Give it back!!!

June 10th, 2008

If I may (who’s going to stop me?), I’m going to jack the introduction from SICP:

“I think that it’s extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customers got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don’t think we are. I think we’re responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don’t become missionaries. Don’t feel as if you’re Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don’t feel as if the key to successful computing is only in your hands. What’s in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.”

Alan J. Perlis (April 1, 1922-February 7, 1990)

True words! If you keep paying attention to well-known programmers and successful shops you’ll start to notice, these people have fun. There are things like goating,  Sun Microsystems pranks, and so on and so forth.

Part of it, I think, is because programmers genuinely enjoy what they do, but I like to tell myself that the rest of it comes from an intrinsic property shared by all computer programmers: You can’t stare at these humorless machines all day and suffer through endlessly unfunny business requirements without wanting to keep things light and fun. With bug reports streaming in, with clueless users, with PM’s panicking,  how are you supposed to keep sane without cracking a few jokes, or covering someones entire office in tin foil?

So! To the humorless person who stole our toilet seat from off the trashcan from my office… Hey man. That’s not cool. That was our backup whiteboard. (And it was sanitary)

Ipse Dixit… Twittering on endlessly.

June 2nd, 2008

I haven’t done a fantastic job of updating this blog, or indeed even making it’s content worthwhile. There’s reasons for that - mainly because there are a lot of programming blogs and the opinions of a twenty-seven year old self-serving hacker is fairly inconsequential when you compare the other people doing the same things. Still, I’ve carved out my little chunk of the internet and I might as well use it.

That, anyway, is the main reason. The other reason is that, lately, when I’ve had things to say, I usually just head over to Twitter and say what needs to be said there.

Twitter gets a lot of praise that I think is fairly bullshit - I definitely think it’s a cool service written to a cool idea that was well designed (at least, from a UI standpoint) - but all these people praising it for some genuine invention apparently have very short memories to the fleets of webapp trends that have invaded in the past. Face it: Twitter is Livejournal is Blogger is Scrawl Wall is Message Board is BBS. You go there to input data into a little box and read what other people have inputted into their own little boxes.

Such is the Nature of web applications, though. There’s only so much you can hope to achieve with web apps. You input data, and data is output. What happens to the data is the unique aspect of the web application. It can be as silly as reversing text, it can be as complicated as giving you a home insurance quote. Twitter has earned itself billions of dollars* by doing one simple thing: restraining your input data.

*: Excuse me, that’s “Potential dollars”, not “Kinetic Dollars.” Assuming they actually figure out how to make all of Twitter stay running for an entire 24 hours and then figure out some way to monetize, then maybe they can turn their “estimated worth” into “money the founders can use to buy a Yacht.”

If this seems harsh - it shouldn’t. I’m not trying to knock Twitter. They’ve taken a ridiculously simple idea all the way to the bank. That’s the web 2.0 paradigm in a nutshell - It’s not WHAT you do, but how sexy your method is.

On top of all that, they’ve apparently taken lessons from the Paris Hilton / Britney Spears / Lindsay Lohan school of self-promotion… To wit: You can keep the rapt attention of a whole lot more people by airing your dirty laundry then you can by promoting your terrible album.

Would hordes of hackers give a shit about Twitter if it didn’t give them a chance to discuss how fucking terribly unreliable the service generally is? I’m going to guess no. Perhaps the hipsterish elite of YCombinator would still use it, but MY kind of hacker, the bedroom hackers who shun sunlight and guzzle coffee brewed from jolt cola, I somehow doubt they need to constantly Twitter on about how they’ve been sitting behind their computer for the past.. oh.. 27 years. That would get boring.

So it goes. In conclusion, I guess I’m saying that despite all of Twitters problems, it is doing a really great job of pwning the internet. If you’re going to start a web service, learn from them. Worry less about Amazon S3 vs Google App Engine and more about who your internet hype men are going to be. In this digital age,  UI is king and providing a little transparency can breed a type of rabid fan that the internet hasn’t seen before. It’s amazing, really. People will forgive you your bugs and applaud your acknowledgment of said bugs. If you have to actually fix those bugs is currently unclear… Twitter certainly hasn’t!

As for me, I have all of one friend on Twitter (well, two, but I had to sign my girlfriend up and she still refuses to use it.) so…  you know what to do.

Maintain.

April 16th, 2008

I get the general impression that this:

A programmer whose job mainly consists of changing code that someone else has written and does not often get chances to perform real cleanup on the code (refactoring, redesign, whatever). Unfortunately it is usually seen that this is a job for interns and people right out of college.

Should be something like:

A programmer who generally deals with a more ticket/task based work structure then a project structure.

It’s too general a term, and c2 is giving maintenance coders a bad rap. Not cool.

I have a life outside of blogging, you know.

April 14th, 2008

Oh! I got a comment:

There are so many web-sites like this! Nothing special and nothing original! I will never come back here

Huh. Well. Explains the $1.31 in my AdSense account.

But um, fine, here’s some magic: Google the words “mediafire thread” and the name of a band and have fun with that shit for a good six hours. Works for a lot of cool bands. Might not work if you have shitty taste in music. I wouldn’t know.

And hey - jenevevezthreeway@gmail.com? Your Mother.

Django + Minifb || Facebook

March 24th, 2008

Because for the life of me I couldn’t get PyFacebook running on Dreamhost (Getting django up there is such a hack…) I ended up going with minifb and found I had to write a bit of code to get them to play nice together (or maybe it’s just with me?).

Here’s some quick boilerplate code to make the Django request object readable by minifb for it’s validate method. You can specify the http method as POST or GET or don’t and it’ll find the data.

def TranslateFacebookRequestData(request, method=None):
        """
        for use with minifb.validate:

        pass it django's request object (of type WSGIRequest)
        and an option parameter of POST/GET and it will return
        the request information in a format that minifb can
        work with.
        """
        if method == 'POST' or request.GET == {}:
                data = request.POST
        else:
                data = request.GET

        ret = {}
        for dataItem in data.items():
                ret[dataItem[0]] = dataItem[1]
        return ret

RESET-FCGI.py

March 23rd, 2008

If you searched for Python + Django + FCGI + Reset, then this might be the script for you! (it kills all running python dispatch.fcgi threads.)

#!python
import commands

for line in commands.getstatusoutput('ps -e -o pid,cmd | grep fcgi')[1].split('\n'):
        if line.strip().split(' ')[1].find('python') <> -1:
                commands.getstatusoutput('kill ' + line.strip().split(' ')[0])

Python Encoder

March 18th, 2008

Here’s a quick hack python script to convert mbcs encoded text to UTF-8.

import os
import re

sourceDir = "SOURCE_DIR"
targetDir = "TARGET_DIR"

searchPattern = re.compile("[\S\s]+\.htm[l]{0,1}$")

for f in os.listdir(sourceDir):
    if re.match(searchPattern, f):
        fileContents = open(sourceDir + f, "r").read()
        decodedContents = fileContents.decode("mbcs")
        NEW_FILE = open(targetDir + f, "w")
        NEW_FILE.write(decodedContents.encode("utf-8"))
        NEW_FILE.close()

Daily Digest updates

February 20th, 2008

The Daily Digest GUI is nearly done, and pretty slick, if I do say so myself.

Of course, in the testing process, I managed to trigger some of dreamhosts spam checks… So development has slowed to a crawl.

On the bright side, Dreamhost’s support staff has never been anything but awesome to me, so I’m guessing it won’t be an issue for very long.

A compiled version for the Mac is coming as soon as I can get a successful unit test ran, but as of now all I’m doing is triggering every error handler I wrote.  (although now I’m glad I wrote them, best believe.)

Best Link Ever. (Windows only)

February 19th, 2008

http://www.geisswerks.com/drempels/

http://www.geisswerks.com/drempels/

http://www.geisswerks.com/drempels/

http://www.geisswerks.com/drempels/

http://www.geisswerks.com/drempels/

http://www.geisswerks.com/drempels/

8 years or so later and it’s still true!!!

WhatthefuckPress

February 19th, 2008

WordPress won’t, no matter what I do, leave my chosen theme selected for very long. No matter what I do, it always gets sick of my customized theme and decides that it was much better off with the Default theme.

Hey, I understand: Change is scary. But you know what else is scary? WordPress with free will. (Especially considering some of the stuff I’ve told it in the past.)