Uncategorized

Party at Work..Why Not!

Published by:

IMG-20151110-WA0041 (1) (1)

In sync with our policy of celebrating all major festivals and even minor successes, we celebrated Diwali at our ‘Nice View’ office. Diwali, also known as the Festival of Lights is celebrated in verve by lighting Diyas (earthen clay shells with a lighted wick) to signify the triumph of good over evil. Staying true to the spirit of Celebrilla errr Cybrilla, Diwali Party was a congenial affair.

At Cybrilla, we have a vibrant culture that celebrates festivals from across the country. Diwali Party shed light on it through a 100 LED’s as we avoid Diyas and crackers for the love of environment.

From adoring the floor with a beautiful Rangoli, the walls and tables with garlands and flowers to dressing in ethnic Indian wear to ordering everything that is otherwise cooked at home(Yes! we took a few shortcuts). All stomachs looked convex after having been stuffed with Gol Gappas and other delicacies.

The lack of sound of fireworks was soon replaced by the Cyborgs on dance floor who went all footloose dancing to the top charts. The cherry on the cake was the solo performance of Satish Perala, our CEO, who set the bar high for upcoming dance events. It was amazing to see an otherwise code filled evening progress into an amazing night of Cyborg get together. The Diwali Party was yet another gem we would preserve in our memories.

Javascript jQuery jQuery Plugin

Disable sorting of a column when using Datatables

Published by:

Hello,

For a while now, along with other team members I’ve been working on building a payroll software for one of our clients. This is a multitenant application and each tenant can use this software to process the salaries of their employees in addition to certain other functionalities that use employee information.

One such functionality of the application has got to do with the generation of reports and as an application end user(this could probably be a company HR person for example) one might want to generate a report containing certain data of only a selected list of employees. The next question could be, how could one easily filter or sort a table list full of employees to get only a selected list of employees that match certain critera? Turns out there is a jQuery plug-in called [Datatables](http://www.datatables.net/) which converts an HTML table into one which provides a sorting functionality along with an additional set of functionalities like searching and pagination, all, out of the box.

Since there is a need to select only a particular number of employees(based on what was discussed above) for a report that needs to be generated, we’d be selecting the employees using a checkbox that comes as part of each employee record as shown in the screenshot below. The only problem is that datables by default provides sorting for all columns and we didn’t want this to be there for the checkbox column as this is meaningless and could easily confuse an end user.

Datatables with a sorting option on the first column

Datatables with a sorting option on the first column

It took me a while for me to figure out how to disable the sorting on a specific column when using data tables hence I thought I’d share some code on this could be accomplished. The below configuration settings that are passed to datatables, disable the up and down arrow options as shown in the screenshot below for the first column from when the employee data is first loaded on a page. This code was last tested using Datatables 1.10.8 .

Datatables without a sorting option on the first column

Datatables without a sorting option on the first column

Below is how one could pass these options to a datatable. Here example represents the table id that one would specify as part of the HTML table tag.

Here targets[0] represents the first column of the datatable.

Credits

1. Thanks to this discussion within the Datatables forum for some initial leads into the issue.

 

ProgrammingTips

Making Aws::SES API to work with ActionMailer

Published by:

Aws::SES SMTP integration is a cake walk indeed. But SES API does not directly work with ActionMailer. I think there could be a better approach but for the current requirement I made it work this way:

1. Added SES as a delivery method:

In initializer, add your SES configuration and add the SES client as  new delivery method:

You have to specify Region as well. I had already added

to my application.yml

2. Asked ActionMailer to use ses delivery method in your environment:

Add the following line to config/environments/<environment>.rb

Once you are done with this you are ready to send mail. Well I also thought the same, but when I ran the code BOOM. So what we dont have is deliver! method in the Aws::SES module. So you extend Aws::SES:Client. I did it in the initializer itself.

3. Added the following code to config/initializer/ses.rb

VOILA! You get back the message ID that the API send back and you can store it to track the delivery status of your mail.

Note: AWS SES provides SMTP service as well, which is easier to integrate but you wont be able to track the deliver from your application. Also SMTP access key pair is different from the access key pair that we use for API (which is global API key pair. I have not tried the IAM setting with this).

Asset Pipeline Development RailsTips

How to figure out Runtime Dependencies when using Bower via Rails Assets

Published by:

Recently, for one of our client projects we decided to make use of Bower via Rails Assets to better manage Javascript dependencies with respect to the application. This project is on Rails 4.0.13 . For reasons as to why we choose this approach one can refer to the below two blogs –

1. Better Asset Management in Rails Using Rails Assets

2. Bower through Rails Assets

In our application, we were basically replacing the existing dependencies(few of which were placed in vendor/assets/javascripts and others were gems like the jquery-ui-rails) with gems provided to us via the Rails Assets site.

One such third party plugin that we had to replace was the jquery validate plugin. After including the appropriate gem(rails-assets-jquery-validate) from rails-assets site in the gemfile and running bundle to install that gem you might observe from the Gemfile.lock that this gem depends on the rails-assets-jquery-gem.

The BIG question now is, how does the rails-assets-jquery-validate gem(I had installed the gem with version 1.13.1) know which version of the rails-assets-jquery gem it should pick up, given that unlike rubygems.org the current rails-assets site(based on the screenshot below) doesn’t currently list the runtime dependencies required for a gem(which in our case is that we can’t directly find the runtime dependencies for rails-assets-jquery-validate gem).

The workaround

One can find out the exact dependencies required wrt a specific gem by checking out the bower.json file with respect to appropriate code repository corresponding to the gem(in the context of our e.g., this would be for checking out the bower.json file of the rails-assets-jquery-validate gem related code repository) listed on the rails assets site.

 

Agile Methods Feature Tracking Issue Tracking

Agile Tools for writing Product Backlog and Sprint Tracking

Published by:

Agile claims to make product development hassle-free. But as the saying goes the chain is only as strong as its weakest link.  In the case of Agile one the biggest challenges is to maintain a Product Backlog, track items picked at each sprint and groom the Sprint Back log along with Product Backlog.

Since Agile is about experimenting, we @Cybrilla follow SCRUM and explored the following tools for maintaining Product Backlog, tracking features and tracking velocity.

  • Redmine
    • Pricing: ₹₹
    • Epic, Theme, Story structure: No epic, theme & story structure. Story has sub-tasks or related tasks
    • Story Fields: Story has a lot of fields, more fields can be added by turning on extra features. All the added fields can also be displayed in the sprint view
    • Issue Tracking: Story has an Identified and On Hold state.  This helps to account for bug fixes and parked features
    • Velocity Tracking: No out of the box support for tracking and analyzing velocity. Just show tasks done and pending in number not points
    • Third Party Plugins: Has wiki support, documents and files support but it is all internal to the system
    • Collaboration: Commenting and notifications on a story is bad since users cannot be tagged. Only notes can be written and watchers need to be added explicitly else there is no way of knowing updates
    • Look & Feel: Looks like a legacy system with sprint tables and rows of stories.  The story fields to be displayed can be custom defined
  • JIRA by Atlassian
    • Pricing: ₹₹₹
    • Epic, Theme, Story structureJIRA Agile supports the epic, story structure. No themes. Story has sub-tasks or related tasks. JIRA however has only issues
    • Story FieldsStory has a lot of fields but they are disorganized. All the added fields can also be displayed in the sprint view
    • Issue Tracking: Issue can be tracked via basic states but additional custom fields can be added, labels can be added.
    • Velocity Tracking: Basic support for tracking velocity.
    • Third Party Plugins: Has wiki support, documents and files support but it is all internal to the system.
    • Collaboration: Comments and notes can be tagged to users which prompts a email or system notification to the tagged user.
    • Look & Feel: Looks like a legacy system with sprint tables and rows of stories.  The story fields to be displayed can be custom defined
  • Pivotal Tracker
    • Pricing: ₹₹ Free for upto 3 collaborators
    • Epic, Theme, Story structure: Supports epics, themes and story structure. Labels and Tags also exist for categorization
    • Story Fields: Story has limited but important fields. It is difficult to display these in the sprint view
    • Issue Tracking: Story has only few states and there is no way of accounting for bugs associated with a story. One has to reject the story and restart it
    • Velocity Tracking: Very good support and analytics for velocity tracking
    • Third Party Plugins: Good API support to integrate with third party tools. https://www.pivotaltracker.com/help/integrations
    • Collaboration: Excellent support for collaboration via notification system and email.  Easy to switch between projects from dashboard in 1 click
    • Look & Feel: Very graphical and visual display with three main columns: Icebox, Backlog and Current. Each column has rows of story teasers.  Hovering on a story displays the entire story
  • Trello
    • Pricing: Free. Pay per extra feature
    • Epic, Theme, Story structure: Supports epics, themes and story structure but these are custom defined
    • Story Fields: Story has basic fields but it does not have points.
    • Issue Tracking: Stories can have a checklist, which can be tweaked as different states of a story.  This can also help as definition of done.
    • Velocity Tracking: Difficult to track velocity as points can’t be associated easily. One can use Burndown charts API for velocity tracking
    • Third Party Plugins: Integrates well with third party tools
    • Collaboration: Well collaborated tool with member tagging and commenting system
    • Look & Feel: An intuitive display to replicate sticky notes given on a wall. Columns can be custom defined and each story can be dragged and dropped into these custom defined columns
Miscellaneous

My first Conference talk experience @ gcrc 2015

Published by:

For months my good friend @satish has been pushing me to give a conf proposal. I am not the type who gives talks. The thought of conference talk just scared me as i have never given one!!.  I have finally put up some of our solutions for problems we faced at work as proposals. And my nightmare came true. One of my proposal got selected!!. :(. I was happy and scared at the same time. I have fierce stage fright.

At school I have participated in an elocution and froze up in front of around 400 audience. I did not utter a single word and came back silently from the podium. Even during my education in US, whenever I did a presentation none of the students ever understood the content except the professors. I did give my Thesis presentation in front of three professors, but they always understood whatever the heck I am saying because they already know everything.

Now coming back to my preparation, I have created the slides. At first iteration they are awful. Full of text. Everything I have to say is already on the slides. I am not adding anything. One can pretty much read and understand everything without me.

I did the first rehearsal before my colleagues. I got some valuable feedback.

  1. The slides are boring
  2. I am reading from the slides
  3. There is no humor!!
  4. Too much text
  5. I am skipping important parts
  6. Some of them even can’t understand what I am saying!!
  7. I am shivering and going way too fast
  8. My brain is freezing on some slides (lack of proper preparation)

So I am still battling with these problems, I came across my old friend Bill Hunt and asked him for advise. He told me

Do not think of it as giving a speech, think of it as talking about your idea. People do not want to make mistakes when they give a speech. If you believe in what your saying and say it with passion and enthusiasm they will believe it too.

A change in perspective indeed!! A conference talk is not a speech!

Following the advise of my colleagues and my friends I have changed my slides. I reduced the text to few key points. Less text, more images, some funny pictures appropriate for the theme of my talk. I have replaced some of the slides with flow charts so that the audience will understand it easily without reading too much. I thought of it as presenting my idea to a group of people who have moderate idea of the theme of my topic but never done it in the way I have presented!!

The day before the conference talk, I did the second rehearsal before another group of my colleagues. This time it is way better than the first time. I got more feedback on where I am lacking and noted those parts. Out of time for more practice!!

Finally, the day of conference came!! I had a great sleep the night before, I reached conference late :(. I was still nervous. And finally the time came. I am up for the talk. I went on the podium, everything was set-up for the talk and introduced myself (still shaking). First few slides of my talk made the audience laugh, gave me a huge relief. Then continued with next slides. I have observed some of the audience are responding to my presentation positively. I focused only on them.  Instead of looking at only one person, I have been kind of looking around, noticing the few audience, interested in my talk, this gave me the confidence. And there I am able to finish it successfully without a hitch from there on. One of the audience even asked me a question (YAY!!). Now here I am waiting for send a proposal for the next conference 🙂

Without the push from my friends, and support and constant reassurance from my colleagues @cybrilla,  I would not have been able to do this.

Its too early for me to give advise to anybody!! but here are the few points I am making a note to myself in case I forget these in future

  1. Conference Talk is not making speeches in public
  2. Its about presenting your idea with passion
  3. People like humor
  4. Audience are not there to grill you 😛
  5. Practice & Practice && Practice!!

And finally remembering my workout poster which says

“I’m not telling you it’s going to be easy, I’m telling you It’s going to be worth it.”

 

BTW: Proposals for Rubyconf India are open. Just go and propose!! I have already done it.

Slides Capacity Planning

Disclaimer:- The information, views, and opinions contained in this post are those of the author and do not necessarily reflect the views and opinions of Cybrilla.

Development ProgrammingTips

Auto redirect based on language in nginx

Published by:

When you want to do an auto redirect based on the AcceptLanguage parameter sent by the browser the first solution that comes up in Google is this:

This will not work because the AcceptLanguage is of the following form:

And Map will always map to the first one and will not respect the priority.

Solution:

Put this in the nginx

make sure you do :

 

Development Project Management

Tips to Outsourcing your Product development

Published by:

Most of the startups / founders choose to outsource their product development due to shortage of development talent, business domain experts or to skip the hassle of recruiting quality talent and instead start building their product asap and ship it.

At Cybrilla, we get the opportunity to chat with many such founders / companies who have gone with the outsourcing model but have had a really bad experience. Most have had a terrible time managing product development, meeting launch dates, managing different development teams, project delays etc.

Unfortunately most of them have unrealistic expectations w.r.t budget and time about building their product.

If you are one of them, here is a list of things that we recommend to reduce the overall project cost and time.

1> Wireframe your idea :

As a founder / product owner, wireframe your products user flow before you speak to a development shop. It’s one of the most important steps when presenting your idea to someone.

Most of us have an idea that exists only in our head. Wireframes helps to get that idea out of the head and onto a piece of paper. Once your idea is on a piece of paper, you can easily visualize how it works rather than just thinking about how it will work.

It also helps you to jot down different ways a user can flow through the application. Wireframes act as the blueprint for product development.

More importantly it helps the development shop to break down the requirement into user stories.

User stories represent the different features of your product. They serve as guidelines to product development. Exhaustive wireframes will help the development shop to break down the requirements into user stories.

At Cybrilla, we write the user stories and put them into a project management tool like Redmine or Pivotal Tracker. We assign a priority to each story and estimate them individually.

This helps the client to breakdown the budget and assign it amongst the must-have and good-to-have features.

2> Active participation during product development :

You need to be a good project manager, since good project management is the major difference between finishing a project within the estimated time and spending more money on additional features.

At Cybrilla, we follow continuous delivery process and encourage our clients to test each and every build and provide constant feedback. This helps us validate the original requirements and/or make quick changes or tweaks in some of the features. Since we deliver continuously, its important that we have constant feedback

Right from product requirement to delivery participate in each and every step. You can help chart out the test cases which the developers need to validate post development. As a client it is necessary to stay actively involved in each and every step.

3> Having an open mind towards new tools and processes :

At Cybrilla we make use of many tools and follow agile development process. Take time to adopt these tools so that you remain an active participant. These tools help you to keep track of the development progress. Make sure that you are part of weekly sprint meetings where in your prioritize the weekly user stories which will be picked up by the devs.
So, the next time you are planning on outsourcing your product development, follow these steps and be amazed to see how far your budget will go. Take initiative to extensively wireframe your product, scope your product and actively participate in the development process.

News

Heartbleed wakes up the open source community

Published by:

Immediately after having many sleep less nights because of the recently discovered Heartbleed bug, The Linux Foundation has come up with the “Core Infrastructure Initiative (CII)” to raise money to fund critical open source projects. Companies like Facebook, Google, Amazon any few others have already come forward to support this initiative. Many others are expected to join this group.

There are lot of critical open source projects like OpenSSL, which every company uses, but lack the needed financial support. I was shocked to hear that an important project like OpenSSL receives only around $2000 annually in donations and there is no developer who works full time on this.

To avoid the next Heartbleed, more than money, these open source projects need dedicated developers and testers working full time. Hopefully CII will raise enough money to support all the critical OSS projects and fund the development.

If you consume a lot of open source projects and have deep pockets, feel free to donate for this noble cause. Let me know your thoughts on avoiding the next Heartbleed in the comments below.

If you haven’t heard of the Heartbleed bug, I have explained it in detail in another post.

Development News

Are you affected by the Heartbleed bug?

Published by:

Heartbleed bug logo

If you are a sys admin or a web master or an internet entrepreneur owning a website, you probably know about the recently discovered bug in the popular open source library Open SSL.

For people who do not know about it, let me put it in simple words. Very recently, on 7th April, 2014, a serious vulnerability has been discovered in Open SSL library (a popular open source library used for secure access to websites & servers on the Internet. It is used by Google, Yahoo, Amazon and almost all popular websites on the Internet). This vulnerability allows a hacker to steal private certificates, user passwords and sensitive data from your website or server. It is a serious bug registered under CVE system as CVE-2014-0160.

Here is what Wikipedia says …

Heartbleed is a security bug in the open-source OpenSSL cryptography library, widely used to implement the Internet’s Transport Layer Security (TLS) protocol. A fixed version of OpenSSL was released on April 7, 2014, at the same time as Heartbleed was publicly disclosed. At that time, some 17 percent (around half a million) of the Internet’s secure web servers certified by trusted authorities were believed to be vulnerable to the attack, allowing theft of the servers’ private keys and users’ session cookies and passwords.

We managed to test all our clients applications and servers if they are affected by this bug before there is any serious damage. Thanks to Vijay and his team for quickly identifying and acting on this.
We have hosted a simple utility which allows you to test for the Heartbleed vulnerability on your website (http://heartbleedtester.org/)

If you are a geek and love digging deep, read this unofficial guide which explains the vulnerability in detail.

If you are stuck fixing this bug on your servers or want to check if you are affected, we’ll be happy to help you. Get in touch to talk to our server security expert.