March 1, 2015 by Daniel P. Clark

Version Both Your Github Repo and Gem

There are many howtos on getting started with Github and creating a Ruby gem.  What I haven’t come across is a blog about versioning your github releases.  So I will demonstrate here the steps I go through after verifying a gem is ready, releasing it, and publishing a version to the code base on Github….

Continue Reading »

February 27, 2015 by Daniel P. Clark

Value Assignment and Deferment with Lambdas/Procs

When assigning a variable with a raw value the outcome is as you would expect. greeting = “hello” # => “hello” puts greeting # hello Now while learning about assigning methods to variables I used to wonder if I was assigning the result value from the method, or simply pointing to the method to be…

Continue Reading »

February 24, 2015 by Daniel P. Clark

Writing methods for both class and instance levels

When perusing the Rails documentation for various methods I noticed something that seemed odd to me.  The method descriptions seemed to show an extra parameter as the first parameter that I was never using.  It’s strange when you use the methods all the time and it doesn’t seem to be implemented the way the documentation…

Continue Reading »

February 21, 2015 by Daniel P. Clark

Minitest with Watir-webdriver

Why, you might ask, would I even think of Watir-webdriver?  Well let me tell you.  It’s because it’s easy and fun.  It’s not a fast way to run tests though.  What Watir will do for you is open an actual web browser window and let you check and interact with it from your Ruby code….

Continue Reading »

February 20, 2015 by Daniel P. Clark

Some Basic Ruby Tools for Sniffing out Errors

Needing to know what’s going on under the hood is a big part to solving problems and challenges.  For the longest time I only ever used print statements to output to the console the state of something at a specific point.  That’s all I ever used in Python.  But sometimes you need to do a…

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 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: arr = [] 10.times do…

Continue Reading »

Page 5 of 8
1 3 4 5 6 7 8
1 3 4 5 6 7 8