cleaning the readability of this ruby script
Hey guys,
I could really use some help cleaning the readability of this ruby script. I could not figure out how to read files more properly for my situation. I know there is a fh.each_line ... but I'm reading more into blocks within the file... first here is the script: http://thorium-ini.ini.cmu.edu/unique_contact.rb (md5sum 1742e0c0fc2022ca06cd99f07342d1c3) Code:
#!/usr/bin/ruby http://thorium-ini.ini.cmu.edu/test1 http://thorium-ini.ini.cmu.edu/test2 Code:
ce0fc04cd448d645f0e1a259a4b40d16 /var/www/localhost/htdocs/test1 Code:
gnychis@x60s ~/school/thesis/host_analysis/degree $ ./unique_contact.rb test To help you better understand the input: Code:
0.245.42.235 *** TOP LEVEL HASH KEY *** George |
What do you mean by "readability"?
To me, it's the layout of the code on the page in a way that makes the logic easy to see. However, "fh.each_line ... but I'm reading more into blocks within the file... " makes me think you have something else in mind. Some things you could do that would improve my kind of "readability":
Right now your script is a major pain to read because of the horizontal scrolling it causes. |
All times are GMT -5. The time now is 05:45 AM. |