Monday, March 23, 2020

The TDD Course for Beginners : Learn by Practicing 7 Katas

Learn how to do Test Driven Development using Ruby within 4 hours. You will get:

1. The transcript of the entire course in PDF.
2. TDD in Ruby ebook in PDF, Mobi and Epub formats
3. Members only TDD tutorial website that walks you through every exercise in the course.
4. Monthly Google hangout Q&A session that supports your learning objectives.
5. All the slides used in the course in PDF format.
6. TDD Course Tools Checklist for every sub-skill covered in the course.
7. TDD in Ruby Course Outline that was used to create the course.

How do I get access to the videos and all the above goodies?

For only $9 / month, you get my support and access to all of the above. Send me payment via Paypal to to get access today!


Jeff Casimir, Principal, Jumpstart Lab


The actual coding TDD examples for Fizz Buzz and Fibonacci were really well done
During the coding exercises the refactoring of code was a good illustration of how to improve certainty of test results
Good overview of the importance of testing
Each lecture / exercise was only 5-10 minutes providing nice incremental gains in the course


The instructor's delivery was not engaging - students tune out very quickly
First 61 minutes were very high level and included no actual coding
Instructors speaking voice was monotone and slow for the entire course no inflection, jokes, or anything to keep your attention
The audio between segments varied in quality to sometimes low quality not ideal for a $200 course
Instructor used whiteboard to write notes and diagram concepts during lecture (also wrote in cursive and at least 1 time wrote off viewable screen)


We wouldn't recommend it for Turing pre-requisite work, but could be valuable supporting material for students in the class.

Mylene Reiners

When you want a theoretical background on TDD, this course is great (and the Ruby part is not too hard for people knowing only a little Ruby...)

Yury Voloshin

This is a good introduction to TDD for those who either have never used it or who have a very rudimentary understanding of it. Some of the more advanced concepts toward the end are somewhat rushed through, but I' sure that can't be helped due to time constraints and to the nature of the material. At least now I know the topics that I need to into more deeply.


This course introduces a solid foundation for practicing TDD. The instructor definitely knows what he's teaching. Information is divided in small logical and understandable chunks/lectures.

Jesse Mignac

Techniques, examples and theoretical material. This course is a really nice start to TDD with Ruby

Andrew Platkin

Very good pace and learned alot

Thom Parkin

The beginning of this course seems a bit slow and very dry. But your patience is well rewarded because the depth and detail of information provided is priceless! Mr. Paranj uses a time-tested technique of methodical presentation of ideas, one built upon the other, to its ultimate success. I am grateful and impressed by this course.

Jikku Jose

I am very happy to have such a comprehensive course from Mr. Paranj. I have been trying to do TDD in my projects for quite sometime without much success. This course helped a lot to expose much of the concepts and details one should focus on while doing TDD.  I wish the examples mentioned in "Fake It till you make it" and "Triangulation" was a bit more involved rather than the basic ones presented so that the techniques could be better understood.  I thank Mr. Paranj and Udemy for the course, it really helped me. Hope more advanced Ruby related materials can be brought out.

Pawel Jackowski

Instructor knows TDD and explains it with ease. I am quite familiar with technique and just wanted to refresh knowledge and I still recommend course. I definitely learned something about common mistakes and importance of every step in TDD sequence. I enrolled for free.

Steve Freeman

Instructor uses katas very effectively to show the patterns behind TDD. His clear examples and pointers to material for further study were very helpful and I look forward to practicing katas on my own. If you're trying to make sense of TDD I highly recommend this class!

What are the requirements?

Basic programming skills
You need to have your favorite text editor installed on your machine
You need Ruby 2.0 or above installed on your machine.

What am I going to get from this course?

Do Problem Domain Analysis
Do Solution Domain Analysis
Design Test Cases
Write Tests First
Apply Canonical Test Structure when having difficulty in writing a test first.

Who is the target audience?

Beginners to Test Driven Development
You should already know how to write programs in Ruby
You should already know how to create an instance of a class and invoke methods.

Course Description

In this course you will learn the basics of Test Driven Development. You will learn how to do Problem Domain Analysis, Solution Domain Analysis, Designing Test Cases and Writing Tests First. Learn the Basics of Test Driven Development in Ruby using this Beginner Course. This course will take 4 hours to complete.

Practice skills using 7 katas

  • Use the downloadable checklists to guide you when coding
  • Learn 3 different techniques to do Test Driven Development
  • You can be more productive if you practice TDD at work. Companies that adopt Test Driven Development are great places to work.
The material used in this course is the result of feedback from students who attended my TDD bootcamps and tutorials. This is a course designed by a developer for developers.

The concepts are first explained in a presentation. Then a coding demo illustrates how to apply the theory in practice. At the end of the lesson an exercise is given to reinforce the material.

You will learn the following concepts:
  • Assertions
  • The structure of a test
  • TDD Cycle
  • Minimal Implementation
  • Starter Test
  • Story Test
  • Next Test
  • Refactoring
  • Obvious Implementation
  • Fake It Till You Make It
  • Triangulation
  • Hiding Implementation Details
You will be able to attend interviews for companies that demand TDD skills to get a six-figure salary. Complete with working files and code samples, you'll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course. I have interviewed people and I have seen the common mistakes made by candidates.

Subscribe Now

For only $9 / month, you get my support and access to all of the above. Send me payment via Paypal to to get access today!

Sunday, June 18, 2017

Test Behavior vs Implementation

You might have heard that in Rails model:

      validates_presence_of :name
can be tested using helpers like:

should_validates_presence_of :name

The problem with this kind of testing is that it is tied to this specific implementation of validation. If you change the validation to use it's own custom object, this test will break. This is not a good idea.

Wednesday, June 14, 2017

Conversion Points

Conversion Points

Every time your audience is asked to take an action within your sales funnel some users fall off. The key to a highly profitable funnel is to optimize each one of these conversion points.
Let's see which conversion points matter most, how to optimize them, and the 4 main metrics you should track if you want to profit.
  • Lead Magnet
  • Opt-In
  • Email Followups (Open Rates)
  • Order Form Conversion
  • Upsell
Every single step in the sales process is a conversion point. Every kind of sales funnel has it's own conversion points. Take a look at your existing funnel and identify all the conversion points. Conversion rates in sales page is one of the conversion point in the sales process. But the entire sales process must be optimized. 

Key Metrics

  • Cost of Customer Acquisition 
  • Life-Time Customer Value      (Triple the initial sale, in two years or so).
  • Cost Per Lead 
You can buy PDF template at Graphic River  and use it to create PDF documents.

Wednesday, June 07, 2017

Possible Rack Cache Issue

I had to remove rack-cache to figure out why articles index page did not display all articles when a user clicked on a tag to get related articles.

First remove the rack-cache gem, delete rack-cache gem in Gemfile and run bundle. To troubleshoot this problem, in production.rb set:

config.assets.compile = true

In your development machine (not production) run:

bundle exec rake assets:precompile returned 1 instead of one of [0]

This gave a clue that there was a reference to rack-cache in application.rb.

rake assets:precompile --trace RAILS_ENV=production
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
rake aborted!
LoadError: cannot load such file -- rack/cache Be sure to add rack-cache to your Gemfile


config.action_dispatch.rack_cache = true from application.rb

Redeploy the code and from rails console production in the production machine, run:


to clear the cache. The problem turned out to be not related to rack-cache. At least one of the suspect has been ruled out. I temporarily disabled the find related articles by tag.

Monday, June 05, 2017

Tagging Multiple Models in Rails Notes

class TagMultipleModels < ActiveRecord::Migration
  def change
    rename_column :taggings, :episode_id, :taggable_id
    add_column :taggings, :taggable_type, :string, :default => 'Episode'
    remove_foreign_key :taggings, :episodes

rake db:rollback

StandardError: An error has occurred, all later migrations canceled:

Add a new migration for:     remove_foreign_key :taggings, :episodes

rails g migration remove_foreign_key_for_taggings


Delete teh new migration and create a new article instead of editing an existing record in an invalid state.

SELECT column FROM table WHERE column NOT IN
(SELECT intended_foreign_key FROM another_table)

select taggable_type from taggings where taggable_type NOT IN (select taggable_id from episodes);

Mysql2::Error: Cannot add or update a child row: a foreign key constraint fails

Mysql2::Error: Cannot add or update a child row: a foreign key constraint fails (`chico_development`.`taggings`, CONSTRAINT `fk_rails_18a01188f6` FOREIGN KEY (`taggable_id`) REFERENCES `episodes` (`id`)): INSERT INTO `taggings` (`taggable_type`, `tag_id`, `taggable_id`, `created_at`, `updated_at`) VALUES ('Article', 542, 4752, '2017-06-06 03:14:34', '2017-06-06 03:14:34')

Import data from production. Merge the last two new migrations to one migration:

brew install elasticsearch

==> Using the sandbox
==> Downloading
######################################################################## 100.0%
==> Caveats
Data:    /usr/local/var/elasticsearch/elasticsearch_bparanj/
Logs:    /usr/local/var/log/elasticsearch/elasticsearch_bparanj.log
Plugins: /usr/local/opt/elasticsearch/libexec/plugins/
Config:  /usr/local/etc/elasticsearch/
plugin script: /usr/local/opt/elasticsearch/libexec/bin/elasticsearch-plugin

To have launchd start elasticsearch now and restart at login:
  brew services start elasticsearch
Or, if you don't want/need a background service you can just run:
==> Summary
  /usr/local/Cellar/elasticsearch/5.4.1: 100 files, 35.4MB, built in 1 minute 7 seconds


org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/local/var/elasticsearch/elasticsearch_bparanj]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

$ brew remove elasticsearch
$ sudo rm -rf /usr/local/var/elasticsearch
$ sudo rm -rf /usr/local/etc/elasticsearch

$ brew install elasticsearch

brew install elasticsearch
==> Using the sandbox
==> Downloading
Already downloaded: /Users/bparanj/Library/Caches/Homebrew/elasticsearch-5.4.1.tar.gz
==> Caveats
Data:    /usr/local/var/elasticsearch/elasticsearch_bparanj/
Logs:    /usr/local/var/log/elasticsearch/elasticsearch_bparanj.log
Plugins: /usr/local/opt/elasticsearch/libexec/plugins/
Config:  /usr/local/etc/elasticsearch/
plugin script: /usr/local/opt/elasticsearch/libexec/bin/elasticsearch-plugin

To have launchd start elasticsearch now and restart at login:
  brew services start elasticsearch
Or, if you don't want/need a background service you can just run:
==> Summary
/usr/local/Cellar/elasticsearch/5.4.1: 100 files, 35.4MB, built in 12 seconds

  Article Store (14.7ms)  {"id":5091,"exception":["Faraday::ConnectionFailed","Couldn't connect to server"]}
Completed 500 Internal Server Error in 50ms (Searchkick: 14.7ms | ActiveRecord: 9.6ms)

Rails.cache.clear if new production import does not show new episodes.

Sunday, May 28, 2017