In case you haven’t heard, PHP may soon have support for lambdas. These are basically anonymous functions that let you more easily create dynamic code, or throwaway functions that only get used in one place. Mmm. Lambdas.
Here’s a neat trick, if you’re working with Ruby. Ever wondered how to get a list of all installed gems?
At the command prompt, type
sudo gem server
Once you’ve done this, go to http://localhost:8808, and you can see all the Ruby Gems installed, along with info and documentation about them. Awesome!
Hat tip to Matt
Continue reading about Listing Ruby Gems, or just viewing documentation
One hugely important thing in coding is debugging. Unfortunately, a lot of Javascript debugging gets done via alert() calls. This gets awkward quickly, with the alerts affecting timing, and just being annoying if you have to dump large amounts of data out.
Firebug is a great development tool, and has a really handy logging interface that […]
I’ve been writing a lot of JS lately, and I wanted to take this opportunity to drop some knowledge right here.
Lots of languages have support for some type of for-each-looping. This is great for looping over associative arrays, and even regular arrays, since it’s a bit cleaner than the standard for-loop. Sadly, Javascript doesn’t totally […]