RubyOnRails
RubyOnRails Application Templates
I’m starting to use application templates more, and because of it, figured I’d make them public. Right now, only two are public but that will change. The first is for generating a very minimal application, whereas the second is what I use for building community oriented applications. I plan to release one every type of [...]
If You Cant Teach Yourself Go Back To PHP
Rails has hit that point of public adoption where we are getting the mass of tools asking for basic help that they can answer by clicking the first result of a simple google search. We all ask questions, sometimes stupid questions, but it’s part of the learning curve. There are those that ask stupid questions [...]
Ezmobius Is The Devil And Is Gaining Followers For The Apocalypse Using Nanite
I was looking through nanite, a neat system using rabbitmq, erlang and a bunch of hackery, to give you a scalable message queuing backend for your queueing needs. I scrolled to the top of the page when this caught my eye, a sign of events to come, the apocalypse, if you will. Ezra is the [...]
Affiliate Click Tracking With Rack And Redis Because I Care
I’ve been investigating methods for performing affiliate based click tracking, for both work and my own personal needs. I’ve tried using Rails directly, Sinatra and Rack.
Rails – Slow, hell no.
Sinatra – Fast, but now another app to maintain (as small as it is), but still an option.
Rack – Faster than Rails, slower than Sinatra. [...]
Why MemCache Makes Me Want To Spoon Out My Own Eyes
Fragment Caching is a handy technique in which you cache a fragment of your view logic for subsequent requests. This allows one to decrease the time a request takes to complete and put less load on resources. Before you even ask, no, you don’t need this on your todo list or whatever other crappy app [...]
Not Using IPAddr Should Result In You Being Mauled By A Bear
I wrote a huge rant about stupid people storing IP addresses as a CHAR(15) in the DB. I then gave up and realized stupid people will remain stupid, and intelligent people will learn. Use an INT(4), it’s a huge saving in size and indexing will be fast.
“kris, Im not a stupid person, and want to [...]
Paperclip before_process For Your Habitual Pornographic Needs
Ok, so say you built yourself a handy dandy little webapp for organizing all the porno pics you ripped from google image search, you know, since you live alone in your parents basement and all. Suddenly, it strikes you, “I should move up to porno movies now, but I want to keep my images”. You’re [...]
Find Missing Table Indexes With ActiveRecord For The Inept
Nothing is worse than scouring a table full of foreign keys, only to find out they aren’t indexed. I don’t care if you’re Jet Li hopped up on rails of coke and old episodes of Dragon Ball Z, you’re finds are still going to be slow and taxing. “But how do I look for missing [...]
Polymorphic Associations For Tools Like You
You think I’m going to back down on you being a tool? Think again, little Nancy. On your road to becoming a RubyOnRails programmer made of lightning, you need to learn a bit about polymorphic associations. What are they? It’s a simple way of associating one class to multiple classes. “But kris, I already have [...]
Disabling Paperclip asset timestamp keeps you from committing genocide
Know what’s frustrating? Having a flash app that pulls xml from a controller not function. What’s even more frustrating is finding out it’s because of asset timestamp caching. That’s right, that stupid little ‘?293636′ is a form of caching, and works fine, except when it’s being swallowed by flash via XML. I forgot to write [...]
