I remember when my home directory used to be organized. I knew exactly where my documents were. Which folders had which files. All my Napster MP3s were organized perfectly by artist and album. It was beautiful. I maintained this order assiduously, between multiple installs and machines. But the internet gets faster. And there is ever…
Tag: programming
Learning how to program in Oman in the 90’s
I grew up in Oman and lived there until I finished high-school in 1999. In 1991, when I was ten years old, my father bought me a 386SX for my birthday having noticed my burgeoning interest in computers. For the first few months, I mainly played games. But even that was a non-trivial endeavor in…
Don’t use class literals as type-tokens
Generics were added to the Java language within J2SE 5.0, and there was much rejoicing. It was finally possible to deal with containers in a type-safe manner. Prior to the availability of generics, Java developers had to do things like this: List people = new ArrayList(); people.add(new Person("Donkey Kong")); people.add(new Person("Guybrush Threepwood")); Person pirate =…
How I got a medal from the Army for writing code
In 2005 my National Guard unit was deployed to Iraq as part of Operation Iraqi Freedom. My MOS (Military Occupational Specialty) in the Army was 92A, which is basically a logistics and supplies specialist. My job was to order parts for mechanics, pick them up, return old parts, manage HAZMAT, dispatch/return vehicles from missions, and…
Maintaining a sorted array in O(1)
Yesterday, I came across an interesting question on StackOverflow. The question is as follows: assuming you have a sorted array, is it possible to increment locations by 1 (one at a time) and still ensure that the array is sorted in O(1)? Assuming you are not allowed to use any other secondary data-structures, the answer…
The Feast
Inspired by The Codeless Code: The master was meditating when a priest respectfully entered his chamber. The master opened his eyes. The priest bowed respectfully and said, “Master, I would like you to look at the code of a young disciple of mine”. The master nodded and followed the priest to a computer. On the…
Data and Code
Inspired by The Codeless Code: A novice monk had just started learning assembly programming when he was troubled by doubt. He approached his master and asked: “Master, how do I know which is code and which is data?” The master who was meditating, opened his eyes, smiled, and said: “Each is the other, yet neither…
Akṣi: Handwritten-digit-recognizing neural-network
I’ve always been interested in Neural Networks (ever since I first found out about them around 10 years ago). However, I never got a chance to learn about them or write one of my own; this is something I’ve wanted to do for some time. I got the opportunity this semester when my professor in…
CherryBlossom
I’ve created a project page for the CherryBlossom programming language. You can check it out here. The interpreter is written in perl.
Introducing CherryBlossom
Over the past month, I’ve been working on a new project. It’s called CherryBlossom, and it’s a way to write programs using haikus. Strictly speaking, CherryBlossom is a brainfuck analog. I actually spent more time writing the obligatory “Hello World” program in CherryBlossom than I did writing the interpreter for the language. The idea behind…