|
When I was learning to program (a long, long time ago), I was told that untidy code always contained more errors that tidy, well laid out code. If the programmer was too lazy to lay the code out neatly, what else was he too lazy to do.
|
|
|
|
|
My experience shows that to be a universal truth. Every programmer I've ever met who wrote sloppily formatted code had sloppy logic as well. Unfortunately, the reverse is not true. Tidy code does not guarantee tidy logic.
In the terms our logician friends would use, tidy source code is a necessary but not sufficient condition to have tidy logic.
Software Zen: delete this;
|
|
|
|
|
My experience has been that people who write messy code, don't really understand it --- they mostly just copy'n'pasted it from somewhere, and then hacked at it until it (sorta) worked. It looks like a black box, because they view it as a black box: data goes in, magic happens, data comes out and no one knows why.
Recently, I attended a lecture on functional programming in C#. Most of the audience was rather quiet and I was the only one asking questions. One line of code was like this:
return b => a => a + b;
After a bit of prodding, I got him to rewrite it as:
return (b)=>
{
return (a) => { return a + b; }
}
And suddenly, the room came alive where finally everyone realized what the line was doing.
Truth,
James
|
|
|
|
|
And then he realized that you write code for people, not compilers. compilers don't care (in most cases) about format, but good format aid in the understanding of the code by others, and yourself when you have to debug or maintain it.
|
|
|
|
|
When I allowed Microsoft's SQL tools to re-interpret my code, they not only shoved it into as few lines as possible, but actually pulled apart the Boolean logic in moderately complex WHERE clauses and rewrote them with unnecessary repetitions of elements interspersed with extra AND's and/or OR's so that I couldn't even understand my own logic. Lots of guys like to use Microsoft's code generation tools, resulting in code like that, but they don't even try to look at the code, they just work from the code generation tool. So, maybe what you're seeing isn't even coded directly by a human. What I did is to take over the code, always formatted and saved it in a way that bypassed the code generation crap, and explained to the other developers how my code worked and why it was best to keep it formatted like I did, or they would never be able to understand and modify it.
|
|
|
|
|
I always format my SQL, because I maintain the master in .txt or .sql files. Unfortunately, many systems reformat it for you - SQL Server among them. Which is otherwise far better than Oracle or DB/2.
That is one of the things I detest about most IDEs (especially Visual Studio). They reformat my carefully formatted code.
|
|
|
|
|
I just downloaded this[^] which is free and integrates into VS and SSMS and appears to work pretty well.
You can configure VS/SSMS to do some basic formatting but I also keep everything as re-usable scripts stored in TFS.
|
|
|
|
|
...and it made me laugh, anyway: Copy The Reindeer[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
But it says "copy", not "copy and paste"!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yeah, that really made me laugh too!
All they achieved was copying the empty grid on the right onto itself.
It's obvious that ctrl+c must be written into the left grid and ctrl+v must go into the right grid where it already is.
And that's the whole of the joke really.
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Oh look, a VB programmer in the making!
Marc
|
|
|
|
|
I always thought the zenith of PETA's inanity was reached when the sent a letter to Ben and Jerry (the ice-cream guys) asking them to make ice-cream from human breast milk [^] ... but, now:
PETA is now suing photographer David Slater on behalf of the Macaque Monkey, Naruto, even though the U.S. Copyright Office has ruled that animals cannot have status as "authors." [^]. According to Slater, Naruto absconded with his camera, and took the picture "on his own" (sounds of snickering).
The legal remedy PETA seeks is: "the ability to license the monkey selfies (wait, there’s more than one?) and use the proceeds “solely for the benefit of Naruto, his community of crested macaques, and preservation of their habitat.”
One wonders if the infinitely-sensitive (what are they "on" ? I want some) minds of PETA will come up with something in the future like suing the U.N. for reparations for the trillions of earthworms used for bait.
I wish I could make-up stories like this one
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
Even if Naruto could have status as the "author" of the "selfie", I can see no reasonable grounds under which PETA should have any access to his money... the Macaque himself, yes - there is some good justification there (sort-of), but a third party that have never been involved? Go forth and multiply...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
If the monkey wishes to persue this, he should take it up in court. PETA should stick to naked models.
|
|
|
|
|
Is PETA then going to provide tax consultation services to the monkey since his/her income will be taxable I 'm sure? Once it seems that have to spend money on behalf of an animal rather than on their own self-aggrandizement they will probably decide the problem is that people keep monkeys as pets, this is wrong, so murder all the monkeys - in the same way they apparently mass murder puppies, kittens and other stray domesticated animals.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
"The History of the Decline and Fall of the Roman Empire".
When I read about nonsense like this I think the book title should read:
"The History of the Decline and Fall of the West in the 21st century due to it being overrun by a bunch of loony liberals with nothing better to do because they are entitled morons".
|
|
|
|
|
Well that's actually pretty much the reason for the D & F of the RE if you take Gibbon's rather bonkers theory out of the equation. Hah, Gibbon. I only just realised!
|
|
|
|
|
Quote: [A]s long as mankind shall continue to bestow more liberal applause on their destroyers than on their benefactors, the thirst of military glory will ever be the vice of the most exalted characters.
Nailed it.
|
|
|
|
|
The most irritating aspect of issues like this, is how much they continue to be treated as 'serious' by lawyers and the courts.
|
|
|
|
|
Richard MacCutchan wrote: The most irritating aspect of issues like this, is how much they continue to be treated as 'serious' by lawyers and the courts.
because... [^]
|
|
|
|
|
Did the monkey ask for and receive Slater's permission before using his equipment to take the photograph.
I imagine that if the answer is 'no', to the above question, the monkey does not have much of a case in a copyright law suit.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
If PETA really things animals should have all the same legal rights and protections as humans, they should immediately turn themselves in to police for mass murder[^].
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Meanwhile animals are scared, suffering, dying and going extinct, but I see how selfies are hot and get priority...
|
|
|
|
|
PETA is a self promotion agency, has nothing to do with animals in reality.
|
|
|
|
|
BillWoodruff wrote: sent a letter to Ben and Jerry (the ice-cream guys) asking them to make ice-cream from human breast milk Um, how is treating a human like a cow somehow better than treating a cow like a cow?
Jeremy Falcon
|
|
|
|