Monthly Archives: December 2010

Announcing my new programming language

I’ve been working on a new “Programming Language”. It’s called Whitespace. Before explaining to you the philosophy behind it, I’d like to show you some sample code so you get an idea of what it’s like to use it.

I do warn you. It’s literally going to look like nothing. But bear with me. You’ll realize the reasoning behind it is brilliant.

Let’s see if you can figure it out before reading the explanation that follows…. Go check out the code and come back.

OK…Get it?

Let me explain. First, this language is inspired by Python. Everyone loves Python. It’s so easy. All the cool kids are using it. “The Whitespace” is the most popular feature and I figured why not make a whole language out of it!

Now as a programmer, your goal is to remain gainfully employed by becoming instrumental to your employer. This can only happen if your code is brilliant. Which is determined by how few other programmers can understand it. If you’re the only one to “get” the complexity, then you are the smartest programmer. This is obvious.

Now, with my help, you can take it one step further. Not only won’t anyone understand your code, they literally WON’T be able to even READ IT! Win win!

Imagine the look on your boss’ face when you run the program you showed him a moment ago as being blank and it’s filled with functionality!

Here’s how the syntax works. You see, every bit is 0 or 1. A carriage return without a whitespace is 0. A space plus carriage return is 1. 8 lines per byte. No wasted lines. No comments. In fact, the code is self-documenting.

That, in a nutshell, is Whitespace.

I’m not quite done yet, but do not worry, I will open source it here. Enjoy.


Why Mark Zuckerberg’s Mom wants Facebook to get into cloud computing

Being Jewish myself, I can understand what Mark is going through. He must be getting a lot of pressure from mom. I’m sure conversations like this are pretty common in the Zuckerberg household:

Mark’s Mom: Son, I’m so proud of you. You’ve been playing with something that is now one of the largest Countries in the world. But Bubbele, please, when are you going to stop playing computer games and work in a real company! Do something a bit more secure than this toy of yours.

Mark: But Moooom…

Mom: Son. I know. It’s all wonderful honey, but if you can’t be a Doctor, maybe you can work on something a little more serious, like Jeff is. He’s in BOOKS.

Mark: But Moooom…

Some facts to ponder.

Facebook can make Billions. Go public. Sell lots of ads. Hey, they’ve even made millions selling virtual icons for $1. But a social network, even a powerful one, is vulnerable to the next cool thing. It feels like they’re on more solid ground than some of their predecessors were, but still. You can understand Mom’s concerns…

Amazon on the other hand, has built many solid businesses. Including cloud computing, which they are saying will be larger than all their other businesses combined!

It’s a no-brainer that only a handful of companies have the experience and know-how to build a cloud computing company. Facebook Engineering certainly has the chops. A cloud division could be a long-term play to outlast their impressive social division.

Amazon would be a very tough competitor though. They have executed like pros. One impressive release after another.

But wait, there is an innovative service they pioneered which has some issues. Mechanical Turk. It’s hard to ensure the workers are legit and it’s hard to make sure the people hiring aren’t spammers.

Which brings us back to Mom and her wishes for Mark & Facebook. Combining social media with crowdsourcing can actually be a solid business.

MechanicalFaceturk is something that Mark would be in a position to do better than Jeff does.

I haven’t played with MT yet, but from all I’ve read, it feels like Amazon’s problem is that buyer and seller are pretty much anonymous strangers to each other. Before and after the work…

Facebook has the best social graph in the world. The famous 6-degrees of separation concept means that you can hire a huge workforce and use your social graph as a factor in deciding how much you pay. How far from your social graph before you accept a worker…and vice versa.

Facebook can let you set minimum rates for yourself. I think the workforce would make more money…and while it may cost the buyer more, many would happily pay more for better quality.

This also would let Facebook become a more serious part of your life. If they help you make money, you’re less likely to leave to the next cool site…

Your facebook profile would get deeper and better. What languages do you know? What fields are you proficient in? It’s one thing if you fill this out for your friends to see and a whole other ballgame if you can make money doing this.

Given a few minutes, I already have lots of thoughts on how this could become a serious marketplace. Set a room full of engineers into brainstorm mode and I’m sure this could become big. Really big.

And most importantly, Mark’s Mom would be happy to see him finally work at a real job!

How to add “compare to local history” feature to any *nix system

NOTE: This refers to a Mac install. If you’re on a regular *nix box, this should work even easier w/o as many workarounds…

NOTE2: I need to edit this post. I was writing it while working on the issue and got too busy to really polish it up. When I get some free time, I’ll fix it.

There are some wonderful things about Eclipse. Plugins for just about anything. Some cool svn integration. And one item was the killer feature for me. Right click a file and you can compare to local history. It will list for you every version of the file, which gets created when you hit save.

On the downside with Eclipse, they have no word wrap after years of being asked for it. That’s a killer feature too. And perhaps worse, it’s quite heavy.

I wanted to find the local history in another tool and move to it, but there didn’t seem to be a way to achieve it….

Meantime, a friend of mine suggested trying TextMate. I tried it. Didn’t especially like it. What particularly bothered me was that I had gotten used to diff’ing local history. So I gave up.

As luck would have it, just as I started a new project, the new Eclipse PDT Helios came out. I don’t even remember which feature I “upgraded” for…but it was a disaster. I won’t go into details, but many others are having problems, so Google will tell you all about it.

Meantime, another friend told me he switched to Textmate & decided to give it a week before giving up. That convinced me to try again. And now I “get it”. The command line integration is key!

My setup for the current client project is an svn repository. So I had a bright idea! Why not use git to version every file in the project on save? Just hook Textmate’s save to a git add and commit. While I like this idea, so far I haven’t quite figured out how and the person who said he’d post a method, hasn’t gotten to it yet.

No worries, as I had a different idea that would work for any text editor and be a little more flexible. I’m marking it down here so I can remember it in the future & perhaps give some others the same idea.

Using cron, once a minute, git add and commit all files in the project. Unbeknowest to me, Apple deprecated cron on the Mac when I started writing this…and it took me a fair bit to figure out what went wrong…

Upshot, first set up a git alias like so:

git config --global alias.add-commit '!git add -A && git commit'

Then on the command line, this will git add and commit in one go, with a commit message:

git add-commit -m 'My commit message'

So on cron, I have the following command:
* * * * * (. /Users/YOU/.profile && cd /Users/YOU/Workspace/YOURPROJECT && git add-commit -m 'autocommit') > /Users/YOU/Documents/cronlogs/cronlog-autocommmit.txt 2>&1

Note, that to test the cron, “su -” (iow su to root) and run the commands. That’ll give you an idea if git is in the path, if the alias is set up correctly, etc…

I set up the git alias in both environments. You can see I’m sourcing the .profile as well so root has git in its path….

So now, cron runs every minute. Which means that any save I’ve done will get committed more than frequently enough. I can do a diff on the svn repository….or a local diff on my git repository.

It’s janky, but does the trick and makes me happy 🙂

P.S. I was planning to talk more about Textmate, SmartSVN, GitX, Araxis Merge and whatever other tool I’ll wind up integrating with git diff…however this took me WAAAY longer than I expected and I’m BEAT!