Thursday, October 6, 2011

Software Development's Biggest Mistakes

The most common and most detrimental mistakes that seem to occur again and again.  I'm not saying you need to "master" all of these, but you should be familiar enough with all of these aspects to be able to explain them to your grandmother.  Hopefully you strive to apply these in your daily work.

Basics_Hero

  • Not Understanding Programming Basics
    • Decision Branching (If / Then / Else / Select /Switch / Cond / ElseIf, etc.)
    • Boolean Logic (And, Not, Or, etc.)
    • Functions, Sub-Routines, Lambda Expressions
    • Iteration and Recursion (While, Do, For, Apply, Mapcar, etc.)
    • Variable Scopes (local, private, global, public, etc.)
    • Not understanding all of the Data Types for a given language
    • Not understanding String Behaviors (for given language)
    • Not understanding File Streams
    • Ignoring ERROR/EXCEPTION HANDLING (Gaa!!!!  GD IT!!!)
    • Not Documenting source code (it ain't just for others, it helps you as well, especially when you go back to fix something a year later)
    • Modularity / Code Reuse
  • Not Understanding Databases
    • Ignorant of Table Structures and Data Types
    • Ignorant of Constraints
    • Normalization !!!!!!!!!  God damn it!  Normalize your fucking tables!!!
    • Views and Stored Procedures
    • Using MS-Access to build applications (GD IT!!!!!!!  teeth gnashing)
    • Excel is NOT a database!
  • Not Understanding User Context
    • Assuming users have administrator rights (kill the developer on sight!)
    • Not understanding Multi-user / Shared computer environments
    • Not understanding Terminal Services / Server Shared environments
    • Not understanding Service / Proxy accounts
  • Not Understanding the Installation (and Uninstall) Process
    • Not following the documented guidelines (TechNet, MSDN)
    • Not providing a Silent/Unattended installation option
    • Not providing a Silent/Unattended Uninstallation option
    • Not using MSI-based installers (Windows only) - a setup bootstrap is ok, but building your own installer is just stupid as shit.  And stop with the no-name bullshit setup packagers, just buy Wise or InstallShield and do it right, mmmkay?
  • Ignoring Cohesion and Consistency
    • Installation scatters crap all over the place, rather than keeping it collocated logically
    • Application stores state data in too many locations (registry and files, and ...)
    • Forgetting to REFACTOR your code (using the rollback method, where you revisit project "A" after finishing product "C" to apply what you learned since)
    • Ignoring common naming conventions.  Name your code files, functions, variables, registry keys, event entries, database names, tables, views, procedures, services and everything CONSISTENTLY!  If you don't care enough to make your code look like it works as an integral army of awesomeness, what else don't you care about?  Making it work properly?!
  • Becoming Locked into One Language
    • Learning and Using ONE language is like eating with only a fork.  No spoon or knife?  It's like trying to rebuild a car engine with only a screw driver.  Languages are tools.  The more you learn and apply, the broader your skills, understanding and wisdom about methods, approaches, and quality.
    • Never assume an "old" language has nothing to offer.  There are still plenty of situations where an "old" BAT script will work more efficiently than VBscript or PowerShell.  Where an INI file will work more efficiently than an XML file or a database table query.
    • Arguing in defense of ONE language above all others.   Within the context of a particular project or contract, this is acceptable.  However, in the global scope of programming, this is the sign of a complete idiot.
    • Buying books on one language before reading books on general programming practices and theory is just stupid.  This is like reading a book on 1001 ways to use a fork to eat.  Why not read up on eating, then learn about the tools, that way you understand why you're using the fork, and not just how to use it.

What can you do about it?

  • Read Books on Programming topics (not just an "Unleashed" book on your favorite language)
  • Read some useful Blogs about programming
  • Go to School (a university, not a for-profit tech school)
  • Join MSDN or TechNet or something similar (and use it!)
  • Meet with other programmers - ESPECIALLY programmers that work with other languages, database engineers and administrators, network engineers, etc.

No comments: