Writing |

Technical blog where I share insights and solutions to problems, discoveries and thrills I encounter as a Software Engineer.

 

Metaprogramming: Invoking Methods

Object-oriented programs generally involves objects passing messages back and forth between themselves. This is what happens when methods are invoked i.e when we call a method of function. When methods of objects are called, it can be said that “messages are being sent to that object”. The send method in Ruby, is used to invoke... keep reading >

 

Metaprogramming in Ruby

Ruby is a very expressive and dynamic language with lots of features that makes it a joy to work with. A lot of this is achieved by its great use of the Metaprogramming concept. From its concise and highly readable syntax to a lot of syntactic sugar which almost feels like magic. In an... keep reading >

 

Setup Test Database for TravisCI

Most of the time, we need a database to test our applications. This can be tricky to setup in a Continuous Integration test environment, but Travis CI makes it pretty easy. Normally you would need to create a database on another online service then set the database URL as an environment variable on your... keep reading >

 

Generating Test Data With FactoryGirl

While testing Rails applications, you often need sample data to try out features in your app. The general flow is to create some data, perform operations on them, then make assertions about the data or expect some changes in your application. Rails does this with Fixtures which can be used to stub-out sample data.... keep reading >

 

Hoisting in JavaScript

Hoisting is a behavior in JavaScript where variable declarations are moved to the top of the scope it is declared in. That is, the top of the current function or the top of the global scope. This is what allows JavaScript variables to be referenced before they are declared. This is what happens when a... keep reading >
Page 1 of 2 Next