having fun with code

Monthly Archives: December, 2008

Modifying the URL Hash without affecting the browser history

Although this is not very common, some times you would like to modify the URL hash (this is the value after the # on the URL) without affecting the browser history. Let’s say you have multiple sets of tabs on your page or simply that your hash is going to change very often. But still [...]

Adding specific code for production only

When you are developing a website you want to get as close as production as possible, to guarantee the final result will be appropriate and to make sure everything is going to work fine. But there are special cases when you want to add some code only on production, like stats code for example. One [...]

Forest demo (was Grass)

I have updated the Grass demo and renamed it to Forest, which I think is a more appropriate environment for the sounds I used. I have done some fixes to the rain loop and I have added some light animations.

Splitting a vector into two vectors 90 degrees apart

I wanted to add something special to the Particle-Balls demo I made. At first, the idea seemed pretty simple: When clicking on a moving ball, split it in two with a 90° angle between them (π/2 in radians). To keep it simple, both balls will have the same size as the original and the same [...]

Grass demo: background sounds

Grass is an example of how to create an environment with multiple sounds playing in the background at random intervals. See the demo: http://dev.enekoalonso.com/research/grass.php

Particle Balls demo, now with sound!

Last week I read about the SoundManager2 javascript/flash library to manage sounds on websites (I found SoundManager2 while reading about MooSound, a sound management library based in Mootools that I haven’t tried yet.). The library looks very nice. It is pretty small but at the same time it gives you a lot of control on [...]

sIFR Lite

sIFR is a script that allows using any font on websites by embedding them on a flash object. The first release was back in 2005 and although is not the only solution for using non-standard fonts on the web, is widely used because its server independent and doesn’t require any graphic processing on the server [...]

WordPress Comment API & WPNotifier

I didn’t know WordPress had an API (I just decided to start using WordPress a few weeks ago). Apparently now is event better, since the 2.7 API has support for comments too. Well, I promise I’ll play with it as soon as I have some time. Others are already having fun with it and applications [...]

Gravity in the DOM

A couple of days ago I created a demo to simulate planets on a 2D universe interacting each other like Gravity does in our lives. To compute the movements every planet had to be evaluated with each other on every step. Their position will be affected by the other planet position and in proportion to [...]

Keyboard shortcuts in Drupal: Navigating through comments

It was one of the best features of Google Reader and Google GMail: the keyboard shortcuts, specially the ones to navigate through messages or posts (n = next, p = previous). I decided it was time to implement it on spaniards.es, so here is the code I used. So far it only navigates through comments [...]

About the blog

This is a blog about development, focused mainly on Javascript but also other languages like python, shell scripts and more.

About the author

Eneko Alonso is a software engineer and UI developer with more than eight years of experience in software and web development. He lives in San Luis Obispo, California and works at LEVEL Studios.

Contact Info

Contact Info