Badass JavaScript

Entry posted on 2008-04-14 8:34 pm

I came across this one today: JavaScript in StarGate. Man, it’s fun to see code you know on TV, but I love the comments on that post the best:

“The aliens are trying to open a new browser window a synchronize it with our screen size…..bloody bastards!!” –OndraM

“Wow, and we thought XSS Injection was a security vulnerability. In the future, h4ckers actually inject evil robot bugs into your lair via XSS.” –tj111

;)

Makes me want to seriously watch this show now.

Rediscovering PHP

Entry posted on 2008-03-12 1:21 pm

So last night, armed with my nifty new font, I decided I’d get a move on with the next top-level version of Enthusiast. (Yes, I’ve started working on Enthusiast 4.0.)

(For those of you interested in it, it will probably be slow going, as whatever free time I have needs to be spent juggling between rest/recreation/social/family/other hobbies… and because I’m putting in a lot more effort in the backbone, and in usability.)

One thing I’ve always believed in is that you only get as good as what you actually do. That one might read a lot of tech blogs, a lot of white papers, a lot of those hifalutin framework blueprints… but if you don’t get down and dirty with code, you can’t expect to get better. It’s a given that the first few codes you churn out will be riddled with flaws. That’s normal, but that’s better than never getting over that simply because “I can’t fully understand OOP yet, I need to read more about it”. Ugh, get a grip, and get on with playing with code.

My first PHP project, way back when I was doing self-studying, was actually the precursor to Enthusiast. It was the script that handled my then-fanlisting, Bubblegum Crisis. After it was working, I moved on to the first “system” — an admin tool for handling my directory for NeoPets galleries. I actually put up that site, got a pretty nice following for it, and then when I weaned off NeoPets, I shut it down.

And then I started working on Enthusiast (the single-fanlisting version).

Without these first projects, I’d never have learned PHP. And this time, with PHP4’s End of Life looming in the distance, Enthusiast will be bringing me forward to PHP5. OOP, Exceptions, and many newfangled stuff in PHP isn’t new to me, but it’s been a while since I’ve actually handled PHP code continuously (almost eight months–the same time I’ve been with Yahoo! as a frontend engineer). I will be getting personal with a lot of these new things, in order to do what I need for it to do. And that’s quite exciting.

For anyone who’s thinking of learning PHP, the best way to learn really is by doing something you’re passionate about using PHP. I was passionate about NeoPets galleries; I was passionate about fanlistings. The passion drives you forward, and that’s a great thing to have.

I will probably be blogging here occasionally about new things I find out while working with PHP, or thoughts on development in general — what would you like to hear about?

Inconsolata, a monospace font

Entry posted on 2008-03-09 11:37 am

I came across an interesting monospace font, Inconsolata, when it was featured at Smashing Magazine (along with other interesting fonts). I’ve started using it — it speaks to both my geek programmer and aesthetic sensibilities.

Sample of Inconsolata font

I’ve noticed that straight quotes (single or double) lean slightly to the right, as if it doesn’t know if it’s a straight quote or a curly quote, exactly. This is “pretty”. Unfortunately, the backtick (`) leans the same way to the left, around the same angle. This can possibly be a problem (or maybe that’s too harsh: the word is annoyance) especially for types such as myself who habitually use backticks and straight quotes in the same line (see the SQL queries above).

The same goes for zero (0) and uppercase O — the former isn’t slashed, and the difference in width between the two is rather slight especially at small font sizes. I don’t want to need to use a bigger, less space-efficient font size just to use the font. The number one (1) and lowercase l seem different enough to me, so that’s good.

The font is pretty, but is pretty enough?

We’ll see. If I end up getting annoyed because I’d be hunting for code errors and can’t easily distinguish it (due to things looking somewhat the same… especially at 3AM in the morning and some 486732478623472 lines of code later), I suppose it will be time to look for another font.

For the moment — it’s shiny!

What type of programmer are you?

Entry posted on 2007-03-02 3:44 pm

I love personality tests, as I’ve always been the sort who believes that you should know yourself as much as you can to be able to use your strengths optimally and tackle the weaknesses you have the best way that’s suitable for you. I came across this personality test for programmers today and tried it out.

According to the author of the test, it’s based on the Myers-Briggs personality test and my results feel rather accurate, although I also feel like the questions were too few to be able to really encapsulate what sort of programmer you are.

I got the following results:

Your programmer personality type is:

DHSB

You’re a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.

You like coding at a High level.
The world is made up of objects and components, you should create your programs in the same way.

You work best in a Solo situation.
The best way to program is by yourself. There’s no communication problems, you know every part of the code allowing you to write the best programs possible.

You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We’re not writing on paper anymore so we can take up as much room as we need.

Interesting (geeky) stuff.

More entries