Category Archives: Programming Philosophy

Beautiful Code

A few days ago, @edensh mentioned in Facebook beautiful code, and many people gave examples of assembly, while I was thinking of Python. That got me thinking: what is beautiful code for me? So here are my criteria for beautiful … Continue reading

Posted in Programming Philosophy | Tagged , , , , | 2 Comments

Ethics in Programming

Some time ago I was bothered by the issue of ethics in programming. I heard the question best raised during a “game unconference” I attended. There was a panel about monetary systems for games, and people talked about the issues … Continue reading

Posted in Programming, Programming Philosophy | Tagged , | 7 Comments

Breaking Rapidshare's Annoying Captcha the Easy Way

Like many others, I got stuck in front of Rapidshare’s captcha. After more than five attempts at reading different letters with kittens and other critters hidden behind them, I was thinking of giving up. Especially because each time I failed … Continue reading

Posted in Programming Philosophy, Security, web-design | Tagged , | 1 Comment

A classic programming challenge, in Python

It has become a tradition for computer scientists to create various self referential ‘strange loops’. Traditions such as writing a compiler in the language it compiles are actually quite useful – and also very interesting. This tradition also branched to … Continue reading

Posted in Challenges, computer science, Programming Philosophy, Python | Tagged , , | 6 Comments

Zen Programming – 2

I thought about this a long time ago with Erez: To fully grasp structured control flow – you must first learn to program without it. Saw it happen, with myself and with others. Only after writing some hand-written conditionals and … Continue reading

Posted in Programming, Programming Philosophy, Teaching Programming | Tagged , | 1 Comment

Browser visibility-security and invisibility-insecurity

Formal languages have a knack of giving some output, and then later doing something completely different. For example, take the “Halting Problem“, but this is probably too theoretical to be of any relevance… so read on for something a bit … Continue reading

Posted in computer science, Design, Programming, Programming Philosophy, Security | Tagged | Leave a comment

"Fnord" or "The evil empire cheerfuly striked back at the merry-colored pretty princess"

One of my favorite exercises for young programmers is the following (widely known program): Write a program that will read lists of words from the following files: verbs.txt – contains verb, the others are respectively – nouns.txt, adverbs.txt, and adjectives.txt. … Continue reading

Posted in C, Programming, Programming Philosophy, Python, Teaching Programming | Tagged , | Leave a comment

Proofreading and what's wrong with the heapq module

Consider the following problem: you have a large book you would like to proofread, with many chapters (100+) and a few men (4) at your disposal. How would you distribute the chapters among the men, considering that each proofreader must … Continue reading

Posted in Algorithms, Programming Philosophy, Python | Tagged , , , | 2 Comments

Zen Programming – 1

To achieve correctness of code, you must first realize that your code is incorrect. Too many times I’ve reviewed code that was written with only the obvious cases in mind. A small step towards writing better code is to think … Continue reading

Posted in Programming Philosophy | Tagged | Leave a comment