Home

Strips

Comments

Sort By:
Feb 24, 2013
@magallanes

I offer that your students code is more efficient in that there are fewer steps for the computer to execute, it is equally as easy to type using ctrl v, and more intuitively obvious so they did not waste time looking for the elegant solution. If you wanted them to do it your way you should have made it 1 - 1000.

For all

Friend of mine told me about his Dad who had to create a random number generator in college back in the days of punch cards. He sequence punched all the numbers in the desired range, threw the box out of a 4 story window, and then collected the cards.
 
 
Feb 24, 2013
Years ago, i give some homework to my students. A simple stuff for example, a countdown from 10 to 1.

for (i=10;i>0;i--) {
print(i);
}

but i was shocked to find that most students answered with:
print(10);
print(9);
print(8);
print(7);
print(6);
print(5);
print(4);
print(3);
print(2);
print(1);

In my experience, the problem is not the capability, specially since most kids are able to solve simple programming task, the problem is that some people are not really trying.
 
 
+47 Rank Up Rank Down
Feb 24, 2013
I have lost to code once, but I stayed alive. Every coder has made crappy code in their lifetime, but the real problem are the people who deliberately make code difficult to read to make themselves "invaluable". Fortunately this is a lot less common now than it was before, but it still happens.
 
 
+69 Rank Up Rank Down
Feb 24, 2013
It's bad enough looking my own code, you know, the stuff I wrote a few years ago when I used to be 'clever'.
 
 
Feb 24, 2013
Inefficiency is only an issue when it matters, which is rarely. Even if a project is performance constrained, it's rare that the inefficiencies in the code-base will align well to the type of performance being optimized for(that would be just too lucky). You can speed optimize a memory constrained application for sport, but it's just for fun at that point.
However, new engineers usually take a while to ramp up to being overloaded like everyone else on the team, so its usually a good use of their time to have them work out some of the kinks other programmers wouldn't have made to start with if they had unlimited time and attention.
 
 
 
Get the new Dilbert app!