Jun 06
I finally wrapped my head around routes and how to get URLs pointed to the correct actions and controllers.
After that, it literally took 10 minutes to create a view for uploading a file, connect it to the controller, and create another view for displaying the uploaded file.
(Specifically–uploading the location CSV to be parsed and added to the database)
Now to parse!
I’m really beginning to fall in love with Ruby on Rails. It’s been kind of difficult wrapping my head around some of the concepts, but once I do… damn it’s fast.
Once I get the CSV upload mechanism complete, it’s time to create another action for searching and returning a set of locations (in JSON!)

I know, I sortta fell in love with Ruby looking for a better language for just general scripting and possible web development then I saw some insanely great things Ruby on Rails can do and I was sold.
I’m actually writing some convenience scripts for certain tasks at work… it is so freaking easy to do things.
For example, part of one of the scripts is generating a list of hostnames from shorthand. A lot of hosts are sequentially numbered, so people will enter host[101-200].domain.tld and it will spit out 100 lines of singular hostnames (or in this particular case, make 100 rows in a CSV for those hostnames). I don’t think there’s another language in existence that can do this in so few lines of code:
I mean, seriously. In 10 lines of code I have taken a string from the standard input, checked to see if a pattern exists, yanked the pattern, pulled numerals out of that pattern, created a range from those numerals, iterated the range and replaced the subsection of the string with the numeral, added them all to an array, and printed each line of the array to the screen. What other language can do that in ten lines of code?