Given a range, calculating the mid is a straight forward process.
mid = (low + high) / 2;
But, there’s a problem with this line. Adding two large positive numbers can result in an overflow, if the sum is more than the max positive number.
One way to fix it is to use the following:
mid = low + ((high - low) / 2);
This’ll prevent the expression from overflowing to a negative value. I’ve read this line in random code so many times and wondered why anyone would want to write it this way instead of the simpler and more straight forward way I mentioned in the beginning of this blog. It wasn’t until I read this lovely blog post that I understood the reason behind it.
A while ago, I wanted to build a data aggregation service that’d allow its users to fetch data from a set of data sources defined by them. I wanted to allow the users to configure the data fetch interval for each source. This led to the birth of the Dashboard project.
Dashboard is a data aggregating web application that provides a way to customize and display the aggregated data. It’s an open source project. The code is hosted on GitHub.
I first learned Go in 2014. I didn’t do anything with it after I learned the basics. After all the years, I even forgot the syntax and the basic concepts. This time, however, I wanted to make sure I properly learned Go and implemented something useful in Go.
I’ve now been programming in Golang since a few weeks and I’m absolutely in love with the language. I enjoy writing code in Go, especially, as someone who has been programming in Ruby for a while now. The language has an amazing design with some really cool features. It’s amazing how simple it is to use Goroutines with Channels. Go removes the apprehension from dealing with concurrent programming.
OCD is weird. It makes a person do weird things. For instance, I find it annoying to have tabs not grouped by their purpose. When I’m working, I usually have the documentation opened in one tab (which usually is the left tab) and the tab to its right, absolutely, has to be the tab that’s running my local copy of the app that I’m currently working on.
I’m used to using the mouse to rearrange my tabs all the time. Sometimes, I have multiple windows open (if I’m at work, since I have a dual-monitor setup) at the same time. I’ve always wanted to have keyboard shortcuts that did all this. That’s the reason I wrote a new Google Chrome Extension called Rearrange Tabs.
A year ago, I was trying to organize my bank accounts and found that it was really hard for me to understand where I was spending most of my money. So I started doing some research in order to find a good tool/application which would do this for me.
Mint, of course, was my first tool of choice. Mint is a pretty good application, but not the right one for me. I’ve been a Mint user since a long time and never found it to be really helpful for me in organizing and understanding my expenditures. Every single time I logged in to Mint, it complained about Bank Account Authentication Failures™. I’ve tried re-connecting my bank accounts over a 100 times and it still never works. Moreover, I’m not really comfortable letting a 3rd party access my bank details anymore. Also, it’s not that great at auto-categorizing my bills/expenses anyway and it still lacks some of the features that I thought would be cool and helpful for me.
Up until a few years ago, I never really understood the value of Open Source Software (OSS). I used to think of it as something really lame because the quality that comes out of such software is usually “low”. Now why was I under such an impression? Linux. As a Windows user, I’ve always loved the OS for its ease of use and support for games. I found Linux to be a half-assed OS just because it didn’t support the games I played and it was relatively “difficult” to use. I couldn’t wrap my head around why Linux was such a big deal.
I started web development using WYSIWYG tools like Adobe Dreamweaver. I loved Dreamweaver. It was fantastic. It had every single feature that I wanted and more. I was happy.
The first thing I do every morning immediately after I wake up is, check my mobile for any emails/messages/updates etc. Today was no different. I was skimming through the updates and found an interesting blog post. I was impressed by the post and started scrolling the page to find the usual Like/G+/Save-to-my-swiss-bank-account buttons. That’s when I realized that there was no existing solution that was efficient and needed no authentication.
Dustin Curtis solved this problem by implementing the “kudos” feature in Svbtle. Unfortunately, Svbtle is not Open Source. So I decided to implement the feature myself and make it available as a reusable component that anybody could use by including the corresponding code. As a result, I created hi5!
First and foremost, create a new Rails application by using the command rails new app_name.
Once the app is created, navigate into the app folder cd app_name.
Integrating HTML5 Boilerplate
Now let’s first start with HTML5 Boilerplate. Open the downloaded H5BP zip file.
Navigate into the css directory in the zip file. Copy the style.css file into app/assets/stylesheets of the Rails application that you just created.
I have been actively looking for jobs since the past few days and I couldn’t find an efficient way to properly keep track of all the jobs I’ve applied and the resumes I’ve used for each of the jobs. I tried using some applications but in vain. None of them suited my needs. I even tried using Dropbox to keep track of all the resumes and the job applications. Even that didn’t go well. All of these had their own problems. I needed a powerful and robust solution.
As a result, I developed a new Web Application as a weekend hack, which does exactly what I need, keeps track of all the jobs that I’ve applied to along with the respective resumes. It’s called “CareerTrackr”. I don’t even know if the name is apt to the product that I’ve developed. The only thing that matters to me at the moment is its functionality. A lot of my effort went into designing the interface for the application. As always, I believe in a good UI/UX.
Currently the project is not open to the public. I am testing the project on my own. If I find any bugs (which I am eventually bound to), I’ll fix them and then open it up to the public. Also, I will Open Source the code once I am done with the testing. Once the project is full-fledged, I will post the link and the screenshots. If that sounds interesting to you, wait for my next post on CareerTrackr.