Recently I built a Rails application that allows a user to create workouts corresponding to a specific muscle group. Throughout my app I continuously relied on Ajax and JavaScript to create a more seamless user experience. In this blog post I’ll explain in detail how I used Ajax and JavaScript to allow a user to edit their workout without having to refresh the page.

Read more

Instead of putting the burden on yourself and your team for implementing an authentication feature for your app, many programmers are deflecting the responsibility to tech giants such as Facebook, Google, and Twitter to securely log in their users. Besides saving your team from writing code, the major benefit of using another authentication provider is that your app becomes considerably more robust against security vulnerabilities.

Read more

Besides the added benefit of writing more concise and considerably less code, metaprogramming has many other advantages as well. Possibly the most appealing feature of metaprogramming is it allows your code to become much more flexible and easier to edit. Although there are many aspects of metaprogramming, I would like to focus on one concept in particular: dynamic dispatching. Dynamic dispatching is a valuable tool for any programmer because you can call methods throughout your program at run time.

Read more

The Yahoo! Finance API makes it remarkably easy to retrieve realtime stock data and store it in a comma separated values (csv) file. But how do you get the values from the csv file into your program? That was the second challenge that I faced as I tried to implement my stock ruby gem.

Read more

On a mission to create a ruby gem to return realtime stock data to the user, I was confronted with a dilemma: how can I attain stock data from the internet and displaying it in a formatted table within my gem? With the help of Yahoo! Finances incredibly convenient API, this process was made exceptionally easy. If used correctly, this API would return realtime stock data within a csv file—all I had to do was properly assemble the URL.

Read more