Posts

Showing posts from 2017

Easy Image Slider

Image
I needed a image slider for one of my web pages. The bootstrap template that I was using also provided a slider component but needed a lot of tweaking to suit my page. When I googled, I chanced upon imageslidermaker.com . It was simple and very easy to use. All you need to do is select the slider configuration on the screen and with one click, the site will generate the css, js and html files that you can download as a zip file. The generated slider code stands on its own and does not intrude into the existing style, script and mark up code. You can easily customize the css. For example, I made my own style for the image caption as given below: #my-slider .ism-caption-3 { font-size: 1.75em; font-family: sans-serif; position: absolute; top: 20%; left: 10%; border-radius: 4px; border: none; color: #FFFFFF; text-align: left; } Try it, you will like it.

Daughters Of India

Image
This post is not about feminist movements in India or any such similar topic; rather it's about using Python code for applying basic NLP (Natural Language Processing) techniques on tweets.

Ideas From Another Field

Image
Applying concepts from one field or a book in another field has been a common pattern in modern technological development. The spirit of antifragile, a recently coined word, has found its way in the implementation of microservices. In the quest to make software programs antifragile, the way forward is to build intelligence into them. A couple of other examples are: i) The law of diminishing returns from economics which applied to parallel computing becomes Amdahl's Law. ii) I surmise that the Agile board in the Scrum methodology is the application of the Hawthorne Effect. Cross-pollination of ideas is one of the mechanisms of innovation. And, as we found out recently, learning transfer is the way Elon Musk follows to become such a prolific technocrat and businessman. My essay ends here.

I Dare You Not To Fall In Love

Image
On the best part of using Ruby on Rails for software development, thus spake its creator David Hansson: You get to use Ruby, which, even in a world that has rediscovered the benefits of functional programming and immutability, remains the most extraordinarily beautiful and luxurious language I’ve yet to encounter. Just look at some code. I dare you not to fall in love. [1] Well, this is my exact opinion of Ruby, my most favourite programming language but I couldn't have articulated it any better than Hansson.

Applied Rails : Gems I Use

Image
In this article, I discuss key gems that I have used in my Rails application. For each gem, I state what it is used for, a brief description of how I used it and the code snippet(s) pertaining to my use case.

Book Review : The Rise Of The Robots

Image
The technology world faces new trends frequently. New technologies typically promise to get things done faster, reduce costs, and open new market segments, thus improving the financials of a lot of firms. From Service-oriented Architecture to mobile and cloud computing, all of them stake their claim to deliver these benefits. However, the advent of Artificial Intelligence (AI) will impact the world economy in a way that no technology in the past was able to. This is the core thesis of Martin Ford’s 2015 book, 'The Rise of the Robots', sub-titled 'Technology and the Threat of Mass Unemployment.' If AI can unleash a tsunami of unemployment, how should America deal with it?

Applied Rails: An Algorithmic Perspective

Image
The Human Resources manager informed that employees working in the corporate headquarters (CHQ) will have the second and fourth Saturday of the month off. This affected the leave balance calculation method in my Rails application. If a CHQ employee applies for leave and a second or fourth Saturday falls in between the start date and end date, they should not be deducted a leave. I was already using the Rails date library. Given a date, I could get the beginning of the month and end of the month in which the date occurred. Before I could figure out how to proceed with this info, I went to stackoverflow.com and put up a question[1].

Applied Rails: Bulleted Text With Prawn

Image
I use the prawn gem to generate pdf documents in my Rails application. It has a drawback that it does not have built-in support for displaying bulleted text. So I wrote a simple function that took a string parameter and printed it with an indent and a leading asterisk.

Applied Rails : Customizable Text

Image
I got a requirement in my Rails application in which the user would add a set of "Terms & Conditions" in the Offer screen. These are typically standard, but the user should be able to customize the individual clauses. It sounded oxymoronic, but remembering Scott Meyers' words, "pretty this ain’t, but sometimes a programmer’s just gotta do what a programmer’s gotta do," I set out in right earnest to figure out what can be done.

Applied Rails : Variable Rows For Child Records

Image
I got a requirement in my Rails application to give the user the ability to input a variable number of records with multiple fields. The fields were of text type as well as select comboboxes. These rows had to be saved to the database as child table rows.

Welcome 2017

Image
First blog post at the beginning of the year, as was last year's, is a quantified compilation of my personal activities outside of my day job.