Happiness is…
…running top, pressing 1, and seeing this message:
Sorry, terminal is not big enough.
…running top, pressing 1, and seeing this message:
Sorry, terminal is not big enough.
Heard of Scratch? My nephew Dante introduced me to it. It’s a really nice visual programming environment, aimed at kids. You create programs that control the movement of sprites by snapping blocks together. There’s an “IDE” (written in Squeak Smalltalk) that you download and install and use to develop your programs, and then you are encouraged to share your programs by uploading them to the Scratch site. On the site, your Scratch program is run in a Java applet. Other users can then download the “source” to your programs, “remix”, and repost them. The people behind it have put a lot of work into both the technology and the community, and it ends up being really fun all around.
I made a few small programs to get the feel of it, like this Mars Lander game, but wanted to see how far I could push Scratch. So I set out to make a LOGO interpreter! It was pretty difficult, since Scratch doesn’t have subroutines, and the only data structure is the array. I ended up with something that supports a small subset of LOGO, including basic turtle graphics, user defined subroutines, and global variables. I also spent quite a lot of effort optimizing it to be as fast as possible within the limitations of Scratch. At first I just wanted to get the simple LOGO program to draw a circle, REPEAT 360 [ FD 1 RT 1 ], to run as fast as a “native” Scratch program to do the same thing. I succeeded beyond my wildest dreams and actually made my interpreter run faster than native Scratch. How I did that is another story, but to give you a hint, -funroll-loops.
Anyway the point of all this is while poking around at how to speed things up in Scratch, I decompiled the Java player that runs Scratch programs on the web. I was at first very confused by the output, because it looked like the source code to a… LOGO interpreter…??!?! I looked harder and found enclosed in the JAR file a LOGO program to run Scratch programs! For whatever reason, maybe because they had a LOGO interpreter in Java lying around, the Scratch team implemented the online player as a LOGO program that runs on Java. So that means when my Scratch LOGO interpreter is running, it’s LOGO, on Scratch, on LOGO, on Java. Neat!
This:
Made me immediately think of this:
I just launched an automated build, and the log file timestamp ends with ‘1337′. If that’s not a good omen for a programmer I don’t know what is.
Here are a bunch of stories of really great last minute hacks that were needed to get a game out the door. I have perpetrated my share of these as well. On one project I worked on, we had an upcoming very high profile marketing launch. (how high profile? we rented this room at Lincoln Center – the same one used as the meeting room in the recently canceled bad show Kings) Anyway, just before that launch, we realized that due to some very low level bugs in our messaging infrastructure, some small percentage of messages were being lost. The cause was unknown, and the “real” fix would have taken more time than we had. So instead, I put in a small change. Send every message… no, not twice, that wouldn’t be quite awesome enough… no, I sent every message in TRIPLICATE! Worked like a charm.
make -j, when you meant make -j2.

Are you like me? Do you like games that feel like work? Then maybe this game is for you. Конструктор (constructor) has been my obsession since it appeared on Sunday. I’ve had Zachtronics Industries subscribed for a while, after stumbling across some of his older games “for engineers”. But this one is my favorite so far. In it, you create chips that meet certain specifications using metal wires and two types of silicon. The red silicon, when powered, can stop the flow of electricity when drawn on top of the yellow. And the yellow, when drawn on the red, stops the flow unless it is powered. That is all you have to work with! Did you ever take a class in “Digital Logic” where you sketched out designs for things like an an adder using simple gates, like NOT or AND or NOR? This game is like the ASSEMBLY LANGUAGE of that. You don’t even have a NOT gate. In fact, your first challenge is to make one! The levels ramp up in difficultly quite quickly from there, and many seem simply impossible at first. I’m now to the point in the game with timing glitches and space to lay out circuits is becoming an issue, and loving it. The last few levels are “Confidential” but I have high hopes given that in the levels leading up to them you implement a shift register, RAM, and a rudimentary ALU.
If I stop showing up to work for the next few days this game is the reason why.
(by the way: the author of the game seems to have neglected to point out one important fact: you hold down the shift key to toggle between paining the two types of silicon. this took me a while to figure out the first time.)
This story of the recent technical happenings of Muxtape has three points that resonate with me:
Remember how I was all “Is there available, on planet Earth, REALLY good C++ training?” The answer turns out to be YES! We (the place where I work) just finished a week of training provided by DevelopMentor, using materials created by Scott Meyers, and presented by Steve Dewhurst. It was absolutely excellent! I had recently been in a phase where there more I learned about C++ the less I liked it, but during the course I think I hit some sort of Tipping Point™ where I started to like it again. You can (and should) complain about a lot of things in C++, but no other language spans a greater range of the abstraction spectrum from the lofty and metaphysical down to gritty opcodes and registers.
Here are two statements from ICANN’s announcement that they will be opening up registration of top-level domains:
“The potential here is huge. It represents a whole new way for people to express themselves on the Net,” said Dr Twomey.
Yay! I would love to be able to “express myself!” http://messy.78/ here we come!
There will be a limited application period where any established entity from anywhere in the world can submit an application that will go through an evaluation process.
Oh.
Another thing I realized while reading this is that some day very soon “.com” will be passe… and then shortly afterwards extremely cool and retro.
Answer: up until yesterday, it was the current date. But starting today, it is AN ERROR MESSAGE! Why? DAYLIGHT SAVINGS TIME!!! This wasted about 1 hour of my time today.
Updated!
This word count bookmarklet searches through the page you’re on, and attempts to report the word count of the selection. It will first look for the text selection, and if there is none, it will search for a textarea that has a selection. It should be working in Safari and Firefox, and possibly even IE and Opera.
OK, so you actually expect me to believe that ON THE SAME DAY we got actual evidence that Duke Nukem Forever is going to come out, like, ever, AND news that the next version of IE is going to pass the ACID2 web standards test? Just how gullible do you think I am? The next thing you’re gonna try and tell me is that a new version of Feed on Feeds has been released.
Great. I am now completely obsessed with the squishy left side of my MacBook.
Please get like 50 of your PhDs together and have them figure out how to automatically provide subtitles for all your YouTube videos.
Love, the Internet.
Saw these at the local asian grocery:

After doing a double take I realized that yes, those were emoticons on the cookies! (or biscuits, I guess) I bought them, and just as advertised:

I couldn’t find a page dedicated to this product, but this is the manufacturer and here’s some Japanese guy blogging about them. How do they taste? Sort of Pocky-esque, but not as good. But hey, EMOTICONS! *^^*
I don’t remember where I picked it up, but Anarchaia by Christian Neukirchen is one of my current favorite feeds. It’s an incredibly eclectic combination of deep geekism, pictures, random links, IRC chat snippets, and occasional poetry (which I skip – especially when it’s in German!).
trivia: it’s also the site that caused the mysterious _why to coin the term “tumblelog”)
If you’re on an iPhone, press back now! NOW! PRESS IT!
TOO LATE!!!!!!!!!!!!!!!!!!!! NOOOOOOOO!O!O!!!O!O!O!O!O!!!O!O!!!
Confessions of a Samurai Coder:
In the end there were just too many classes. The coupling was too severe; the dependencies too subtle. The Samurai is beaten. The blades of destruction spin down. Not so much Kill Bill – more my very own horror film, The Refactoring.
There is only one course of action left for the true Samurai:
Awesome quote from Bryan O’Sullivan on how much fun programming is becoming, given the whole “Moore’s Law is Dead” meme and how you couldn’t even buy a single core computer if you wanted to:
Programming is hard; parallel programming is way the hell harder; compsci courses have turned into votech Java pap; and enrollments in compsci are in any case as lively as the waiting list for the Lusitania the week after it was torpedoed. People want their programming to be easier and more casual, and they’re about to have it jammed into their eyesockets on bamboo stakes instead.
By the way, I know what he’s talking about, because I’ve had some fun with a type of parallel programming recently. Each screen = one CPU, plus one more, just for fun.
If you’ve ever used it, then you know ClearCase sucks. But let me tell you, if you haven’t used ClearCase MultiSite, which is the version for distributed development, you don’t yet understand the meaning of the word “suck”. If you can, imagine a slower, harder to administer, more expensive version of ClearCase. That’s MultiSite — but only if your sites are working on completely seperate projects! If your distributed developers want to work together on the same project, or god forbid, on the very same files, then I can guarantee that your imagination is not sufficient to fully envision the universe of pain that awaits your every working hour.
You might think all that money would buy you a system that lets developers on different continents work together as if they are in the same building. How naive! No, instead MultiSite allows developers on different continents to work together just as easily as if they are on different planets.
This month at work is especially fun:
PROJECT 1: Work with programmers from a Swedish company who live in Denmark and Germany to update an American piece of hardware to display (and edit!) French and Japanese text.
PROJECT 2: Try to access a .Net web service (created by programmers in Israel) from C++ on Linux. We made the possibly fatal mistake of trying to use Java as a rendezvous point to get started.
PROJECT 3: Travel to London to help a team of programmers there figure out how to clone some embedded Qt software in MACROMEDIA FLASH, of all things.
By the way, I have been extremely disappointed with the Java web service experience. There are SO MANY different Java APIs and toolkits out there, and no clear way to figure out which way the cool kids are doing it this week. Understanding Google results for anything related to Java web services is like interpreting an archaeological dig through thousands of years of technological progress, including dark ages, which may or may not be over. And the official site is no help, just pages with long lists of poorly named APIs.
I mean I just want to call a SOAP service, described by a WSDL file, and pass a username and password (a la WS-Security). Why is that so hard? No, I don’t want to learn all about handler chains or wsdd files or GlassFish (whatever that is) or deploy any WAR files to a server or install security providers or configure everything through a GUI in an IDE and just be left staring at “NullPointerException” when it doesn’t work. I just want to use the good old JDK to write a simple command line client which I naively thought would be about 10 lines of code. You know which web service client toolkit I’ve had the most luck with? cURL. BY FAR.
Every curious how Japanese people with their unbelievably complicated writing system manage to enter text on a cell phone? Wonder no more! Willy (who apparently has good taste in video games) shows us all how, in Japanese Input on Cellphones and Japanese Input on Cellphones 2.
Recently I’ve been using Skype and have been quite impressed, especially with how effortlessly it glides through any firewalls and NATs that it finds in its way, almost as if they don’t even exist. I was even more impressed by “Vanilla Skype”, a presentation (part 1, part 2) that details the Herculean efforts that the developers of Skype went to to encrypt and obfuscate the workings of their client and network, and the truly Super-Herculean efforts of a pair of hackers who have circumvented all the encryption and booby traps and figured it all out anyway!
The presentation was given at REcon 2006, a computer security conference. There’s probably other equally interesting stuff in the rest of the proceedings.
Feed on Feeds, once and future king of open source web based feed aggregators, has now completed its move to Google Code. There’s no official new release yet, but there is some early code available in svn for the adventurous.
There’s also a newish project blog. Now would be a good time to subscribe to it.
Dear Lazyweb: Is there available, on planet Earth, REALLY good C++ training? Price and location are no object (within reason). A week duration would be perfect. I’m looking for something that can put me on the road from a 1990’s era, middle-grade, procedural with dashes of OO, STL-barely-grokking, late night double-free-debugging, C++ job-get-doner to a 21st century, meta-template slinging, smart pointer using, TR1 breathing, C++ madman who can turn on a dime from modern OO to generic to functional programming as the mood hits me. My ultimate end goal would be to be able to open up the source code to a random Boost library and not immediately doubt that I’m even looking at C++.
Possibly related: did you ever notice that Scott Meyers looks exactly like The Ultimate Warrior?
I read all the raves for Why’s (Poignant) Guide to Ruby when it first came out, but haven’t been intested in Ruby until lately, when two strangely synchronous events occured: on the very same day, the new kid at work decided to give us all a presentation on Ruby, and Leonard’s Ruby Book (which squarely falls into the “hit” partition of Cookbooks, which have been hit or miss) finally finally finally shipped. So today I lazily browsed over and started to read the Poignant Guide. I hereby declare it THE NEW AWESOMEST THING EVAR!!!!!11!!!-(e^pi·i)!!! Words can’t describe. I’m giddy. It’s so good that I’m reading sections out loud to Jenny, who rather than feigning half-hearted interest, nearly broke down in tears at the story of Bigelow. IT’S THAT POIGNANT. Waste no time reading anything else on Ruby before reading this.
A brief exercise using GNU Make:
| Makefile | subMake.sh | Submakefile |
submake : ./subMake.sh |
#!/bin/sh make -f Submakefile |
STUFF = a b c d e all : $(STUFF) $(STUFF) : @echo making $@ @sleep 1 |
Run ‘make’. You’ll see a, b, c, d, and e get made serially, one per second. Want to parallelize? You’d think ‘make -j5′ would do it, right? You’d be wrong. The Submakefile complains that there is no jobserver available, and still makes them serially. The reason is that the toplevel Makefile doesn’t “think” that subMake.sh is a sub-make, and doesn’t pass along the necessary magic environment variables and file descriptors for the jobserver stuff to work. But, by merely adding a COMMENT:
| Makefile |
submake : ./subMake.sh |
IT WORKS!
据当地法律法规和政策,部分搜索结果未予显示。
That’s the message that Google China shows when you search for “sensitive” things, like Tiananmen or Falun Gong. (compare vs Google.com: tiananmen, falun gong) It means something like “Due to local laws and regulations, some search results were not shown.” I was surprised, however, to see that that sentence does not show on a search for Taiwan (台湾)! But then, I compared the actual search results to what Google.com return, and found them quite different. The Google.cn results are all Chinese government sites, but the Google.com results include the “real” Taiwan sites, including some at .gov.tw. Does this mean that Google.cn has two distinct levels of censorship? The kind they admit to, and the kind they do silently?
I don’t get Google Base at all. From the announcement: “This beta version of Google Base is another small step toward our goal, creating an online database of easily searchable, structured information.”
Isn’t that just the web, minus the structured part?
Isn’t the whole genius of the web the realization that the structure isn’t necessary?
And isn’t the very reason for Google’s riches the fact that they figured out how to do the “easily searchable” part without the structure? That they figured out that even when a billion people who are definitely not interested in tagging or categorizing or structuring anything just start cobbling together half-broken HTML pages on whatever topics they like that it SELF ORGANIZES?
Google Base just feels like a throwback to the earliest thinking about online systems, like Xanadu or Cyc or CompuServe or something. Or maybe the semantic web people have infected Google and all is lost.
Steve’s Helpful Hints For Making Your Workday More Enjoyable (part 27):
Always take a big swig of coffee (or whatever other beverage you have handy) just before launching your unit tests. That way when you suddenly see something like this:
Test Results:
Run: 39 Failures: 21 Errors: 5
You can spit the coffee all over your monitor and keyboard. It’s “big fun!”
Google Reader – Google’s new web based feed reader. Feels a little clunky to me….but then again what would I know about it.
It’s called Computational Theology. It only took about a year!
Engineers: You now have less than two years to update your systems for the new Daylight Saving Time rules.
Users: You now have less than two years to prepare contingency plans to work around all the problems caused by the systems that the engineers screwed up or forgot about.
Good luck!
Jenny’s getting just what every girl wants for her birthday this year: A new version of Internet Explorer!
Microsoft confirmed to internetnews.com that it will deliver the beta 1 version of Longhorn Server on August 3, along with the beta 1 release Internet Explorer 7. They’ll be available along with the beta 1 version of Windows Vista, the next-generation Windows client formerly known as Longhorn, which Microsoft announced Friday morning.