View Single Post
  #1   Spotlight this post!  
Unread 01-25-2011, 09:18 PM
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Bad Programming Practices

I'm noticing a disturbing trend here. While the code being shared is great, the actual programming isn't.

The majority of code here is barely commented, if at all. This is a poor practice. Well commented code is easier to read, easier to understand, and easier to debug. The more complicated the code, the more comments it should have. The examples provided by FRC Java are especially bad. The CircleTracker and Dashboard examples are extremely difficult to interpret without cross referencing them across multiple documents scattered all over the web.

Think about it: one of the advantages to Java is that classes are reusable. But two years from now how reusable is it if the original programmer has left and the new one now has to spend hours, or sometimes days, to figure out how the old stuff works? In many cases the old, hard to read stuff will get scrapped, and the new programmer will invent the wheel all over again.

I've been in college courses where it was a requirement to comment every single line. I've always thought that was a bit excessive, but in the courses I teach if the purpose of a code segment isn't completely obvious it better be commented so I can understand what was intended, if the student intends on getting a decent grade

I strongly urge you to take a look at your programming habits and try to improve them. Lets work on making things easier for the people who come after us, so they can concentrate on enhancing and improving our work rather than having to rewrite it.
Reply With Quote