Nicht aus der Schweiz? Besuchen Sie lehmanns.de
Bad Programming Practices 101 - Karl Beecher

Bad Programming Practices 101

Become a Better Coder by Learning How (Not) to Program

(Autor)

Buch | Softcover
XXII, 221 Seiten
2018
Apress (Verlag)
978-1-4842-3410-5 (ISBN)
CHF 67,35 inkl. MwSt
  • Versand in 15-20 Tagen
  • Versandkostenfrei
  • Auch auf Rechnung
  • Artikel merken
  • Distills into one book many common practices to avoid (which normally comes from several years of experience), thus giving you a checklist of things you shouldn’t do
  • Explains the fundamentals in a humorous and easy-to-understand way
  • Sources its information from successful software projects and empirical research

This book takes a humorous slant on the programming practice manual by reversing the usual approach: under the pretence of teaching you how to become the world’s worst programmer who generally causes chaos, the book teaches you how to avoid the kind of bad habits that introduce bugs or cause code contributions to be rejected.

Why be a code monkey when you can be a chaos monkey? OK, so you want to become a terrible programmer. You want to write code that gets vigorously rejected in review. You look forward to reading feedback plastered in comments like "WTF???". Even better, you fantasize about your bug-ridden changes sneaking through and causing untold chaos in the codebase. You want to build a reputation as someone who writes creaky, messy, error-prone garbage that frustrates your colleagues.

Bad Programming Practices 101 will help you achieve that goal a whole lot quicker by teaching you an array of bad habits that will allow you to cause maximum chaos.

Alternatively, you could use this book to identify those bad habits and learn to avoid them. The bad practices are organized into topics that form the basis of programming (layout, variables, loops, modules, and so on). It's been remarked that to become a good programmer, you must first write 10,000 lines of bad code to get it all out of your system.

This book is aimed at programmers who have so far written only a small portion of that. By learning about poor programming habits, you will learn good practices. In addition, you will find out the motivation behind each practice, so you can learn why it is considered good and not simply get a list of rules.
  • Become a better coder by learning how (not) to program
  • Choose your tools wisely
  • Think of programming as problem solving
  • Discover the consequences of a program’s appearance and overall structure
  • Explain poor use of variables in programs
  • Avoid bad habits and common mistakes when using conditionals and loops
  • See how poor error-handling makes for unstable programs
  • Sidestep bad practices related specifically to object-oriented programming
  • Mitigate the effects of ineffectual and inadequate bug location and testing

This book is for those who have some practical programming knowledge (can program in at least one programming language), but little or no professional experience, which they would like to quickly build up. They are either still undergoing training in software development, or are at the beginning of their programming career. They have at most 1-2 years of professional experience.

Karl Beecher is a British writer, software developer and teacher based in Berlin, Germany. He specializes in taking meaty, complex ideas and presenting them in ways that are easy to understand.

Chapter 1: Fundamentals of BadnessHow best to approach programming, in particular how to learn it, how to choose your tools wisely, and how tothink of programming as problem solving.ï · Bad ways to learn programmingï · Bad toolingï · Bad ways to approach a solution (or: programming is really problem-solving)Chapter 2: Layout and StructureShow the reader the consequences of a program's appearance and overall structure.ï · Make indentation and spacing poor and inconsistentï · Avoid structured programming, use lots of gotosï · Nest deeply - programmers like solving intricate puzzlesï · Have lots of paths through a subroutineï · Clutter the code with extraneous tokensï · Avoid comments - code should be hard to read!Chapter 3: VariablesExplain poor use of variables in programs.ï · Use obscure names - thinking up meaningful labels isn't worth the effortï · Consider declaration a waste of timeï · Use global variablesï · Thoroughly abuse the type systemChapter 4: ConditionalsDiscuss bad habits and common mistakes when using conditionals.ï · Use long, complex expressionsï · Forget the else clause - the computer will figure it outï · Mix up nominal cases with errors casesï · Make sure the cases overlap or have gapsChapter 5: LoopsDiscuss bad habits and common mistakes when using loops.ï · Make 'em looooong!ï · Give loops lots of exit pointsï · Avoid iterators - loop counters help make code convoluted and insecureï · Infinite loops are funChapter 6: SubroutinesShow the consequences of poorly-written subroutines.ï · Write monolithic programs - after all, someone else will do the maintenanceï · Make subroutines long and complexï · Use lots of local variablesï · Use inconsistent return values to keep your colleagues on their toesChapter 7: Error-handlingExplain how poor error-handling makes for unstable programs.ï · Never check inputs - users don't make mistakesï · Don't handle errors - just assume everything will always go wellï · Don't check for null pointersï · If you must check values, do it as late as possible (a.k.a. defensive programming is for wimps)Chapter 8: ModulesDiscuss bad practices to follow when dividing a large program into pieces.ï · Make modules big and heftyï · Ensure they expose their inner workingsï · Give them rigid designs to prevent others from writing their pesky extensionsï · Make them specific to one problem - why should others benefit from your work?ï · Import all the things!Chapter 9: ObjectsDiscuss bad practices related specifically to object-oriented programming.ï · Expose a class's internals - why should we have secrets?ï · Put unrelated stuff togetherï · Objects are not independent - make them follow ordersï · Keep coupling tightï · Favour deep inheritance hierarchiesï · Avoid polymorphism - abstract code is harder to 'get' than abstract artï · Give classes multiple parents (a.k.a. classes shouldn't reproduce asexually)Chapter 10: Bugs and debuggingShow how to carry out ineffectual and inadequate ways to locate bugs and mitigate their effects.ï · Write really unfriendly error messages - users shouldn't understand them anywayï · Don't discriminate between exception typesï · Litter code with print messagesï · Don't use debug levelsChapter 11: TestingShow how to carry out ineffectual and inadequate testing.ï · Ignore the requirements when testingï · Leave testing until the very endï · Keep code coverage lowï · Testing once is enoughï · Avoid test automation tools

Erscheinungsdatum
Zusatzinfo 15 Illustrations, color
Verlagsort Berkley
Sprache englisch
Maße 178 x 254 mm
Gewicht 475 g
Einbandart kartoniert
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Software Entwicklung Qualität / Testen
Informatik Software Entwicklung Software Projektmanagement
Informatik Theorie / Studium Compilerbau
Schlagworte anti patterns • Best Practices • Coding • Patterns • programming • Software
ISBN-10 1-4842-3410-3 / 1484234103
ISBN-13 978-1-4842-3410-5 / 9781484234105
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
Aus- und Weiterbildung zum ISTQB® Advanced Level Specialist – …

von Manfred Baumgartner; Stefan Gwihs; Richard Seidl …

Buch | Hardcover (2021)
dpunkt (Verlag)
CHF 55,85
Methoden und Techniken für Softwarequalität in der agilen Welt

von Tilo Linz

Buch | Hardcover (2023)
dpunkt (Verlag)
CHF 55,85
Aus- und Weiterbildung zum Certified Tester – Foundation Level nach …

von Andreas Spillner; Tilo Linz

Buch | Hardcover (2024)
dpunkt (Verlag)
CHF 55,85