RISE of a new conference!

RISE was the first of Web Summit taking on Asia. Hong Kong is indeed an excellent place for conference of this scale. Over 5000 attendees and 500 different startup exhibiting their products is indeed a mind blowing experience. The scale of the event started with having a separate immigration counter at the airport for Riseconf !!

The organisers were extremely professional and helpful in all aspects and though it’s obvious that managing such a large conference is tough, they managed it with very efficiently, always with a smile!

As a speaker, I had access to numerous pre-conference and post-conference exclusive parties, where I was able to interact and network with over 150 people including speakers, sponsors and investors.

photo credit @joshholmes

photo credit @joshholmes

Since I was speaking about Go (an Open Source systems language), it made for interesting conversations. The energy at such conferences is different from technical conferences that I have attended in the past – here it’s more about business, investments, connections and references. The proof of this arises from the fact that even before I got back to India, I had emails in my inbox asking about when we can talk to engage for some work!

There were different stages the conference – a Centre stage, Marketing stage, Builders stage and even a Machine stage where speakers were giving talks that had a vast spectrum – from drones, software frameworks, social media, IoT, languages and even community building!

The myriad startups that were involved in a Startup Pitch showcased their products and were reviewed by judges. To ensure that they get good exposure, there were RoundTables, one of which I conducted on ‘Open Source and how it changes your everyday life’ to mentoring session where you could go and meet people who have “been there and done that” and can guide you in your startups. There was also an investor corner, where people were encouraged to meet and interact.

There were quite a few startups from India exhibiting their products and it was the energy for these 2 days at conference left me really exhausted but inspired. An exhilarating journey — not to mention the Hong Kong night life that goes on well into the morning!

A must-attend for startups that are looking for getting better visibility, feedback and advice. I would definitely like to speak at more such conferences.

Posted in Conferences | Tagged , | 1 Comment

Enforcing coding guidelines using CircleCI and Rubocop

Sethupathi Asokan:

Siva talks about how to enforce coding guidelines using CircleCI and Rubocop

Originally posted on rails learning:

Being a rubyist we don’t just write code, we write beautiful code. But sometimes, in a hurry to complete the requirement some developers, especially new comer, might not follow the coding guidelines which would become headache later. Rubocop is here to rescue us from this scenario.

Let’s see how to integrate rubocop:

1. Add rubocop and generate config file:

Here is the file where you can find list of cops that rubocop uses.

2. Run rubocop or through CircleCI:

where -R option make rubocop to run rails cops as well.

This would run rubocop upon every commit on CircleCI. Though your test cases have been passed but if rubocop fails then your build fails.

Now let’s see how rubocop enforces you write to better & clean code:

Scenario-1: Using else with unless:

As a matter of fact, using else with if would make more sense than using with unless

View original 75 more words

Posted in General | Leave a comment

Quoted-printable – crossing the 1000 character SMTP barrier

Gautam Rege:

Sent a long email with a text attachment that got messed up? Did you know that SMTP has a 1000 character limit – it’s well documented but then again, who reads the manual?

Here’s a nice post from Shifa that explains the problem and how to solve it.

Originally posted on Noob Snippets:

While sending some lengthy text files as email attachments, I discovered that some of my sentences were broken mid-word into new lines. Turns out, SMTP protocol allows only 1000 characters per line. Each line is to be wrapped at 998 characters by a CRLF (rn). Now, most email platforms such as Mandrill and SendGrid follow this rule, but Gmail seems to bypass it somehow. This prompted me to further look into workarounds to keep the attachment formatting as is.

Action Mailer Rails Guides tell you that the Mail gem automatically guesses the attachment content type, encoding and creates the attachment. The default content-type is ‘plain/text’. So I tried playing around with different content-types/ mime-types, for example text/tab-separated-values (Since I had a tab separated format) hoping they would be treated differently from plain text. But that didn’t do the trick.

After reading up some more about the SMTP line limits

View original 291 more words

Posted in General | Leave a comment

All in a days work

How much can you achieve in one day? Let’s ask the Josh team and Seva Sahayog Foundation. It all started when Hetal asked us if we can help them out.

Seva Sahayog has volunteers who collect donations from either door-to-door or setup a desk at various companies. Now, as part of a donation, you are supposed to receive a receipt and this was causing a lot of expense. The big issues were the large number of receipt books being printed, the donation collection monitoring, the collection limits (i.e. what is the maximum amount a volunteer should hold with himself when collecting money) and most importantly – saving paper! So, Hetal asked us if we can build a portal for them and how much will it cost, yada yada yada. 

We decided to have a one-day Saturday hackathon and get our developers together and build this.

Hetal came over at 11am and explained what he had in mind. We kept things simple and sweet – we created Github issues and collaborators were assigned the tickets. Using twitter bootstrap, we ensure that the UI was standardised. MongoDB has been our preferred database. We used delayed job instead of Sidekiq because this was to be hosted on Heroku.   Well, though we actually started coding at about mid-day, by evening, the fervent activity was all put together and the site was ready for testing. After Hetal’s feedback was implemented and done, the site was ready to go and hosted on Heroku! You can see this at http://donations.sevasahayog.org

When we say one day – the team meant it.

one-day commitsAfter it was pilot tested at a few places,  Hetal received an excellent response from his team of volunteers and this email from him says it all.

Hi Gautam, Sethu,

I thought I’ll let you know that for the first time, a user exceeded his credit limit on the donations portal, and I had to increase it. This is awesome news because it tells us that the portal is being heavily used, and we haven’t heard of any bugs so far. This year we have used it in a few companies as a pilot, and the experiment has been massively successful.
We are now on track to move to a completely paperless donation process next year.
Please pass this on to the team with a big thank you once again. I’m very proud of what we could achieve in a single days work.


Here are the proud committers.


Posted in Ruby on Rails | Tagged | 2 Comments

Using Null Object Pattern in Rails to improve code quality

Gautam Rege:

Rishi talks about writing clean code and avoid conditional blocks whenever and wherever feasible using Null Object Pattern.

Originally posted on Learning shall never stop..!!!:

If you have not read my previous post I wrote about Service classes, I would suggest to read that first as it is in continuation to the previous post. This is the link to previous post.

In this post we are going to look at another pattern that helps us in refactoring code, especially helps us in removing conditions. It is called Null Object Pattern.

This code is used to download the data dump based on some rules as always. But here is my 2 cents, do not even try to understand the code.

We clearly need to refactor because this code is difficult to understand even for the person who has written the code, forget the team who is working on the same project. And since this code is difficult to understand, it is difficult to debug and it is difficult to change as changes will come…

View original 726 more words

Posted in General | Leave a comment

Don’t test your code

I spoke at Agile India 2015 in March. Excellent conference but I was a quite disappointed that the videos are not publicly published. So, I decided to write about it here in detail.

The slide deck has been published at on slideshare But here goes the picto-blog. This is an experience report – the story of Josh Software and you can see a quick 2 minute preview here

Dont test your code.001The entire talk has the theme of war – because that was exactly what it has been. If you saw the preview, I have a sword there because I had promised my daughter that I would use it the next time I took the stage. It did fit the bill on this war theme.

Dont test your code.004



So, this talk does not talk about going in the wild and changing code on production without testing it. This is a story about about how manual QA can make you blow yourself up!

Dont test your code.005




This is a story about a perspective – towards cleaner code, good code quality and happy customers. This is what we learnt over the years when we started Josh Software in 2007 as a company that specialises in Ruby on Rails.

Dont test your code.009


When we started, we were like a refugee camp searching for clients and leading a hand to mouth existence. Sethu and I started with no experience (and no money or savings). This was our entrepreneur plunge in to the wild. Of course, I admit, it’s been an excellent journey and we are far better off than being “lost to the corporate cause” ;)

Dont test your code.011Anyway, back to Josh… in 2007, we had our first war at Josh. Just like World War 1, this was an internal battle between egos – those of our developers and the QA. It was a question of responsibility and while that battle raged, our customers suffered.



Dont test your code.012Of course, we matured and like all mature countries, we had our Second World War at Josh in 2008.  – this was a better organised war between our QA and Developers on one side and our client on the other. This was a war on scope of work, delays caused due to missed deadlines, finger-pointing and low budgets!


Now, the crisis had reached critical mass and we needed to the right thing – choosing the right customers and concentrating on quality over time and cost! This then brought the new order at Josh:

Dont test your code.016 Dont test your code.017

We also overhauled all our old arsenal to the new arsenal.

Dont test your code.018We used to use SVN, Trac, Redmine, and Bugzilla. While these are still good tools, it didn’t suit use. SVN and Trac had local server installation dependencies causing numerous problems. Redmine and Bugzilla couldn’t help in the way we wanted to manage projects.


Dont test your code.020

Now, we switched to Github as our code repository and started using Pivotal Tracker or Trello for our project management. We added Code Climate for our code quality checks and CircleCI for continuous integration!

A special mention for Slack as it’s fast evolving into an ideal communication platform.

The theme of Agile India this years was #noestimates. While I was a little taken aback at it’s emphasis in almost every talk, I also realised that it was exactly what we do:

Dont test your code.023We estimate (sorry Forecast) a budget and then race to deliver stories. We estimate the stories at run-time and keep flexibility for adding, removing and changing priorities for any stories in a current iteration too! Pivotal Tracker for the win.



Dont test your code.028We use CodeClimate and CircleCI to their full potential thereby removing the need for any manual QA. Now, we are in a unique situation, where we have only engineers in our office – everyone codes and everyone writes their tests. We have never stressed on TDD or BDD (or BDT, TBD, DDT, TDT etc. ;) As long as the code is covered, we are good to go. Dont test your code.026


Since we get emails about code-coverage and test-coverage, it’s easy to monitor and manage projects among the entire team. In fact there is always some healthy competition between teams to ensure good code quality and better test coverage.


Now, what remained was browser testing. Even though there are good automated tools for cross-browser testing, nothing beats the human eye!

Dont test your code.032Along with this, we also changed and improved our processes. I believe that Agile, scrum, sprints etc. are overrated. We have our own process and we always encourage teams to have their own strategy. We don’t have daily standups and any process control. We hope our customers talk to our developers directly and keep the project management tool at the centre of the development universe!

Dont test your code.033Well, we also pushed agile to a whole new level. We have started Agile billing – we don’t charge any advance from our customers. This means its a “pay as you go” model where the customer always pays for what they get!

We bill every 2 weeks and that also keeps our cash flows running smoothly. Above all, it builds a lot of trust with our customers. It’s only natural that this keeps everyone on their toes.

Dont test your code.035All these changes have ensured that Josh Software has now become very successful in any work undertaken and we can proudly say that we have customers who are proud of us! Writing this post itself is testament to that! :) We feel like winners indeed when our customers value us as much as we value them!


They do say that there are no winners in war, so it was only fair to end my talk/post with an awesome photo of Dalai Lama – “may the peace be with you”.

Dont test your code.036

Posted in Conferences | Tagged , , , | Leave a comment

Uniqueness Gotcha!!!

Gautam Rege:

validation_uniqueness_of does not guarantee uniqueness. Interesting write-up by Yogesh about things to remember while working with uniqueness in Rails.

Originally posted on Happy Coding!!!:

♦ The Problem

Consider the following relation where poll is having many options and each option of the poll must be having a unique description,

Now, when trying to create a poll with its options using nested attributes, uniqueness validation is not getting applied due to race condition.

> poll = Poll.new(options_attributes: [ { description: 'test' }, { description: 'test' } ])
> poll.save
=> true
> poll.options
=> [#<Option id: 1, description: "test">, #<Option id: 2, description: "test">]

♦ Why it is occurring ?

There is a section in UniquenessValidator class, which mentions that the ActiveRecord::Validations#save does not guarantee the prevention of duplicates because, uniqueness checks are performed at application level which are prone to race condition when creating/updating records at the same time. Also, while saving the records, UniquenessValidator is checking uniqueness against the records which are in database only, but not for the records which are…

View original 128 more words

Posted in General | Leave a comment