Gitlet – git implemented in JavaScript.  Why, you ask?

Over the last six years, I’ve become better at using Git for version control. But my conceptions of the index, the working copy, the object graph and remotes have just grown fuzzier.

Sometimes, I can only understand something by implementing it. So, I wrote Gitlet, my own version of Git. I pored over tutorials. I read articles about internals. I tried to understand how API commands work by reading the docs, then gave up and ran hundreds of experiments on repositories and rummaged throught the .git directory to figure out the results.

I discovered that, if approached from the inside out, Git is easy to understand. It is the product of simple ideas that, when combined, produce something very deep and beautiful.

Spoken like a true hacker.  My hat is off to you, sir.

quine-relay – an uroboros program with 80+ programming languages

quine-relay – an uroboros program with 80+ programming languages.

quine relay

If you didn’t get it, here’s a better description:

This is a Ruby program that generates Scala program that generates Scheme program that generates …(through 80 languages in total)… REXX program that generates the original Ruby code again.

Insanity at its best!

P.S.: Quine (computing) Wikipedia page comes handy:

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are “self-replicating programs”, “self-reproducing programs”, and “self-copying programs”.

Every system is terrible, if you look at it long enough

As I was reading through the rant on why your previous developer was terrible, I kept nodding my head in agreement. It’s all true.

It’s what I call the “curse of the present.” When you, as a developer, look at the choices used to build a particular application, you’re blown away at the poor decisions made at every turn. “Why, oh why, is this built with Rails when Node.js would be so much better?” or “how could the previous developer not have forseen that the database would need referential integrity when they chose MongoDB?” But what you may not realize is that you are seeing the application as it exists today. When the previous developer (or team) had to develop it, they had to deal with a LOT of unknowns. They had to make many decisions under a cloak of opacity. You are cursed with the knowledge of the present, so the system seems like a hackjob of bad decisions.

But as true as it is,  it’s incomplete. It’s not only about the previous developer. It applies to pretty much all systems that you can access as a user. Things just constantly don’t make sense. And while there are many cases of a developer being inadequate, in many more cases IMHO what you are staring is a bunch of unknowns.

It is easy to assume that the guy who did this (this being anything at all) is just a stupid idiot. But that’s only because you don’t know or care. Who’s decision was it? You might think it was a developer, when in fact it was a clueless boss. Or maybe this was the most feasible approach. Or maybe it was the only possible one at the time. How much resources were allocated for this development? Anybody can do better you say, but could they be as good in 15 minutes only – cause that’s how much time was given. Do you know which technology was used and why? These are usually very transparent.

It’s easy to judge without knowing. And I guarantee you that any system can appear terrible if you stare at it long enough. But who needs all this negative energy? Nobody. Look around, try to understand, try to improve the system and learn something new in the process, and the world will surely become a better place.

“But don’t you find it boring to wear only two colors?”

“Not at all. I find it liberating. I believe my life has value, and I don’t want to waste it thinking about clothing,” Malcolm said. “I don’t want to think about what I will wear in the morning. Truly, can you imagine anything more boring than fashion? Professional sports, perhaps. Grown men swatting little balls, while the rest of the world pays money to applaud. But, on the whole, I find fashion even more tedious than sports.”

Jurassic Park, by Michael Crichton

Happy Programmer’s Day

My brother reminded me that today is Programmer’s Day, an official holiday and appreciation day for those hundreds of thousands of people who spend their days teaching computers new tricks.  I know that not many people think about it, but I do and I find it totally fascinating, that everything, every tiny little thing that we see on a computer screen is thanks to someone who programmed it in.  Just think about it.

What are you staring at now?  Probably a web browser.  That’s a large and mighty complicated program that was written over a few years by hundreds, if not thousands of programmers.  Your browser runs on top of an operating system, which again was written by many programmers over lengthy periods of time.  The browser, through operating system, communicates with the server that runs my blog.  All those communications go through a number of networking devices (routers, switches, firewalls, load balancers, etc), which run software written by more people.  My server runs Apache web server software.  Which runs PHP software.  Which runs WordPress software.  Which connects to MySQL database.  These are just a few major pieces of software involved in the process.  There are probably thousands of smaller applications that nobody ever thinks of, that still do their job to deliver this content from me to you.  Like TinyMCE editor that I am using inside of WordPress to write this post.  Or like Google search engine that you probably misused to get to this post.

Do you like any video games?  Those are software applications.  How about YouTube videos?  For you to be able to waste time at work this inefficiently, a lot of software had to be written by a lot of people.  Oh, are you working then?  Doing some calculations in Excel or drafting up Word document?  Maybe you are working through some customer data in the CRM application.  All those are software applications too.  They didn’t just grow on trees.  Someone somewhere had to think them up, design them, implement them, and maintain them.

Oh, and do you know what’s even crazier?   Programmers are using software applications created by other programmers.  Operating systems, text editors, compilers, linkers, debuggers, and more!

Software industry is very young.  I’m not sure when was the first program ever written, but, according to Wikipedia, the first theory was proposed by Alan Turing in 1935.  That’s not even 80 years ago.  And if you look around you now, the amount and the complexity of software applications created to date is immense – from operating systems, through games and business applications, to all the things online and mobile.

But that’s just the job, right? All those people were paid for it, right? Wrong! Very wrong!  While many did indeed get paid, there is plenty of contribution from amateurs and enthusiasts.  Those are the people who push the technology, ask hard questions, and try to make the world a better place not necessarily for their own greater income, but out of pure curiosity and for the love of science.

Anyways, I’m getting carried away.  All I wanted to say is that it’s important to pause once in a while, look around, and appreciate what we have and people who brought us all that.  Computer software is not the single most important thing around us, but it is one of those things that we rarely notice, until it breaks.  So, have a thought about what software you use, what role does it play in your life, and how did it get there.  And then, find a programmer and buy him a beer.  Because there is someone somewhere not just using his software, but enjoying and/or depending on it, and not thinking about it.

One last thing I wanted to mention.  Of course, I knew about Programmer’s Day for a while now.  And, of course, I knew that it is an officially recognized holiday in Russia.  But what I didn’t know is that I actually know one of those people who worked to make it an officially recognized holiday.

This particular day was proposed by Valentin Balt, an employee of Parallel Technologies web design company. As early as 2002, he tried to gather signatures for a petition to the government of Russia to recognize the day as the official programmers’ day.

Valentine Balt currently works in FxPro, here in Cyprus.  And we had a few drinks together.  Well done, Valentine!

To all you programmers out there – happy Programmer’s Day.  I wish you faster computers, shorter compile times, fewer bugs, better APIs, clearer specifications, more pull requests and patch submissions, and more appreciative users.  Enjoy!

Octopress – a blogging framework for hackers

Being a very happy WordPress user doesn’t stop me from looking around for alternatives.  I recently came across Octopress, which is, in some sort, GitHub pages on steroids.  This is a really neat and geeky approach to tech-savvy bloggers. Recently, version 2.0 has been released.

Octopress comes with:

  • A semantic HTML5 template
  • A Mobile first responsive layout (rotate, or resize your browser and see)
  • Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics
  • An easy deployment strategy using Github pages or Rsync
  • Built in support for POW and Rack servers
  • Easy theming with Compass and Sass
  • A Beautiful Solarized syntax highlighting