Skip to content

Comment on Top 6 List of Programming Top Listsparent

Comments

These are wonderful, thank you. What is your rationale for item 6?

  for(a=0;a<aa;a++){
   if(bbb[a]<bbbb[aa]){
    bbb[aa]=bbbb[aaa]
   }else{
    bbbb[aaa]=bbb[aa]
   }
  }
  
I'll be out of jail in 30 days.

The original programmer will be fine once the stitches are removed.

Actually, all kidding aside, yesterday I enhanced a 1700 line program with these variables:

  Cust
  CustCmmts
  CustComments
  DelCmmts
  CustNbr
  DelDate
  Cmmts
  CustID
  Comments
  CustDel
  Del
The variables "Cust", "Cmmts", "Comments", and "Del" should have different names. What are they? I spent half a day just trying to figure out what everything was, one line at a time. You can't globally locate, edit, cut, paste, or change without fucking up everything else. (And please don't ask me to use a fancier IDE. Just name your variables so the next guy doesn't have to suffer.)

Just structure your data so the next guy doesn't have to suffer.

Cust.Name

Cust.Cmmt (commit?)

Cust.Comments

Cust.Number

etc.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.