A lot of times, a little white-space can improve readability of a series of function calls, or a data structure, such as a hash.
If you are vimpire, check out tabular it can do things like:
and for your Cucumber steps you can turn
I won’t reinvent the wheel, so give this vimcasts.org screen cast a watch!
It is seriously addicting. By exposing common game object features through ‘traits’, you can quickly get off the ground by mixing in modules into your game objects.
Just to get an idea of how simple it is, check out the
examples folder or give my asteroids-like game a download nfgrebvqf
10 points if you can decipher the title =)
You can catch some videos of the conference over at Viddler
The conference had a great turnout. Fellow ruby nerds came from Texas, and as far as Chicago! A welcome change of pace, since Acts_as_conference stopped 2 years ago.
Two of my favorite talks were:
Given by Avdi, Avdi Devblog and going over all the subtle nuances about exception bubbling, re-raising, exit codes, and threads.
Given by Pete, PeteOnRails Blog he shows several tools available for ruby to deal with geographic data, and map projections.
When working with float values, it’s good to get familiar with how Ruby deals with them. When using division, what you can end up with is a Float, that is NaN or Infinity
Luckily you can use some helper functions to determine what kind of number it is!
As well as working with invalid numbers
Pay attention to the subtle differences between
infinite? returning 1,-1, nil and
finite? returning true/false.
Infinity is also quite useful for representing numbers without a bounds.
Great for that ‘Ultra Mega Robo Deathstar’ hosting plan you offer.
The logo for this site was made by dumping some numbers out of ruby (For coordinates on a unit circle), and crafting this SVG file by hand.
The result can be rendered as an image using: