|
why your code is so hard to understand[^] - a short article on the whys and wherefores of readable maintainable code.
Quote: In the end it boils down to this: as a programmer your goal is to construct the simplest possible semantic model that would solve your problem. Translate that semantic model as closely as possible into a syntactic model (code) and provide as many clues as possible so that whomever* looks at your code after you can re-create the same semantic model you originally had in mind.
*Pro tip - this will be you but older and more tired.
|
|
|
|
|
Duncan Edwards Jones wrote: simplest possible semantic model
Duncan Edwards Jones wrote: provide as many clues as possible
Ah, good, no Linq.
P.S. Understanding is in the eye of the beholder.
modified 4-Nov-14 23:21pm.
|
|
|
|
|
PIEBALDconsult wrote: Ah, good, no Linq Personally, I think Linq can make the code much more understandable.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
Then you must not be an old dog.
|
|
|
|
|
Actually, been doing programming for 30+ years. So, yeah, an old dog.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
PIEBALDconsult wrote: Ah, good, no Linq. I'm happy with it; sorted a list today containing Tuple<int, string> , with the string containing a "X (Y)", sorted on Y (asc), ThenBy X (asc).
Tucked away in a single method - feel free to replace the black box with your own bubblesort/quicksort
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Wise words, indeed. Thanks for the link!
/ravi
|
|
|
|
|
|
Duncan Edwards Jones wrote: whomever looks at your code
Aaargh!
Someone needs a visit from "Grandma Nasty".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yup - it was a direct quote from the article. A [sic] would be appropriate.
|
|
|
|
|
"My own personal opinion is that time is a human construct" “Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.”
|
|
|
|
|
Neat!...I've always jokingly maintained that there is no such thing as time...it's cool to see that it changes with gravity.
|
|
|
|
|
Unless it run by Stardate, it can be canned with the metric system.
|
|
|
|
|
Quote: People assume that time is a strict progression of cause to effect, but actually from a non-linear, non-subjective viewpoint it’s more like a big ball of wibbly wobbly timey wimey stuff.
|
|
|
|
|
A "non-subjective" viewpoint on time...is that time, as seen from the outside?
|
|
|
|
|
You're just not thinking fourth-dimensionally!
|
|
|
|
|
Time varies with gravity? I think there was a Swiss patent clerk who has prior art on that idea.
|
|
|
|
|
But he had not enough gravity to change the time - one stone creates to little of it.
|
|
|
|
|
He got some relatives to help.
|
|
|
|
|
Fat lot of good it did to him.
He didn't have the sense to patent the idea despite working at the Patent Office!
PS. The scientist (Leo Szilard) who thought of the chain reaction did take out a patent on it. It was pretty much confiscated by the British government during World War II.
|
|
|
|
|
Now I understand why I'm so forgetful these days but still can run like the wind... my head is just aging faster than my feet. I ought to perform more headstands.
|
|
|
|
|
A two-stage attack could allow spies to sneak secrets out of the most sensitive buildings, even when the targeted computer system is not connected to any network, researchers from Ben-Gurion University of the Negev in Israel stated in an academic paper describing the refinement of an existing attack. "FM - no static at all"
All these 'attacks' that start with, "assumes that an attacker has already compromised the targeted system" make me sad. C'mon people, try harder!
|
|
|
|
|
For years Enterprise Java has been a synonym for Application Servers. Deployment and operations of the Application Servers has changed little over the years – while the APIs have adapted to new paradigms and competitive programming models were introduced. Time to rethink this part of the traditional enterprise stack, too. They were buried under a pile of configuration XML files.
|
|
|
|
|
Making short-term decisions about technology investment is relatively easy; trying to work out how IT will develop over the next decade is much harder. "Prediction is very difficult, especially about the future."
|
|
|
|
|
The new Microsoft: Azure CTO Mark Russinovich pursues a compelling vision -- enabled by Docker, Linux, and Google. The Russ and Gu show continues
|
|
|
|