Archive for the ‘CodePeople’ Category

R.I.P John McCarthy

No Comments »
R.I.P. John McCarthy
John McCarthy, 1927-2011
(Creator of Lisp and more)

This giant, John McCarthy stood at the cradle of AI, Lisp, and theoretical computer science. Like us, he loved elegant mathematics.


R.I.P. dmr

No Comments »

Dennis Ritchie, 1941-2011
(Unix co-creator, creator of C, and more)

Read the rest of this entry »


The Woz on Coding

No Comments »


Thanks to a good friend I had the honor to join a select group spending some time with The Woz. Topics ranged from how mutually intelligible Beijing and Hebei dialects of Mandarin are to whether history should be taught in schools. Being a nerd of the right age I had to ask Steve some questions that had been haunting me since 1978. I learned how to program by looking at SWEET16 code, the (build in) assembler/system monitor, Integer BASIC and DOS. His recollection powers are incredible. Not only could he answer all but one question without pause, he also could describe how long it took, who else participated, what the other Steve did and most interesting to me he often gave an introspective view of how he felt while doing it, why it turned out the way it did and what he did not know but might have wished he had. If he ever needs a headshrinker he will be done in half a session. For example, he would describe this “flow” effect that we coders all know when working one something complex. Incasu, Steve was working on a different timing of the disk head read/write signal. Specificly he moved from a 4/8ms to a 4/8/12ms signal in order to cram in some 25% extra bits. He described, much better than I can reproduce, how he worked till he was too tired, getting it almost done. Than next day it would take very long to get back into the flow and he would work till he was too tired again, getting it almost done. Than one night he did what he had to do and worked till early mornings to finish it. He declared it the hardest code he ever did. He also compared performing a complex dance as a non dancer to writing Integer BASIC without relevant experience or training. In fact he disclosed he did not know, back than, that BASIC was a collection of incompatible dialects (like Mandarin). This entry is getting too long so I leave you with just one more gem. Steve wanted BASIC for the Apple because of the book “101 BASIC Computer Games“. He still seems oblivious of the enormous impact of this decision. He chose my first computer language for me and for most all my peer coders.


Finding a Loop in a Linked List

No Comments »
Ladies, your mission is simple yet dangerous. The enemy is upon us … maybe. We have been handed a linked list. It is claimed it does not loop. But if we are to send in our troops, we better darn well make sure. Assumption is the mother of all, remember!?! It is your job to find a simple algorithm to check this linked list on loops. Ladies, O(n²) will not suffice. (Seriously, try it before reading on. Hint, the photo on the left shows Bob Floyd rendered using Floyd-Steinberg dithering.)

int has_loop(node_t slow)
{ node_t fast1, fast2 = slow; if (!slow) return 0; /* No list, no loop. */ while (fast1 = fast2->next && fast2 = fast1->next) { if (slow == fast1 || slow == fast2) break; slow = slow->next; } return slow == fast1 || slow == fast2; }

This solution is Floyd’s Cycle-Finding Algorithm as published in Non-deterministic Algorithms by Robert W. Floyd in 1967. It is also called The Tortoise and the Hare Algorithm. (Stephen Ostermiller) [Finding a Loop in a Singly Linked List]

Trivia: Actually this solution is not published in the above mentioned article [pdf], apparently Donald Knuth credits Floyd for the algorithm, but without citation. Since nobody influenced Knuth more than Bob Floyd [pdf], they might have simply discussed it and Knuth put it in The Art of Computer Programming II.


Thompson Not To Check-in Code

No Comments »

kendensAccording to The Register Google won’t allow the co-inventor of Unix and the C language to check-in code, because he won’t take the mandatory language test. (Andrew Orlowski) [C language inventor spurns Google’s language exam]

Q:  I know Google has a policy where every new employee has to get checked out on languages before they’re allowed to check code in. Which means you had to get checked out on C [which you co-created].
Thompson:  Yeah, I haven’t been.
Q:  You haven’t been! You’re not allowed to check in code?
Thompson:  I’m not allowed to check in code, no… I just haven’t done it. I’ve so far found no need to.
[Coders at Work]

The Reg is right; It would be madness for Google to test Ken Thompson on his C programming skills. The Reg is also wrong; It is not because he co-designed the C language. Designing a car doesn’t necessarily make you a good driver. At my own level, I have designed several languages. I wrote test code in those languages but I would not hire myself to code in those languages.

Google should not test Ken Thompson on his C coding skills because it is insulting to one of the icons of the computer industry. Because he is Ken Thompson.


Random Ordering

No Comments »

bugReplies to problems posted on stackoverflow.com are ordered by vote. So if you put up a question like “What are your best programmer/computer science/programming jokes?” you end up with an randomly ordered list of nerd-jokes. For example: An SQL query goes into a bar, walks up to two tables and asks, ”Can I join you?” is rewarded close to 900 points. Where When your hammer is C++, everything begins to look like a thumb. scores significantly lower. And If you put a million monkeys at a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs. even lower. Pure random. To make it more complex some responses all most out-score the “answers” they comment on like: Jesus saves, but only Buddha makes incremental backups. Wanna read more? Go a head, lose your day.


Definitely Worth a Cat

No Comments »

microwave-cdA few months ago we bought a new digital camera, […] it came bundled with a CD of software. So [my wife] innocently ejected the DVD tray, and dropped the CD in. I happened to notice out of the corner of my eye […] screamed “noooooooooooo,” and frantically launched myself across the room in a desperate attempt to keep that CD from launching […] I nearly took out a cat in the process. […] Nobody hates software more than software developers. (Jeff Atwood) [Nobody Hates Software More Than Software Developers]


If Coders Made Ads

No Comments »

md


Laziness, Impatience, and Hubris

2 Comments »

larrywallLaziness, impatience, and hubris: the three qualities that make a programmer. If you are lazy you look for shortcuts. If you are impatient you want your program to be done now. And as for the hubris, that makes the programs easier to distribute. […] We use natural language—most people think COBOL—and that’s not how we think about it. Rather, the principles of natural language are that everything is context sensitive and there is more than one way to say it. You are free to learn it as you go. […] We don’t expect a five-year-old to speak with the same diction as a 50 year-old. The language is built to evolve over time by the participation of the whole community. Natural languages use inflection and pauses and tone to carry meanings. These carry over to punctuation in written language, so we’re not afraid to use punctuation either. […] Do you have a release date for this yet? […] Sure, It’s Christmas Day—we just don’t say which one. […] We’re certainly well into the second 80 percent. (Larry Wall) [The A-Z of Programming Languages: Perl]

State a good design principle and people mock you. Look for example at a snippet form The Reg:
Larry said: “Similar things should look similar but similar things should also look different, and how you trade those things off is an interesting design principle.” It’s very Zen, but this is standard issue for Perl developers: the way you understand a Perl program depends on how you read it. Those seeking the path to enlightenment should probably start with Perl 6 interpreters. (Ted Dziuba) [Larry Wall on the Zen of Perl 6]

I have to wonder if Ted Dziuba lacks the intelligence and/or relevant experience, or if he tries to insult my relevant experience.


Forget My Number

No Comments »

Sometimes impossibles find their way into your code specs, like an intuitive GUI component that will make complex selections simple, or a wrapper that will make application objects into distributed objects, transparently. The list is endless. This is when all those theory courses, finally, pay off. You just know it is impossible instantly, where you otherwise would waste days trying the impossible. Or worse, you actually implement something. Because of the world wide web, nowadays, you can skimp on theory classes and use Google. For example, Merchants who take credit cards over the Internet for payment need to get rid of the number the microsecond after they’ve placed a hold on the funds, because it is impossible to store that number in a form that is both searchable and secure. (Cranky IT Guy) [How to secure a credit card number] (via: DI) You don’t have to know, anymore, about Knuth, Shannon, Dijkstra, Chomsky, Turing, Erdős, Parnas, Minsky, and the many others. But they are still fun!