Runcible Blog

you know that feeling?

You know the feeling you get after riding a bike or ice skating for a while, where you feel like you're still doing that activity? I feel that way after being around Anna. The experience sort of lingers for a while. I think that's a good thing.


mundane dreams

This morning I had a few very odd dreams that I can't remember, but I do remember dreaming about sleeping. Then my alarm went off in real life, I hit the snooze button and went back to dreaming about sleeping and waking up. That cycle continued several times as I kept hitting snooze.


Bush Speech

Here's my summary of Bush's speech tonight:

Terra, terra, terra, terra. ummm....9/11, 9/11, 9/11, terra, terra, terra, evil doers, terra. Stay the course, terra, lessons of 9/11, freedom, democracy, eye-rak, eye-rak, terra.

It went something like that. I think he also mentioned "suiciders" and that he was disappointed with the Iraqi military's performance. I'm a little confused about that.

The worst part is that even though he must've been coached for hours before the press conference, he still managed to come across as a bumbling idiot.

Here's a picture from the press conference (hot off the wire):

Bush dribbles shit
What's that on your lip, W? uhh, I think it's supposed to be a turd.


Sick of Java

The other day while killing time at a book store I paged through "The Python Cookbook" and felt so refreshed to read such elegant and simple code. I'm really impressed with Python. Within a couple days of learning Python, I had written a multithreaded application with configuration files, logging, and other nifty things (it was just an exercise though). It's too bad we're not using Python for anything at work.

I'm already getting tired of Java, mostly because I think it's overrated. Java seems infested with marketing dweebs with fetishes for acronyms, buzzwords, and XML files. I'm tired of using such ugly, counterintuitive interfaces (NetBeans, Eclipse, etc.) to do even rudimentary things in Java. "Java people" are in denial that the language they love is still slow and bloated after 10 years and still looks crummy on OS X.

I think that if a language basically requires you to use a big, fancy IDE to develop with it, you've got a problem. And specifying each JAR file you need to use on the command line when you run a class gets old quickly.

Here's a very unscientific comparison between Java and Python. I wanted to know how much resources Java takes when it's not doing anything. Here's the shortest bit of code I know to have Java sleep for 10 seconds:

public class JavaSleep {
    public static void main(String [] args) {
        System.out.println("Sleeping...");
	    try {   
                Thread.sleep(10000);
	    } catch (InterruptedException ex) {
	    }
    }
}

pretty needlessly verbose.
Here's how to do it in Python:

from time import sleep
print "Sleeping..."
sleep(10)

Ahhh...that's more like it!

And here are the results from top:

PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE

955 python       0.0%  0:00.14   1    12    37   816K   376K  1.44M  27.5M
956 java         0.7%  0:00.43   9   150   110  23.8M  12.4M  8.32M   235M

The JVM uses 9 threads, many megabytes of RAM, and more CPU time just to sit there sleeping. To be fair, Python isn't known for its speed or its memory footprint either.

Anyway, that wasn't much of a comparison, but my complaint still holds. It seems like Java and its IDE's encourage programmers to be lazy and unsure of themselves. Type-ahead editing is nice but very easily abused. I've seen it in action: you start typing something, hit period, wait 10 seconds for a long menu of methods to pop up, and find the right one. "Java people" will say, "It makes me more productive!", but I'd argue that if someone experienced with Java still relies on code completion for every task, there's probably something wrong with Java (and the programmer).

That's my Java vs. Python rant.


Today's Observations

  • I think there's a cult living down the street from here. The house/church on the corner is called "The Lighthouse Baptist Church". I know that only because some of the residents canvassed the neighborhood with their propaganda.
    I don't think I've ever seen adults around their house, but I always see a bunch of idyllic, somewhat Aryan kids who look like transplants from 1953 playing in the yard or standing around outside. And the weird thing is that the kids look happy. There must be something fishy going on...
  • While eating lunch at Papa Gino's today, a man in his fifties with his three little kids strategically chose the seat where he could stare at two hot high-school girls sitting in the next booth. I noticed his forbidden, devilish glances between bites of pizza.
  • I walked to the ATM to deposit my check, and it felt great! (the walk; not the deposit) A few more brisk walks like that and I'll be ready for the marathon, for sure!
  • A house on Haverhill Street has a sign on the lawn: "room for rent/share a 2 bedroom house/seeking female roommate/Call Eddie". I laughed to myself but then thought, "what a great idea!"