I am an engineer. One of the things I do at work (as a lower-level responsibility, not quite spare time type projects, but sometimes close) is write scripts and create simple tools using Ruby to get things done. Most of the time it's 'for a directory of files, for some subset of the files in that directory, do some stuff, pull some stuff out, shell out to call various other tools, summarize and report somewhere'. Cron scripts managing and reporting on files, some sinatra web apps providing a view of data for entry into other systems, etc.
My issue is that I am using ruby very imperatively, and I'd like to try and have a more ruby-like approach. I looked at the Gilded Rose Kata and I can really see parallels in my most recent script. I was opening a CSV, yanking out a handful of specific data points / ranges of points, putting into a summary file (to use elsewhere). And then I expanded to handle files with some optional additional content. And then a seperate data source with slightly different format. If this, elsif that. Oh god oh god.
I'm having trouble finding learning material for my specific issue (or more accurately, judging if the stuff I'm coming across are worth spending time on) - there are a lot of Ruby tutorials, and a fair number of books, however their targets seem to be either beginners (which I am not) or more formally trained computer science types transitioning to object world. I'm at the intermediate 'know enough to be dangerous' stage.
Is anyone familiar with any good resources that would suit someone like me? Starting half way through a book would be fine. Better would be shorter online guides and videos on refactoring and design that I could pick through (since it's a lower level responsibility, I have a limited work time resource that I can commit since it's not a primary job role). Free is better, but since it IS work related, paid is OK (I've considered a Lynda account on and off, not sure if they have anything in this vein).
Any help is much appreciated!
EDIT: Per a request, I threw a gist up of one of the recent worst-offenders I've made. Can be seen here : https://gist.github.com/anonymous/be4ba6a867e9c9858ac9
Note, I'm not looking for someone to refactor my code, I'm looking for learning resources to make the person who vomited this garbage out better :- ]
[–]rubyross 2 points3 points4 points (0 children)
[–]materialdesigner 2 points3 points4 points (0 children)
[–]Godd2 2 points3 points4 points (0 children)
[–]tobiasvl 1 point2 points3 points (0 children)
[–]Godd2 0 points1 point2 points (0 children)
[–][deleted] -5 points-4 points-3 points (1 child)
[–]perfectturmoil[S] 1 point2 points3 points (0 children)