Entries Categorized as 'Software Development'
December 7, 2007
I upgraded to Rails 2.0 today, and found that countercache columns were suddenly :readonly, which means that you can’t update them with your regular old model.associationcount = model.association.count routine. So, I whipped up the following ActiveRecord patch.
module TagTeamInteractive
module ActiveRecordSynchCounters
[…]
Posted in Ruby/Rails
1 Comment »
May 3, 2007
I got my latest commit of SanityBags into SVN last night (at about…oh, 1:30 AM). It’s a massive overhaul of the whole system, and much more closely obeys the MVC design objectives now.
SanityBags is a virtual bags AddOn for World of Warcraft interfaces. I started writing it…oh, 5 months ago, and then got busy […]
Posted in Software Development, Gaming, World of Warcraft, Lua, Sanity, SanityBags
3 Comments »
May 2, 2007
Yesterday, I discovered RubyInline. In short, it’s a gem that allows you to write Ruby extensions in C.
I decided to see what I could do with it.
Posted in Ruby/Rails, Software Development, Hacks
No Comments »
May 1, 2007
My first Rails plugin is working! I won’t quite say finished, as it includes no formal tests or migrations, but I’ll get that packaged up in due time.
I recently found myself wanting to move my MySQL database from MyISAM tables to InnoDB tables. The primary reasons for this are:
InnoDB supports transactions
InnoDB supports row-level locking, as […]
Posted in Ruby/Rails, Software Development
17 Comments »
April 27, 2007
BorkWeb has a good article about a relatively old and yet, underused image technique. It’s a good read, and certainly worth implementing where possible. I tend to use this technique with image rollovers, since you have “sets” of images that belong together.
It’s worth noting that this technique is very similar to sprite sheets used in […]
Posted in CSS
No Comments »
April 24, 2007
There are all these great logos out there for the so-called “Web 2.0″ companies springing up every 15 minutes. How do they do it? It’s easier than you may think.
I’m going to show you how to create one of these logos in Photoshop in 5 minutes, or your money back. So fire up Photoshop, think […]
Posted in Design, Photoshop
No Comments »
April 24, 2007
One of the annoying things about Rails is that it goes so far to connect pieces of the database together for you, but it doesn’t have the ability to automatically do validations or associations based on the schema data. A VARCHAR(30) NOT NULL is always going to need validates_length_of(:field, :in => 0..30), and validates_presence_of(:field), right? […]
Posted in Ruby/Rails
No Comments »
April 24, 2007
RJS is a great little tool for interactively updating pieces of a page in response to some AJAX action, but it tends to fall short when you want to do anything beyond blinding dumping content into a page. Dan Webb has written a plugin called “MinusR” that basically flips RJS templates on their head. Instead […]
Posted in Ruby/Rails, Javascript/AJAX
No Comments »
April 22, 2007
Rails has the really nice ability to store an AR model object in the session for easy access. Additionally, it obeys the following rules:
If obj.new_record? == true, then any associations on the object will be saved in the session as well.
If obj.new_record? == false, then any associations whether association.new_record? == true […]
Posted in Uncategorized, Ruby/Rails, Software Development
No Comments »
April 17, 2007
For years now, I’ve used Ahead’s Nero Burning ROM as my CD/DVD burning solution, and it’s worked well. The quality seems to have deteriorated in the past few years, though, putting it more in line with the software that I originally sought to avoid by using Nero - EasyCD Creator, abomination that it is.
I downloaded […]
Posted in Software Development
No Comments »