⊙ AntiQuark

Truth, Beauty, Charm, Strange

2005/06/29

Funny Hungarian Notation Joke

From a conversation at Cyrus' Blather:
I think Hungarian notation is great. In fact, it should be used for everything, not just code development. For instance, see how much clearer things are if we prefix all nouns with a 'n', verbs with a 'v', adverbs with a 'd', and adjectives with a 'j'. Vdoesn't nthis vlook jbetter?

Nthat's dnot dreally jenough, though. Jplural nnouns vshould dreally vhave an nindicator, "pl". plnsubjects vshould vhave a "sbj" and sbjplnobjects vshould vhave a "obj" nprefix. Nwe vcan vuse "tr" for jtransitive nverbs, and trvuse "int" for jintransitive nverbs. Jour plndocuments vwill dthen vbe jmuch jclearer.
Now THAT'S comedy!

For those of you who've neven been assaulted by the idiocy of HN, it's basically a naming convention for variables in programming. The idea is that the type of the variable is attached to the name as an abbreviation. For example, if you have an pointer to an unsigned int named MyAge, then you'd have to prepend the initals pui to get puiMyAge.

HN is a relic from an era where compilers didn't give a hoot about types, and would let you assign anything to anything without complaining. These days, with quality languages like C++, the compiler bitches loudly if you try to fit a square peg into a round hole.

Some other Hungarian Notation Links:
Wikipedia Page on HN
A humorous example of Hungarian notation is this example:
a_crszkvc30LastNameCol : constant reference function argument, holding contents of a database column of type varchar(30) called LastName that was part of the table's primary key

The Good, The Bad and The Ugly
Some interesting points
Hungarian notation is, when all is said and done, a commenting technique. And the one great law of comments is that they lie. Comments are not syntax checked, there is nothing forcing them to be accurate. And so, as the code undergoes change during schedule crunches, the comments become less and less accurate.

The same happens with hungarian notation. When the type of a variable changes, it is not likely that you are going to hunt through all the code and change all occurrences of its name. Especially during the schedule crunch. Thus, the variables name will become a lie.

MSDN: Hungarian Notation
A 1999 paper by the inventor Simyoni, although it had been around for about a decade by then.

Simonyi has moved onto bigger things since then. His current idea is generative programming. All you need, he says, is a system where the customer writes the spec, and that spec is automatically converted to bugless software.

He doesn't say it outright, but it seems that the point is to get rid of software developers. In the process of coding, he says that programmers take a good spec and and put it through
the funhouse mirror of software coding, [where] it becomes all but unrecognizable: thousand times fatter, disjointed, foreign.
That reminds me of this Alan Perlis epigram:
When someone says "I want a programming language in which I need only say what I wish done," give him a lollipop.
Oh yeah, also in the same article Simonyi gripes about automated scheduling:
The scheduling program for the airline takes many thousand times more memory than what I believe it should be. Hence the software represents complexity that is many thousand times greater than what I believe the problem is.
Dummy. Someone should tell him that scheduling is NP-complete -- the difficulty of the problem increases exponentially with the number of elements; there is no easy way to do it. (And if you do find an easy way, someone will give you a million dollars.) I can't believe that guy was Microsoft's Chief Software Architect at one time. On second thought, I take that back; it makes perfect sense.

2005/06/28

ExoComments

Sometimes I'm amazed by now flexible and programmable the intarweb is.

I've always noticed that BoingBoing doesn't allow comments. (Well, they allow other weblogs to link to them and then comment, which is a pretty slackassed and self-serving workaround if you ask me.) I thought, "hey, there must be a way to create a bookmarklet that will let you combine Haloscan comments with BoingBoing."

I came up with this, a bookmarklet I call "ExoComment" because it lets you comment on a page from outside of the page.

Drag the following link to your toolbar, or right click on it and add it to your favorites. It seems to work with Mozilla, Firefox and Internet Explorer.

ExoComment


Once it's installed, just go to a page, then click on ExoComment in your toolbar. A Haloscan window will pop up and let you post your comment. ExoComments are page-oriented, so if you want to comment on a particular item in a page, you have to open the permalink for that item, then comment on that.

It's a hack, but it seemed to work for all of the pages I tried it on. If Haloscan changes their internals, it'll stop working though. They also might get pissed off and cancel my account. Who knows, give a try anyways... it's rilly kEwL!

2005/06/26

Cranks and Brain Damage

For the longest time, I really liked cranks and crackpots. I'd read their pages on the internet, I'd follow their conversations in Usenet. I even corresponded with a few, and tried, really really hard, to scream some sense into them.

Of course, I failed. No matter how sound your arguments are, you can never win with a crank. Regardless of what you tell them or show them, they are incapable (totally, absolutely, UTTERLY incapable) of comprehending the possibility that their belief might be wrong.

I've often pondered why cranks act the way they do. Are they joking, trying to be funny? Are they insane? Are they pathological contrarians? Are they liars? What?

This month's American Scientist has a book review that hints that cranks might actually be brain damaged.

Here's a quote from Brain Fiction: Self-Deception and the Riddle of Confabulation:
The confabulation syndromes, Hirstein suggests, reflect "knowledge deficits." Confabulators suffer from a derailment of processes by which we ascertain our beliefs about the world. Their brains produce fast and loose hypotheses but, crucially, fail to check them for accuracy. Instead, confabulators experience a "pathological certainty" that whatever springs to mind is simply true, despite overwhelming evidence to the contrary. Their inability to cross-check their beliefs blocks them from acknowledging how deeply flawed their claims are; accordingly, they can't perceive or even conceive their own deficits.
Yep, those symptoms sound pretty crankish to me. (The author thinks that confabulation is caused by problems in the orbitofrontal cortext.)

I stopped arguing with cranks long ago, but if, by some irritating turn of events, I ever get dragged into a crank-argument, I wont bother with logic. I'll just calmly explain to them, "YOUR MIND IS F--KED, MAN!" and leave it at that.

Adventures with an Ice Pick
Speaking of the frontal lobes, here's a short history of the lobotomy. The lobotomy inventor, Walter Freeman, used an ice pick to carry out his gruesome procedure:
People often fainted when watching Walter Freeman at his peak in the late 1940s and early 1950s. Even the eminent Dr Edwin Zabriskie, a 74 year old who had been involved in hand-to-hand fighting in the First World War and was a clinical professor of neurology, was observed to crumple on to the carpet at the sight of Freeman in action.

Rotten.com: Lobotomy
Here's another lobotomy page that's a bit more stomach-turning. (But aren't all the pages at rotten.com stomach-turning?)

2005/06/23

Knuthlu

More Knuth...

First Publication
Knuth's first paper was published in Mad magazine. (This is a repeat blog entry from many months ago.)

FAQ
A frequently asked question (relatively speaking) from one of my cow-orkers:

Q: I thought that Knuth was this squid-headed monster in one of H.P. Lovecraft's novels.

A: I don't know who this Lovecraft fellow is you're talking about, but I'm sure you're mistaking Knuth with Knuthlu. Project Knuthlu was a top-secret experiment by the Genetics department at Stanford University. The goal was to combine the DNA of the smartest cephalopod (the octopus) with that of the smartest mammal (Knuth).

The resulting organism exceeded the experimenters expectations. Within days, Knuthlu was counting on its tentacles in binary up to 255. Later, when connected to a neurally-activated speech synthesizer, it clearly stated "I INK, THEREFORE I AM."

Before the experiment could be halted, Knuthlu escaped at night. The scientists were able to trace a slimy trail that crossed the campus and led to the mighty Stanford River. The current whereabouts of Knuthlu is unknown. One theory is that it is rallying the denizens of the deep, preparing to wreak bloody havoc on mankind as revenge for overfishing and oceanic pollution.

Another theory is that Knuthlu is a mere hoax. The following photograph (which has been examined and declared authentic by experts) casts doubt on that hypothesis.


The only known image of Knuthlu.

2005/06/21

KnuthMania

A pile of Knuth links from the backlog...


Home page of Sean Barrett, dysfunctional programmer
Someone's hard-earned KnuthBucks. Knuth gives a $2.56 reward (that's a hexadecimal dollar) for every error found in his books or software. (image here)


Knuth's first analysis of an algorithm
Thanks to the web, everybody can now have easy access to an original of Don Knuth's NOTES ON "OPEN" ADDRESSING .


Breakfast with Knuth
Two guys have breakfast with Knuth and live to tell about it.

CV
Read it and gawk. It's 34 pages long.


Here's the one about Don Knuth.
A cartoon that's only funny if you're familiar with Knuth's writings. (via)

This is Knuth 3:16
One of Knuth's books, 3:16 Bible Texts Illuminated, is a tour of the Bible that looks only at Chapter 3, Verse 16 of each book. Knuth 3:16 is a humorous parody page from thousands of years in the future, in which Knuth's life and philosophy is reconstructed by looking at chapter 3, verse 16 of each of his books.

S'Karaoke Halloween Party
Gallery of a Halloween Karaoke party at which Knuth sang. Sadly, there are no audio files.

TeX the Lion
Some pics of Knuth with TeX the Lion.

Musings and More
Video lectures, which I've mentioned here before.

Donald Knuth, Founding Artist of Computer Science
8-minute audio interview on NPR.

Chapter 2: Donald Knuth: Leonard Euler of Computer Science
Nice biography.

And last, but not least...
Home Page
Knuth's Stanford home page.

Category Theory

Philosophia Mathematica - Category Theory
Special issue dedicated to the history, philosophy and meaning of category theory. The articles in this issue are freely available. Not sure if they'll be that way for long, or what.
Table of Contents:
Categories in Context: Historical, Foundational, and Philosophical
Learning from Questions on Categorical Foundations
Categories, Structures, and the Frege-Hilbert Controversy: The Status of Meta-mathematics
I've always been interested in the Philosophia Mathematica journal because it is edited by (and, IIRC, was also founded by) one of my first year calculus professors at the University of Manitoba. It's a journal that discusses mathematics in a philosophical sense (hence the name). So, instead of technically oriented articles, you have articles that look at mathematics and ask "why" at the meta-level.

2005/06/17

SloMo; Shuttle; Voting; Quaoar

I had a hard drive crash (or something) a few days ago. It was my fault though. In a moment of irresponsibility, I turned off my computer without letting it shutdown first. When I tried to boot up again, system was fuxxored. That'll learn me! I thought it might be a good opportunity to get rid of Windows once and for all and switch over to Linux.

You know how people say things like "Linux is good, but it's too technical for, say, my grandmother." Screw that. It's too technical for a fricken electrical engineer. I'll give it a chance, but I think I'll eventually go back to WinXP.

Interesting High-speed (super slow motion) Video Clips
I only watched a few of these before my PC cacked. I didn't watch any of the others, because LINUX CAN'T PLAY THEM, but the titles look interesting.


Endeavour Rides Piggyback
Just a nice picture, that's all.

Condorcet Voting Explained
Voting wonks say CV is mathematically the optimal voting system. Apparently, some people say that if CV was used in the 2000 election, Ralph Nader would have won. The system basically consists of selecting a candidate for every possible pairing, the overall winner being the candidate with the most wins. This would work fine with a small group, but if you have lots of candidates, you end up evaluating N*(N-1) pairings. For example, If you have 20 candidates, then you'd have to rate 380 pairs. Personally, I'm a big fan of the approval voting system. It's simple and to the point, plus it gives you the ability to vote against a candidate, by approving of everyone else.

Quaoar Precoveries
The beyond-Pluto planetoid, Quaoar, was discovered in 2002. Once the astronomers knew its orbit, realized that it had already been photographed (several times) as far back as 1983. I wonder how many other things we've photographed, but haven't seen, because we don't know they're there? (By the way, here's a guide on Quaoar pronunciation. The hip way is KWA-WAH.)

2005/06/12

kEwL Machine Guns


FN P90 (Belgium)
Neato! But how do you hold it?


Jackhammer shotgun (USA)
It's like a pump-action, but instead of pumping it, it's automatic, and instead of one shot every few seconds, you get 240 per minute.


HK MP-7 PDW (Germany)
I bet it sounds like a LAZER!


Steyr Stg.77 AUG assault rifle (Austria)
Look, it's the BatGun!


The P11 Super Secret Underwater Pistol
Not a machinegun, but still kEwL. This gun could possibly revolutionize sport fishing.

(Thanks, McAARGHH!)

2005/06/10

Best Statistical Chart & Napoleon


Re-Visions of Minard
Modern versions of Minard's famous diagram of Napoleon's ill-fated Moscow campaign. Diagram guru, Edward Tufte, said "it may well be the best statistical graphic ever drawn."

I think the diagram works at an emotional level. It portrays the army of 600,000 as a powerful river that dwindles to a stream as Moscow is reached. Then, the stream reverses course when Napoleon retreats, and finally becomes a trickle in the end.

Napoleon's Grand Armee was ruined by a combination of extreme weather, disease, starvation, the Cossacks (who showed them no mercy) and the Russian tactic of burning villages before Napoleon arrived, denying the troops food and shelter. The final casualty rate was 97.7%.

Some other pages:
Losses Suffered by the Grande Armée during the Russian Campaign

Insects, Disease, and Military History
Additionally, Russian soldiers burned many villages and farm houses as they retreated east. This "scorched earth" policy further stressed the soldiers and caused many peasants to wander the countryside, joining the teeming mass of refugees. The troops had to sleep close together because of the threat of Russian attack and peasant reprisals. Poor crop yields resulted in little straw available for bivouacs, so soldiers had to sleep on the moist ground (Etling 1988). This provided an ideal environment for the spread of lice and typhus.

Why did Napoleon Fail in Russia in 1812?

Costly Retreat from Moscow Part 5: Nature As Enemy
In the two-week period since the army quit Moscow and its embers on October 19, an estimated 30,000 horses had succumbed to starvation and winter's cold. Many a soldier's face now was colored with the dried blood of devoured horseflesh. A camp-follower mother had nourished her babe-in-arms on horses' blood. The men had lost ears, tongues. When the campfires died out, many keeled over and never rose again. Others ransacked and even ate the dead.

Napoleon's Lost Army: The Soldiers Who Fell
BBC report on a mass grave of soldiers discovered in 2002
Remains found in a mass grave outside Vilnius in Lithuania hold vital clues to the fate of Napoleon's Grand Army and the catastrophic retreat from Moscow in 1812.

2005/06/04

RocketCo; Rockets Blowing Up


The Rocket Company
Fictional account of a company that develops a reusable launch vehicle. From what I gather, all the facts presented are actually true. This is more of a business plan that's been dramatised into a story.

Neat fact about low-tech heat shields:
The Chinese had developed another novel but usable "low tech" solution. They glued up wooden blocks, appropriately contoured, with the end grain facing the reentry air stream. The wooden heat shield would char and ablate during reentry, just like the caulk material on the Apollo capsules. The fact that you could build a serviceable heat shield for reentry from space out of wood certainly showed that the basic problem was not insurmountably difficult...
This is available as a paper book now, so the publisher requested that the most of the web version be taken down, except for a few sample chapters. Too bad there's no online version anymore... (*cough* waybackmachine *cough*)


Missile Failures
Videos of exploding rockets, exploding nukes, and things that exploded because a nuke exploded nearby. (via aebrain)

2005/06/01

Genetic Anomalies; Cheap Rockets; Phenomena

Dermoid Cyst
A malady that's both revolting and interesting
These evil-looking, but benign, tumors result from a very independent (or confused) egg thinking that it can develop on its own with only half of its own genetic material, and the result is something that even a mother could not love: a monstrous ball of sebaceous glands, cartilage, teeth, hair, and various other cellular structures.

Pegasus Rocket User's Guide (PDF)
Pamphlet if you're in the market for a low-cost (~15 million) launch vehicle. The Pegasus rocket is carried to 40,000 feet by a jet where it's released and launched into orbit. It's such a well-designed system that the Orbital team won a National Medal of Technology.
(Via Orbital Space Launch Systems. Another good one pager here.)

Gallery of Natural Phenomena
Ancient (and recent) accounts of strange natural occurrences. Reading these (especially the "curiosities" section) makes me wonder which ones are myths, which ones are real, and which ones are myths that are based on some real event.