Why Non-Coders Shouldn't Write Code
jfruh writes "Software firm FreeCause made a bit of a splash with a policy that requires all its employees — including marketers, finance, etc. — to write JavaScript code. And not just 'code to learn basics of what JavaScript can do,' but 'write code that will be used in production.' Phil Johnson, a tech writer and editor who himself once coded for a living, thinks this is nuts, a recipe for miserable workers and substandard code."
function MarketingFunction(originalText)
{
var revisedText = new String(originalText + ", which will help build synergy and increase marketshare.");
return revisedText;
}
What political party do you join when you don't like Bible-thumpers *or* hippies?
While they are at it, perhaps their accounting department should replace the plumbing in their office building, the secretaries should swap the engine in the CEO's car, and let's have the janitors install a new security system. What could possibly go wrong?
sudo make me a sandwich
a recipie for miserable workers and substandard code.
Which is why non-spellers shouldn't spell. Or something
Oh, oh... Executive Officers clean up overflowing toilets. Not so they get an appreciation of what is being done, but for the general entertainment of the rest of us!
I would have hated to get heart surgery from one of their doctors.
What's fun is to write a script that produces a list of non-repeating random numbers. Especially when you don't know what the hell you're doing.
First time around? I made a list by using a random number generator and then going over the numbers already in the array with an if statement in order to make sure that the random number wasn't in the list. Guess how fast that thing ran? Took like a minute and a half just to make a list of 100 non-repeating randomized integers with values from 1 to 100.
Then I talked to one of my internet friends that had more of a clue, as he is an actual programmer. So I was told there was definitely a better way. Not how to find the better way (wasn't his job anyways), just that the code I had was ugly. (Which I expected, since I knew I wasn't that great at it.)
Next time around? Looked more at how arrays work, since it was hinted at. First populated one array with sequential numbers, thus they didn't repeat. Then used a random number generator to pop items from one array to populate another. Result? Random numbers that again didn't repeat, and each time it looped the list of random numbers to choose from got a lot shorter. Waaay faster than the first time around, and it did what I wanted.
Still I suspect it's not ideal from a statistical point of view (in the degree of randomness generated), but it's definitely workable. And it's likely I re-invented the wheel because there's some script library I don't know about. It's uses? Basically to scramble the order of a finite number of things where you don't want repeats. Quizes or card games are the first two things that come to mind.
But my first example shows what's more likely to happen with a non-programmer coding. However if a programmer offers advice or insight, a non-programmer is able to re-do a better version. (Well at least if they understand that there's something wrong to begin with and are willing to work on that.)