Spock: Making Java Testing Groovy

In my previous post, I alluded to how I was introduced to the Ruby cult some time ago. I decided to try out the language for myself. Now, being used to statically typed languages, I’m not really a fan of type enforcing only happening at run-time for languages such as Ruby, JavaScript and Python. But one I really like about Ruby, similar to what I found about Python some time ago, is how human-readable it is, making understanding what the code does a lot easier. Groovy, a language that runs on the JVM also has this advantage to it, making it a useful tool in testing Java code.

More

Spring Field vs Setter vs Constructor Injection

Lately, I have been immersed in the world of Java and its various frameworks, tools and language features. I’ve also recently discovered that Java is not cool. I found myself at a gathering of developers some time ago, where they attempted to proselytise me into the ruby cult family. Unfortunately, since puberty, I have had trouble growing enough facial hair to be seen as ‘one of them’.

More

Simple Applications Change The World

When someone dreams of being a ‘software developer’ or ‘programmer’ (or whatever the other ill-defined terms are for someone who creates software), they imagine someone highly intelligent someone solving complex algorithms that will solve the {{ world.generateRandomProblem() }} crisis for humanity and make this world a better place. At least that’s what I thought.

More

The Danger with Frameworks

For the past 2 weeks, I have been delving into the magical world of AngularJS and single page applications. This is how the internet should be. Increased processing speeds and more memory have allowed the browser to process a lot more than what was previously feasible, allowing for a much better experience for the user.

More

Interface Segregation and Objective C Delegates

The fourth principle of the SOLID principles is the Interface Segregation Principle. According to Wikipedia, the authority on most truth, this principle states that “no client should be forced to depend on methods it does not use”. This principle can help in cleaner and more intuitive designs of protocols and delegates.Most Objective C introductory tutorials introduce developers to the idea of delegates. For example, if you have a table view controller and table view cells, the table view cells can send messages to the table view controller using a delegate.

More

A .Net Developer’s Initial Thoughts on the Django Framework

Python has been my ‘I need to learn this sometime soon’ language for the past two years. I’m not sure why. A few weeks ago, I started playing around with it to learn the basic syntax using code katas. That was fun. But while code katas help one figure out ways to solve common problems, many of them are really language agnostic, and one can’t really build something useful using knowledge gained only from code katas. This week, I had some spare time and decided to play around more with the Django framework for python.

More

Objective C: Posting Foundation Objects with AFNetworking

The scenario was this. I had Objective C objects which I needed to parse as JSON, and send a POST request to a web server. At first, I used RestKit because that’s the framework that’s being used in the project, but that was giving issues, so I decided to strip it down a level, and use AFNetworking. I searched the internet for hours on how to do it, and good reading was hard to find. Here’s how I did it to anyone who may be in this position in future:

More