SlideShare a Scribd company logo
1 of 93
Download to read offline
Conjuring Demons
The Power of the True Name
Benjamin Wolf
@ichaos1985
Photo by kellepics on Pixabay
Conjuring Demons - The Power of the True Name
„Reading
good code is like
reading a
good book.“
Benjamin Wolf

Senior Consultant
at INNOQ
• Trainer
• Develops applications in Java / .NET
• Loves software quality
• Coffee snob
Conjuring Demons - The Power of the True Name
There are only two hard things in
Computer Science: cache invalidation
and naming things.
— Phil Karlton
Foto © INNOQ
Conjuring Demons - The Power of the True Name
Motivation
Thank you for using <AppName>! We’re always
working hard to make the app faster and better
than ever. Update to the most recent version to
get the best experience of <AppName>.
Love the app? Rate us! Your feedback helps us to
continuously improve <AppName>.
Conjuring Demons - The Power of the True Name
INNOQ /
Comic by Abstruse Goose on http://abstrusegoose.com
Conjuring Demons - The Power of the True NameINNOQ /
Digression
—
Code Comments
Photo by Luca Bravo on Unsplash
Exception up = new Exception("Something is wrong.");
throw up; // ha ha
Conjuring Demons - The Power of the True Name
Comment by benmatth on stackoverflow.com
// When I wrote this, only God and I understood
// what I was doing
// Now, God only knows
Conjuring Demons - The Power of the True Name
Comment by johnc on stackoverflow.com
// somedev1 - 6/7/2002 Adding temporary tracking of Login
// somedev2 - 5/22/2007 Temporary my ass
Conjuring Demons - The Power of the True Name
Comment by Rohit on stackoverflow.com
// Magic. Do not touch.
Conjuring Demons - The Power of the True Name
Comment by Jason Sundram on stackoverflow.com
// private instance variable for storing age
public static int age;
Conjuring Demons - The Power of the True Name
Comment by Mia Clarke on stackoverflow.com
try {
...
} finally { // should never happen
...
}
Conjuring Demons - The Power of the True Name
Comment by gedevan on stackoverflow.com
// it was hard to write
// so it should be hard to read
Conjuring Demons - The Power of the True Name
Comment by Neil Kodner on stackoverflow.com
// John! If you'll svn remove this once more,
// I'll shut you, for God's sake!
// That piece of code is not “something strange”!
// That is THE AUTH VALIDATION.
Conjuring Demons - The Power of the True Name
Comment by matiouchkine on stackoverflow.com
options.BatchSize = 300; // Madness? THIS IS SPARTA!
Conjuring Demons - The Power of the True Name
Comment by Jumpinjackie on stackoverflow.com
long long ago; /* in a galaxy far far away */
Conjuring Demons - The Power of the True Name
Comment by Juliano on stackoverflow.com
// Dear maintainer:
//
// Once you are done trying to ‘optimise’ this routine,
// and have realised what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42
//
Conjuring Demons - The Power of the True Name
Comment by Jens Roland on stackoverflow.com
/*
* You may think you know what the following code does.
* But you don’t. Trust me.
* Fiddle with it, and you’ll spend many a sleepless
* night cursing the moment you thought you’d be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/
Conjuring Demons - The Power of the True Name
Comment by PoppaVein on stackoverflow.com
Conjuring Demons - The Power of the True NameINNOQ /
Commit Messages
Photo by Nathan Lemon on Unsplash
Source: https://xkcd.com/1296/
• Some bugs fixed
• Fixed bugs
• Some little changes
• Changed a little
• Small fixes
• Fixes XYZ
• F*CK! Had to revert!
Conjuring Demons - The Power of the True Name
Common Commit Messages
Photo by Emily Morter on Unsplash
INNOQ / Conjuring Demons - The Power of the True Name
Style
Photo by Nafinia Putra on Unsplash
INNOQ / Conjuring Demons - The Power of the True Name
Content
INNOQ / Conjuring Demons - The Power of the True Name
Photo by Sindre Aalberg on Unsplash
Metadata
INNOQ / Conjuring Demons - The Power of the True Name
Photo by Jingyi Wang on Unsplash
Conjuring Demons - The Power of the True NameINNOQ /
7 rules for commit messages
Photo by Marvin Ronsdorf on Unsplash
Conjuring Demons - The Power of the True Name
1. 

Separate subject from

body with a blank line
Source: Chris Beams on chris.beams.io
Conjuring Demons - The Power of the True Name
2.

Limit the subject line 

to 50 characters
Source: Chris Beams on chris.beams.io
Conjuring Demons - The Power of the True Name
3. 

Capitalize the subject line
Source: Chris Beams on chris.beams.io
Conjuring Demons - The Power of the True Name
4.

Do not end the subject

line with a period
Source: Chris Beams on chris.beams.io
Conjuring Demons - The Power of the True Name
5. 

Use the imperative mood

in the subject line
Source: Chris Beams on chris.beams.io
Conjuring Demons - The Power of the True Name
6.

Wrap the body at

72 characters
Source: Chris Beams on chris.beams.io
Conjuring Demons - The Power of the True Name
7. 

Use the body to explain

what and why vs. how
Source: Chris Beams on chris.beams.io
Summarize changes in around 50 characters or less
More detailed explanatory text, if necessary. Wrap it to
about 72 characters or so. In some contexts, the first
line is treated as the subject of the commit and the rest
of the text as the body. The blank line separating the
summary from the body is critical (unless you omit the
body entirely); various tools like ‘log’, ‘shortlog’ and
‘rebase’ can get confused if you run the two together.
Explain the problem that this commit is solving. Focus on
why you are making this change as opposed to how (the
code explains that). Are there side effects or other
unintuitive consequences of this change? Here's the place
to explain them.
Source: Chris Beams on chris.beams.io
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet,
preceded by a single space, with blank lines in between,
but conventions vary here
If you use an issue tracker, put references to them at
the bottom, like this:
Resolves: #123
See also: #456, #789
Source: Chris Beams on chris.beams.io
What is the purpose of a commit message?
Conjuring Demons - The Power of the True Name
What is the purpose of a commit message?
NOT stating the obvious
NOT babbling
Conjuring Demons - The Power of the True Name
What is the purpose of a commit message?
NOT stating the obvious
NOT babbling
Summarizing the essential
Explaining the motive in detail
Conjuring Demons - The Power of the True Name
@gitlost



@git_commit_m
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
Source: andrewvos.com/2011/02/21/amount-of-profanity-in-git-commit-messages-per-programming-language
Conjuring Demons - The Power of the True NameINNOQ /
Naming
Photo by Jared Rice on Unsplash
What has
been seen
cannot be
un-seen
Conjuring Demons - The Power of the True NameINNOQ /
Naming
Photo by Quentin Dr on Unsplash
What has
been seen
cannot be
un-seen
Conjuring Demons - The Power of the True NameINNOQ /
Naming
Photo by Paul on Unsplash
What has
been seen
cannot be
un-seen
private int a;
private int b;
private int c;
Conjuring Demons - The Power of the True Name
SetUserInterfaceControlState(false);
Conjuring Demons - The Power of the True Name
SetAutoUpdateOnOff(“1”);
Conjuring Demons - The Power of the True Name
// Yap, that is a string! (╯°□° ╯ ┻━┻
ActReqInter4ProcUp(string aHaMesCo)

{ 

...
Conjuring Demons - The Power of the True Name
ActivateRequiredInterfaceForProcessUpdate

(string aHashedMessageContent)

{ 

...
Conjuring Demons - The Power of the True Name
ReadThisFromFileIfRequiredOrDoNotReadAndChangeOrder
(false);
Conjuring Demons - The Power of the True Name
void SetSimpleIntValue(int aValue)
{
}
Conjuring Demons - The Power of the True Name
// check borders
// calculate two other values with rocket science math
// Trigger UI Update
// request information from server
_myMember = aValue;
Conjuring Demons - The Power of the True NameINNOQ /
Amazing examples for
awesome names
Photo by Blake Richard Verdoorn on Unsplash
Think.
Conjuring Demons - The Power of the True Name
Think twice!
Conjuring Demons - The Power of the True Name
Write your code.
Conjuring Demons - The Power of the True Name
Think again!
Conjuring Demons - The Power of the True Name
Refactor your code.
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
Think different!
Use Concrete Names
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
bool ServerCanStart();
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
bool CanListenOnPort();
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
ourRemoteServerApp.exe --run_locally
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
ourRemoteServerApp.exe --extra_logging
Source: „The Art of Readable Code“
Attach Details
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
var elapsed = Date.GetTime() - start;
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
var elapsedMilliSeconds = Date.GetTime() - start;
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
void printUserComment(string comment);
Conjuring Demons - The Power of the True Name
void printUserComment(string unescapedComment);
Prevent Ambiguity
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
Results = Database.AllObjects.Filter(“year <= 2011”);
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
Results = Database.AllObjects.Select(“year <= 2011”);
Results = Database.AllObjects.Exclude(“year <= 2011”);
Source: „The Art of Readable Code“
Naming Booleans
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
bool read_password = true;
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
bool need_password = true;
bool user_is_authenticated = false;
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
bool disable_ssl = true;
Source: „The Art of Readable Code“
Conjuring Demons - The Power of the True Name
bool use_ssl = false;
Source: „The Art of Readable Code“
Match expectations of users
(of your code)
Conjuring Demons - The Power of the True Name
Conjuring Demons - The Power of the True Name
var myVal = myObject.GetValue();
Conjuring Demons - The Power of the True Name
myObject.SetValue(myVal);
Conjuring Demons - The Power of the True Name
Setters are evil
Conjuring Demons - The Power of the True Name
class CookieJar
{
void SetCookies(int aCookieCount) { ... }
...
}
See more: https://github.com/joyclark/cookie-jar
Conjuring Demons - The Power of the True Name
myJar.SetCookies(myJar.GetCookies() - 3);
Conjuring Demons - The Power of the True Name
It’s all about the context...
Conjuring Demons - The Power of the True Name
class CookieJar
{
TakeCookies(int aCookieCount) { ... }
AddNewCookies(int aNewCookies) { ... }
...
}
Conjuring Demons - The Power of the True Name
myJar.TakeCookies(3);
Conjuring Demons - The Power of the True Name
Setters are evil
89
• Many examples and ideas that are valid
in .NET
• Good value
• Covers code style, comments,
naming, testing, error handling, object-
oriented and functional design best
practices. 
• Overall about beautiful code
• Unique before/after approach with bad and
clean code side-by-side.
Conjuring Demons - The Power of the True Name
https://pragprog.com/book/javacomp/java-by-comparison
Promotion on our own account
Conjuring Demons
The Power of the True Name
Benjamin Wolf
@ichaos1985
Photo by kellepics on Pixabay
• Cover page, last page: Photo by kellepics on Pixabay, https://pixabay.com/en/fantasy-forest-creepy-woman-bird-2846786/
• Page 7, „O.P.C“, comic by Abstruse Goose on http://abstrusegoose.com/432, CC BY-NC 3.0 US
• Page 8, “Code on a laptop screen“, Photo by Luca Bravo on Unsplash, https://unsplash.com/photos/XJXWbfSo2f0
• Page 21, “Best Made Cup“, Photo by Nathan Lemon on Unsplash, https://unsplash.com/photos/FBiKcUw_sQw
• Page 22, “Git Commit“, https://xkcd.com/1296/ / https://imgs.xkcd.com/comics/git_commit_2x.png, CC BY-SA 2.5
• Page 24, “Where is the Love“, Photo by Emily Morter on Unsplash, https://unsplash.com/photos/8xAA0f9yQnE
• Page 25, “Latte art and laptop“, Photo by Nafinia Putra on Unsplash, https://unsplash.com/photos/k7BdNN6TwFo
• Page 26, “Round storage“, Photo by Sindre Aalberg on Unsplash, https://unsplash.com/photos/mEr7U5yfYt8
• Page 27, “Network everything“, Photo by Jingyi Wang on Unsplash, https://unsplash.com/photos/avKPLHgASBM
• Page 28, “run track from the air“, Photo by Marvin Ronsdorf on Unsplash, https://unsplash.com/photos/sX9_SHIqH4w
• Page 43, “Github profanity“, andrewvos.com/2011/02/21/amount-of-profanity-in-git-commit-messages-per-programming-
language
Conjuring Demons - The Power of the True Name
Resources (images)
• Page 44, “Monkey“, Photo by Jared Rice on Unsplash, https://unsplash.com/photos/O6DUoIl6NWA
• Page 45, “Oh my God !“, Photo by Quentin Dr on Unsplash, https://unsplash.com/photos/mUtlJ4yumzg
• Page 46, “Green Cat Eyes“, Photo by Paul on Unsplash, https://unsplash.com/photos/OvLBv6F6DGE
• Page 54, “Latte in a coffee machine“, Photo by Blake Richard Verdoorn on Unsplash, https://unsplash.com/photos/gM-
RfQsZK98
• Page 89, “Java by Comparison“, https://pragprog.com/book/javacomp/java-by-comparison
Conjuring Demons - The Power of the True Name
Resources (images)
• Page 9, “Throw Up“, Comment by benmatth on stackoverflow.com, https://stackoverflow.com/a/549611, CC BY-SA 3.0
• Page 10, “God Knows“, Comment by johnc on stackoverflow.com, https://stackoverflow.com/a/316233, CC BY-SA 3.0
• Page 11, “Temporary“, Comment by Rohit on stackoverflow.com, https://stackoverflow.com/a/778275, CC BY-SA 3.0
• Page 12, “Magic“, Comment by Jason Sundram on stackoverflow.com, https://stackoverflow.com/a/185106, CC BY-SA 3.0
• Page 13, “Public“, Comment by Mia Clarke on stackoverflow.com, https://stackoverflow.com/a/694644, CC BY-SA 3.0
• Page 14, “Finally“, Comment by gedevan on stackoverflow.com, https://stackoverflow.com/a/192823, CC BY-SA 3.0
• Page 15, “Hard“, Comment by Neil Kodner on stackoverflow.com, https://stackoverflow.com/a/789811, CC BY-SA 3.0
• Page 16, “Auth Validation“, Comment by matiouchkine on stackoverflow.com, https://stackoverflow.com/a/618976, CC BY-SA
3.0
• Page 17, “Sparta“, Comment by Jumpinjackie on stackoverflow.com, https://stackoverflow.com/a/331424, CC BY-SA 3.0
• Page 18, “Galaxy“, Comment by Juliano on stackoverflow.com, https://stackoverflow.com/a/615845, CC BY-SA 3.0
• Page 19, “Hours wasted“, Comment by Jens Roland on stackoverflow.com, https://stackoverflow.com/a/482129, CC BY-SA 3.0
• Page 20, “You do not“, Comment by PoppaVein on stackoverflow.com, https://stackoverflow.com/a/189859, CC BY-SA 3.0
• Pages 29-37: „How to write a commit message“, Chris Beams on https://chris.beams.io/posts/git-commit/, CC BY-SA 4.0
• Pages 62-79: Boswell, Dustin; Foucher, Trevor (2011). The Art of Readable Code. O'Reilly Media.
Conjuring Demons - The Power of the True Name
Resources (examples)

More Related Content

More from DevDay Dresden

Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...
Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...
Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...DevDay Dresden
 
Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...
Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...
Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...DevDay Dresden
 
Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...
Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...
Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...DevDay Dresden
 
Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...
Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...
Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...DevDay Dresden
 
Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...
Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...
Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...DevDay Dresden
 
Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101
Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101
Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101DevDay Dresden
 
Dev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-Teams
Dev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-TeamsDev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-Teams
Dev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-TeamsDevDay Dresden
 
Dev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den Radverkehr
Dev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den RadverkehrDev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den Radverkehr
Dev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den RadverkehrDevDay Dresden
 
Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...
Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...
Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...DevDay Dresden
 
Dev Day 2019: Martin Schurz - Manual Work Is A Bug!
Dev Day 2019: Martin Schurz - Manual Work Is A Bug!Dev Day 2019: Martin Schurz - Manual Work Is A Bug!
Dev Day 2019: Martin Schurz - Manual Work Is A Bug!DevDay Dresden
 
Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“
Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“
Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“DevDay Dresden
 
Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"
Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"
Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"DevDay Dresden
 
Dev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die SeeleDev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die SeeleDevDay Dresden
 
Dev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AG
Dev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AGDev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AG
Dev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AGDevDay Dresden
 
DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...
DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...
DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...DevDay Dresden
 
DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...
DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...
DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...DevDay Dresden
 
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...DevDay Dresden
 
DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...
DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...
DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...DevDay Dresden
 
DevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuern
DevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuernDevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuern
DevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuernDevDay Dresden
 
DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...
DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...
DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...DevDay Dresden
 

More from DevDay Dresden (20)

Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...
Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...
Dev Day 2019: Nathan Mattes – Kommunikation ist wichtig, scheiße wichtig und ...
 
Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...
Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...
Dev Day 2019: Stephan Birnbaum – Die Glaskugel hat ausgedient, wir machen Sof...
 
Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...
Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...
Dev Day 2019: Markus Winand – Die Mutter aller Abfragesprachen: SQL im 21. Ja...
 
Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...
Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...
Dev Day 2019: Kay Grebenstein – Wie wir müssen das noch testen? - design for ...
 
Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...
Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...
Dev Day 2019: Kathrin Friedrich/Michael Kunze – Design better together - Styl...
 
Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101
Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101
Dev Day 2019: Benjamin Wolf – "Some fixes" - Commit Message 101
 
Dev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-Teams
Dev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-TeamsDev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-Teams
Dev Day 2019: Lucas Fiedler – DevOps-Dashboard: Transparenz für DevOps-Teams
 
Dev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den Radverkehr
Dev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den RadverkehrDev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den Radverkehr
Dev Day 2019: Ulrich Deiters – Offene Daten und IT-Lösungen für den Radverkehr
 
Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...
Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...
Dev Day 2019: Alexander Lichter - JAMstack - Eine neuartige Webanwendungs-Arc...
 
Dev Day 2019: Martin Schurz - Manual Work Is A Bug!
Dev Day 2019: Martin Schurz - Manual Work Is A Bug!Dev Day 2019: Martin Schurz - Manual Work Is A Bug!
Dev Day 2019: Martin Schurz - Manual Work Is A Bug!
 
Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“
Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“
Dev Day 2019: Stefan Schleyer: How to build an cloud-based IoT application“
 
Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"
Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"
Dev Day 2019: Mirko Zeibig – "Hallo " <> "Elixir"
 
Dev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die SeeleDev Day 2019: Mike Sperber – Software Design für die Seele
Dev Day 2019: Mike Sperber – Software Design für die Seele
 
Dev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AG
Dev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AGDev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AG
Dev Day 2019: Steve Lohn – 5 Jahre CD-Pipeline @ Deutsche Post AG
 
DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...
DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...
DevDay 2018: Mark Keinhörster - Skalierbare OCR Pipelines mit Python, Tensorf...
 
DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...
DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...
DevDay 2018: Martin Schurz - Aufbau einer Monitoringlösung für moderne Applik...
 
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
DevDay 2018: Ulrich Deiters - Offline First - kein Netz, kein Fehler, zufried...
 
DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...
DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...
DevDay 2017: Ralf Knobloch - "Einfacher leben mit DevOps bei der MMS !!" - De...
 
DevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuern
DevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuernDevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuern
DevDay 2017: Marc Rohlfs - Maven-Projekte mit Gitflow über Jenkins steuern
 
DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...
DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...
DevDay 2017: Andreas Reischuck - Benutzbare & Sichere Kommunikation für die v...
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

DevDay 2018: Benjamin Wolf - Conjuring Demons: Die Macht des wahren Namens

  • 1. Conjuring Demons The Power of the True Name Benjamin Wolf @ichaos1985 Photo by kellepics on Pixabay
  • 2. Conjuring Demons - The Power of the True Name „Reading good code is like reading a good book.“ Benjamin Wolf
 Senior Consultant at INNOQ • Trainer • Develops applications in Java / .NET • Loves software quality • Coffee snob
  • 3. Conjuring Demons - The Power of the True Name There are only two hard things in Computer Science: cache invalidation and naming things. — Phil Karlton Foto © INNOQ
  • 4. Conjuring Demons - The Power of the True Name Motivation
  • 5.
  • 6. Thank you for using <AppName>! We’re always working hard to make the app faster and better than ever. Update to the most recent version to get the best experience of <AppName>. Love the app? Rate us! Your feedback helps us to continuously improve <AppName>. Conjuring Demons - The Power of the True Name
  • 7. INNOQ / Comic by Abstruse Goose on http://abstrusegoose.com
  • 8. Conjuring Demons - The Power of the True NameINNOQ / Digression — Code Comments Photo by Luca Bravo on Unsplash
  • 9. Exception up = new Exception("Something is wrong."); throw up; // ha ha Conjuring Demons - The Power of the True Name Comment by benmatth on stackoverflow.com
  • 10. // When I wrote this, only God and I understood // what I was doing // Now, God only knows Conjuring Demons - The Power of the True Name Comment by johnc on stackoverflow.com
  • 11. // somedev1 - 6/7/2002 Adding temporary tracking of Login // somedev2 - 5/22/2007 Temporary my ass Conjuring Demons - The Power of the True Name Comment by Rohit on stackoverflow.com
  • 12. // Magic. Do not touch. Conjuring Demons - The Power of the True Name Comment by Jason Sundram on stackoverflow.com
  • 13. // private instance variable for storing age public static int age; Conjuring Demons - The Power of the True Name Comment by Mia Clarke on stackoverflow.com
  • 14. try { ... } finally { // should never happen ... } Conjuring Demons - The Power of the True Name Comment by gedevan on stackoverflow.com
  • 15. // it was hard to write // so it should be hard to read Conjuring Demons - The Power of the True Name Comment by Neil Kodner on stackoverflow.com
  • 16. // John! If you'll svn remove this once more, // I'll shut you, for God's sake! // That piece of code is not “something strange”! // That is THE AUTH VALIDATION. Conjuring Demons - The Power of the True Name Comment by matiouchkine on stackoverflow.com
  • 17. options.BatchSize = 300; // Madness? THIS IS SPARTA! Conjuring Demons - The Power of the True Name Comment by Jumpinjackie on stackoverflow.com
  • 18. long long ago; /* in a galaxy far far away */ Conjuring Demons - The Power of the True Name Comment by Juliano on stackoverflow.com
  • 19. // Dear maintainer: // // Once you are done trying to ‘optimise’ this routine, // and have realised what a terrible mistake that was, // please increment the following counter as a warning // to the next guy: // // total_hours_wasted_here = 42 // Conjuring Demons - The Power of the True Name Comment by Jens Roland on stackoverflow.com
  • 20. /* * You may think you know what the following code does. * But you don’t. Trust me. * Fiddle with it, and you’ll spend many a sleepless * night cursing the moment you thought you’d be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ Conjuring Demons - The Power of the True Name Comment by PoppaVein on stackoverflow.com
  • 21. Conjuring Demons - The Power of the True NameINNOQ / Commit Messages Photo by Nathan Lemon on Unsplash
  • 23. • Some bugs fixed • Fixed bugs • Some little changes • Changed a little • Small fixes • Fixes XYZ • F*CK! Had to revert! Conjuring Demons - The Power of the True Name Common Commit Messages
  • 24. Photo by Emily Morter on Unsplash INNOQ / Conjuring Demons - The Power of the True Name
  • 25. Style Photo by Nafinia Putra on Unsplash INNOQ / Conjuring Demons - The Power of the True Name
  • 26. Content INNOQ / Conjuring Demons - The Power of the True Name Photo by Sindre Aalberg on Unsplash
  • 27. Metadata INNOQ / Conjuring Demons - The Power of the True Name Photo by Jingyi Wang on Unsplash
  • 28. Conjuring Demons - The Power of the True NameINNOQ / 7 rules for commit messages Photo by Marvin Ronsdorf on Unsplash
  • 29. Conjuring Demons - The Power of the True Name 1. 
 Separate subject from
 body with a blank line Source: Chris Beams on chris.beams.io
  • 30. Conjuring Demons - The Power of the True Name 2.
 Limit the subject line 
 to 50 characters Source: Chris Beams on chris.beams.io
  • 31. Conjuring Demons - The Power of the True Name 3. 
 Capitalize the subject line Source: Chris Beams on chris.beams.io
  • 32. Conjuring Demons - The Power of the True Name 4.
 Do not end the subject
 line with a period Source: Chris Beams on chris.beams.io
  • 33. Conjuring Demons - The Power of the True Name 5. 
 Use the imperative mood
 in the subject line Source: Chris Beams on chris.beams.io
  • 34. Conjuring Demons - The Power of the True Name 6.
 Wrap the body at
 72 characters Source: Chris Beams on chris.beams.io
  • 35. Conjuring Demons - The Power of the True Name 7. 
 Use the body to explain
 what and why vs. how Source: Chris Beams on chris.beams.io
  • 36. Summarize changes in around 50 characters or less More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of the commit and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); various tools like ‘log’, ‘shortlog’ and ‘rebase’ can get confused if you run the two together. Explain the problem that this commit is solving. Focus on why you are making this change as opposed to how (the code explains that). Are there side effects or other unintuitive consequences of this change? Here's the place to explain them. Source: Chris Beams on chris.beams.io
  • 37. Further paragraphs come after blank lines. - Bullet points are okay, too - Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here If you use an issue tracker, put references to them at the bottom, like this: Resolves: #123 See also: #456, #789 Source: Chris Beams on chris.beams.io
  • 38.
  • 39. What is the purpose of a commit message? Conjuring Demons - The Power of the True Name
  • 40. What is the purpose of a commit message? NOT stating the obvious NOT babbling Conjuring Demons - The Power of the True Name
  • 41. What is the purpose of a commit message? NOT stating the obvious NOT babbling Summarizing the essential Explaining the motive in detail Conjuring Demons - The Power of the True Name
  • 43. Conjuring Demons - The Power of the True Name Source: andrewvos.com/2011/02/21/amount-of-profanity-in-git-commit-messages-per-programming-language
  • 44. Conjuring Demons - The Power of the True NameINNOQ / Naming Photo by Jared Rice on Unsplash What has been seen cannot be un-seen
  • 45. Conjuring Demons - The Power of the True NameINNOQ / Naming Photo by Quentin Dr on Unsplash What has been seen cannot be un-seen
  • 46. Conjuring Demons - The Power of the True NameINNOQ / Naming Photo by Paul on Unsplash What has been seen cannot be un-seen
  • 47. private int a; private int b; private int c; Conjuring Demons - The Power of the True Name
  • 49. SetAutoUpdateOnOff(“1”); Conjuring Demons - The Power of the True Name // Yap, that is a string! (╯°□° ╯ ┻━┻
  • 50. ActReqInter4ProcUp(string aHaMesCo)
 { 
 ... Conjuring Demons - The Power of the True Name
  • 53. void SetSimpleIntValue(int aValue) { } Conjuring Demons - The Power of the True Name // check borders // calculate two other values with rocket science math // Trigger UI Update // request information from server _myMember = aValue;
  • 54. Conjuring Demons - The Power of the True NameINNOQ / Amazing examples for awesome names Photo by Blake Richard Verdoorn on Unsplash
  • 55. Think. Conjuring Demons - The Power of the True Name
  • 56. Think twice! Conjuring Demons - The Power of the True Name
  • 57. Write your code. Conjuring Demons - The Power of the True Name
  • 58. Think again! Conjuring Demons - The Power of the True Name
  • 59. Refactor your code. Conjuring Demons - The Power of the True Name
  • 60. Conjuring Demons - The Power of the True Name Think different!
  • 61. Use Concrete Names Conjuring Demons - The Power of the True Name
  • 62. Conjuring Demons - The Power of the True Name bool ServerCanStart(); Source: „The Art of Readable Code“
  • 63. Conjuring Demons - The Power of the True Name bool CanListenOnPort(); Source: „The Art of Readable Code“
  • 64. Conjuring Demons - The Power of the True Name ourRemoteServerApp.exe --run_locally Source: „The Art of Readable Code“
  • 65. Conjuring Demons - The Power of the True Name ourRemoteServerApp.exe --extra_logging Source: „The Art of Readable Code“
  • 66. Attach Details Conjuring Demons - The Power of the True Name
  • 67. Conjuring Demons - The Power of the True Name var elapsed = Date.GetTime() - start; Source: „The Art of Readable Code“
  • 68. Conjuring Demons - The Power of the True Name var elapsedMilliSeconds = Date.GetTime() - start; Source: „The Art of Readable Code“
  • 69. Conjuring Demons - The Power of the True Name void printUserComment(string comment);
  • 70. Conjuring Demons - The Power of the True Name void printUserComment(string unescapedComment);
  • 71. Prevent Ambiguity Conjuring Demons - The Power of the True Name
  • 72. Conjuring Demons - The Power of the True Name Results = Database.AllObjects.Filter(“year <= 2011”); Source: „The Art of Readable Code“
  • 73. Conjuring Demons - The Power of the True Name Results = Database.AllObjects.Select(“year <= 2011”); Results = Database.AllObjects.Exclude(“year <= 2011”); Source: „The Art of Readable Code“
  • 74. Naming Booleans Conjuring Demons - The Power of the True Name
  • 75. Conjuring Demons - The Power of the True Name bool read_password = true; Source: „The Art of Readable Code“
  • 76. Conjuring Demons - The Power of the True Name bool need_password = true; bool user_is_authenticated = false; Source: „The Art of Readable Code“
  • 77. Conjuring Demons - The Power of the True Name bool disable_ssl = true; Source: „The Art of Readable Code“
  • 78. Conjuring Demons - The Power of the True Name bool use_ssl = false; Source: „The Art of Readable Code“
  • 79. Match expectations of users (of your code) Conjuring Demons - The Power of the True Name
  • 80. Conjuring Demons - The Power of the True Name var myVal = myObject.GetValue();
  • 81. Conjuring Demons - The Power of the True Name myObject.SetValue(myVal);
  • 82. Conjuring Demons - The Power of the True Name Setters are evil
  • 83. Conjuring Demons - The Power of the True Name class CookieJar { void SetCookies(int aCookieCount) { ... } ... } See more: https://github.com/joyclark/cookie-jar
  • 84. Conjuring Demons - The Power of the True Name myJar.SetCookies(myJar.GetCookies() - 3);
  • 85. Conjuring Demons - The Power of the True Name It’s all about the context...
  • 86. Conjuring Demons - The Power of the True Name class CookieJar { TakeCookies(int aCookieCount) { ... } AddNewCookies(int aNewCookies) { ... } ... }
  • 87. Conjuring Demons - The Power of the True Name myJar.TakeCookies(3);
  • 88. Conjuring Demons - The Power of the True Name Setters are evil
  • 89. 89 • Many examples and ideas that are valid in .NET • Good value • Covers code style, comments, naming, testing, error handling, object- oriented and functional design best practices.  • Overall about beautiful code • Unique before/after approach with bad and clean code side-by-side. Conjuring Demons - The Power of the True Name https://pragprog.com/book/javacomp/java-by-comparison Promotion on our own account
  • 90. Conjuring Demons The Power of the True Name Benjamin Wolf @ichaos1985 Photo by kellepics on Pixabay
  • 91. • Cover page, last page: Photo by kellepics on Pixabay, https://pixabay.com/en/fantasy-forest-creepy-woman-bird-2846786/ • Page 7, „O.P.C“, comic by Abstruse Goose on http://abstrusegoose.com/432, CC BY-NC 3.0 US • Page 8, “Code on a laptop screen“, Photo by Luca Bravo on Unsplash, https://unsplash.com/photos/XJXWbfSo2f0 • Page 21, “Best Made Cup“, Photo by Nathan Lemon on Unsplash, https://unsplash.com/photos/FBiKcUw_sQw • Page 22, “Git Commit“, https://xkcd.com/1296/ / https://imgs.xkcd.com/comics/git_commit_2x.png, CC BY-SA 2.5 • Page 24, “Where is the Love“, Photo by Emily Morter on Unsplash, https://unsplash.com/photos/8xAA0f9yQnE • Page 25, “Latte art and laptop“, Photo by Nafinia Putra on Unsplash, https://unsplash.com/photos/k7BdNN6TwFo • Page 26, “Round storage“, Photo by Sindre Aalberg on Unsplash, https://unsplash.com/photos/mEr7U5yfYt8 • Page 27, “Network everything“, Photo by Jingyi Wang on Unsplash, https://unsplash.com/photos/avKPLHgASBM • Page 28, “run track from the air“, Photo by Marvin Ronsdorf on Unsplash, https://unsplash.com/photos/sX9_SHIqH4w • Page 43, “Github profanity“, andrewvos.com/2011/02/21/amount-of-profanity-in-git-commit-messages-per-programming- language Conjuring Demons - The Power of the True Name Resources (images)
  • 92. • Page 44, “Monkey“, Photo by Jared Rice on Unsplash, https://unsplash.com/photos/O6DUoIl6NWA • Page 45, “Oh my God !“, Photo by Quentin Dr on Unsplash, https://unsplash.com/photos/mUtlJ4yumzg • Page 46, “Green Cat Eyes“, Photo by Paul on Unsplash, https://unsplash.com/photos/OvLBv6F6DGE • Page 54, “Latte in a coffee machine“, Photo by Blake Richard Verdoorn on Unsplash, https://unsplash.com/photos/gM- RfQsZK98 • Page 89, “Java by Comparison“, https://pragprog.com/book/javacomp/java-by-comparison Conjuring Demons - The Power of the True Name Resources (images)
  • 93. • Page 9, “Throw Up“, Comment by benmatth on stackoverflow.com, https://stackoverflow.com/a/549611, CC BY-SA 3.0 • Page 10, “God Knows“, Comment by johnc on stackoverflow.com, https://stackoverflow.com/a/316233, CC BY-SA 3.0 • Page 11, “Temporary“, Comment by Rohit on stackoverflow.com, https://stackoverflow.com/a/778275, CC BY-SA 3.0 • Page 12, “Magic“, Comment by Jason Sundram on stackoverflow.com, https://stackoverflow.com/a/185106, CC BY-SA 3.0 • Page 13, “Public“, Comment by Mia Clarke on stackoverflow.com, https://stackoverflow.com/a/694644, CC BY-SA 3.0 • Page 14, “Finally“, Comment by gedevan on stackoverflow.com, https://stackoverflow.com/a/192823, CC BY-SA 3.0 • Page 15, “Hard“, Comment by Neil Kodner on stackoverflow.com, https://stackoverflow.com/a/789811, CC BY-SA 3.0 • Page 16, “Auth Validation“, Comment by matiouchkine on stackoverflow.com, https://stackoverflow.com/a/618976, CC BY-SA 3.0 • Page 17, “Sparta“, Comment by Jumpinjackie on stackoverflow.com, https://stackoverflow.com/a/331424, CC BY-SA 3.0 • Page 18, “Galaxy“, Comment by Juliano on stackoverflow.com, https://stackoverflow.com/a/615845, CC BY-SA 3.0 • Page 19, “Hours wasted“, Comment by Jens Roland on stackoverflow.com, https://stackoverflow.com/a/482129, CC BY-SA 3.0 • Page 20, “You do not“, Comment by PoppaVein on stackoverflow.com, https://stackoverflow.com/a/189859, CC BY-SA 3.0 • Pages 29-37: „How to write a commit message“, Chris Beams on https://chris.beams.io/posts/git-commit/, CC BY-SA 4.0 • Pages 62-79: Boswell, Dustin; Foucher, Trevor (2011). The Art of Readable Code. O'Reilly Media. Conjuring Demons - The Power of the True Name Resources (examples)