Every reader should ask himself periodically “Toward what end, toward what end?” — but do not ask it too often lest you pass up the fun of programming for the constipation of bittersweet philosophy.
– Alan J. Perlis [foreword to SICP]
I find long functions names charming — I think they impart a certain personality to the API and add to the fun of programming. And while I try to avoid excessively long names in my own code at work (unless they add to clarity), I never fail to get a good kick seeing such names used by other programmers! Continue reading
A bunch of n wires have been labeled at one end with alphabetic codes A, B… The wire identification problem asks for an efficient procedure to mark the other end of the bunch with the corresponding labels. The wires run underground so you can’t track them individually and any wire is visibly indistinguishable from any other (except for the labeling). Continue reading
Last week I finished reading Kernighan & Plauger‘s beautiful book The Elements of Programming Style, the classic that pioneered the term programming style. I’ve excerpted below some rules of style from that book. I hope these get you excited to reading the book too!
For the past several days, I’ve been working my way through Prof. N.G. de Bruijn’s book Asymptotic Methods in Analysis; and I want to share some of the fun I’ve had reading it.
This post is not a review or anything (here’s an image of the back cover with some reviews). Below are just fragments of what I’ve read so far and found fascinating. Continue reading
Some days ago I migrated to the emacs 23 pretest (23.0.92 Windows binaries and 23.0.91 Cocoa Mac binaries). In this post I’ll give brief notes of several of the cool features I found in emacs 23.
First, the good news: My zillions of customizations, installed packages and hooks all worked without a glitch and my most frequently used modes have been working great Continue reading
I was going through the first chapter of the book Graphical Enumeration by Frank Harary and Edgar M. Palmer when I chanced upon this perplexing footnote:
Read wrote Wright that both Read [R2] and Wright [W3] were wrong. So Read and Wright wrote a joint erratum [RW1] to set things right. This may be wrong since Wright asserts that Wright wrote Read first.
Some months ago, I was re-introduced to Project Euler (PE) through the blogosphere. I had visited that site before, but had been left unmotivated by the first dozen or so problem statements that I read — neither the programming nor the math involved anything new or challenging. Only in the past few months, when I attempted to crack some of the harder nuts, did I realize how interesting many PE problems could be — requiring a neat algorithm (or invoking a crucial theorem) for an efficient solution. Continue reading
In this entry, I’ll attempt to record the important ideas Knuth presented in his 14th Annual Christmas Tree Lecture, part of his regular Computer Musings.
While I wasn’t fortunate enough to attend the lecture in person, I did go through the recording that, thankfully, was quite well done. Like all other “musings”, this one included some fascinating anecdotal bits (no pun intended) and Knuth’s good sense of humor was sprinkled throughout; but most noticeable was his infectious enthusiasm for the topics he spoke about. Continue reading
Some time back, I had read a hilarious piece by Shashank, a friend of mine from the days at BITS, Pilani. The auto-podal-tow phenomena that he describes has to be seen to be believed: an autorickshaw towing another with one of the drivers using his leg as a connection! A good soul captured the moment and licensed it under Creative Commons Attribution-Noncommercial 2.0 Generic. Continue reading
In this blog, I plan to write about the fascinating/curious stuff that I come across. My plan, for the moment, is to stick to topics I have some familiarity with: CS/math, programming, tools. I’ve a deep interest in certain areas of mathematics and computer science — analysis, combinatorics, probability theory, design & analysis of algorithms, graph theory & network effects, computational problems. Many of my posts would be on these topics. Some would be about EMACS, the one true editor. The remainder would be on programming languages, performance hacks, bitwise tricks… Continue reading