Posts
Hosting a Hands-on Session: Lessons Learned
Every year, I wish to run a couple of public speaking sessions/presentations/demos. This year, I had the opportunity to teach a hands-on session at CAMUG and wanted to share some lessons learned with my readers on this blog.
Thanks Terence for taking this photo.
Scheduling Breaks Because this was a 3 hour session, and I believe my attention span cannot be stretched beyond 40 mins, the 3 hour session was chunked as follows:
Posts
AngularJS: Refresh or Die
Just worked on my first AngularJS project at http://loveyyc.info (source code) and wanted to share my thoughts about it while the memory is still fresh. My impression in a one-liner:
AngularJS needs to rename a lot of things and introduce higher level abstraction
A great technology only becomes so because people feel happy about it. The happiness for people like me comes from the fact that not only I understand the technology well, but also find it to be easy to use.
Posts
The Year 2014
2013 was an amazing year in many ways for my personal life. To recap, the top story of 2013 was of course the birth of our son, Shopoth. And then, we bought our first house, paid off our car-loan and ended the year with a much needed vacation, that too to Bangladesh where we spent some quality time with the families.
2013 was my year of learning Haskell. I can’t claim to be a seasoned Haskell programmer yet.
Posts
Configure Me Not
Configuration in software provides a method to build systems that can adapt to different configurations. For example, if a website’s language and date/currency formats are configurable, then it can be configured to support multiple languages and regional formats. Configuration makes it possible to deliver such features without needing a log of change in the application source code.
However, this notion of flexibility that configuration provides can be a trap at times.
Posts
Introducing Asset Pipeline to Older Apps?
Introducing Asset Pipeline to an old project is quite hard. Most pre-asset pipeline projects used small JavaScript/CSS files that are often scoped to a single page or a part of the application. A typical example is as follows:
$(function(){ $('#login').on('click', function(){ var isLoginValid = hasValue($('#user_name')) && hasValue($('#user_password')); if(isLoginValid){ $('#login_errors').hide(); $('#login_form').submit(); } else { $('#login_errors').show(); return false; } }); }); Now, within the scope of the login page this code executes just fine.
Posts
Career choices: Should I take this job?
I get intimidated by this question, “Should I take this job?”
Growing up, my dad had a huge influence on my upbringing. He had a government job and it was the only job he ever had (retired in 2012). However, my generation Y seems somewhat lucky to be able to pick and choose a job, once every couple years or so. And every time I feel like it’s time to start looking around for that next job, I get intimidated by this question.
Posts
Will You Put That Cell Phone Away?
I know it’s your phone and you can do anything you want. But may be it’s worth holding back at times. There’s more to life than our screens.
I’m leaving it off the hand, off the table and off the bed, in silent mode, all day long. I’m asking for permission to use it if I have to while I’m with others. Instead of spending the time with the screens, it’s been very rewarding to play with my little son, with all the attention on him.
Posts
Algorithms Need Better UI
Since 2006, as I became a professional software engineer, I spent a fair amount of time reading books and online articles about software. Most topics were around Object Orientation, Web technologies, Software design, Testing, Automation, Agile and Lean, etc. Last year, I decided to take a break from such topics on purpose. So, I cleared all my RSS subscriptions.
Instead, I thought I would revisit some of the algorithms that I learned during my undergraduate courses.
Posts
AngularJS is Very Productive, and Cool too!
It has a very steep learning curve, but yields a superb productivity boost once you’ve learned it. Check out my demo of the wizard that we’ll discuss next.
AngularJS works by extending HTML to produce declarative UI code and eliminating the need for a lot of boilerplate code. For example, the mental model of a wizard can be expressed using the following HTML:
<wizard title="Flight Search"> <step title="Search"> </step> <step title="Select a flight"> </step> <step title="Select a return flight"> </step> <step title="Checkout"> </step> <step title="Confirm purchase"> </step> <step title="Receipt"> </step> </wizard> With AngularJS, one can write exactly this markup with the help of two custom directives, widget and step.
Posts
Released streamy_csv gem
Following the previous post, I decided to spin off a little ruby gem for you folks. Get streamy_csv, and write only your application code while it’ll do the boilerplate work for you.
In a nutshell, with this gem in your application, all you need to do is this:
Class ExportsController def index stream_csv('data.csv', MyModel.header_row) do |rows| MyModel.find_each do |my_model| rows << my_model.to_csv_row end end end end Find more at https://github.com/smsohan/streamy_csv