|
When I was as Comp.Sci student, one of the professors was really pushing 'descriptive variable names' to the extreme. I happened to look over the shoulder of the brightest guy in our class while he was working on a programming homework: His integer variables were named I00, I01, I02, ..., reals were R00, R01, ... and so on. I was shocked: "Do you really think Prof. C will accept that?"
"Oh, no", he replied, "Before I hand it in to Prof C., I will do a textual substitute, replacing all I01s with 'NumberOfOilCans', all R04s with 'WeightOfEachCanWhenEpty' and so on. But I couldn't possibly work with that kind of names - think of all that extra typing, how long that would take!"
His mental capacity was so that he didn't need any 'descriptive names' - he could easily map from R04 to the concept of WeightOfEachCanWhenEmpty without any visual reminder. Descriptive names are for people with less mental capacity
The only negative thing about his style is that after making his substitutions, the code lines would be 100, maybe 120, maybe 130 characters long. (When substituting, he used really long descriptive names). End-of-line comments would of course end up mis-aligned - but this was in the Fortran days when EOL-comments were non-standard.
|
|
|
|
|
Both are good for code that won't be used ever after. You just gave me a terrible idea: if I'll ever teach, I will make the students work on their code of 2-3 months before. THAT will teach them the importance of code readability
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
When I was teaching computer network software to last-year college students, I made myself the hate object of the year when I organized the group programming assignment in four stages throughout the full semester course: After each stage, each group handed their work over to another group, and were given another group's work as a base for the next stage.
Students hated revealing their own deficiencies to fellow students, and they hated having to struggle with that terrible code written by their completely incomptetent fellow students... Telling them that in a few months, this would be the normal working situation for them didn't really make it.
I have no regrets, even though the students hated me for it. An essential element in learning to code is learning to handle code from other programmers, and to make your own code so good that there is no reason to feel ashamed, no matter who reads it - both in plain readability and in other quality aspects.
|
|
|
|
|
You have ALL my respect! Also, a teacher can be hated for two reason: either he's incompetent or he's evil. Evil teachers are the only ones that really teach anything.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
Yesterday's regex[^]
Geek & Poke has been my favorite "insider" comic strip for a the last year.
The jokes are suprisingly durable - this one is almost three years old, and nothing has changed.
|
|
|
|
|
Ah, Fortran... Where we remember this phrase:
God is Real, unless declared otherwise!!!
|
|
|
|
|
One of my first COBOL instructors would give us an assignment, due in 2 weeks. a couple of us would complete it in the next couple days...
about halfway thru the time-frame... he'd change what he wanted us to do.
We thought he was too dumb to make up his problems ahead of time
little did we realize - he was teaching us what life as a programmer was really about...
|
|
|
|
|
den2k88 wrote:
More obfuscated than THAT? Her brain.
But you already said she was female.
|
|
|
|
|
Yeah, the usual Mars - Venus problem
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
B. Clay Shannon wrote: if something is already as simple as possible, it's impossible to simplify it further.
Which doesn't stop people from trying - I think his point is made.
Peter Wasser
"The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts." - Bertrand Russell
|
|
|
|
|
I think you're simply failing to appreciate that the word 'simple' is simply being used with two distinct, simple meanings; in the first case 'easy to understand or mentally manipulate', in the second 'idiotic', neither of which, incidentally necessarily conforms exactly to your imposed meaning of 'not complex'. In doing so you have highlighted the simple problem with all positivist interpretations of language, simple rigidity!
I am not a number. I am a ... no, wait!
|
|
|
|
|
It's perfectly normal; he's using different inflections of the word.
I.e. If a task is complex, then find the simplest way to handle the complexity -- but don't make the task less complex.
E.g. building a car is a complex task, which has been made simpler and simpler over the years by people applying thought to processes and automation, and by improvements in technology -- but it would be pretty damned stupid to make the task simpler by removing all wheels from the design.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Einstein was the first one without saying to first having believed to make known what some barely understood favets of the cosmic system possessed to the point to anuerism, taking knowledge from demons crashed in the forties in new mexico as an end times means to deceive as knowledge is already simple, but relativity is the idea there is no set right and wrong, just like the serpent said in the garden
|
|
|
|
|
Aaaarrghhh!!!! Not again!
MEDS!!!!!!!!!!!!!!!!!!
|
|
|
|
|
marie915 wrote: but relativity is the idea there is no set right and wrong, just like the
serpent said in the garden
How does one get that from 'sssssssssss'?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
jeron1 wrote: 'sssssssssss' It's all in the variable frequency and intonation of 's'
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Ahh that very well may explain why I failed Serpent in school!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
WTF are you smoking?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I live in the Netherlands, but even the stuff that's legal here doesn't result in people talking the guff you're spouting.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
You know the crap at the end of spam, this guy is the author!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No, he was not. He was merely saying that oversimplyfication is as bad as unneeded complexity.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
B. Clay Shannon wrote: the ending clause is redundant,
Because some people try to make things too simple. Management, for example, when in their simple mind, something should be doable in a day, when it actually takes weeks or months.
But what he's really getting at is the balance between complexity and simplicity. It's the balance we all face as programmers and some of us are totally ignorant of.
VB / Javascript / Ruby / Python / et al. programmer: cut and paste the code
Everyone else: Oh, I'm about to duplicate this code, let me make a function.
VB / Javascript / Ruby / Python / et al. programmer: Wow, look at my cool function, it's 10000 lines long!
Everyone else: Ew, this is getting gross, let me break this apart so it's readable and self-documenting.
And so forth.
Marc
|
|
|
|
|
Quote: “I have only made this letter longer because I have not had the time to make it shorter."
(Letter 16, 1657)”
― Blaise Pascal, The Provincial Letters
Probably Einstein had the same issue
Paulo Gomes
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
—Bill Gates
|
|
|
|
|
He and Yogi Berea hung out together ... a lot, so I'm thinking some entanglement occurred?
Nothing is impossible, we just don't know the way of it yet.
|
|
|
|
|
Something to do with patent law?
|
|
|
|