Re: numeric?

2012-12-27 Thread Robert Klemme
On Thu, Dec 27, 2012 at 11:32 PM, Brandon Weaver wrote: > Sorry, I wasn't very clear. I was typing most of that from my Phone. > > I'm writing scripts for a wireless ISP, and we use several different types > of antennas. They're monitored in several different ways, > SSH/Telnet/SNMP/etc. Annoyingl

Re: When to use Hashed Parameters for method calls.

2012-12-27 Thread Robert Klemme
On Thu, Dec 27, 2012 at 11:40 PM, Henry Maddocks wrote: > > On 28/12/2012, at 12:06 AM, Robert Klemme wrote: >> Using a Struct generated class might give a bit more type safety since >> all possible keys are laid out explicitly. > > Yes, this is a good compromise, but it always feels odd to me t

Re: Ruby Association Certified Ruby Programmer

2012-12-27 Thread Robert Klemme
On Thu, Dec 27, 2012 at 5:29 PM, Sean Alphonse wrote: > Also, yes Ruby and Perl are very similar, being that their both > scripting languages (though they do have differences). But there similarities do already end. Perl does not have OO from the start, Perl has a ton of special cases etc. and

Re: Ruby Association Certified Ruby Programmer

2012-12-27 Thread Robert Klemme
On Thu, Dec 27, 2012 at 5:11 PM, Matt Lawrence wrote: > I have noticed that this list has been taking on a rather nasty tone lately. I wouldn't call it "nasty" - still the tone has degraded. There are a few other changes I have observed. - Discussions of advanced topics almost vanished these d

Re: When to use Hashed Parameters for method calls.

2012-12-27 Thread Robert Klemme
On Wed, Dec 26, 2012 at 10:43 PM, Henry Maddocks wrote: > PS. To answer your original question, I personally don't like hashed params > because they hide the interface, but I occasionally use them because > sometimes they 'feel' right. Looking back over my code it is usually when I > have a lo

Re: Accumulate total count for each month

2012-12-27 Thread Robert Klemme
On Wed, Dec 26, 2012 at 10:59 PM, 7stud -- wrote: > Robert Klemme wrote in post #1090246: >> >> >> Why isn't that simple? Did you actually try it? >> >> require 'date' >> >> counts = Hash.new 0 >> >> ARGF.each do |line| >> line.chomp! >> counts[Date.parse(line)] += 1 >> end >> >> counts.sort_