-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement for the exceptions section #49
Conversation
* Added Documentation of problem domain terms Control-Flow * Added behaviour changes to fail-fast Exceptions * Added naming for exception classes * Added exception in legacy codes
|
clean-abap/CleanABAP.md
Outdated
@@ -365,6 +368,13 @@ so choose names that all of these can relate to without a customized dictionary. | |||
> Read more in _Chapter 2: Meaningful Names: Use Solution Domain Names_ and _[...]: | |||
> Use Problem Domain Names_ of [Robert C. Martin's _Clean Code_]. | |||
|
|||
### Document problem domain terms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree with the content of this section, I wonder whether it makes sense in a clean code guide. This is more a question of communication and documentation between the customers, product owners, solution managers, and architects, than the actual code. Do you have specific examples or incidents in mind where this has been neglected and led to misunderstandings? From my experience, we usually find more than enough explanations in the design documentation, architecture concept documents, scope documents, backlog items, and the application help to get along. SAP even has its own tool SAP Term for defining business terminology.
Removed this section. |
Hi, While some of it makes sense, I am not convinced by this change in the Guide either. The part about naming exceptions is already explained in the example Use sub-classes to enable callers to distinguish error situations and naming is discussed quite a lot in this guide. Perhaps a small comment in the subclass section could be added, or changing the title to "Use appropriately named subclasses...", but a second example is redundant IMHO. The legacy code dependencies part is more controversial for me. I think it would make a nice blog on SCN for some discussion. To me the scenario seems very narrow in scope, and whether to catch or to let dump is very context-driven and subjective. Even in the example scenario I would still catch it. Leaving it out as the example suggests looks like someone forgot, therefore it should get a comment, which goes against Clean Code's "Express yourself in code not comments" principle. I would handle this type of situation in a couple of ways.
(in real life I would use a RAISE method that also reads the SY message information for more clarity). Alternatively go by Dump for totally unrecoverable situations, which I believe is the intent of your example, making it also feel a bit redundant for me. |
* scenario updates * upd * upd * clarify
* Creative commons license it's not code, anyway * Create README.md initial title * Scaffolding (#5) * scaffolding * remove non existing logo * update title * README: additional info for onboarding (#6) * scaffolding #2 (#7) * scaffolding #2 * some first intro content + added VSCode build task * first intro content * Inital diagram Finally got ditaa to work. Plantuml activity diagrams are apparently not supported. Not really convinced yet of the text-based diagrams approach. Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * change font to sans-serif (#9) * introduction, minor changes (#10) * some more notes (#12) * some more notes * some words regarding impact * mention abapgit restrictions/design * update scenarios * add note regarding steampunk * first attempt at best practices Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * small formatting issues (#16) * minor changes (#17) * updates (#23) * update deps * updates * upd * closes #15 * upd * small additions and corrections + some official text on (g)CTS Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * move the static analysis part into the tooling chapter (#25) * move the static analysis part into the tooling chapter * add short abaplint description * show 3 toc levels * updates * upd * small corrections and enhancements on tooling Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * Update README.md (#31) * Update README.md * Update README.md * fix typos Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * add title page logo (#33) * add title page logo * add page numbers * Build timestamp * recommend spellchecker * custom dictionary * add this document section (#32) * add this document section * introduction, sections etc. * remove heading, move related work to new chapter * add related work to index * moved to abstract Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * front page hacks (#34) * update links (#36) * update activity diagram (#35) * update activity diagram * upper case OK * polish scenarios (#37) * should fix #26 , #24 , #14 * needs some more polishing of example for #21 * publish pdf to latest tag (#38) * Update build.yml * Create publish.yml * Update build.yml * Update build.yml * Update publish.yml * dummy, testing (#39) * rename release asset (#40) * mention latest release pdf (#43) * minor changes (#41) * link Gerrit * upd * add todos * upd * minor * upd * update abaplint section * some diagrams * more diagrams * I love diagrams * upd * remove "to" * happy -> happen * Update code_review.adoc (#45) ``todo, wording? remove "qualified" ? Done. `` "gain reputation" -> "developers can actively become more knowledgeable about the codebase" something like that No need to overdo it. Meritocracy is all about reputation. I don't see how anyone could take offence in that. * update url (#46) * related work: add link (#47) * workaround page numbering problem (#52) * adjust headings (#51) * update README.md with automatic build information (#48) * update README.md with automatic build information * Update README.md Co-authored-by: Christoph Pohl <christoph.pohl@sap.com> * abapgit examples (#53) * wip: abapgit examples * abapgit chapter updates * split setup steps in two * scenario updates (#49) * scenario updates * upd * upd * clarify * update deps * minor changes (#54) * name in italics * additional abaplint links * abapGit add note * add link * Move gCTS example to separate section (#56) * fixes from Mike (#58) * README: add "Thanks To" seciton (#57) * check links in build (#59) * check links in build * test * move structure * add link to code review guide in main README.md * prepare latest release links release links should point to SAP/styleguides * use main license * parent license * ignore build and node_modules * Delete LICENSE redundant to ../LICENSE * Update .gitignore moved build and node_modules to top level * README, add AsciiDoc notes * code review improvements * motivation: getting different perspectives * selection: mention central distribution by team leads * add missing space * Automated Review --> Checks * disambiguation of terms VCS, git platforms... Co-authored-by: Lars Hvam <larshp@hotmail.com>
described properly with the following names. | ||
|
||
```ABAP | ||
" The bass-class for all booking faults |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" The bass-class for all booking faults | |
" The base-class for all booking faults |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a small addition to what @pokrakam already wrote:
When implementing code, you can never be sure who will be using it in which context at some point in time. I would argue that a wrapper of legacy functionality can't decide what's managable, unrecoverable, etc.
So to refer to Dump for totally unrecoverable situations and your example: Just because you can't deal with a non-existing log, it doesn't mean none of your consumers can deal with it and try again. And you should at least give them a chance to try, IMHO.
I'll close this pull request because:
|
I write some improvements for: