Posted by Jarsto in Technology
December 15th, 2008 | 1 Comment »

I spent quite a bit of time yesterday, as well as most of today so far, playing with code. Some PHP and some javascript. I’ve never done much with the latter until quite recently, so a lot of that is not much further than “Hello World”, but it’s fun.

I’m actually still in two minds about most javascript uses. Or rather in one mind: don’t do it. As a rule I believe sites should use as little javascript as possible. For one thing javascript, like flash and other client side scripts, is somewhat impolite. Rather than using serverpower to present the site you want, you use the processor power of person showing an interest by visiting the site.

Granted there are things that simply can’t be done serverside, and javascript is usually a better way to deal with them than flash. But quite a few sites use javascript even when there are perfectly valid serverside alternatives. In fact there are sites where, even when I’m not doing (or looking at) anything special I can still watch my processor usage spike just from having them open.

I’ve had a look at some more advanced code as well, and I find that it’s getting easier and easier to figure out what’s going on just be reading the code. That should translate into an ability to either adapt or write more advanced pieces of code, which is my real aim: Combining the clientside effects of javascript with the serverside power of PHP through AJAX.

Most of that’s still in the future (though I hope in the near future), but however that may be, I’ve rediscovered something: playing around with code is almost as much fun as writing fiction. My ideal is still to make my living by writing fiction some day, but if I can make some of my money by writing code, that would be good too.

One Response to “Playing With Code”

  1. Starstuff Says:

    Well, I am happy that you find joy in flexing your coding muscles :) And I have to agree with you: writing code and tweaking it so it works the way you want it is a lot fun. Even though I am not much into scripting languages, I enjoyed doing some HTML and CSS over the weekend and seeing those cryptic lines of code transformed to a beautiful (patting myself here) site reminded me why I like this sort of thing.
    And for me it’s exactly the other way around: while I like writing, I hope to be able to make (part of) my living one day by designing sites.
    Oh well, let’s bravely go where we haven’t gone before…

Leave a Reply