16
votes
5answers
1k views

Parse webpage and save fetched images to a directory

I had a task for a programmer position which I failed. I am a newbie programmer and I accept that. The only problem is that employer never told me what the actual problem with the code is. So maybe ...
6
votes
2answers
53 views

Refactor an XML to JSON parser class

I used Nokogiri and a piece of ActiveSupport to parse an xml file from a given URL, format the data properly and return a JSON string. The script works as expected, so I'm only wondering if there are ...
5
votes
3answers
150 views

Converting KML/XML to Javascript

So, I have the boundaries of every states in the US, from the google map KML file. This KML file is actually a XML file. I'm converting this file to a JS file compatible with google map in order to ...
3
votes
2answers
836 views

How would one more elegantly parse data from XML using Ruby and Nokogiri?

I have a method that parses XML into an array of hashes. Here is the original XML: ...
3
votes
2answers
256 views

Improving Rails feed parser

This is my feed parser method using feedzirra. It works, but I feel dirty because I can't figure out how to improve this code. Any suggestions? ...
2
votes
3answers
504 views

Extracting and mangling a parameter from a MySQL configuration file

Is there a better way of doing this? ...
1
vote
1answer
106 views

Ruby html href parser working slow

I wrote this simple HTML parser in Ruby. Basically I have a folder that has files. Every file has crawled web pages. The only addition within these files is before the HTML content there is a page ...
0
votes
1answer
106 views

Is this the most efficient way to track word changes in a string?

I'm working on a writing platform and am using a modified version of the Levenshtein distance algorithm to track a writer's engagement with their writing. It tracks not only words added to their ...
0
votes
2answers
52 views

ruby notes scrubber search for specific characters [closed]

I am looking to making a not scrubber for my testing notes. I want to run a script that will read the entire file looking for special "tags" that I made in my notes, like @ ? (c) etc... I then want to ...