Log in

No account? Create an account
Adventures in Ruby: I only have a hammer, but this problem really is a nail 
13th-Jan-2016 06:29 pm
My efforts to teach myself Ruby programming have not advanced much in the past few months, having been displaced by acquisition of other skills more immediately of need in Ye Daye Jobbe. However, I have a solid skill base in writing scripts that take information in one format, slice it and dice it a bit, and spit it out in another format. This is surprisingly useful.

This morning I was in a meeting where we found ourselves saying, "We have a pile of XML files with a ton of information - if only we could turn them into a CSV file containing that information." I have now written a script that does just that.

Using the Nokogiri gem actually makes it pretty stupidly easy to parse XML/HTML. One of these days I'll set myself a programming challenge in Ruby that does not basically reduce to 1) Find the gem that provides the correct objects and methods to handle your data set. 2) Perform basic string and array manipulations. 3) Profit!

Today is not that day.
This page was loaded Jul 19th 2019, 6:48 am GMT.