Archive for March, 2014



Final Blackjack game

Posted on: Saturday, Mar 29, 2014

The last lesson (week) of the Tealeaf Academy Ruby on Rails Online Bootcamp was to add betting and AJAXify the Blackjack game. I’ve had the wildest ideas and grand schemes to make the Blackjack game a fun, flashing, exciting and grand game that even could compete with the Casinos.

Blackjack on the web

Posted on: Monday, Mar 24, 2014

In week 3 of the Ruby on Rails online bootcamp I had to remake the Blackjack game using the web framework, Sinatra. As this would be the third time making the Blackjack game, that game logic wasn’t that much of a problem anymore. However, getting used to Sinatra and suddenly making a web application proved to […]

I’m working on the web version of the Blackjack game. This is done using the Sinatra framework for Ruby. While running the development web server (Shotgun/Thin) and using sessions, you may get the following warning in the console: SECURITY WARNING: No secret option provided to Rack::Session::Cookie. This poses a security threat. It is strongly recommended […]

Blackjack console game (continued)

Posted on: Saturday, Mar 15, 2014

In the next week of the Ruby online bootcamp over at the Tealeaf Academy, you have to recreate the Blackjack game using  an object oriented approach. Having worked as a Java Software Engineer before, this isn’t much of a problem to me. I’ve implemented the objects and spruced up the ASCII art even more then […]

Why use symbols as hash keys in Ruby?

Posted on: Wednesday, Mar 12, 2014

Question A lot of times people use symbols as keys in a Ruby hash. What’s the advantage over using a string? E.g.:  hash[:name]  vs.  hash[‘name’] Answer Using symbols not only saves time when doing comparisons, but also saves memory, because they are only stored once. Symbols in Ruby are basically “immutable strings” .. that means that they can not be […]

Maker’s Schedule, Manager’s Schedule

Posted on: Tuesday, Mar 11, 2014

As recommend by my TA, Chris Lee, in one of his previous live sessions, over at Tealeaf Academy, I read the article ‘Maker’s Schedule, Manager’s Schedule’ today. I must say, it was a halleluja moment. Finally it all made sense how hard it is to concentrate on the development work now and then. As a […]

Blackjack console game

Posted on: Friday, Mar 7, 2014

I’m attending the GoTealeaf Professional Grade Ruby on Rails Online Bootcamp. As an assignment you have to create a procedural Blackjack game that can be run in the console / terminal. I’ve done this but I developed it a bit more then required: I created the Blackjack game with lots of ASCII art to make it […]

Pass by reference versus pass by value

Posted on: Friday, Mar 7, 2014

I’m currently studying Ruby and Rails with the Tealeaf Academy. It’s going well and it’s really fun to study Ruby. After years of Java, I feel Ruby is being a step forward. During the study, the subject of Ruby’s passing by reference or passing by values.  (For the less-technical readers; this is the difference between […]