January 13, 2016 by Daniel P. Clark

101 Ruby Code Factoids

0) ‘methods’ method Since almost everything in Ruby is an Object you can type dot methods on it to see what methods are available. 4.methods – Object.methods # => [:-@, :+, :-, :*, :/, :div, :%, :modulo, :divmod, :fdiv, :**, :abs, :magnitude, :~, :&, :|, :^, :[], :<<, :>>, :to_f, :size, :bit_length, :zero?, :odd?, :even?,…

Continue Reading »

December 12, 2015 by Daniel P. Clark

Ruby: Arrays by Example

Arrays are Ruby’s most used collection type.  I will use very little description as I give examples for the many different ways to work with Arrays. Different ways to create an empty Array [] Array.new Array[] # same as :new Array(nil) # tries converting to an Array first and insures an Array result %w^^ #…

Continue Reading »

January 8, 2015 by Daniel P. Clark

JavaScript is easy with jQuery

If I had only known how easy it would be to pick up JavaScript with jQuery I would have learned it a long time ago.  But I had allowed a glimpse of obscure looking JavaScript to deter me in the same way Java kept me from learning programming for years. When I first wanted to…

Continue Reading »