12
jdreg95
9y

I help first year Computer Science students at my uni. In the first few weeks I reviewed someone's code to find he had 253 variables called var1, var2, var3 and so forth. The even worse part: he made the same if-else structures for every variable without using a loop.

if (var1 == something) {
//huge chunk of code here
}
else if (var1 == something) {
}
else {
}

... var2... var3

The funniest thing about this is that we had a discussion about this, because he claimed this was the right way to solve his problem.

Comments
  • 1
    Also, his file was 4.5k lines long. Manually written.
  • 0
    lol didn't he read about arrays?
  • 1
    It is first year, people don't know much when they start out
  • 0
    In my first year CS class, we weren't allowed to use anything he hadn't taught "because it's cheating." So this was the only way to do things until he taught arrays half way through class.

    It was awful.
  • 0
    hope this child learn about arrays ......unless he would take all of the memory available in the work... 😂😂😂
Add Comment