Friday, September 23, 2011

Writing Unmaintainable Code...

A treatise on how to write programs that are very difficult to maintain.  As any experienced programmer will recognize, the techniques are commonly found in code that wasn't (presumably) intentionally written to be unmaintainable.  Even though it might as well have been.  An example:
Creative Miss-spelling
If you must use descriptive variable and function names, misspell them. By misspelling in some function and variable names, and spelling it correctly in others (such as SetPintleOpening SetPintalClosing) we effectively negate the use of grep or IDE search techniques. It works amazingly well. Add an international flavor by spelling tory or tori in different theatres/theaters.
But do go read the whole thing...

A USB Typewriter?

This may be an elaborate hoax, but it sure looks real.  The tagline looks like a joke, though:
The USBTypewriter™ is a new and groundbreaking innovation in the field of obsolescence.
The claim is that this fellow has developed a circuit board that can be attached to any old-fashioned mechanical typewriter, converting it to a USB keyboard input device.  From a technical perspective, this is completely plausible.  From just about any other perspective, it's some degree of crazy (and leaning toward very crazy).  Here's the company page, the Etsy storefront, and below is their marketing video.




I'm pretty much speechless...

Faster Than Light?

More than likely you heard the news yesterday: scientists at CERN have made the results of an experiment public – and those results seem to indicate that a beam of neutrinos traveled between two locations at a speed greater than the speed of light.

If verified, this is a remarkable result that turns much of modern physics on its head.  It's as if someone discovered that one plus one doesn't always equal two.

Probably in the end it will turn out there was some flaw in the experiment – but maybe not.  After all, it's a fine group of scientists who performed the experiment repeatedly, and got the same very unexpected results every time.  More here, here, and here...

Thursday, September 22, 2011

Email from My Mother...

I received the following email from my mother this morning:
To save the economy, on September 27, 2011, the government will start deporting old people (instead of illegals) in order to Lower Social Security and Medicare costs.

Old people are easier to catch and will not remember how to get back home.

I started crying when I thought of you.

RUN, YOU OLD BUZZARD, RUN!
Does your mother call you an “old buzzard”?

Trello Upate...

I posted very briefly about Trello last week.  I've been using it ever since to keep track of my personal “to do” list, and so far it's proved to be the single most usable such implementation I've run across.  For a developer, the checklist feature is absolutely perfect – I can plan out all the little steps involved for a new feature I'm adding, and then run through them.  I can add or delete or reorder these steps as I go.  I can attach screenshots and documents willy-nilly.  I have yet to run into something that I want to do, but cannot.

Nice job, Fog Creek!

Richard Feynman...

Long-time readers will already know that Dr. Feynman is one of my personal heroes.  I recently ran across something I'd read years ago – his appendix to the Rogers Commission report on the Challenger disaster, containing personal observations.  It's a masterpiece in its entirety, but I'd completely forgotten the last sentence:
For a successful technology, reality must take precedence over public relations, for nature cannot be fooled.
The man had a real talent for cutting through the clutter and crap that more ordinary thinkers get distracted by.  Awesome...

Tuesday, September 20, 2011

No Words Required...


Benford's Law and the Greek Debt Crisis...

We could have had early warning of the Greek debt crisis...

Clever Analysis...

I've read about this famous little bit of WWII analysis before, and then read a bit more about Dr. Wald on the web.  It's an interesting story...

Shakespeare...

I'm not sure where this originated, but it's a great presentation of a bunch of English expressions still in common use that actually originated with the bard: Shakespeare.  It's rather stunning just how much influence a single writer had.  Click to enlarge, and enjoy!

Even More SSH Tricks...

Here.

A Quintet of Moons...

Cassini is still hard at work in the Saturnian system, returning scads of good science data every day.  The photo at right (click to enlarge, as always) was taken recently, and shows five moons of Saturn all in one shot.  From left to right: Janus, Pandora, Enceladus, Mimas, and half of Rhea.  Awesome!

Geek Humor...

Math joke:
“An infinite number of mathematicians walk into a bar. The first one tells the bartender he wants a beer. The second one says he wants half a beer. The third one says he wants a fourth of a beer. The bartender puts two beers on the bar and says “You guys need to learn your limits.”
Posted by Les Jones.  More jokes in the comments...

Sunday, September 18, 2011

OMG!

A whole new meaning for OMG!

Via my mom, both the photo at right and the story below...
I was eating lunch on the 20th of February with my 7 year-old granddaughter and I asked her, "What day is tomorrow?"

She said, ‘It's President's Day!’ (She is a smart kid.)

I asked, ‘What does President's Day mean?’ I was waiting for something about Washington or Lincoln ... etc.

She replied, ‘President's Day is when President Obama steps out of the White House and if he sees his shadow we have one more year of unemployment.’

You know, it hurts when hot coffee spurts out your nose...

The Sun...

In recent years, the quality of the solar images scientists can capture has gone up dramatically.  The one at right shows the edge of a sunspot.  Often these amazing images have been taken from satellites, but the one at right was taken from a ground-based telescope, using several sophisticated adaptive optical systems and some digital post-processing. 

Via APOD, of course...

Saturday, September 17, 2011

The Sad Farmer...

Via my mom:
A farmer was selling his peaches door to door. He knocked on a door and a shapely 30-something woman dressed in a very sheer negligee answered the door. He raised his basket to show her the peaches, then asked, "Would you like to buy some peaches?"

She pulled the top of the negligee to one side and asked, "Are they as firm as this"?

He nodded his head and said, "Yes ma'am," and a little tear ran from his eye.

Then she pulled the other side of her negligee off asking, "Are they nice and pink like this?"

The farmer said, "Yes," and a tear came from the other eye.

Then she unbuttoned the bottom of her negligee and asked, "Are they as fuzzy as this?"

He again said, "Yes," and broke down crying.

She asked, "Why on earth are you crying?"

Drying his eyes he replied, "The drought got my corn, the flood got my soy beans, a tornado leveled my barn, I voted for Obama and now I think I'm gonna get screwed out of my peaches.

The Job Opening...

Via reader Simon M., who saw this on Facebook:
A guy walked into the local welfare office to pick up his check.

He marched straight up to the counter and said, "Hi.. You know... I just
hate drawing welfare. I'd really rather have a job."

The social worker behind the counter said, "Your timing is excellent. We just got a job opening from a very wealthy old man who wants a Chauffeur and bodyguard for his beautiful daughter. You'll have to drive around in his 2011 Mercedes-Benz CL, and he will supply all of your clothes.

"Because of the long hours, meals will be provided. You'll also be expected to escort the daughter on her overseas holiday trips. This is rather awkward to say but you will also have as part of your job assignment to satisfy her sexual urges as the daughter is in her mid-20's and has a rather strong sex drive."

The guy, just plain wide-eyed, said, "You're bullshittin' me!"

The social worker said, "Yeah, well... You started it."
How does one measure the seriousness of an unemployed person's commitment to finding a job?   In particular, one question that begs to be answered: to what extent does the amount and duration of unemployment benefits affect the willingness of unemployed people to seek and take a new job?  These questions are very challenging to answer, as there are so many variables involved.  Nevertheless, the evidence seems to suggest that the more unemployment benefits pay, and the longer they're paid, the longer unemployed people are willing to remain unemployed.  The timing of job acceptance in the first link above is particularly telling to me.

I don't have good answers for all this.  I'm certainly not advocating the elimination of all jobless benefits – there are definitely people out there who can't find a job at all, and without the benefits they won't be able to purchase even the basic necessities of life.  I am saying something else, though: that the nature of our unemployment safety net deserves close study and (probably) some kind of adjustment.  On the evidence at hand, taxpayers are financing the voluntary unemployment of an interesting fraction of the unemployed, and that just ain't right...

Akin's Laws of Spacecraft Design...

Via reader Eric J., who points out that some of them are applicable to software design as well.  I'll add that many of them are applicable to any kind of engineering – certainly any kind of engineering I've been involved with (electrical, software, optical, mechanical, thermal, and civil)...

  1. Engineering is done with numbers. Analysis without numbers is only an opinion.
  2. To design a spacecraft right takes an infinite amount of effort. This is why it's a good idea to design them to operate when some things are wrong.
  3. Design is an iterative process. The necessary number of iterations is one more than the number you have currently done. This is true at any point in time.
  4. Your best design efforts will inevitably wind up being useless in the final design. Learn to live with the disappointment.
  5. (Miller's Law) Three points determine a curve.
  6. (Mar's Law) Everything is linear if plotted log-log with a fat magic marker.
  7. At the start of any design effort, the person who most wants to be team leader is least likely to be capable of it.
  8. In nature, the optimum is almost always in the middle somewhere. Distrust assertions that the optimum is at an extreme point.
  9. Not having all the information you need is never a satisfactory excuse for not starting the analysis.
  10. When in doubt, estimate. In an emergency, guess. But be sure to go back and clean up the mess when the real numbers come along.
  11. Sometimes, the fastest way to get to the end is to throw everything out and start over.
  12. There is never a single right solution. There are always multiple wrong ones, though.
  13. Design is based on requirements. There's no justification for designing something one bit "better" than the requirements dictate.
  14. (Edison's Law) "Better" is the enemy of "good".
  15. (Shea's Law) The ability to improve a design occurs primarily at the interfaces. This is also the prime location for screwing it up.
  16. The previous people who did a similar analysis did not have a direct pipeline to the wisdom of the ages. There is therefore no reason to believe their analysis over yours. There is especially no reason to present their analysis as yours.
  17. The fact that an analysis appears in print has no relationship to the likelihood of its being correct.
  18. Past experience is excellent for providing a reality check. Too much reality can doom an otherwise worthwhile design, though.
  19. The odds are greatly against you being immensely smarter than everyone else in the field. If your analysis says your terminal velocity is twice the speed of light, you may have invented warp drive, but the chances are a lot better that you've screwed up.
  20. A bad design with a good presentation is doomed eventually. A good design with a bad presentation is doomed immediately.
  21. (Larrabee's Law) Half of everything you hear in a classroom is crap. Education is figuring out which half is which.
  22. When in doubt, document. (Documentation requirements will reach a maximum shortly after the termination of a program.)
  23. The schedule you develop will seem like a complete work of fiction up until the time your customer fires you for not meeting it.
  24. It's called a "Work Breakdown Structure" because the Work remaining will grow until you have a Breakdown, unless you enforce some Structure on it.
  25. (Bowden's Law) Following a testing failure, it's always possible to refine the analysis to show that you really had negative margins all along.
  26. (Montemerlo's Law) Don't do nuthin' dumb.
  27. (Varsi's Law) Schedules only move in one direction.
  28. (Ranger's Law) There ain't no such thing as a free launch.
  29. (von Tiesenhausen's Law of Program Management) To get an accurate estimate of final program requirements, multiply the initial time estimates by pi, and slide the decimal point on the cost estimates one place to the right.
  30. (von Tiesenhausen's Law of Engineering Design) If you want to have a maximum effect on the design of a new engineering system, learn to draw. Engineers always wind up designing the vehicle to look like the initial artist's concept.
  31. (Mo's Law of Evolutionary Development) You can't get to the moon by climbing successively taller trees.
  32. (Atkin's Law of Demonstrations) When the hardware is working perfectly, the really important visitors don't show up.
  33. Space is a completely unforgiving environment. If you screw up the engineering, somebody dies (and there's no partial credit because most of the analysis was right...)
Original source is Dr. David Akin of the University of Maryland.