February 18, 2015 by Daniel P. Clark

A Glimpse at Tail Call Recursion

Tail recursion is where a method calls itself. When I first saw tail call recursion I was blown away by it! I found it difficult to wrap my mind around. Thinking about it was like thinking about a snake eating its own tail and I couldn’t see that working out. But, as it turns out,…

Continue Reading »

February 14, 2015 by Daniel P. Clark

Use the given project generators

Rails Before I started using Rails I was the guy who would type out web projects by hand… I was accustomed to it.  I knew what I was working with all the time simply because I wrote it.  When I had started reading the docs on Rails I was trying to learn it in this…

Continue Reading »

February 12, 2015 by Daniel P. Clark

Setting up Remote SSH Access to your Ubuntu Box

I’ll keep this as short and simple as I may.  In my use case I have a Netbook that doesn’t build or run Rails very well, but I love editing with it.  My main computer runs Ubuntu 14.04 and is a great development environment handling server features like a champ.  For your PC that you…

Continue Reading »

February 10, 2015 by Daniel P. Clark

Rails Polymorphic Associations

What is a polymorphic association you might ask?  It’s where an ActiveRecord model can potentially belong to more than one other kind of model record.  So the single instance of your car belongs to you, a person, whereas other cars may individually belong to a car lot, a business. Why do we need it? In…

Continue Reading »

February 7, 2015 by Daniel P. Clark

Do It All With Ruby

There is a recent post on thewildblogger.com titled “Top 12 Programming Languages for Beginners in 2015” which uses diagrams from IEEE Spectrum based on popularity of languages on the internet based on quantity.  The article itself does a decent job on touching on many good languages.  But I find the image graphic misleading. Image: IEEE…

Continue Reading »

February 6, 2015 by Daniel P. Clark

Getting Into Rails Model Queries

For the longest time I was stubborn against learning “database programming”.  It was the abhorrent syntax that made me so resistant.  But low and behold there came Rails who found it in their heart to make a middle man ActiveRecord in which to slay the evil abhorrent syntax by resolving all good details in more…

Continue Reading »

February 4, 2015 by Daniel P. Clark

Using Ruby Object Type Classes to Safely Build Data

When building collections of data you will find situations where the types aren’t what you planned to work with.  And when I say types I’m speaking generically of arrays, hashes, strings, integers, nil, etc.  Everything’s cosy when you know what your getting.  For example putting 10 integers into an Array:

But if you want…

Continue Reading »

February 1, 2015 by Daniel P. Clark

Discovering UJS with AJAX

Having worked with Rails a while I’d heard of UJS as being Unobtrusive JavaScript.  I had thought that it was simply a pattern of writing your JavaScript in a JS file to be called via a method call rather than inline JavaScript within elements in the view.  So I had definitely overlooked the benefit of…

Continue Reading »

January 28, 2015 by Daniel P. Clark

Learning by Teaching

I grew up in a home-school family.  That being the case there were times where my mom was learning as well while still teaching.  There are many times where the teacher will learn from the student.  As we learn we can both sharpen our own knowledge and refine it by teaching what we learn to…

Continue Reading »

January 28, 2015 by Daniel P. Clark

Rails Helper Methods

When I had started developing in Rails it was months before I even heard of “Helper Methods”.  I did see the folder in the app directory, but I didn’t see any use for it at the time.  I mean Rails is pretty much Model-View-Controller, so why would anyone need helper methods? Well once I found…

Continue Reading »

Page 7 of 11
1 5 6 7 8 9 11
1 5 6 7 8 9 11