Thursday, December 29, 2016

Cyclomatic Complexity and C Code

Cyclomatic Complexity refers to the code complexity and the relevent threat level of code having bugs. It's measured as counts and the range is generally 1-10 good - very less possible bugs, 10-20 average - few bugs possible, 20-30 High threat - high number of bugs possible due to high complexity, >30 is very dangerous with very high number of complex bugs possible.

Generally a program counting the Cyclomatic complexity goes through the code and
counts the various conditions, branches, go to's etc. Then by counting the edges of code flow graph w r t nodes, the CC count is calculated.

What I have to do with all this? Basically in my current organization we have CBA - continuous build automation facility which produces nightly builds of all projects. It also performs linting, static code analysis and produces various red/yellow etc flags for code quality issues. Recently a red flag was seen in a feature I halped integrate.
This is a third party component, but since we integrate it in source form, the CBA issues become our responsibility.

Going through the code I found the flagged c - functions to be complex code with about 25+ if else conditions and couple of switch cases each.

So now to make this code CBA clear, I'm going to have to refactor it into cleaner code.

To do this I am using "cccc" tool. Following link proved very handy
cccc lets me check in detail what's wrong with cyclomatic complexity of functions and where. Then when we have cleaned them up we can check the result with cccc again to validate the changes.

Similar too is an eclipse plugin  by name of metriculator. So if you are using eclipse as IDE for your C/C++/Java code then you can use this.

Wednesday, December 28, 2016

Thinking about getting a Raspberry Pi 3 to use as Living Room Computer

Well, I have a laptop for home use. But it's got kind of cramped feeling when using it for media consumption - because mainly that's what we use it for. Basically I have an external HDD to which I dump whatever media I get my hands on. This is then used on the laptop. So I'm looking at a setup which is cost effective and at the same time let us do the TV thing with external HDD and also lets us do bit of browsing for news etc. 
Recently I purchased a Logitech MK215 wireless Keyboard Mouse combo and it's made this setup much better. So now I'm thinking of shifting to bigger display - at least a 18.5 - 24" monitor. The problem is connecting laptop to this will just make the laptop work as desktop and it's not good for battery. Also it gives us a tangle of cables plus the space used. Then there's the screen switching between external and internal display. So it's not just the ideal setup. What I want is a low power one box solution that will let me play all the media I have and also let me do basic computing tasks. 
Now the Raspberry Pi 3 fits the bill. The board with a case and power adapter costs about INR 3500/-. To this I connect the HDMI monitor and I get the display, my existing 2.1 speakers, and voila I have a media center of my choosing with minimum cost. I'm assuming the monitor to go for about INR 8000/-. That's INR 11.5K but I get a good and big monitor plus a separate system from my laptop which is self contained. So that my wife could use this or the laptop while I'm using the other. The main reason for this being that my other laptop went kaput. And getting a D-SUB monitor is waste of time. Of course if I could get a D-SUB to HDMI converter box then that might work too. In that case I'll have to shell out INR 8000/- for monitor and the box for approx INR 800/- which is INR 8800/-. But in this case I'll be dependent upon a 5Yr old hardware which might fail at any time. 
Hmm. The RPi route looks better. But the cost if of course more. Maybe if I experimented with the Pi Zero the cost would come down. On the other hand my existing kaput laptop is sitting there in the closet gathering dust, it might get some usage with the second route, also better since four months back I spent about INR 700/- on a power brick for that thing. Grrr!
Well lets see. Mostly I would just postpone this due to my temporary living arrangements. Maybe next year when I move to a bigger and permanent place I'll get the things. 

Sunday, December 25, 2016

My views regarding smart phone purchase

Many of us are routinely looking at buying yet another smart phone and there are so many options out there, so many features, combinations and different hardwares, it becomes challenging. Looking at the available choices it can be frustrating at times - especially for people looking to buy an Android phone.
There are some people who want an iPhone. New buy is simple for them. If you have the budget go for the latest and greatest from Apple. Otherwise settle for one or two gen older iPhone. You know what you are getting. You want it so you take it with all the shortcomings or the lack of features there-of. They spend considerable amount on phone and get something that can be very fulfilling for them.
Next are people who are looking for just calling and light games-entertainment. They usually have budgets from INR 5000 to 10000. And from options front they have Androids only. The entry level androids are quite limiting in hardware/features and overall performance. But they can be good value for money if people are looking for limited functionality.
When you cross INR 10000, you start getting some very good androids with mid range hardware with good enough specs and features like Snapdragon 600 series processors/ 2GB RAM/ 16-32GB ROM etc. There are many good options in 10000-15000 range and most people buy phones from this range itself.
Beyond 15000 till 25000 there are capable devices with latest chipsets and high-end features. People who have budgets and are looking for even better features covet these. There are usually one or two defining features like flagship grade cameras, thin and light construction, great design etc. They are coveted for these differentiating features.
Beyond 25000 there are true flagships. These are handful devices with high end specs costing similarly. People who don't want iPhone but want flagship devices in Android go for these devices.
In Indian smartphone market, people are usually looking for phones to use for 3-4Years. The phones come unlocked and carrier subsidies are not available. So people pay upfront and that's one of the reasons that Indian smartphone market is very price sensitive and is very competitive. Also this is the major reason that even unknown chinese brands sell well, if they are giving good value for money and quality.
So that's about the market. Lets look at a case of buying a phone in the most popular price bracket. Lets say I'm buying a phone from Amazon. So I open Amazon and enter the price bracket. There is so much choice. 197 Androids, 3 WP's and 1 Blackberry even!!! Lets drop the WP and blackberry. Lets say I'm looking at only 32-64GB ROM devices. There are 44 left now. I'm looking for a 5" device. So that narrows down to 13. There are same models with different colors. These are Nubia Z11 mini, Lenovo Vibe X2-AP, Asus Zenphone 3Max, Gionee Elife E6, HTC Desire 628, Gionee Marathon M5. All these are capable and we can choose further. In case we are looking for particular brand we can differentiate accordingly. E.g. Moto G4 is available in similar brackets but has only 16GB ROM, still many people prefer a Moto and go for it.
That's it!

Thursday, December 22, 2016

Android Games I Like

I occasionally use my Android phone for playing games. Most of the android games are not comparable to PC Games where you get lots of content, slick graphics and great game play too. There are some games on Android which strive to be equivalent and also manage to be so. Lets take a look at them: 

1. Modern Combat 5: Blackout - Excellent Game, pity can't be played offline. Bugs out once in a while due to god knows what issues. But overall awesome when it works. 

2. Brothers in Arms: WWEII era game that manages to look and play the part. Really awesome game - felt like I'm almost back to Call of Duty. The missions and games are totally worth.

3. Modern Warplanes: Relatively new game but is very engaging. Excellent graphics and great controls. Overall awesome experience. 

4. Hill Climb Racing and Hill Climb Racing 2: Total timepass. 

5. Asphalt 8 and Asphalt Extreme: Great racing games. The graphics are top notch and the races even more so.

6. Overkill 3: This is the game I have played longest. Very engaging with great weapons. The only thing which made me turn away after almost five months of playing it, it's feels like a tight FPS with not much funny aspect. You shoot enemies, but you can't play with the enemies, like lodge a grenade and watch them go kaboom. 

7. Sniper Fury: Great sniper game. 

8. Plants Vs Zombies 2: Great game but if you have played the first then this might get repetitive. 

8. Trials Frontier: Another great game of adventure bike genre but the game can get windy at times and get boring when you have to keep playing existing games to get through.

9. NOVA 3: This is the game everybody talks about like its the de facto FPS on Android. And it is with great weapons and great gameplay. 

So these are few of my favorite games. There are thousands more out there and I'm yet to try them but these few are maybe the cream.

A Recap of Year 2016

It's about the end of this year and I felt like I should put together a recap post for this year. The thing is I'm not posting as much sine I have been busy elsewhere. (New home it is ;) )
But a lot of things happened. I started the year with a switch to Linux Mint, but after using it for 3-4 months got bored, and instead switched to KDE Neon distro which showcases latest plasma developments and certainly is cutting edge and exciting. But because of stability related issues - yeah it's cutting edge ;C - I had to abandon it. So couple of months back I'm back on Ubuntu. Actually my old Acer laptop which boasted of 1GB of RAM and was proving to be bane of all Linux distros I was trying, died second time. It turns on and everything seems to be working except no display. Maybe the LCD panel is gone or maybe the connector is damaged, I don't know. I don't have a spare monitor to connect to the D-SUB port so I can't check if it's really working or just making stupid noises. Maybe I'll get a monitor in near future and put this to work, maybe. 
So now I'm left with the blue Lenovo - blue because there's another Lenovo which my Sister uses which is black and had AMD A4 5000K APU inside, so that makes mine the Intel Lenovo which doesn't sound as good as Blue Lenovo. It's Pentium D + 2 GB+500GB machine which is working fine since last year I replaced it's battery and keyboard. Having 2GB RAM it's lot forgiving and manages to run everything fine. So that meant I'm sticking to Ubuntu since it just works now. (Previously it was bit of struggle on 1GB Acer J.) 
On Windows front, I'm sticking to tried and trusted Windows 7 - no surprises here. 
Mid year was quiet with me busy with things and work at office with assignment to a new project. 
In Sept, I got an Intex Aqua Fish to try out Jolla and it has been a good experience overall. They have good amount of work to do, there are many things missing, but there are updates and things are looking at least ok for Jolla. Lets see how far they make. I posted my experience of various things about Aqua Fish and Sailfish in many posts. I have not yet tried to use Aqua Fish as my daily driver. Will try soon.
Last but not least my Nubia Z9 Mini completed one year in Oct and to celebrate I replaced the factory applied screen protector with a tampered glass screen protector purchased for all of INR 169/-. Hahaha. But the original had acquired a number of scratches and was looking really scruffy. So the new one makes the phone look newer right away and better on eyes.
Meanwhile I started on a Sailfish App but after spending a some time on it I realized that I am not able to give it enough time to make it work. So I scrapped it. 
Ubuntu translations have continued and it's my pleasure to state that Marathi Language support have passed Tamil Language and is right behind Punjabi - got to keep kicking. This was possible because I got hold of butt-load of upstream translations for Inkscape. Still merging them with the po file from Launchpad was no mean feat and took me about a week. 
So that's all for Yr 2016. A lot has happened here in India with Demonetization, Black Money Issues, New Corruption scandals, Terrorist attacks and still we keep kicking. 
What's for new year? Well I'm thinking about getting a Raspberry Pi or some similar board and doing a TV Connected home computer with it, I'm just not sure if it'll serve the purpose that well. Lets see, I'm going through the available hardware and actual requirements. Might come true. The Dead Acer might see the light of day too. And The Blue Lenovo should keep going. That's all 2016! 


Thursday, December 8, 2016

Git Proxy Settings

Command to use:

git config --global http.proxy

    change proxyuser to your proxy user
    change proxypwd to your proxy password
    change to the URL of your proxy server
    change 8080 to the proxy port configured on your proxy server

If you decide at any time to reset this proxy and work without proxy:

Command to use:

git config --global --unset http.proxy

Finally, to check the currently set proxy:

git config --global --get http.proxy

A test of merging two big files in Linux

Update: "Beyond Compare" it is. Certainly for big files weighing in MBs it's the clear winner since meld just craaaaaawls. Unfortunately you get only 30 days of eval period with Beyond Compare and it's paid after that. But for anybody doing serious amount of compare and merge "Beyond Compare" may prove to e good investment. Otherwise for all us fellows who just occasionally merge things "Meld" it is!

I contribute to Ubuntu Translations. Recently a curious thing happened. While going through some translations I noticed that there are some projects where upstream translations are available. But those are not yet imported in Ubuntu packages available on Launchpad.

One such package was inkscape. When I checked the upstream website for inkscape I found that in trunk there's a translation available and there is a lot of work done.

So I downloaded the po file from there and tried to upload it to Launchpad. Rosetta(Launchpad Translations Management System) declined with note that Launchpad po files contain custom tags, which the upstream translation did not have.

So I decided to go at it the hard way - manually merge the files and upload the updated Launchpad copy. This I found out to be tough task since the files are 1.4MB and all linux merge softwares fairly suck at big file merging.

Meld was creeping and took about couple of minutes (:D) to load the files. Merging was slow with every change taking upto 10secs to refresh the UI.
Kompare also failed where similar behaviour was observed. I didn't try any other tool since these two are the mainline tools.

Finally I cleaned up the upstream po file removing unwanted text like fuzzy markers and easing the load a bit. After this cleanup I'm now able to merge the files using meld. But it's still creepy crawly. But at least not as bad as before.

Incidently I came to know about Linux version of Beyond Compare. It's a paid software. But I downloaded it anyway. Funnily enough it works great. I could move around with no delay and the merging is very fast. Lets see how it works out. Certainly beats meld though!!!

Thursday, November 24, 2016

Google Takeout for downloading your data at google

Google Takeout is a service that lets you download all your data available with Google. Funny thing is that we don't actually get how much data we share with Google. 
With Android, App logins, GMail and many other google stuff the integral part of our life, we share a bootload of data with google. So this week I downloaded my google data using google takeout service and I was surprised when the archive turned out to be 6.39GB in size. 
I'll be analyzing what all I've been sharing with Google. My expectation was about 2.5-3GB max data since my Gmail and Photos are using about 2GB at present. They managed to hit 3GB six months back so I trimmed both in spare time. So I was surprized with >6GB figure. 
Lets see what all has ended up with google...
Photos 5.2GB
GMail 350MB
Drive 650MB
Rest all services few more MB.

I was frankly surprised with the amount of space photos are taking, but then I recalled that only full resolution photos count towards the calculated storage. And most of my photos are not full res. So I guess that's the reason. Everything else looked okay.
I also saw Google Fit using about 300KB data  and after going through it I found out that its the exercise data from the one week I used Google fit as trial. Funny that.
So Takeout can provide a glimpse of your usage of Google services as well.

Monday, November 21, 2016

Nokia C5-00 5MP - from Yr 2012

We all have those relic phones which are replaced by yourself/cousins/relatives and ended up with you as secondary or tertiary phone. This was the phone I gifted my sister as her primary phone in 2012. She used it for about two years, then she wanted a big touchscreen phone so I got her an entry level droid. And so the Nokia was discarded as a secondary. The entry level droid  - a chinese knock-off by a local company is still kicking after about two years and a battery replacement, but now this Nokia has ended up with me. Funny part is I love this phone. it's small and simple. Gives very good battery life. Is a pleasure to use  -all these buttons. And is a good mp3 player too - again thanks to all the buttons I don't have to take it out of pocket to skip to next song. 
Well, I have been using this as my secondary device for about a year now. I charge it maybe once a week, have all my contacts on it - took me a painful evening to send them one by one using bluetooth. I'm laizy enough that I did not bother setting up Nokia PC Suite and what not. But now it has all my contacts - at least the important ones, I keep a nano-SIM adapter since my other phone uses all nano-SIMs. And that's it! Really! 
It's a novelty to use all these buttons and keys. It's a different kind of experience where you mostly do things by the feel of physical buttons and not look all around the screen and hunt for soft-keys and menus. Here you know, you press call end button and you are going to go to homescreen, while on my droid it gets stuck in the transition once in a while. This is the solidity of Symbian - no crashes seen yet. While on the droid the other day a nightly update put it in bootloop. Hangs and crashes are common even when using Stable ROMs and heck, even with Stock Firmware. I would use The Nokia if I could forego the Contacts sync and the few apps that I use - Whatsapp. Bigger problem is this phone does not have WiFi support, so I'll be almost offline unless I activated a cellular data package. But they are costly so I would forego data too, which would make this a dumb phone as far as I'm concerned and to that end I have another Nokia - a terrible terrible entry level Nokia 1280 whose only feature is a LED Torch - god bless!!! 

Saturday, November 19, 2016

Update on the Sailfish App

Well, it's been a while and I actually didn't spend much time on the app all this while. But today I decided that I'm going to spend at least couple of hours on it. And I did. Kind of solved couple of big issues too. Maybe not completely, but progress still.
So the summary is I was facing issue with deployment of the database. It's sqlite db and I didn't know where to place it and how ty place it.
So after lot of googling and some forum searching I found a way to deploy data files on Sailfish.
After applying and troubleshooting couple of issues here n there I got the database working. But the problem now is, it works only when the app is run from sdk. When I launch the app from inside, no DB. Well atleast the role are going to the device. Teething issues.
Another problem is the UI is all screwed up. This should not have happened because on desktop was all Sunny and Rozy. Anyway I'm yet to get to Sailfish specific stripes anyway so I'm thinking it would fix the UI issues.
So I pushed all these changes git. Also logged above issues too. Overall it's ghost couple of hours.

Wednesday, November 9, 2016

The story of Airtel Prepaid to Postpaid Conversion

Update: On Wed 2016-11-08 I gave in and visited the nearest Airtel Care Store. Thankfully the people there were very helpful and they knew the exact problem. So they gave me a 1800-xxx-xxx number for televerification. Once it's done they asked me for ID proof which I did not have at the time. But I visited them in evening and submitted the ID Proof. After this I was given a new SIM Card. This got activated in about two hours and the phone service was started. The SMS service was started after 24 Hours. 
Hush! That was an experience. So this proved that Airtel's OnCall Customer Care sucks but the Airtel Care stores might be the ray of hope. Well, lets see how the postpaid services work out for a while. Or else we can always port out!!!

Sometimes you look at the many hours you spent looking at your prepaid packs n the best combos and stuff, it seems like a waste. Me too. So I decided to convert my Prepaid Airtel connection to Postpaid. And it has been an adventure so far.
Sat 2016-10-29 Airtel guy visits to collect documents and gives SIM. Assures SIM will be activated when address verification is done. Another guy will visit for address verification by 2016-11-02 since its four days holiday.
Sat 2016-11-05 Finally the airtel address verification guy shows up. I have the SIM in the phone but no network. I hope it will get network after address verification.
Sun 2016-11-06 Verification complete. But no network yet. I try to get to Airtel Customer Care but cant find a way to reach any exec. Airtel website is useless. The internet is useless as it seems.
Mon 2016-11-07 I have shot out a number of mails to Airtel Customer Support E-Mail - They say they will get back to you in two hours. But no help yet. Airtel really sucks.
Tue 2016-11-07 Got some replies. The tune is same - Your tele-verification is pending so please complete it. I shot out at least three replies to the tune - your damn SIM won't connect to your thrice damned network. So god help me.
Wed 2016-11-08 Shot out a mail to their nodal officer. Got positive and useless reply. I complained about the lack of Customer Care Number Access and this idiot have not mentioned anything about it in the reply. Stupids!
Also got a call from the Postpaid people who contacted me in the first place. And they can't find their ass with both hands. Airtel have lost me as a customer. Now I'm just waiting to get the number working and then port out to someone even marginally better.
Who? Probably Idea or Vodafone.
Reliance Jio is crap as seen fro their billing plans and the freebies are vaporware or reality only till Dec 03.
Telenor has crap service, don't have 3G.
Tata Docomo has severe signal issues everywhere. Incidentally I have a Photon WiFi dongle which can't find network half the time.
Reliance RCom is a thief of a company with crap service.
Aircel is total unknown. And I'm not looking to experiment right now.

Monday, November 7, 2016

A quest for returns from Foodpanda for failed payment

Update: Finally after couple more follow-ups the refund was initiated and delivered to my account three days ago. It was interesting to see the lack of processes at Foodpanda and it does not give me much confidence. Mainly because they depend most on their CC Execs to keep track of things and the requests do get missing as I found out with my refund. Anyway at least I got the refund.
I have been a loyal customer of foodpanda for about two years. For single IT professionals having the food delivered at doorstep is a boon especially when you are exhausted after a 12-14Hr workday and just not wanting to go out for food. Having food home delivery services like Foodpanda, Swiggy, JustEat etc helps a lot in maintaining peace of mind.
But then once in a while that peace of mind gets eaten up when any of them screw up. 
I have had my experiences dealing with unprofessional and lousy restaurants, delivery screw-ups and what not. But that has been generally rare experience and we have ensured we gave crap ratings after such. So overall it's been a positive experience with foodpanda and their customer care has been okayish in dealing with order related mishaps. 
Now what I'm talking here about is something different - online payment. There have been couple of occasions when online payment failed due to various reasons - like network issues, payment processor issues etc. And we had to get through Foodpanda's customer care which was helpful in getting the refunds processed. It did work. And I was satisfied. But there were couple of payment failed issues last few orders where I had a negative experience. Refer below mail:

17-10-2016 21:00
from me to Foodpanda Customer Care
I have returns pending for following three orders:
1. 15/08/16 first payment failed so I retried the payment and this time it was successful. But no refunds.
2. 04/09/16. Similar story. No refunds.
I firgot to check foe the returns for these two orders in time.
3. 13/10/2016. First payment failed with timeout error. I had a customer care person place another order with Cod Option. Its more than said 48 hrs and yet refunds are not in the account.
Please help.

17-10-2016 21:01
from Foodpanda Customer Care to me

Hi vaibhav,

Thank you for contacting foodpanda Customer Support.

Your request number is # 13289930. We strive to answer all e-mail support requests within eight business hours.

For urgent issues or modifications in your order please contact us directly on our Live Chat at or give us a call on 0124-6149200.

Best regards,

Your foodpanda Customer Care team

18-10-2016 16:42
From foodpanda Customer Care to me

Dear Mr. Dalvi,

Thank you for writing to us.

Thank you for bringing this issue to our notice. We are committed to resolving your concern with utmost priority. Post investigation I found that due to a technical issue with the payment gateway the amount was deducted from your account and order was not processed.

As per our telephonic conversation, we have initiated the refund against the order id: n0dp-r4as which was not successfully placed due to the online payment issue. You will receive another confirmation mail within 24 to 48 hours. Be assured it will be credited to your respective bank account within 5 to 7 business days. Furthermore, payment of order v8tx-m6ol 4th September, 2016 and 15th August, 2016 was already reversed.

We appreciate your patience and understanding on this situation. Please be assured that you will receive the refund as per the given timelines.

Looking forward to serving you and enhance your experience with foodpanda.

Najmul Hasan
Happy Food Ordering!

Now it's about a fortnight since and it's 07-11-2016. No returns, no communication. Foodpanda has lost one customer who would have brought them hundreds of rupees in business, but if for the 200 odd rupees they would have returned.

Foodpanda! Not Happy Food Ordering! Never Happy! 
Panda Sucks!!!

Update on Tata Docomo Photon Plus WiFi USB Dongle

So I have been using Tata Docomo Photon Plus WiFi USB Dongle for a while now. My experience remains unchanged. On most if the days it just cannot connect to the 'plus' network. Mostly it connects to the 'Wiz' variant, which is CDMA1 RevB with about 115kbps(Yeah - It's kilobits!). Anyway, when it manages to connects to 'plus' variant which is as I believe CDMA2 the speed is good. I get about 1-1.5Mbps which is good. But again with the INR700 pack it's just 2GB of high speed goodness. After that it's 115kbps crawl. But since it's unlimited, I am okay with it. Heck, I once even managed to upgrade my Sailfish OS phone using the slow network. 
So the outlook remains same. INR2500 is too much investment in Tata Photon Plus WiFi USB dongle. It's just not at all a strong contender for Dongle of the month or year. The good thing is it does work in it's own moody way. And if you can live with it, it's an okay deal. But still I wish I had gone for an unlocked dongle and be using SIM card. Might have been cheaper with a RJio SIM in it. J

Wednesday, November 2, 2016

Intex Aqua Fish Update

Not much happened for last couple of weeks. I was busy with things to work on the app porting. But three days ago I tried something to get the latest update. Here's the story with the background. 

The background: 
Intex Aqua Fish is a Sailfish OS phone with partner space enabled. What that means is whenever there's any update by Jolla e.g. Fiskarsinjoki v2.0.4.14, you don't get it right away on Aqua Fish. It goes to Intex and then after validation it reaches you. 

Anyway as you all know Aqua Fish is just clone of Jolla C, I decided to try out some
tinkering on my own. My inspiration is following link:

So after reading the steps, the provided script, and the comments carefully and multiple times, I started with the script. 

The script failed saying I had some conflicting packages. So after going over instructions of how to clear out the offending packages in about half an hour I had Jolla packages on my phone replacing Intex packages. 

Next I restarted phone (why? Because with computers it's a good idea to reboot them once in a while, and especially when you tinker with the system to see nothing's got broken.)

And after that I connected phone to my home WiFi and checked software update - and there it was Fiskarsinjoki. Took a while to download since the update is hefty 400MB, but then it was installed and the phone rebooted. 

Feels great to run the latest and greatest. Keep up the good work Jolla. 

Tuesday, October 25, 2016

First try to port a Qt application to Sailfish

So last week I prepared v0.3 and put it to git. Yesterday I tried to port it to Sailfish as was the original plan. I went at it as below: 
I used an existing test application to get the required files and project settings. I added them to my project. This part included copying various tidbits to the .pro file. Also included is copying over folders for RPM, translations, icons etc. 
Then I went through the files and updated the file names wherever needed to reflect my app. This gave me a build which built successfully using the mer-arm toolchain.
Now to get it running on the device. I plugged in the Aqua Fish to Laptop with microUSB cord, and enabled debugging. Then tried to debug-run the app. First problem - debug-run doesn't work. I got error as - gdbserver not found. On googling for this, found out I need gdbserver installed on device and it will probably take a while since I'm not familiar with this functionality of Sailfish. So I decided to skip debug-run, and go with only run. 
This worked fine but the app won't launch and I got some qml errors on console. After going through them I learned couple of things - 1. Sailfish SDK doesn't yet have support for Qt Quick Controls, confirmed this by going to SDK's qml folder and found only Quick 2.0 qml's there. 2. Debugging QML's is a real pain. There were times when I wanted to give up. Going through the errors one by one, finding dependencies and then fixing it, and then verifying the fix, it's exhausting. One problem which was my doing, was not checking in advance what QML things are supported on Sailfish. 
Anyway after couple of hours of hair pulling and redoing the code, the app did launch on AquaFish. One major deployment related issue is I need to figure out the location for the database, because it's not getting deployed right now. Other major issue is UI related. My app used flexible positioning but Sailfish UI expects some stuff like padding and widths according to theme guidelines and so these all need change. Plus most of the screen looked white with barely visible gray fonts - this also needs fixing. I wish I had a screenshot to post here to show how bad it looks, but it's just some stuff that needs fixing. 
So well that's my experience porting my app to Sailfish OS. It was good experience, in that I got some hands on the various files related to packaging the app, and I got more hands on Silica Controls. So my goal is to get the app working and push a Sailfish OS compatible v0.4 to git. Lets see if I can nail it!

Wednesday, October 19, 2016

E-Governance experiences in India

For last few years computerization has become common in all government departments and we can do a number of tasks online. 
Last few days I had different encounters with a few government systems here around. I'll summarize my experience as below. 

1. Online Tenant Registration

I'm living at present in a rented apartment. Recently I was looking at a new vehicle purchase and one condition was the tenant should be registered at nearest police station. Being lazy, I looked up if there is anything online for this. Funnily enough, there is a website: It was started two years back on the outset of "German Bakery Blasts" and "26/11 Mumbai Attacks". The website when I tried to access was down. I tracked the registration and found out one probitysoft maintaining it. I found mail of the registering person and fired an email to that person. I didn't get any reply or acknowledgment, but the website miraculously came online. I went through the options and checked the various operations. 
It looked functional enough, but me being the pessimistic type decided to go visit the police station. It didn't turn out that exciting but anyway this is one story of eGovernance.

2. Online Tax Payment and RTS queries

This is from KalyanDombivali Municipal Corporation website. They had an old system 4 years back which was okay'ish. But the payment options were dreadful with only 2-3 banks supported. So couple of years back they revitalized the whole thing and computerized a number of departments. 
The new system is up to date, is easy to use and is not an eyesore. For this I must give credit to the developers and the corporate admins who helped put this together. 
The payment part now uses two payment processors techprocess and billdesk which means anybody - I mean totally anybody can perform an online payment. I have been using this system to pay property taxes for one of my properties there and it's worked fine. A good example of eGovernance. 
But that's just one part. Recently I have to use their RTS functionality - this one for getting online No-Dues certificate. The process is straightforward. You fill an online form, pay 15Rs online, and you get a ticket whose status you can see online. 
You get an SMS on your registered phone no when the request is processed, then you can download the certificate from the website. As simple as that. If you have any dues, you can pay them right away and continue to filling the form. 
Brilliant. I got the certificate within two days as promised. This is a really good example of eGovernance. 
To look at it this way, since I do not live in the city it would have taken me one leave, about INR 500/- for travel and a lot of physical discomfort to get this done. But with this online facility, it's all saved. 

So from these experiences you can see that more and more eGovernance is needed. Lets hope the government puts more and more functionality on the computers.

Update on Intex AquaFish

Last one week I explored AquaFish more. Found some nifty things too. PC Connection is great and working fine. I can send files to and from AquaFish well enough. Most of my media plays fine on AquaFish. 
I checked the events view and there were some options regarding to customizing the Quick Toggles or the WiFi/BlueTooth etc buttons. I added brightness control there since it seems like the natural needed option there. 
Besides this I successfully enabled developer mode and managed to connect the phone to installed Sailfish SDK and managed to run coupe of examples on the phone. One problem I faced was the SDK won't connect the phone when I tried connecting the SSH thingie(???) over USB itself. But then I connected both my laptop and AquaFish to WiFi and used the WiFi IP of AquaFish in Sailfish SDK, and debugging worked fine then. Don't know what the real issue is. 
Anyway, going forward I side-loaded some APK's and tried to install few Android Apps like Flipkart, Amazon, WPS Office (I use this for PDF reading, the night mode is blessing), 7Zipper, MXPlayer etc. Out of these MXPlayer and 7Zip failed to install. Others installed and worked fine enough for my small use.
Overall I'm having continued good experience here. Hoping it lasts in the future.
My goal is to port my newly developed Income/Expense Tracking app to Sailfish. Lets see.

Tuesday, October 18, 2016

Using Git with github

For last couple of weeks I am working on a small Income/Expense tracking application. It's a small pet project of mine. It's main purpose is for me to get familiar with latest features in QML and code for various scenarios in a live app.
Recently I put together another point release for this - a version 0.3. Now I needed somewhere to keep track of it's development and manage changes better than a desktop folder and datewise backups. So I thought I should setup a Git repository for this.
So I created a github account and created a repository. To import my project into this, I tried to use a GUI Client, gitg which I thought would be easier to use than stumbling around the commands. 
Unfortunately gitg gave an error regarding .gitg-config something file. I didn't have time to shoot it down, so I used the five-six commands shown in github repository page to setup empty repository on PC. 

The commands are:

$echo "# UIApp" >>
$git init
Initialized empty Git repository in /home/vaibhav/Work/.git/
$git commit -m "first commit"

*** Please tell me who you are.


  git config --global ""
  git config --global "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'vaibhav@HP-Elite-7100-Microtower-PC.(none)')

$git config --global ""
$git commit -m "first commit"
$git push -u origin master

After going through these commands, I checked the repository on github, the first commit was visible. 
OK. Now I copied project files from other folder. Then opened repository with gitg.
Now gitg showed it correctly. The new files were shown as unstaged. So I added them to staged and tried to commit. Gitg asked for updated author info. I went to Author info dialog and updated my name. After this I tried to commit again. This time commit was done. But this was a local commit, and I couldn't find anyway from github to sync this to github master repository.
So I tried following command, it worked and it was synced with master branch at github.

$git push -u origin master

Now my project is on GitHub at:

Thursday, October 13, 2016

1 Year Anniversary of Nubia Z9 Mini

Right a year back this time I was frustrated with my Redmi 1S for not getting through the day. So much frustrated that I sold it to a friend's friend. To add to the cash-pile I sold my four year old Samsung Omnia W on Quickr. And then put in some more hard earned monies, and got this beauty on Amazon Sale with 33% discount. 
It was a risk. Nubia as a brand was not well known. But I have used ZTE's back then and knew them to be solid devices. So I went for it. And now a year later, I'm still happy for that decision. The phone came with Android 5.0.3 with Nubia UI which I found to be crap, but the Camera was top notch. I have since shot more than 2000 photos with it and many of them are just superb. So much so that it convinced me to invest in a tripod. Another good investment.
Anyway, couple of months in I ditched Nubia UI for Mokee ROM and haven't looked back since. Used Mokee 5.1 for a while, then moved to Mokee 6.0 and been using it so far. The phone's solid though, the battery still goes more than a day, it has seen half-dozen falls but still working fine. The screen's provided guard has bellyful of scratches, but I I think I should replace it now after a year. The display is crisp and no issue with anything else. 
This reminds me of the Samsung Omnia W. It also was a solid phone and a joy to use. Maybe more so because it had WinPhone OS and an OLED screen. I miss that OLED screen, but by end of first year, it had developed burn-in spots near top. Nothing like that here in Nubia. 
Well such solid gadgets are few to come by. Especially sad when they explode like recent Sammy Note 7's!!!

Tuesday, October 11, 2016

Thinking in terms of API

Soon I'll be completing seven years of career in IT. I have worked as a software engineer, then a senior software engineer, and for last one and half year as a team leader. And during all this time, I have encountered a number of problems. I have seen code of various quality, code that looked like spaghetti,  totally unmaintained and terror to make any changes to. I have also seen well maintained, well architectured code. I have seen C, C++, .Net, Java, JavaScript, PHP, SQL Procedures and shell scripts. I think I have seen more than enough.
So while reflecting on all this and trying to apply my previous experience to my current work which is in embedded systems, I thought I need to think about API's and how to apply them to my work. Actually it shouldn't be a debate, API's are needed. To avoid mixing of various different functionalities, you need API'fied layers and clear separation between the various functions.
But from what I've seen in embedded applications, it's peoples style to liberally use globals, externs, and with a big application like a complex HVAC system, or a motor ECU, it turns into an unholy mess. You end up with a bunch of static, globals, extern functions and other bits that makes understanding and maintaining such a code a pain in the a**.
That's where API's come in. You are actually formalizing the functionality, and coding the prototypes for that module accordingly. This way you separate functionality into that module and hide all that away from other modules/functions etc.
Consider following example:
Recently I was working on a UDS client. This client communicates with UDS server on a vehicle, it creates UDS queries using UDS over CAN, and writes/reads the queries and response. Now, a quick and dirty hack would have been to hardcode the few, about 4 UDS queries and read off their responses. It would have been easy. But I thought about the utility and possible use cases for this little app. I came to the conclusion that there is a chance of this utility needing future functionality additions. So I tried to mudularize it. That means it got architectured into following three layers.
1. Application layer: Here we create a UDS query and send it to the next layer.
2. Service layer: Here we implement the transport layer for the UDS over CAN functionality.
3. Device layer: Here we implement a virtual CAN device and abstract its read/ write functions.
I had to think hard on the data passing between layers. Also how to maintain the logical separation. Took me about 30% more time but it was worth it. Because next week I was told to make this utility compatible with another CAN device. And with this code I just had to create another derived CANDevice class and implement the read/write functions according to this new device's API's.
Such is the use of API's for code maintainability. And such code is totally applicable to embedded applications. This would address the logical separation and readability aspects of embedded code.
The other pain aspect of embedded code is extern functins and global variables. Having application level global buffers and passing them by reference to lower layers would solve the problem of readability. It would make function prototypes a bit long but then you wouldn't have to hunt the globals around. It would also clarify data passing since all data the function would be visible in its prototype.
Well, this approach does looks promising. Lets see how it works out in real life.

Thursday, October 6, 2016

Adventures trying to share Laptop/PC internet to Sailfish

Well, I got hold of a high speed USB Dongle which I could connect to my laptop/desktop. But I couldn't use it's internet with Aqua Fish. So I thought I would try to share the internet and see how it works out. 

1. Make laptop WiFi hotspot - normally it's effortless with apps like Conenctify,but on this current laptop I don't have admin access. Which means I can't do this using windows. But I have Linux on this too. So I rebooted and googled about WiFi hotspot on Linux. Got some decent instructions too. But it wasn't working. So after changing the WiFi driver twice, following three different tutorials, and finally finding out that this laptop's WiFi doesn't have any driver that supports AP functionality, I was disappointed. 

2. Try USB Reverse tether on Jolla: The instructions were there. But people threw a number of disclaimers so I thought my phone's brand new. Don't wanna break it so early. Which means this was also a no no. 

3. Try USB tether on android and make it WiFi hot spot: Well, getting reverse tether to work was an experience in frustration. Mainly because somewhere between android 5.0 and 6.0, they changed a number of networking commands and thus invalidating all those simple 3-4 command tutorials. 
Finally after trawling the web for couple of hours I found what one lucky soul had posted regarding Android 6.0. I followed that tutorial but somewhere between 7th or 9th command I got lost. 
Not so easily giving up, I found another option: An App in Play Store called Reverse Tethering NoRoot Free. Following their instructions I installed companion app on desktop. And fired it all up. I did get reverse tether working with this. But when I tried to turn on WiFi hot spot so that I could share this hard earned internetz to Aqua Fish, it just wouldn't work. 

Well, they say third time's the charm. For me three tries are more than enough. 
Summary: I changed laptop WiFi Linux drivers thrice. Trawled internet for more than four hours. Installed Linux ADB Driver. Fired about 4 dozen commands in ADB Shell. Fired twice that commands in terminal. And managed to get Android Reverse Tethering working with a ready-made app from play store. 
Some days are just so bleak...

Wednesday, October 5, 2016

Aqua Fish update

Two issues I noticed:
One due to WiFi not connecting to WPA Enterprise network, I had the cellphone reset. After reset I entered my Jolla account credentials.
After that I got notification for update. Except this is one update I had already applied. So Sailfish update may not be working well. Don't know.
Second issue is seen when using the Android app store. I tried to update the apps but the download keeps getting interrupted. Don't know again whether its network issue or store issue or something else.

Tuesday, October 4, 2016

Intex aqua fish review

5-Oct: Just found out Sailfish doesn't support WPA Enterprise. So no office WiFi for me!
Although it connects to plain WPA router. I checked this with my Tata DoCoMo WiFi dongle.


Unboxing hardware

The box looks good. Opening it you find a book like design which is delight to open. The box contains handset, 2500mAh battery, in ear type headphones, a power brick and a USB to micro-USB cable. It comes with an orange colored back plate which can be removed by lifting one corner. Intex
has helpfully provided a sticker at the corner. The phone has quite a bit of footprint but is light in hand. Removing the backplate shows the dual Sim slots and the dedicated SD Card slot and battery slot. The battery is removable. But you need to remove the battery to insert SIM/SD cards.

Display, connectivity, battery life

The display is specified as an IPS HD display. It doesn't have any kind of glass protection though. The covering plastic is bit shiny which causes glare when brightness is set to low. The display can get quite bright and so we shouldn't have any problem with sunlight visibility. Adaptive brightness is supported however I found that it's not as responsive as I like. The brightness adjustments happen slowly. The display is good enough for the price though and touch response is fine.

User interface

Intex aqua fish comes with Sailfish OS. The version is after a small update. Updates are directly available from Jolla. The interface is touch driven. It supports the usual elements like a
Home screen, Notification tray with Quick launch buttons, an app drawer, theming support via ambiances etc. It supports all major accounts like Google, Yahoo, Facebook, Twitter along with VK, Dropbox, OneDrive etc.

For apps you have Jolla store which provides native Sailfish apps. Plus baked in is Android apps support. This means many of your android apps also work on this device. For Android apps a Store application is provided which lists a number of popular applications. You wont find a lot of applications in the Jolla store and with android apps also you may not find all your day-to-day apps. So hardcore app users may be disappointed.

The interface uses what termed as Pulley menus and gestures for navigation. The keyboard doesn't support swipes but otherwise is precise and is fast to type. The menus are easy to use and intuitive. The interface is fast and doesn't show any lag. Perhaps the 2GB RAM is the reason for such
smooth interface. But then Sailfish OS is fairly light. On the home screen you see all your current running apps. The android apps are also seen here. They are displayed as tiles. The tiles may have quick buttons. These may perform some activity in respective app. E.g. Weather app has a refresh button which refreshes the tile.

The settings provide almost all option you will find in android. There's brightness, display, accounts, apps, network settings, personalization security etc settings. It covers the configuration needs for a modern smart phone well. The notification tray is available at left home screen. Its functionality is very similar to android notification tray. But some options like clearing the tray, and swipe to dismiss are not yet available.


I have not gone into the thorough analysis of performance of Sailfish, mainly because the hardware is very entry level. When you consider the Snapdragon 212 SoC, there's not much to benchmark. So lets consider the real world usage only. As I said earlier, Sailfish OS is lightweight. So your average usage reflects that. Navigation between menus is fast. Apps can be switched fast. Apps are slow to load though. Maybe if they provided a pinning option like androids pinned apps in recents menu, then we may avoid opening and closing high usage apps like dialler.

Telephony, messaging, loudspeaker

The dialler and contact apps work well. The UI is intuitive and easy to use. The search is fast. The apps have accessibility features like automatically including the name of contact in message which is neat. The copy-pasting is equally neat. When you select the text by long-pressing a word, it smoothly zooms in which is pleasant to see. I checked both Sims and the calling options etc are similar to
Android. The call volume is decent and loudspeaker is loud enough, but of average clarity.

Gallery, media players, audio quality

Again, the Gallery and media player are similar to android. I checked a number of files and formats and they played well enough. The video player is a bit too basic for my liking. The media gallery is similar. A bit spartan and without advanced options. But it manages to cover all the basic operations. Audio quality is good. The sounds feel natural and not artificial as some low end Mediatech chipsets sound. Overall I would say its a good media device.


Both the cameras are average as expected. The camera app provides a lot of options and it works out giving you a good amount of control over the photos. In daylight you can fiddle around the settings and capture some decent photos. At night though the single LED flash just wont help much. Still the 8MP auto focus camera is decent for the price. Front 2MP camera is similar and it serves the function. but for an entry level smart phone its more than enough.


Overall I would say that Intex Aqua Fish is a fresh breath in a sea of droids. It provides good value for money. The hardware is more than decent. The OS is intuitive and provides good amount of smart phone functionality. Android app compatibility is a good feature. Although average android users may not like the limited availability of native apps and they may not like the lack of their latest and greatest apps. But there's a market for such a device. And choice is always good. So if you are tired of your android and iOS, you can spend ~INR 4500 i.e. ~$80 and get your Sailfish fix.

Saturday, October 1, 2016

Why I hate windows

When you have a itty-bitty mail to send with your 100kbps connection, some godforsaken program crops up and gobbles all your little bandwidth starving your browser and making that mail a half-an-hour wait.

Tuesday, September 27, 2016

My App Usage

I tried to list my general app usage; and am going to try to compare this to apps on Sailfish OS. Will update this post in few days as I find Sailfish OS alternatives.

App Categories: Android: Sailfish
Archive Application: 7Zipper: ??
Download Manager: ADM: ??
WiFi/Bluetooth PC Share: Airdroid/ ShareIT: ??
Messenger: WhatsApp: WhatsApp(Android)
ToDo List: ClearList(F-Droid):??
Compass: Compass:??
File Manager: ZenUI File Manager: ??
Browser: Firefox: ??(Inbuilt maybe?)
Food Ordering: Foodpanda: Foodpanda (Android)
Mobile Recharge: Freecharge: Freecharge(Android)
GMail Client: Official Gmail: ??
Navigation: Google Maps, Here We Go, OSMAnd~: Here We Go
Music: Internal(Apollo Music Player, Not Google Play Music):Internal
Video Player: VLC: Internal(Will have to check support for various files)
Office: WPS Office: Internal/WPS Office(Android)
YouTube Client: YouTube Android: ??
YouTube Downloader: Videoder: ??(Videoder android ??)

Got Intex Aqua Fish!

Qualcomm Snapdragon 210 SOC
2 GB RAM | 16 GB ROM | Expandable Upto 32 GB
Dual Standby SIM
2G/3G/4G connectivity
5 inch HD Display
8MP Primary Camera | 2MP Front
2500 mAh Li-Ion Battery
Jolla Sailfish OS v2

Bought for 4499/- at Tata CliQ Online Store
Will share detailed review soon.

Tuesday, September 20, 2016

E-Filing IT Returns

These last few years with the introduction of Aadhar and computerization of many government departments a lot of government related activities can be done online. As a law abiding common citizen you generally use at least following facilities: Property tax payment, electricity bill payment, Income Tax filing, police verification requests etc. 
Out of these income tax filing was considered difficult and needing special accountants who made sense of various clauses and provided you with an optimized strategy for saving tax. But these days the various clauses are also cleaned up and made easy to understand, so with e-filing of income tax returns the whole tax paying and return-requesting process has become quite easy. 
The income tax cycle for most salaried employees is as follows: You declare a investment declaration at start of your to your organization. Based on that declaration they calculate your tax for year and cut it from your monthly salary. This is Tax deducted at source(TDS). In Dec-Jan your organization asks for your actual investment proofs. Based off them your actual tax is calculated and remaining tax is again deducted from Jan/Feb/Mar salary. After this the financial year is closed. You get form 16 for this year in May(generally). That form 16 contains the whole picture of your total income, deductibles and actual tax you had to pay. Now if your income is greater than 5Lac or if you have paid some extra tax(maybe because you showed less investments but there was room for more and you went for it etc), then you need to file income tax returns.
Using efiling website  you can file the returns. All you need for this is your form 16 for the respective year. The form 16 contains all the figures that you need to fill in the online form. Then you add your bank account details to it. And then you submit it. It takes 2-3 months for this to get processed. And then you get a Return certificate. 
Why ITR is important?
Your tax payment is connected to your CIBIL score. This score is used by banks to check your credibility and accordingly your loan/credit card etc requests are processed. 

Monday, September 19, 2016

F-Droid - Open Source Android Apps

Recently I started feeling a bit tired of Google. Then a took a look at the amount of data I'm feeding google via my phone and I was shocked! There's record of every search I have performed, my app usage, my web activity, my location activity. I just thought that I need to decrease this info sharing. 
So I started to look for alternatives to the google ecosystem. While ecosystem-wise there is just no replacement. Junking google from my smartphone will probably take out the smarts too. I mean I can minimize the google apps usage, but I can't get rid of play services, the many android apps that I use are very critical to my smartphone experience. 
I use google maps/ Here We Go for navigation. I use MX Player for movies, BlackPlayer for music, use WhatsApp for chatting. These are some necessary apps. And if I remove GApps and play store services then I lose all of these. So these are going to stay. But I also need to find some replacements and then start removing some of these. 
So I went ahead and trimmed apps and kept only necessary apps on my phone. That means I got rid of Google photos (which I never use these days...), Hangouts(another never used app), search (also never used), and couple of other Google apps. Then I got rid of some other unnecessary apps that we collect over time - trials etc. With this I installed F-Droid App using it's APK. 
After browsing through I found following apps to be of use:
1. OsmAnd~ - Offline/Online maps and navigation. 
2. ClearList - list manager
3. VLC - VideoLAN Player
4. Firefox - Browser (Already installed which F-Droid recognized)
5. AnySoftKeyboard - OpenSource Keyboard.

With these I am able to slightly decrease my Google info sharing. I'll try more in due time. Let's see. 


Thursday, September 1, 2016

Excel data to tree for org chart

I wanted to prep a simple org chart.
After looking all over the net I found this nifty excel-sheet.

Copy of the provided file is also available here, in case the link vanishes.

Tuesday, August 30, 2016

Replacement File Manager for Android - Asus ZenUI File Manager

I have been using Mokee ROM on my ZTE Nubia Z9 mini for last six months. I got started with Android lollipop 5.1 ROM and soon moved to Marshmallow, while the stock ROM is stuck on 5.0.2. Generally this is the case with chinese OEM's but the phone is solid with more than one day of battery life, great camera and overall snappy response. 
Anyway few weeks back I started seeing this file moving/ copying issue where the inbuilt file manager won't copy the files correctly. When I copied more than 1GB of files then it would fail to copy 1-2 files to memory card. This was infuriating. 
I thought maybe it's the apps problem and tried ES file explorer. But with ES file explorer also I got similar issue. After using ES File explorer for about a month and noticing this issue a number of times, I decided to use some other file manager. Because this is a basic function and if a file manager is failing in this then there's some serious problem with the app. 
So last week I stumbled upon ZenUI's File Manager which is Asus file manager app for their Zenphone's. And I have been using it for one week and everything's working fine. The application interface is great, the copy/ move workflow is well thought. E.g. with Mokee's own file manager, you select a number of files and then you move to target folder and from a hamburger menu there, you select "Move Selection here..." which is un-intuitive in my thoughts. In Asus File Manager, you have a "Move to" option in hamburger menu at top right corner. This opens a dialog box where you select a target. It shows last four folders as well and this helps a lot. After you select move, and tap OK, move operation launches. After moving is finished, you stay in your original folder only, which means you can move some more files to other folders quickly. 
This is great!!
Another feature I like most from Asus ZenUI File Manager is Storage Analyzer which is faster than ES File Explorer's analyzer and quickly shows you the files eating your precious storage. Overall I'm very happy with Asus's File Manager. 

Friday, August 26, 2016

HP Deskjet 2131 Use experience

HP Deskjet 2131 is a basic All-in-one printer. It supports basic inkjet color printing, has a scanner for scanning and copying features.

The package comes with the device, power chord, USB cable, driver CD-ROM, demo cartridges which can print 12-16 pages, a manual and warranty card. The warranty is one year for device. The original cartridges come with six months warranty.

I tried few black and white and color prints and the quality was good. Black and white printing speed is average, but not bad. I have seen some older inkjet printers which take one second to print one line. This is not that bad.
One thing this printer lacks is it doesn't have automatic paper feeder tray, instead you have to feed papers by hand. This is not a problem for occasional home printing but if you have to take number of prints then you would soon get tired of feeding the pages.
The color printing speed is good. I have not yet printed any photos on photo paper. I have ordered some 4'x6' photo paper sheets and will soon test photo printing too. I printed some color documents and couple of photos downloaded from internet and they all printed well enough.
I scanned few documents and the scanner is good. You have to change some settings when scanning the photos though and increase the resolution so photos are scanned with high resolution. Later using any picture utility like GIMP/Photoshop you can resize it to minimize the size. I am yet to find the copying workflow. But I'll check it out soon.

Running Costs:
Price-wise the Black cartridge costs INR 750/- which is bit costly and according to reviews it can print about 200 pages, which means printing a page costs more than INR 2/- which doesn't save you much money, but it should save you money on printing color prints and photos. The color cartridge costs about INR1100/-.

OS Support:
On windows the provided CD-ROM gives drivers and HP's a-la control center which lets you keep track of print jobs.
On Linux inbuilt drivers work out fine.

Overall for INR 2900/- its' a cheap printer with about average running costs and a good deal.

Upgraded Ubuntu 12.04 to 14.04.5 and then 16.04

My desktop at office was stuck on 12.04 for last two years. Recently I got moved to another project and the then critical collection of software and tools on the desktop suddenly became non-critical. So I decided to upgrade it.
For last two days I pushed it through two distro-upgrades. And it has survived them and I can now use latest 16.04 LTS.
Ubuntu is great!!!

Tuesday, August 9, 2016

Buying a Printer

Recently I saw that our combined printout count has risen quite a bit. So it would be good to get a printer. Then started a number of rounds of price and feature comparisons for a printer.
Firstly there are two types of printers - laser and inkjet printers. If you look at the features a simple laser printer starts from INR 6K. A laser MFD(Multi-function device or all-in-one or Print-Scan-Copy) starts at 11K. I wanted a simple printer and a laser printer looked good. I could afford a 6K laser printer and didn't have to worry about ink cartridges drying if unused.
But then wife raised requirement for scanning too which meant looking for a MFD. Now the problem was a laser MFD was outside of my budget so that meant I had to look for inkjet MFD's. I started looking for various products and the cartridge prices. The cheapest inkjet all-in-one was Cannon Pixma MG2470. It costed only 2.5K. But then I looked at the cartridge prices and found out Cannon cartridges are quite costly. The cartridges for this printer went for 0.8K to 1.2K. While competing HP all-in-one cartridges started from 0.6K to 1K max. The HP Deskjet 2131 was the next cheapest all-in-one. It was feature comparable with the cannon and with cartridge prices in affordable category it was the logical choice. So I booked it on and will get it in couple of days. Will share the actual experience in few more days.

Friday, August 5, 2016

KDE Startup and AutoLogin

Starting KDE from Command Line by startx

By Zhiqiang Ma On Nov 29, 2012



Keep updated Share on facebookFacebook Share on twitterTwitter Share on google_followGoogle Share on rssRSS

I don't use xdm, gdm or kdm… I prefer my Linux booting to init 3. I like logging in to the command-prompt and starting X manually with startx. In my Fedora Linux box, I always get to gnome even both gnome and KDE are installed. Actually the startx script is already written for most of the modern desktop environment. What we need to do is open the "trigger".

The startx script in Fedora will read /etc/sysconfig/desktop for the "DESKTOP" variable (through /etc/X11/xinit/Xclients) and starts the desktop environment depending on it. While the default value for "DESKTOP" is set to "GNOME", we will get to gnome if we don't set the variable. When we want to startx to KDE we just need to add one line to /etc/sysconfig/desktop:


If there is already one line that defines "DESKTOP", just change the value of it.

Then we will start KDE when we run startx from console.

Free additional gift

The "DISPLAYMANAGER" in the /etc/sysconfig/desktop file is used to specify the default display manager. To make KDM the default display, just add this line:


to enable automatic logons using the following GUI menu selections:

Control Center > System Administration > Login Manager > Administrator Mode > Convenience Tab


Edit kdmrc. kdmrc can be found as

locate kdmrc

if slocate is installed and database is up to date.

In Gentoo and KDE 3.5 it is in


The following needs to be added if there is no sign of autologin variables. If there are something related to autologin already in place, edit those






AutoLoginAgain logs user in again after when for whatever reason user is logged out but X is not restarted. Everything else should be easy to understand.

gSOAP on Linux and Windows

gsoap v2.7.16


su -


make install

Then into calc++ dir:

soapcpp2 -i calc.h

g++ -o calcclient++ calcclient.cpp ../../stdsoap2.cpp soapC.cpp soapcalcProxy.cpp

g++ -o calcserver++ calcserver.cpp ../../stdsoap2.cpp soapC.cpp soapcalcService.cpp

This compiles calc client app and calc server app.

execute calcserver++ and after that

execute calcclient as

./calcclient++ add 3 3

result = 6

Note: There's some delay observed.


with modifications to calc.h; calcclient.cpp and redoing all above steps from soapcpp2 -i calc.h;

and running calcserver as #./calcserver++ 80 in one terminal and calcclient as $./calcclient++ add 5 6

gives correct output. So gsoap is working in Linux for both client and server.


Now to Windows

*** using available binaries in C:\gsoap-2.7\gsoap\bin folder.

Added soapcpp2 binary's path to PATH variable.

Next using Visual Studio 2005 Command prompt;

got to calc++ directory:

and use

soapcpp2 -i calc.h

This will generate the wsdl and stubs

Next compile the client as:

C:\gsoap-2.7\gsoap\samples\calc++>cl -o calcclient++ calcclient.cpp stdsoa

p2.cpp soapC.cpp soapcalcProxy.cpp

And server:

C:\gsoap-2.7\gsoap\samples\calc++>cl -o calcserver++ calcserver.cpp stdsoap2.cpp

soapC.cpp soapcalcService.cpp

Next open another Visual Studio 2005 Command prompt;

In it run the calcserver as:

calcserver++.exe 80

And in previous window run calcclient as:

calcclient++ add 6 5

This will give output as