Tuesday, May 19, 2015

Posting from Android

I dropped my Lumia for the umpteenth time and after months of working on a cracked screen,  the device finally gave up and stopped  responding.  As I am currently travelling,  I did not have the time to get it repaired and this forced me to finally do what I have been contemplating for months.

I bought an android device - Xiaomi to be specific. I am quite liking the variety of apps on the play store.  I am writing this post using the blogger app while I wait for a doctor at a Dehradun hospital. This is  also the first time I am writing a blog post by swiping rather than the usual typing. 

Posting to this blog via the phone might open up interesting possibilities,  perhaps leading to shorter but frequent posts.  We will have to wait and see.  For now,  I am excited that I finally have an android phone which I can use for  developing apps.  

My trek begins this weekend and I am really looking forward to it.  Once done,  I look forward to getting back to finishing some of the hacks/mini projects that I started. 




Wednesday, April 15, 2015

A developer switches from Windows to LAMP Part 2 : Project Dagobah

It has been an interesting past few days familiarizing myself with Ubuntu. As I had written in my previous post, the best way to do this is, is to code a small project on ubuntu and make it live. The obstacles one comes across in the process really help in the learning process.  

I also intend to learn Android programming so I thought I would start first with a couple of simple Android apps. I downloaded Android Studio and unpacked it and was following the lectures of the Udacity course UD853 - Android Fundamentals. In the process, another simpler idea popped up in my head, to allow people to compose tweets of the form 1/n, 2/n .... n/n easily. This could be a nice Google Chrome extension. Since the idea is to make these hacks public, I also bought a domain. I bought another domain for my Android app idea as well. 

I always used ZnetLive to buy domains, but they seem to have made changes where for you to buy a domain, you have to buy hosting from them as well. This is a pain. So I tried GoDaddy to buy my first domain. But I found the domain control panel confusing and somewhat limiting for a person like me. I want to be able to make all kinds of changes that I deem fit. But many vendors do not expose all the options on their Control Panels, for fear that a noob user may end up inadvertently changing something that may cause issues later. I have faced similar issues with Znet and Yahoo earlier.

Amazon AWS provides an option to buy domains and since I intend to use AWS for hosting and its Route53 service for DNS management, I decided to buy the domain directly using AWS. The price of the domain on AWS per year was the same as on GoDaddy, but GoDaddy did provide a discounted price if you bought for multiple years. But for me the hassle of free experience of AWS is worth the discount that I am losing out.

After buying the domains, I decided to start work on the tweetsmart Chrome extension. I installed git and set up a git repository and successfully checked in a Readme.md file to the remote repository I set up on github. To make changes to the Readme.md I used vim and I realized that this was something new and I needed to learn this.

I spent time learning vim. For this I went through a few tutorials and also played the game vim-adventures.com which I felt was very useful in getting started with an understanding of vim and saved a lot of time for me.

However, when I eventually got to putting my learnings to practice I realized I had just touched the tip of the iceberg and that there was so much more to learn. For example, the simple operation of copy from a webpage and paste in vim is not easy. Being used to writing code in an IDE with Intellisense, I also wanted similar benefits in vim and came across this post which suggested some plugins to install to make javascript coding in vim easier.

The steep learning curve here makes me wonder whether I should look at alternatives such as Sublime Text. However I found quite a few blog posts where
the authors mention how they have been super happy learning vim and how it has made them more productive.  I have to admit that vim has intrigued me and thus I intend to spend more time learning it. Moreover Visual Studio also has an extension, VsVim, which allows for Vim key bindings inside Visual Studio.  Now that is an interesting proposition to be tried in the future. For now, I am learning vim and my next post shall be more specific to things I learnt about vim, the good and the bad.

Monday, April 6, 2015

A developer switches from Windows to LAMP Part 1 : Project Dagobah

One of the objectives that I have set for myself over the course of the next couple of months is to familiarize myself with *NIX environment and become proficient enough to make the switch to the LAMP stack. In the process, I am going to write down some of things which I learn.This is meant for my own reference and does not serve as a tutorial of any sort, though if you find the info here useful, well and good! Of course, I am calling this Project Dagobah, because as Master Yoda put it in his years of exile on The Dagobah System

"You must unlearn what you have learned"

The way I have decided to approach this task is to develop some simple app completely on the LAMP stack. I am not sure which is the app that I will end up building, even though I have a few ideas in mind. However, I have started by installing Ubuntu on my machine.My previous attempts at this involved using a Virtual Machine on top of Windows. That somehow never led to the progress I wished so I thought of being completely radical.

Installing Ubuntu was very easy, though I did view a couple of tutorials on Youtube before I started. I freed up about 40 GB of space on my SSD before I started installation. After installation, I went to Windows and checked how has the disk been used by the Linux setup. I found that Ubuntu seems to have created 2 partitions, a small one where some system level stuff has been put and another where other stuff goes. I wanted to see this on Ubuntu. For this I used the df command.



To capture the above screen shot, I used shutter. When I first tried to install shutter, the package could not be found, so I updated packages using the command

sudo apt-get update

It took a while for this operation to finish and it seemed to me that this should be done once on a new Ubuntu installation.

I had also googled for some Linux tutorials to familiarize myself with some basic bash commands and decided on the one here. I used wget to download the tutorial in my Downloads folder. In my Windows, the Downloads folder is at C:\Users\Shashi\Downloads and after downloading a zip file I usually copy it to D:\ and then unzip it. Since I just have one partition here, I just created another directory /home/works which I thought I will use as the equivalent of D:\.

However, I quickly realized the stupidity of this assumption.





By running the df command with the given path I see that /home/works is on the same partition. D:\ on Windows is a different partition. The one lesson that we learnt while playing with our systems back in our college was to keep the data on a different partition. If one has to reinstall the OS, and that used to be quite frequent back in those days, you do not end up erasing your data. Thus I realized that /home/works needs to be on a different partition. So I decided to partition the current drive into two. I would have ideally done this when installing but the screen where one gets to select the partitions did not show up. I spent some time trying to learn how to partition but I cannot find the tool for that on Ubuntu, Gparted.

So for now, /home/works will have to stay on this partition. I am not too worried about it at the moment as I have played a bit on Aws ubuntu instances with multiple partitions.

I then went through the tutorial that I had downloaded. I opened the tutorial html files from the terminal using

xdg-open

which opens a file in the default program associated with it.

I also came across this Youtube channel which I found has interesting video tutorials for people just getting started with Ubuntu.



Well, that was a start. Next, I have to decide on what app I am going to build and what tools to install to start programming. 

Sunday, March 29, 2015

Coming Back To Life

In the month of Jan, I visited this blog and thought its been a while since I wrote anything here. I was feeling a bit exhausted and low that day and perhaps that's why I spent some time reading some of my very old posts which I had written way back in 2007-08. It felt nice to read those and felt sad that I had stopped writing, specially since I had more to write about now than before. I was heartened to see the curiosity, inquisitiveness, wonder and simplicity that I had back then. Somewhere along the line it seems to have gotten lost. I drew a plot of the frequency with which I posted.

While there is variation between 2007 and 2011, 2012 onwards clearly has been a different picture. And understandably so. With more and more challenges at work, I was in a different zone and never really came to a point where I was in the flow to write. My blogger posts dashboard is filled with draft posts, including this one. So its not as if I never sat down to write, but I never really got in the flow to write and thus many of my draft posts are just one sentence with a headline. Now that I am taking some time off, I realize just how much of my mind was on other issues, both professional as well as personal. I am slowly trying to get back in the zone and getting into a routine, finishing off things which are a distraction (taxes etc.) and trying to focus on my health as well as other things that matter.  One of those is writing. It was so nice to be able to read how the 25 year old me saw the world as well as how the world was at that time. I wont be able to do that 5 years from now about the 32 year old me, if I don't continue to write. Also, writing needs practice and it is a skill where I seem to have lost a bit of touch. So hopefully, with this, I get some practice and discipline going! Cheers!

Sunday, April 13, 2014

Focus

Take your time figuring out what is your next mission. What is the objective? What are you targeting? Know the constraints within which you work. Think about the calculated risks you would want to take.

And once you have a picture where you think you can proceed - START and FOCUS.

Weed out the things around you that distract you. Even though it may seem counter intuitive. Just focus on reaching your target.

You try and you fail - but the failure is the worst when you did not focus, because without focus you will not be able to identify the finer points that lead to failure. That closing of your eyes when the opponent hits a ball for a smash while playing ping pong, resulting in you always losing a point on smash. You missing plucking the 5th string while strumming the guitar, wondering why doesn't your strumming though good, doesn't quite sound the way you want it to.

You will identify these minute but important lapses, only if you have focus.

Otherwise, you can keep trying and keep working hard, but you won't make much progress.

So focus - try and repeat. Keep at it. You are getting better!

Wednesday, August 21, 2013

The impact of Babajob

Just heard this story from a friend of mine, Raj.

Raj's friend wanted to discontinue the services of his driver and asked him to stop coming to work. The driver taken aback and worried about his future asked for a month's notice to search for a job. Raj when hearing of this, suggested the driver to register on Babajob.com so that he will be able to search for driver jobs.

Within a fortnight, the driver had multiple job offers and took up an offer at a business which was paying him 14,000 per month plus food. This was a significant increase from the 10,000 per month that the driver was earning. The driver, Raj told me, was super happy in finding such a better job so easily without running around too much.

It was heartening to hear this story from my friend. In our day to day work, keeping the servers up, fixing bugs, developing new features etc, we don't always get a first hand account of the impact of the work that we are doing. One of the goals at Babajob is to create a radical efficiency in the informal job market, so that people like that driver also have the power of easily searching and finding jobs which they like.

To talk about such goals is one thing. But to hear a story from someone, that your work is indeed making a difference, is just simply amazing.

Sunday, July 28, 2013

A feature request for Web Based Email

Its July and the last to file IT Returns is around the corner. My bank emails me the bank statements every month, so to look at my transactions for the past year, I am trying to download all the statements for the last financial year from email.

I was able to select all the emails for last year which have the statements as an attached PDF. Now instead of going to each individual email, I want to be able to download all the attachments from the emails that I have selected.

This does not seem possible right now. You can download all attachments in an email but not across emails.

It would be great to have this.