Hacker News new | past | comments | ask | show | jobs | submit login
Traceroute in 40 lines of Python (ksplice.com)
73 points by leonidg on July 29, 2010 | hide | past | favorite | 7 comments



This step-by-step script building demonstration (with highlighted "new" lines!) is just awesome. I've seen this approach in a couple of programming books, but hardly ever on programming blogs.


This is actually how I code for the most part. I comment out and indent the general structure of the algorithms/structures without the literal code and then when that's done I go back and add the actual language syntax, types, lookups, etc.

This is particularly helpful for developers like me who jump daily between many different languages. It helps me get the design down first and come back and worry about getting into a specific language syntax/mindset only after I've thought through all of the logic and conditions at a high-to-mid level.


Which is kind of funny since paper is more expensive than e-paper.


I agree 100%. This was useful for me to both learn a little bit of python and to learn a little bit of how tracert works. Great post.


Does someone know such a nice breakup of code used to explain the Linux Kernel?

Or maybe I just have to look through the diffs, albeit without explanations.


I don't know about the Linux kernel, but David Hanson used exactly this approach to brilliant effect with "A Retargetable C Compiler", if you ever wanted to know how a compiler works in line-by-line detail.


In case there are others like me who were confused - this David Hanson ( http://en.wikipedia.org/wiki/David_Hanson_(computer_scientis... ) is not the same person as DHH of RoR fame.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: