Hacker News new | past | comments | ask | show | jobs | submit login
Premature Optimization and the Birth of Nginx Module Development (evanmiller.org)
73 points by mattyb on Feb 6, 2011 | hide | past | favorite | 4 comments



I always wondered why an Nginx module that was about generating a circle had such prominence on the Nginx website and now I can say I understand =]

Although this was premature optimization I still find it a beautiful hack. The author was still not content with the C solution of actually generating the GIF each time (which took 30ms, actually a long time for servers) and instead reframed the problem at a deeper level and created a beautiful little hack that just modified the palette table.


If you like that, you should look into old-school color cycling/palette shifting techniques used in the 8-bit era.

Someone did it with HTML5 too:

http://www.effectgames.com/effect/article.psp.html/joe/Old_S...

Demo:

http://www.effectgames.com/demos/canvascycle/?sound=0


I've seen that before, but I'm still amazed at how beautiful it is. I can't fathom how simple palette cycling can produce these effects, even when I'm looking at the palette.


Fortunately we now have widespread data: URIs, so the GIF/PNG twiddling can be done in the client saving even more time! (But please don't.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: