Monday, December 24, 2012

3G, social networking and work

I recently and grudgingly upgraded my cellular internet to 3G. Actually 2G sufficed for most of my needs which was basic document editing and emails. Add a bit of web browsing and Facebook, Twitter. All that was doable on 2G and if I used my cellphone - should say smartphone, but it's WP7.5, and I like calling phones as cellphones - as a hotspot then with some patience I can even get some work done. What I can't do is access online banking. By the time the applets load the session expires.
So back to 3G, the first thing I noticed was the speed. I'm not a speed junkie but the speed made me find a speed test app and check it out. And by God, I got 5 freaking mbps down and 1.6mbps up. I have never browsed web at such speeds. Things snap up like lightening and coupled with IE the whole browsing experience felt like turbocharged. Another area was the Facebook and twitter integration. The info in people hub, updates on posts and communications would load spontaneously. It has been exhilarating for me using 3G and even though I have to shell out INR 252 ~= $5 for 1GB, I feel like for the speed its worth it. Hmmm, maybe they should show users browsing on 3G as compared to 2G in the ads. That would show most people what we are missing.
Next is social networking and I can say that Facebook has helped get in touch with many of my old friends - school friends with whom I had lost contact. So social networking is in full gear these days.
Also on a side note IM+ is helping me greatly with chat. Well, one life saving app on wp7.5!
Lastly about win8, I've been using it regularly for some time now and my outlook about it hasn't changed much. Using it on a touch screen is probably going to be much better than using it on a vanilla laptop. So I guess I have done all to see if win8 has any use for me. And I'll be going back to win7 soon. Don't think there's anything on win8 that I'm gonna miss, maybe the task manager but I should get something like that for win7 too!
That's ot from this side of planet. Adios!

Saturday, December 22, 2012

What we are doing for ages need not be the best thing that we are doing



Original Source: http://www.embedded.com/electronics-blogs/barr-code/4215934/What-belongs-in-a-header-file

What sorts of things should you (or should you not) put in a C language .h header file? When should you create a header file? And why?
When I talk to embedded programmers about writing device drivers or using real-time operating systems or my Embedded C Coding Standard book, I often come to see that many lack basic skills and information about the C programming language. This is probably because we are mostly a gang of electrical engineers who turned to programming and are self-taught in C (and C++ and the myriad other programming languages we make use of).

Dos and don'ts

In the interest of promoting the general welfare, I'd like to use this month's column to discuss one of those basic skills that is too often lacking: building proper header files. Here's my list of Do's and Don'ts for embedded C programmers to follow when creating .h header files.

DO create one .h header file for each "module" of the system. A module may comprise one or more compilation units (e.g., .c or .asm source code files). But it should implement just one aspect of the system. Examples of well-chosen modules are: a device driver for an A/D converter; a communication protocol, such as FTP; and an alarm manager that is solely responsible for logging error conditions and alerting the user of the active errors.

DO include in the header file all of the function prototypes for the public interface of the module it describes. For example a header file adc.h might contain function prototypes for adc_init(), adc_select_input(), and adc_read().

DON'T include in the header file any other function or macro that may lie inside the module source code. It is desirable to hide these internal "helper" functions inside the implementation .c file. If it's not called from any other module, hide it! (If your module spans several compilation units that need to share a helper function, then create a separate header file just for this purpose.) Module A should only call Module B through the public interface defined in moduleb.h.

DON'T include any executable lines of code in a header file, including variable declarations. But note it is necessary to make an exception for the bodies of some inline functions, about which more below.

DON'T expose any variable in a header file, as is too often done by way of the extern keyword. Proper encapsulation of a module requires data hiding: any and all internal state data should only be in private variables inside the .c source code files. Whenever possible these variables should also be declared with keyword static, which will enlist the linker's help in hiding them.

DON'T expose the internal format of any module-specific data structure passed to or returned from one or more of the module's interface functions. That is to say there should be no "struct { … } foo;" code in any header file. If you do have a type you need to pass in and out of your module, so client modules can create instances of it, you can simply "typedef struct foo moduleb_type" in the header file. Client modules should never know, and this way cannot know, the internal format of the struct.

Inline functions

On a related note, I recently received this question from an engineer in Brazil:


"I am trying to conform to the rules in your Embedded C Coding Standard book and I just ran into what may be a problem with Rule 6.3.a. Instead of using function-like macros, I'm using inline functions, as you recommend. However, my compiler (avr-gcc) gives an error when I declare a function to be inline at both header and source file. If I put both the inline declaration and function body inside the header file it works fine. This fixes my compiler problem, but isn't it a bad practice to place code inside the header file?"


This is a good question, as it seems at first to be about a conflict between my bug-killing rules and something else I refer to as "Generally Accepted Programming Principles" (i.e., GAPP).


The inline keyword is a part of the C++ programming language that was added late to C (in C99). In C++, most programs are built out of classes–with GAPP dictating one header file per class definition. Any C++ function may be declared inline. However, if the inline function is a public member function (a.k.a., "public method") of the class it is necessary to place the code for the inline function in the header file. (This is so that all of the other modules that use the class can see the code they need to have placed inline by the compiler.)

Of course, placing the body of any function inside a header file conflicts with GAPP for the C programming language. Here's a set of rules to help you decide where to put the code for inline functions in C.

IF the inline function is a "helper" function that's only used inside one module, THEN put it in that .c file only and don't mention it in the header file. This is consistent with Rule 4.2.c of my Embedded C Coding Standard, which says that "The header file shall identify only the [functions] … about which it is strictly necessary for other modules to know."

IF, however, the inline function operates on the abstract data type defined in the header file and must be visible to two or more modules, THEN put the body of the inline function inside the header file. There is no rule in the Embedded C Coding Standard that strictly prohibits this, so there is no conflict after all.

Though not really specific to embedded software development, I hope this advice on good C programming practices is useful to you. If it is please let me know and I will provide more C advice like this in future columns.

Michael Barr is the author of three books and over sixty articles about embedded systems design, as well as a former editor-in-chief of this magazine. Michael is also a popular speaker at the Embedded Systems Conference, a former adjunct professor at the University of Maryland, and the president of Netrino. He has assisted in the design and implementation of products ranging from safety-critical medical devices to satellite TV receivers. You can reach him via e-mail at mbarr@netrino.com or read more of what he has to say at his blog (www.embeddedgurus.net/barr-code).

Wednesday, December 12, 2012

Windows 8 and Elementary OS 0.2





Three months ago my current workstation was a slow hulking monster. It was taking forever to boot and literally crawling in between reboots.
I was frustrated with Ubuntu. Unity was the synonym for awkward desktop that tires you just using it. It was like my $4 Blues headset that was a pain over the ears despite its above average sound. Startup of over 1 minute and shutdown of another minute. Add to that I wasn't able to use sleep with Ubuntu - mostly it would screw up WiFi and sound. On a bad day it did hung my lappy into permanent sleep. Had to remove the battery to revive it. So no trusting it. Lots of wishing that someone would fix it, but even after 4-5 iterations and the sleep remained just the same deadly. ScaryBuntu!!!
Windows 7 has also aged quite some and it was also acting up like an old crone that has all the youth sucked out of it. Truth is Windows 7 was the best of all windows. It was stable, it worked, didn't ask you for crap that you don't give a damn about. But then you load a crapload of programs on it and invariably it starts showing. It takes 2-3 minutes to boot and if you need to shut it down then it goes 3-4 minutes. It especially sucks if you switch between OSes as often as I do being multi-platform developer.
So the quest was to setup something that would be light to boot and faster than the aged horses I had on my hands. I found one half of the pair in the form of elementary OS. I started with the developer build, tested it for couple of weeks on my hardware and found that it actually kicked major ass. So after some tweaking and murmuring prayers and of course some crashes I had half the base covered. I have upgraded that build twice since then, the latest being Luna Beta. Its just awesome. Starts in about half a minute and shuts down in 4 seconds flat.
The second wheel for last 3 months had been win 7 - the aged horse and it had been dreadful. So I quickly got my hands on the Win 8 pro version to see how much kick ass it is. I had read a bit about Win 8 and it has received attention as well vista like praise too. But one thing I came to know that it's supposed to be faster than win 7. In fact supposed to be a lot faster than win 7. So with all these expectations and hope I installed it. The experience has been mixed bag so far.
#1 Win 8 is only marginally faster than Win 7. I have startup times averaging half a minute for a laptop with Pentium B960 processor and 2 GB of RAM. Mind though, no heavy programs yet. And shutdown times are also around half a minute which tells me that when I go full on assault on applications this windows is also gonna crawl.
#2 The supposed to be Not-Metro Apps and NEW Start menu or screen whatever MS calls this. Looks like a gimmick. It as the only interface would make more sense on a tablet. On a desktop its just confusing. And it takes more time to browse for apps. Luckily application search is something that MS got right. So I'm using Unity like keyboard searches for apps. The whole UI seems kinda half-ling. There are some metro elements popping up on desktop here n there. The dialogs appear faster and the animations are great eye candy. But it all feels inconsistent. And this inconsistency is present everywhere. We have a metro settings app as well as control panel. And the stuff is divided between the two. That's kick ass confusion.
#3 Some small life saving touches. Upgraded windows explorer. New copy dialog with pause button. New metro style task manager. Hot corners are better on a tablet or desktop with mouse. On a laptop they are pain in the arse to use.
#4 Can a desktop and tablet UI be ever merged?
Its a million dollar question. Tablets are completely different than computers. They are held near eyes. They are handhelds while a desktop is not. You need to approximate the user input considering finger input for tablets while on a desk top user typically has finer control using mouse. On a laptop also a touchpad works pretty well. The so called touch mice are a gimmick. For most users these gestures mean more learning and complexity. I don't  want to generalize but yours truly has never bothered with gestures in all the browsers. I personally like clear easy to access menus and a UI which is WISYWYG. This Thing about discovering things would suck for general users. Because most of them tend to overlook what's presented to them right in front.
From workflow point of view Win 8 doesn't cut it. Its not intuitive. It feels like MS should have gone with a separate touch shell. But only time and the general user will tell what is to stay and what not!!!

Sunday, December 9, 2012

Day Counter

I wanted to code something small to count days to a particular date from today. So I coded a small app in .net and found it very useful. It's done in about an hour so doesn't have much in terms of functionality. It has the target date hardcoded. But then again considering it's limited scope I didn't go to any more trouble for adding more functionality.
Later I tried to do similar things in Qt and succeeded somewhat. There are couple of differences in both apps in that Qt version has colours used for numbers and text. And I have also included past targetted date display functionality in Qt version too. In this case before target date it shows Remaining Days while after target date it shows Past Days.
The links are as follows:
.Net Project
Qt Project

Saturday, December 8, 2012

Friday, November 23, 2012

[non-tech ]Debate

I like to argue when it comes to decisions. Although most of the time it's just me alone evaluating things. But I had some opportunity in office to debate a few things. 
Lately though there's not much discussion going on, rather we have loads of work and the small pockets of discussion that happen when one of juniors gets stuck somewhere. 
Anyway, lets put that aside and concentrate on our own ward. So I'm facing some quite radical change in coming quarter or so. In lieu of this I have decided to cut off the amount of various activities I have been spending time on. So there go the TV Serials. And also decreased stats for movies - maybe 2 per week or so. And almost no e-books. Add in some compulsory study that I'm going to need and more free time for other tasks. 
So there is lot of debate going on. What to be prioritized and what to be altogether dropped. What to be gracefully closed and what to be discarded like trash. 
One example is I discarded about 50 GB of TV Serials and movies since they were just sitting there. I've scheduled the urgent tasks that I need to finish within this fortnight and I have listed down the things that I must take care of. 
And at every step there are decisions and debates with myself. Just like I previously said; what I need; what I can afford to discard; what I may need in future. It's a long pending overhaul this change has brought on.

Tuesday, November 20, 2012

Elementary OS Luna Development Build Late Nov'2012 Review


Update 2012-11-23: I have just updated the dev build to alpha using apt-get upgrade and apt-get dist-upgrade; and the system is feeling more stable. The added blue checks wallpaper really shines




What's new
 
    Terminal
        We have a new terminal emulator which replaces gnome-terminal and it's looking slick.
    Plank
        Plank is the dock at the bottom. I have covered it below.
    Pantheon Files
        Merlin was the file manager used in Elementary Jupiter. Now they have forked it into Pantheon Files.
    GALA: Elementary's libmutter based window manager
        Gala was introduced only couple of months ago. And I think it was a big step for elementary. Having their own widow manager lets them have greater control as well as customization.
    Noise
        Noise is the music player provided by elementary. It's fairly modern and the goal is to have something that fits the elementary philosophy with being fast and lightweight.
    Maya
        Maya is the calender provided with elementary.


System Requirements

    Same as Ubuntu;
    Runs snappier than Ubuntu so good chance of having this run on most run of the mill hardware.


Desktop and Software

Desktop
 

Wingpanel
The top panel is partially transparent bar. In left corner we have Applications Menu button which brings up application menu. In the middle we have time and date. We can click on the date to bring up Calender. But we don't have any option to open Maya from here. It would be innovative to be bale to add an event or view events from this calender itself. Anyway, moving on, in right corner we have the system tray plus notification area plus the user switcher and power buttons. We also have mail and IM indicator which can display number of unread mails etc when geary is configured. We also have empathy's chat related options here in a drop-down menu.

    Plank

        Plank is the dock at the bottom. It's a simple dock and it's actually lacking in quite a bit of functionality. Of course a new user won't even notice it since the main task of plank i.e. of launching applications is done well enough. But for someone who has used AWN, plank is just not enough. The most glaring problem with plank is that the slight glow shown for current application is difficult to notice. This is especially true when we are using several apps in windowed mode and some of them have white/whitish icons. Also there are a few workflow related problems as well. Now consider we want to navigate to window x of App A and our current window is window z from App C, how do we go to the desired window? We go to plank, then we right click the icon for App A and from the list of windows we select the one desired. But if there are multiple windows with the same name then we have to go through this same sequence again and again. So I think there's scope for improvement.

    Notification menu and system tray
        These didn't bug me much. Things usually worked as expected. The white icons on black background are easy to notice.
And the notifications are themed well. I don't know whose work that is though. But it looks well enough.

    Application Menu
        The application menu is themed well, and things look well together.

 
Applications

    Maya
        Maya needs lot more features and lot's of integration. What I observed here is that there are a lot of waysa things could be made better. They could make it more accessible by integrating it with the clock in the center of top panel. The could provide some shortcuts for common tasks etc. And the support for other calenders/ import / export would be welcome.


    Terminal
        The elementary terminal looks beautiful. It's got tabs and funnily dragging them out from a window works but someone up there has forgotten to implement a drop event too. So you can't drop them in another terminal window to move them around.


    Geary Mail
        I couldn't check out geary mail, but from what I have heard on the grapevine it looks like a good application being put together by a pro team of devs and so it should be competitive  But again it will take some good amount of time to get to the accessibility and feature level of current email apps like evolution and Thunderbird.
 
    Pantheon Files aka Merlin
        Merlin has been renamed and forked as Pantheon Files. It's light weight and really fast but it's a little bit unstable at times.


Final Thoughts
 
    Elementary OS is going to need couple more releases to get to where the other distros really are. The bug fixing task is going to be big one. What I would like to see for elementary is have alternate rounds of bug fixing and feature addition. It's going to be tough, or it already is. Being a Dev I know how difficult development and maintenance of software is. Still overall I think the devs have done a great job which what they have with them. They have taken some strides and they have the polish. Now the difficult task of bug fixing and adding stability is the mountain for them to scale. And I would like to both congratulate them and wish them luck on this great journey the have.

Image Gallery

elementary screen caps

Saturday, November 10, 2012

[ non-tech] Change

I have seen a good amount of change. I've seen change for the sake of it. I've seen change out of necessity but unwillingness. I think I've seen all the ways change can be.
So I wonder when I'm going to have so much change what kind it is. Is it opportunistic? Is it out of necessity and desperation or is it enforced? Would you call necessity a desperation? Would you call frustration just an expression of inability? What is it?
Life is going to change in big way. Maybe I've some unfinished business that I might end up taking care of. Or I might make an even bigger mess of things than what it already is. A new city. Goodbye to the present one. Is it going to be difficult? I don't know. I was scared of this change when I decided to do this. So I think everything will be alright. Or I keep telling myself just not to panic. And boy, I know I can panic. I know what it is being panicked. Its like a deer caught in the headlights. Except as a deer you can't decide what to do. In fact you can't even come to think of the many things that you can do - the many solutions to a problem.
So I'm kind of going in blind. Then what are my options? Hmmm, after thinking rigorously for a few minutes I had the answer - hang on!!! Yeah. Hang on and stay stuck! Don't give up. Work hard. Think about the bigger picture. Don't be scared.
I really wanna write a book about all the positive things I have come across. And all the beautiful things that I miss. And the many people who are no more. And the many others in whose universe I don't exist! There are many more in whose universe I'm soon going to cease to exist. Just by not being around. And its sad. Those are the fewer lives I get to touch.
life goes on

Sent from my Windows Phone

Friday, November 9, 2012

Elementary OS Luna dev version - review notice

Yes! Its ready! Penned and all and I'll post it here  as soon as I can get back to my place.

Data management

I'm just reformatted my external HDD. The thing was I had kept two different partitions hoping that I would be able to separate the data better this way. But to my dismay I got bogged down with shifting files from here to there and vice versa.
So after six months or so of such pain, I have wiped out both the volumes and got one single partition now. Actually I need to get one more HDD. The current one - a western digital 320GB has served me well for last 3 years. It's taken its share of falls and has acquired some bad sectors. But I don't think I can splurge anything on some more electronics any soon. So I guess with this drive's 300GB and my laptops 200 odd GB's I'll be making my meal so as to speak.
Well, actually I can just wipe out the 200GB or so of movies and tv serials. But them I'll have to get at least 20 DVD's of my most favorite movies. And dream about the tv serials. And the other STUFF!
What has life come to! Says the guy who had an affair with the recession.
P.s. The babe is Natalie Portman.

localc

What is this localc? ( I thought it as local-c)

I wondered for a lot of time. Launching it would open office.
So $ whereis localc; gives /usr/bin/localc
Ok what kind of file is this $ file /usr/bin/localc; gives POSIX shell script, ASCII text executable.

OK cat it; $cat /usr/bin/localc ; gives #!/bin/sh
/usr/bin/libreoffice/program/soffice --calc "$@"

OK why would a script with name local-c open libreoffice calc? Hmmm, this is weird. 5 minutes of deep thinking reveals the problem with my associative thinking.

Its lo-calc idiot, not local-c! I end up telling myself!

Thursday, November 1, 2012

Elementary Luna dev build review delayed

Problems with 64-bit build's installation, couple of personal problems and overall busier nature of last few days have caused delay in the review.
I'm starting on it. But I don't know when I'll really be able to get through it.
On the side note I'm moving around a lot and the work pressure is also mounting. Things have become tougher. And I think by end of this month they will get tougher. But yeah, I want to do this review. I'm using elementary for last one month or so and I'm impressed by the amount of work that has gone into it. So the review is going to be here. Just its going to take some time.

Thursday, October 18, 2012

Shifting full time to 64-bit

Hmmm. This one has been on the stove for a long time. But I just didn't have the time. Finally though this week I got some free time to perform some much needed system maintenance and so I downloaded Ubuntu 12.04.1 LTS 64-bit ISO, used Usb-creator to create a bootable USB and installed it on a partition holding 10.04.1 Ubuntu.

Right now I'm installing all the required programs, servers and what not. I think it will be a week by the time I fully shift to this 64-bit Ubuntu.

Update 21 10 2012: I have ended up with a botched install of Elementary Daily Build; small relief is that the desktop is working but remastersys is unable to create proper ISO's. I think the nvidia driver is to blame, but I'll try to work through this. If it works then fine else I'll have to restart with a stock daily build. (Groans!!!!)

Update 2 23 10 2012: Okay, finally I have readied the new system last night. And I think it's running beautifully. So I'll test it for a week or so and then get back here to share my experiences in the review post! I know that's been pending for what seems like forever!!!

Sync

Sync has become a popular word these days.

oh, yeah. I have not forgotten about the elementary Luna review. Just working on that.

Sent from my Windows Phone

Sunday, October 14, 2012

Elementary OS Luna Daily Build Review coming soon

I have been using Elementary OS Luna for about a fortnight and I think elementary has reached a stage where I can safely review it. I had refrained from this because like they say "it ain't done yet and sou should wait for the pickle to get ready or it won't taste the best." So with elementary the pickle is yet to get prime, but whatever stage I have in my hands is good enough that I'm going to be telling you about it.

On a side note, this is going to be a OS review from me in quite some time. The reason being I am quite exhausted these days thanks to the Six Day week I have to bear at my current organization. Well, that as it may be, still I find elementary enough exciting that I'll be putting aside some energy for this task.

Adios!

Update 23 10 2012: Due to some problems persisting with 64-bit Luna Live CD and partly my stupidity I have managed to lose the screen caps and half the review I had written. Luckily the system is up now. So I think I'll test all the parts again - it's 64-Bit beast now! - and I'll get back with the promised review. I'll also share the software compilation. The complete ISO runs to 1.1GB as of now. And I think software wise it's almost complete.

Friday, October 12, 2012

Why so many login sessions?

Recently I was working on some maintenance stuff for some crystal reports. And I stumbled upon a peculiar problem.
The report had 4 sub reports in it and it was running out of available login sessions in about 10 runs. The problem was I'm at average level when it comes to .net and a newbie to crystal reports. So I'm just discovering things and half the time I don't know where I'm going. That of course sucks but I can't help it. The workload is more than enough that every day I go to my rented place completely exhausted and badly in need of sleep.
Anyway that's beside the point. The thing is that I didn't even know what is causing the "no more login sessions available" error. So after some discovering on the internet I learned some things about Oracle logins and login sessions. The solution seemed very simple - increase maximum number of login sessions in oracle.
But I knew I have to fix the root cause of this. And the root cause is in the report and the code that generates it.
So I'm again in the code looking for things where there might be a new session getting created. Well, after some careful sniffing I couldn't find anything in the functions block. Well, what now. Then I remembered that I have some more functions pulling data that reside in another source file and I am yet to check them. So after a furious search I found the culprit functions.
So after carefully editing the things and making everything work right, I have the report working much better.
Still something is not alright. I'm still losing one session let run and the connection pool is exhausted by 30th run or so. But luckily for me nobody is going to use it for that long so at least I can push it to production.
Good job!

Sent from my Windows Phone

Friday, October 5, 2012

[from planet.ubuntu.com] Burning down critical bugs

Link to Original Article: http://blog.launchpad.net/general/burning-down-critical-bugs

I have copied the article instead of just providing the link because just in case the article is lost (maybe deleted from original source or link changed... ) it's still available here.

I have been analysing Launchpad's critical bugs to track the Purple squad's progress while on Launchpad maintenance duty. In January of 2011, the Cloud Engineering team nĂ© Launchpad Engineering team was reorganised into squads, where one or more squads would maintain Launchpad while other squads work on features. This change also aligned with a new found effort to enforce the zero-oops policy. The two maintenance squads had more than 332 critical bugs to close before we could consider adding features that the stakeholders and community wanted. By July 2011, the count dropped to its lowest point, 250 known critical bugs. Why did the count stop falling for fifteen months? Why is the count falling again?

Charting and analysing critical bugs

Chart of Launchpad's critical bugs since the formation of Launchpad squads and maintenance duties
The chart above needs some explanation to understand what is happening in Launchpad's critical bugs over time. (You may want to open the image in a separate window to see everything in detail.) Each iteration is one week. The backlog represent the open critical bugs in launchpad at the start of the iteration. The future bugs are either bugs that are not discovered, not introduced, or reported and fixed within the iteration. The last group is crucial to understand the lines plotting the number of bugs fixed and added during the iteration. We strive to close critical bugs immediately. Most critical bugs are reported and fixed in a few days, so most bugs were not open long enough to be show up in the backlog. The number of bugs fixed must exceed the number added to make the backlog count fall. You can see that the maintenance squads have always been burning down the critical bugs, but if you are just watching the number of open bugs in Launchpad, you get the sense that the squads are running to just stand still.

I use the lp-milestone YUI widget to chart the bugs and analyse the our progress through the critical bugs. It allows me to summarise a set of bugs, or analyse a subset by bug tag.

Launchpad maintenance analysis -- driving critical bugs to zero

Though 22 bugs were fixed this past week, 14 were added, thus the critical count dropped by 8. The last eight iterations are used to calculate the average bugs closed and open per iteration. The relative velocity (velocity – flux) is used to estimate the remaining number of days to drive the count to zero. When the Purple squad started maintenance on September 10th of 2012, the estimated days of effort was more than 1,200. In just three weeks, the number has fallen dramatically. The principle reason the backlog of critical bugs has fallen is that the Purple squad is now giving those bugs their full attention, but that generalisation is unsatisfactory.

Why is the Purple squad so good at closing bugs in the critical backlog?

I do not know the answer to my question. The critical backlog reached its all-time low of 250 bugs with the release of the Purple squad's maintenance work in July 2011. There was supposition that  Purple fixed the easy bugs, or that the fixes did not address the root cause, so another critical bug was opened. I disagree. The squad had no trouble finding easy bugs, and it too would have been fixing secondary bugs if the first fix was incomplete. I can tell you how the squad works on critical bugs, but not why it is successful.

I was surprised to see the Purple squad were still the top critical bug closers when it returned to maintenance after 15 months of feature work. How could that be?  The squad fixed a lot of old timeout and JavaScript bugs in the last few months through systemic changes — enough to significantly affect the statistics. About 600 critical bugs were closed while Purple squad were on feature work. The squad closed 210 of those bugs. 60 were regressions that were fixed within the iteration, so they never showed up in the backlog. 70 critical bugs were fixed because they blocked the feature, and 80 critical bugs were because Purple was the only squad awake when the issue was reported. The 4 other squads fixed an average of 98 bugs each when they were on maintenance. The Purple squad fixed more bugs then maintenance squads on average even when they were not officially doing maintenance work.  The data, charts, and analysis always includes the Purple squad.

I suspect the Purple squad has more familiarity with bugs in the critical backlog. They never stopped reading the critical bugs when they were on feature work. They saw opportunities to fix critical bugs while solving feature problems. I know some of the squad members are subscribed to all critical bugs and re-read them often. They triage and re-triage Launchpad bugs. This familiarity means that many bugs are ready to code — they know where the problem is and how to fix it before the work is assigned to them. They fixed many bugs in less than a day, often doing exactly what was suggested in the bug comments.

During the first week of their return to maintenance, about 30 critical bugs were discovered to be dupes of other bugs. Though this change does make the backlog count fall, it also revised all the data, so the chart is not showing these 30 bugs as at all now. The decline of backlog bugs does not include dupes. While the squad was familiar enough to find many bugs that they close in a single day, they were not so familiar as to have known that there were 30 duplicate bugs in the backlog when they started.

Most squad have only one person with DB access, but the Purple squad is blessed with 3 people who can test queries against production-level data. This could be a significant factor. It is nigh impossible to fix a timeout bug without proper database testing. Only 13 of the recent bugs closed were timeouts though. The access also helps plan proper fixes for other bugs as well, so maybe 20% of the fixed bugs can be attributed to database access.

Maybe the Purple squad are better maintenance engineers than other squads who work on maintenance. For 28 months, I was the leading bug closer working on Launchpad. I closed 3 times more bugs than the average Launchpad engineer. I am not a great engineer though. My "winning" streak came to a closed shortly after William Grant started working on Launchpad full time; he soundly trounced me over several months. Then he and I were put on the same squad and asked to fix critical bugs. Purple also had Jon Sackett, who was closing almost 2 times the number bugs than the other engineers. I don't think I need to be humble on this matter. To use the vulgar, we rocked! Ian was the odd man on the Purple squad. He was the slowest bug closer, often going beyond our intended scope to fix an issue. Then Purple switched to feature work…Ian lept to the first rank while the rest of the squad struggled. Ian fixed almost double the number of Disclosure bugs than other squad members. The leading critical bug closer on the squad at the moment though is Steve Kowalik. This is his first time working on maintenance. His productivity has jumped since transitioning to maintenance.

I can only speculate as to why some engineers are better at maintenance, or can just close more bugs than others. A maintenance engineer must be familiar with the code and the rules that guide it. Feature engineers need to analyse issues and create new rules to guide code. I did not gradually become a leading bug closer, it happen in a single day when I realised while solving one issue that the code I was looking at was flawed, it certainly was causing a bug, I knew how to fix it, and with a few extra hours of extra effort, I could close two bugs in a single day. Closing bugs has always been easy since that moment.

I believe the Purple squad values certainty over severity and small scope over large scope when choosing which critical backlog bugs to fix. I created several charts that break the critical bugs into smaller categories. I suggested the squad burn down sub-categories of bugs like regressions, or 404s. The squad members are instead fixing bugs from the entire backlog. They are choosing bugs that they are certain they can fix in a few hours.  I think the squad has tacitly agreed to fix bugs that are less than a day of effort. When this group is exhausted, they will fix issues that require days of effort, but also fix as many bugs. The last bugs to be fixed will be those that require many days to fix a single bug. Fixing the bugs with the highest certainty reduced our churn through the critical bugs, there are fewer to triage, to dupe, to get ready to code.

The Purple squad avoids doing feature-level design and effort to fix critical bugs. Feature-level efforts entail more risk, more planning, and much more time. There is often no guarantee, low certainty, that a feature will fix the issue. A faster change with higher certainty can fix the issue, but leaves cruft in the code that the engineers do not like. Choosing to do feature-level fixes when a more certain fix is available indicates there is tension between the Launchpad users who have a "critical" issue that stops them from using Launchpad, and the engineers who have a "high" issue maintaining mediocre code. I contend it is easier to do feature-level work when you are not interrupted with maintenance issues. When the Purple squad does choose to do feature-level work to fix a critical, they have a list of the bugs they expect to fix, and they cut scope when fixing a single bug delays the fix of the others. The Launchpad Answers email subsystem was re-written when other options were not viable, there we about 20 leading timeouts represented by 5 specific bugs to justify 10 days of effort to fix them.

The Purple squad is not unique

Nothing that I have written explains why the Purple squad are better are closing critical bugs. All squads have roughly the same skills and make decisions like Purple. Maybe the issue is just a matter of degree. If the maintenance squad is not closing enough bugs to burn down the backlog, their time is consumed by triaging and duping new critical bug reports. Familiarity with Launchpad's 1000′s of bugs is an advantage when triaging bugs and getting a bug ready to code. Being able to test queries yourself on a production-level database takes hours or days off the time needed to fix an issue. Familiarity with the code and the reasoning that guided it increases the certainty of success. The only domain that Purple is not comfortable working with is lp.translations; the squad is comfortable changing 90% of Launchpad's code. There may be correlation between familiarity with code, and the facts that the squad members participated in the apocalypse that  re-organised the code base, and that some have a LoC credit count in the 1000′s.



Monday, October 1, 2012

intermittent cellular

For last one week I have been plagued with intermittent cellular connection issues. I have switched to Uninor 2G and the plan is 6 GB data for 90 INR ( that's about $1.7 ) Its really cheap when considered to Airtel which gave only 1GB 2G data for INR 98.
Anyway tye problem is that the connection has not been consistent. Sometimes it would work great giving me a speed of 15-20KBps which is commendable for 2G. But then sometimes I start losing data packets and so everything starts crawling. The drop is sometimes as high as 50%. This I found out using ping. So I'm going to see for next couple of weeks if they get their S••• Together or I'll have to find another provider.
I wish I had a 500 - 700 INR budget for internet but I don't have much use for internet beyond mails and some news. Everything else comes under pastime. So I don't want to spend so much money on pastime. I would rather go to a walk when I'm bored. Or go to a nearby temple for that matter. :)

Sent from my Windows Phone

Friday, September 28, 2012

Lenovo G 580



Recently I purchased a Lenovo G580. It cost me INR 25000 after INR 1000 discount. The configuration is as follows: Pentium B950 @2.1GHz. Its a Sandy Bridge core which translates to cooler temps. We have 2GB RAM here. Added to it is a 500GB Seagate HDD, A DVD Burner, 3 USB ports out of which one is USB3.0. We have Gigabit Ethernet, WiFi, 1.3M webcam, Synaptics touchpad which is embedded in the body. We have both VGA Out as well as HDMI Out and I think that's a neat feature since finding HDMI projector around is still kind of difficult. Sure you can use an adapter but that's another piece of hardware you need with yourself.

The chassis is solid, the display has barely any flex. The hinges are not as stiff as I would like - my emachines e727 has really stiff hinges, you feel like trying to pry a ball from a German Mastiff's mouth, but maybe that's why it's still alive and kicking some major dust. On sound front it has stereo speakers which sound a bit better than average laptop speakers, they are located on the front downside. The 3 status LED's Power, Charging and Caps Lock are on front face right below the touchpad. The touchpad is aligned to center of keyboard and is comfortable to use. The keyboard is excellent. It doesnt have asmuch travel as my emachines but still it's nice and the keys are lot sturdier. They feel much better to fingers and felt comfortable to type on this. The keys are island type and Lenovo calls it AccuType keyboard. I don't know how much accutype this is, since I'm not a touch type guy. But it sure feels like a quality keyboard. The touchpad has separate left and right click keys and they are a bit hard clicking. On the other hand the keyboard has full numpad and full size arrow keys which I really love.

It has a Power button on upper left corner and a small Lenovo One Touch recovery button right next to it. The webcam is centered on top bezel edge of display and it has a white LED that glows when it's on. The 15.6" LCD is just average. It has decent brightness but the viewing angles - especially vertical - suck really bad. They almost match that of my emachines. The notebook is available in Navy Blue, Dark Brown and Dark Gray color. I went with Navy Blue since I wanted it to look catchy.

Performance wise the sandy bridge Pentium B950 is more than enough for almost every everyday task. Also since the target audience - My Sister - is not going to use it for any intensive task I'm not worried about performance. I have partitioned the HDD into 4 partitions.I used two of them for Linux - one swap and one root partition, the remaining two went to windows 7 and Data. I encountered one small problem with this and that was Windows 7 was unable to create any extended partitions on this and it was unable to read the extended partitions by Linux. I didn't think of this before but it came with DOS by default and I didn't wipe out the existing partition table. I did delete the partitions but I should have wiped out the partition table too.

Anyway I have the system working fine right now so I'm not going to worry about anything. Overall it's a really nice machine with great VFM and good hardware quality.

Wednesday, September 5, 2012

A tryst with mail in PHP and the newbie

The problem with newbies is that they haven't the experience. Okay, sounds a but lame but the thing is they haven't seen as much crap as an experienced guy and for my 2 and half years I've seen some interesting crap.

Anyway, to the story the task was to send a mail from PHP. The guy was a newbie. The problem was the guy wasn't familiar with PHP. He didn't track the changes and effects that change brought. There is a way to solve any problem. If you know the root cause of any problem you hit that and then you solve it. But when you don't know the exact cause you got to research on the internet. And usually you end up with a number of things that comprise of a potential solution. And in these situations you have to keep track of every change you are doing to the system. Because unless you track everything and didn't check if every small change then you end up missing the solution.
I'm watching a lot of Dr House these days so I'll compare it to a diagnosis. You can't just use broad spectrum antibiotics for everything because they work on only a handful of cases.
So back to the problem, I let him wrestle with the problem for a week and by that time he ended up with a mess that would scare anybody.
First you find the cracks in the reality - I.e. The girl in red dress. Here it means you need to discover potential areas causing problems. They can be configs, switches to various programs involved, environment variables... In short anything. But you have to try and discover as much as possible. And once you have done that you have to make sure that they all are healthy. The configs are right and the logic super sane. You are doing what's possible to do and not trying to fly superman.
The guy had messed up so bad. He had modified php's mail settings. And sendmail settings. And apache settings. And god knows what else.
I was thinking all possible areas where the problem might be. So this evening I went by his cubicle and told him that we are either going to solve it now or we are going to leave it alone till deployment.
First thing I checked was php's ini file. The SMTP mail server settings are present there but they are needed on windows only. So I disabled them. I also disabled the SMTP port. Then I checked if send.ail was available for PHP. Since it was I left that setting alone otherwise we can specify sendmail binary path.
So here I ensured that PHP's side was okay. Next I checked sendmail settings. I used google with a targeted query to find resources which would explain send mail options and configurations. There I discovered the second problem we had. The send.ail settings sere a total mess. So I cleaned them up. This involved setting proper user name, proper hostname and disabling tls since the mail server connection is unencrypted. I can understand tls thing, but newbie guy messed up hostname and username. That's real shame.
Then I went through the mail sender PHP page's code. There also I found couple of problems, one was the variable names were all messed up. I cleared it up and one the web pages said about setting up an init parameter.
After doing this all I used php to send a mail and voila! The mail was sent.
Lesson: Being ignorant or inexperienced is not something you should be ashamed of but being stupid... God save you!

Sent from my Windows Phone

Friday, August 31, 2012

[ non-tech ] WOW! Part two

Its almost a fortnight since the first wow post. I don't remember the exact date and I don't have net access right now. Its 2 am right now. It may have something to do with the fact that the cellular network is showing full signal strength yet no internet. I'll bet 5 bucks that even for the full signal the call won't go through if I tried someone.
Well, cellular peculiarities aside, I have come to announce that I had to abandon my quest of mastery of C language because the Brian Hall book I was referring to was an alpha quality book and it was never finished. Which meant that I should take up the task of finishing it. I would have but before starting that I found something better to do and that didn't have anything to do with C language.

Anyway failed quests aside, I'm enjoying life by writing code for living and watching lots of movies and lots of dr house episodes for entertainment.

Well the only problem - I'm mentioning only one because in a normal situation there is usually one problem which when solved makes life perfect - is that I'm having trouble moving on. From what I'm having trouble moving on? Good question. You should ask questions and I would have answered you if I would be having some bakarwadi to exercise my teeth. But I don't have any, maybe I'll get some tomorrow from chitle's but since now I don't have any I'll just have to skip on answering.

Anyway the problem is that I'm having trouble moving on. What from is a mystery. And where to is another mystery. But I feel like I'll have to answer this question first. And then maybe and just maybe I'll have the answer to everything.

To cut the long story short, there is a girl involved. And we were not involved at any stage of our life. Considering we had about four years to do that and we didn't, I consider that my personal achievement.

Not that i was this cool guy back then. I was more of a cool messed up computer guy who was hell of a shy person and had trouble conversing which was the reason he didn't talk much and so people assumed he was shy.

I had a soft spot for her. Well, everybody does for someone around themselves. Sometimes because of need, other times because the other person is sexy or sometimes you idolized them. I did because of all these.

I shouldn't have that soft spot now. Yeah she's sexier now. But I have outgrown my teens. Most of my other idols have seen wastebasket now. And I'm not needy anymore. In fact for some minor irritations that are the result of my own errors I'm quite satisfied with my life and going through the days quite happily.

I lack a purpose. But then who said you need a purpose to live your life. Just enjoy the hell out of it. And I've been doing exactly that. Having 3 course dinners, going out with friends, shopping alone for weird styles of trousers, eating ice cream then pizza and then chicken. In fact except the fact that I don't have anybody to share this hellride with, I'm enjoying the hell out of my life.

But I just keep finding her around here and there. And I keep wondering why I keep seeing her around - in this friends profile or in some other friends contacts list.

Am I missing her? Am I really missing her? Let me try and see who else I'm missing. My parents? No, they were always annoying to be around. Yeah mum used to cook great and dad would have some cool stuff gutted around and doing repairs. But... No. I left them behind when I left for the city. My little sis? Yeah, maybe. She could do with her elder  brother around. But we were never any close. Who else? Wow! Nobody! Yeah not even my best friend! We are pretty close as best buddies can be. But I think I always held back because I didn't want to miss him. Hmmm... Revelation. Then why I feel like I'm missing her.

Well, there is only one explanation. The evolution must have missed to disregard this primal urge for some particular person of opposite sex to dominate your mind. Hmmm... Pretty feasible. At least I have some rationale. ;)

On a side note I have left just 5 hours to sleep. Tomorrows Friday. Or rather today is Friday since the time now is 3 am.

Sent from my Windows Phone

Tuesday, August 7, 2012

[non-tech] Wow!

*** Well, not for the first time but I missed the point I wanted to say in this post. So I'm just putting it up here. I really regret missing this opportunity to work with the amazing guys.
I feel bad because the people did expect something from me and I have failed them. I have also failed myself. Well, even though I was a failure, it was touching to be contacted and asked about it. Well, getting back to rebuilding now. First program to go under axe is Kernel Programming... Sucks! But every failure has it's price and I have never hesitated from the payment if the price was right. Next will be my laptop hours. And after that maybe my Sundays!!! (Well if I get to that point the world may end since my current organization is eating my Saturdays as it is. ) I'm hoping to get to that point!!!

I must not be feeling like wow right now. After such a fiasco, I should be sitting in a dark corner and crying my heart out. Actually I almost cried, but when the fault is yours the tears are hard to come. So after spending 4 days in misery over a lost opportunity and a possible pr nightmare, my body rebounded and I'm feeling better now.
The emotional shock has worn off completely and the misery is like small clouds left on the horizon after heavy rains.
I am looking at the failure now. I'm trying to find reasons why I have failed. I'm looking inside out and through the events. And now I can see clearly what caused it.
Well the details notwithstanding, I'll only say one thing. This failure has hurt me more than what I've felt when I missed 1st class in my engineering 3rd yr by 1 mark - please note its one mark, not 1 percent or 0.1 percent.
The main reason was I was ill prepared and overconfident.
There is no forgiving this. So I'm going to take some harsh corrective measures. I'm going to start working on the chinks in the armor. I'm going to dig so deep that I'll know every nook and cranny. I'm a fighter and I'm going to go out and fight this battle again. And I'm going to win.
I have taught myself to be a survivor and the current situation has made me weak. There is no place for a weak guy in this world. So I'm going to be stronger and its going to be difficult. It'll be more efforts than I spent on toning up my body. But I think I can do it. I know I can do it.
Now why I'm putting this on here is because there won't be anything here till I have achieved what I am out to do. Let this last post be the stone that has me writing my name on it!!!

Sent from my Windows Phone

Friday, July 27, 2012

Goody two shoes complex and the jack of all trades

Its the discovery of the decade. Apparently I've found out that I'm too good for this world and so my life sucks! Well the thing is that I'm a jack of all trades and my parents were too good for me. Which led to them teaching me to be accepting and patient and lots of other such non-interesting things.
And so right now in my two and half year of career I've ended up working on following things:
1. Windows administration - system assembly, setup and is installation and troubleshooting. In fact my windows skills are almost power user level.
2 Same power user level with Linux: yeah I started with slackware but that was when I was 16. Its 9 yrs now and i have seen and uses a number of Linux distros. I can handle basic troubleshooting and almost all tweaking of a new installation.
3 .net development: Right after my engineering in 2k8 I did a course in .net, so I can code in both C# as well as VB.NET. Also I have done couple of projects in ASP.net.
4 Oracle: It was my first database. I'm pretty handy with queries and stuff. I won't be able to start writing cursors and procedures fight away but i have used that stuff in the past and i was good enough with that.
4 MySQL: I've been using MySQL for last couple of years so I have achieved a level of comfort with it. I've used it in more than 10 places in both online and local applications.
5 Sqlite: This is the one that got away. No, I mean I know the basic commands and stuff but I haven't used sqlite anywhere and maybe in some embedded project i should use it.
6 C, C++ : Really all that stuff was way more interesting. But i have coded enough utilities in C or Cpp to be confident about all of them. I wish though I would have worked exclusively in these two. I would be working in Linux kernel by now.
7 Java: During college years I did enroll for a Core and Advanced Java class, but like many things in my life I dropped out of it in the middle of J2ee. I learned core Java and bit of JSP though. Well, i never got the chance to really try my hand at Java though.
8 shell scripting: This is the holy grail for linux/unix users.  Everybody using linux/unix, however noob he/she may be has to face the command line one day. I have become proficient enough in shell scripting that I'm contemplating of writing a proposal in shell script; gee just kidding. Don't think my still unknown better half would like that.
9 PHP: I'm coding PHP since a year now. And i have become proficient enough to write complex pages. Though there is some work i have seen that my mind just couldn't come to terms with like single page working as both front end and backend. Well I'm a simple minded guy and i don't believe in chasing one's own tale.
10 jQuery : I'm using jQuery for a year too though i usually stick to using it for functional work. I'm not in UI design or effects and stuff, or else i would be Doing some amazing work with jQuery.
11 Office and documentation: its the dark side of my career but I've worked on about 8 manuals and I've documented as much number of projects.
12 ARM arch related work: I've meddled quite a bit in arm related stuff like rootfs's, cross-compilation, drivers and kernel and stuff. Heck but I have run a rootfs in a kvm virtual machine.
13 Qt/ GTK : I have worked on a 5 month project with qt related work where I optimized and added features to an existing system. I taught myself the ins and outs of qt then. Actually everything I know on Linux is all I have self learned. My liason with GTK has not been much since GTK is difficult to code. You can't hope to create a decent app without knowing GTK inside out. The lack of a decent IDE also sucks. Qt on the other hand has the excellent QTCreator.
14 Drupal, WordPress, blogger etc web related stuff utilizing html and CSS knowledge. : I'm acceptable with html and CSS. So i didn't have any problem working with all the above mentioned frameworks. Its just that I didn't have enough time to really explore all these inside out and they are not main priority for me anyway. Though i do host this blog on blogger.
15 Android : I have successfully compiled hello world for android. That wasn't pain at all, but getting the dev environment surely was!!!!

So you see how fragmented my career path had been.
Well, hopefully someone will notice this post and maybe hire me to really do something amazing!!!

Monday, July 16, 2012

easing up on oracle import

Open import_database.dat and change the path to dmp file. Save it and run it!

C:\import_database.bat

sqlplus sys/sys as sysdba @C:\SqlRefresh.sql
imp m1/m1@m1 fromuser=m1 touser=m1 ignore=y file=c:\cat.DMP

C:\SqlRefresh.sql

connect sys/sys as sysdba;
drop user m1 cascade;
create user m1 identified by m1;
grant dba to m1;
exit;

Working:
import_database.bat logs user in as sys and deletes user m1 so that his database is deleted along with him. Then it creates the same user and grants him dba privileges. All this is done in file SqlRefresh.sql.

Next we import the new dump with the help of imp command.

Thursday, July 12, 2012

The Documenting Professional

When your KRA* is not defined, you had to suffer a lot of things like Documentation, testing and training the users on field (Why would a dev would want and need to go to field??? God knows!!! ).
Well, unfortunately when your 90% of time is spent in these activities you actually can't complain!!!


*KRA: KRA means Key Responsibility Area, these are the responsibilities that form the core of your work and define your role in the organization.

Wednesday, July 11, 2012

In the middle of nowhere


So another week past and another period of time is committed to history. I have learnt a few things. First is however prepared you may be sometimes you just fall on your face and you can't do anything about it.
Second thing was you can try your best and still you may not be able to stop yourself from falling on your face when the situation is just so.
I was on field enjoying a paid vacation in the middle of nowhere and things crapped a bit to conspire the falling on the face.
There was only one positive thing about this, the screw up was not at my end and whatever didn't work, I didn't have anything to do with it. Some people would call it saving own skin but I don't think so. In fact because of this thing only I was able to enjoy the time.
Thankfully I had internet access via the trusty old GPRS. It wasn't fantastic but it did crawl along. And the ample amount of songs on this phone and my adorable Zen Mozaic kept me entertained. The games on this phone also helped.
Next time I'll not forget to keep my laptop and my wacky but working Western Digital with me. They got lots more stuff than 3-4 GB of music. 
Few remarkable things that happened were
We drank tea in bagpiper glasses at a place
One of us got sick with stomach infection and he had some memorable bad time.
I managed to keep up my diet and maybe so didn't get sick.
The place was a nightmare and in the afternoon we used to sleep on thermacol  sheets.
Geez a memorable trip.

-Vaibhav
Sent from my Windows Phone

Tuesday, July 10, 2012

Apps and Internet and...

Having a smartphone and using it regularly as a Smart phone for about a month now, I have come to some conclusions.

1. A smart phone needs Internet. Without Internet it's maybe only 30% smart.
2. Also we each have our specified tasks and we need Apps for that. Without appropriate Apps the smart phone loses its usability.
3. Ease of use is another parameter which determines the usability of a smart phone. If all functions are easily accessible and easily manipulated then the user can exploit it fully.
4. The UI performance is also another important factor and it influences the usability greatly. Fluid animations and clear interface contribute to greater user experience.

Monday, June 25, 2012

Rewrite and rewire

1. Chart necessities
    When you start with existing code then usually it's well bloated. There are half formed, half-implemented ideas, constructs remaining from discarded ideas as well as code that's lying in comments. We need to remove all of this and add new code so that the new software ends up being slicker and easier to manage than old software. Code management is a complex job, and it's almost akin to file management on your personal computer or Laptop. Often you horde up files and what not together and when you start on cleaning you come to understad that half of the stuff is junk. So is with code. In any application which doesn't have quality people looking after it, there's a lot of junk code lying around. It's often in the form of unimplemented ideas coded partially which end up in comments. Or structures that are not used anywhere. Or header files that are not included anywhere.

2. Start with barebone infracture
    We start with an empty project and often don't pick up anything from old project. We study the old code, we evaluate it and then import the parts that we think are good enough. We stay away from junk code. We don't use code that's overtly complex or is dependent on too many things. Instad we develop our own simpler code that does the same thing.

3. Add pieces as well as dependencies
    Next as we go on adding functionality to the application, we increasingly find ourselves using more and more code from old code. So we must make sure that we are nitpicking the required code only. Also we do the same for dependencies.

4. Finish product
    This way we finish the project with minimal code from the old application and the constructs we are using are incredibly simple to use. We have just finished one milestone and if we are strapped for time then we send this stuff out as it is for testing.

5. Don't test it yet; remove unneeded code
    Now if we have time then we spend some of it deeply studying the current code and removing anything that doesn't meet the quality criteria. We need to have a threshold for the quality and so we follow the guidelines and we finish the QC.

6. Optimize existing code
    Next we perform some optimization. Experienced devs like us usually have lists of things that need optimization.

7. Refinish project
    So after all this we celebrate the official development freeze.

8. Give it for testing
    And send it for testing. Which is followed by a small bug fixing routine and some time in between we have the gold party.

Another Sunday and a fortnight with windows phone 7.5 on Samsung Omnia W

I really wish every Sunday was like this. Actually I have taken a break from the Internet, just visit the net to check out the mails on Gmail and check out the 2-3 websites that I frequent for news.

Well anyway as for the Sunday, I woke up at right time in the morning, had my favorite breakfast then some work followed by lunch with my favorite veggies. After couple hours of sleep and an evening stroll ending with a glass of cold coffee. Then some more work and now dinner - that was probably the best egg biryani I've eaten till date. Just wish I had someone to share this with, but no worry. That problem will be solved in due time. Anyway so here ends the Sunday and maybe it wasn't that interesting for you but the good part is the one coming below.

So windows phone! For a guy who's been messing with Linux since his late teens, ending up with windows phone is a surprise. Well how I did end up with the Samsung Omnia W is not what I'm going to talk about now. We are going to see what I have found with the Omnia for this fortnight.
Lets first see the device, Omnia W. Its a mid range smart phone. It doesn't pretend to be high end and after reading a number of reviews I got the impression that Samsung have put together a solid smart phone that is solid looking and would appeal to people who like unpretentious hardware. The phone's form factor is bar touchscreen. The display is 3.7 inches of Super AMOLED. And its gorgeous! Below this are three buttons - a windows button that acts as the home button and two touch sensitive buttons on its either side. On left side is 'back' button and on right side is 'search' button. Above the display there's the front camera as well as proximity and ambient light sensors.


The left side hosts the volume rocker and its a bit thin but works alright once you get hang of it. On the right side near top side there's the power button which also acts as lock button. And near bottom side there's the camera button. Its with half press and works alright. On the top we have only the headphone out. The bottom hosts the micro USB port which is used for charging too. On the backside near top is the 5mp autofocus shooter with LED flash on its right. A Small opening for speaker sits to its left.
That's all about the handset. The package consists of a long enough micro USB cord, a power adapter, a pouch and couple of manuals. There's no driver cd or software disk for that matter. Of course Samsung or MS wants you to grab the latest Zune software and use it to connect the phone to PC and transfer stuff to it. Anyway after I got Zune set up - which was a painful process since ,Zune needed a few of my windows components updated as well, transferring files was easy enough.
Of the remaining hardware specs, the display is protected by gorilla glass. The 1500 mAh battery is removable. The battery cover may look like its brushed metal but it's just plastic. But the fit is nice and solid. The sim card slot is aside from the battery and you don't need to touch the battery do remove the sim. The battery capacity of 1500mah is tad small for such a smartphone though, especially when you consider the 1.4GHz processor and 512MB of RAM. The handset has 8GB of flash of which about 6GB is available for user. So music or video junkies would stay away from this phone.

The Zune way of transferring things to the phone is the first walls of Microsoft's walled garden - no USB storage mode. Well, lose some, win some! 
On performance side the OS is smooth. The apps load fairly quickly and I am yet to see any crash or hang. The animations are smooth and there's no stutter or lag anywhere. The marketplace is small compared to android and you find its smallness when you search for something you would usually have an app for on say Symbian, but here you may end up one or two choices only. Still MS is hoarding developers and they have managed to get enough prominent apps on the platform.
On usability front, I find the settings provided just enough without getting overtly complex. Actually when I compare the settings available on windows phone 7 to say that in Symbian, I find that Symbian provided far too many settings and so that fine grained control is missing here. But at least they have the bases well covered.
Though as you go on using it for some time then you would find some annoying little things that the MS engineers have missed. E.g. The messaging functionality doesn't support sms drafts which is fairly common functionality found everywhere. Also in the mails you can only attach pictures. If you want to attach any document to a mail you need to go through the office hub and mail the document from there.
The phone comes with a sparse set of apps most of which are useful one way or other but you would probably uninstall all the picture related apps.
The preinstalled office suite helps with various type of documents and you can at least view the docs on the phone. Try creating something and you would probably pull your hairs out trying to wrestle with things. So stick to your laptop/ultrabook or whatever for content creation.  If there was a laptop dock then we might have put the office functionality to use.
The mail functionality is easy to set up and works as expected. One thing MS got right was onscreen keyboard. And even a guy like me with large thumbs can type comfortably on the provided space. In horizontal mode I can type fast using both the thumbs and the autocorrect functionality makes sure that the errors are kept at minimum. The keyboard shows predictions in the top line and if you are typing really fast then the autocorrect takes care of that in the best way possible. Of course your thumbs will have to be following at least the approximate path of the word for the autocorrect to work.
In portrait mode typing with one figure works okay though since the finger travel is more you often end up with tired finger/ forearm. Overall typing is not at all a problem.

The live tiles may prove useful if you are heavily into social networking or have a lot of stuff from web appearing on the homescreen but in my case most of them are staying static and so I have limited use for them. The applications list though has one neat feature which is grouping of apps alphabetically and alphabetic group selection. The group selection pops up when you click any character header with theme color or if you double click the application list. This screen is 'a to z' characters out of which you can click any to go straight to that group of applications.
Windows phone 7.5 supports multitasking and a long touch on the back button takes us to  screen where all currently open apps are shown and we can shift to any of them. Though there is no way to close any app from this screen. we need to select the app that we want to close, this takes is into the app and from there we must close it.

Well from telephony point of view I don't have any complaints. The calls are clear and Signal reception is good. The network sometimes plays vanishing act but I think that's the Airtels crappy network. Maybe I'll get another operator and check it out. The microphone volume looks adequate enough.
The 5mp shooter at the back is above average and it shoots good enough snaps. I'm yet to get a good opportunity to put it to test. There are a few settings provided and they are equivalent to what I have on my Sony dsc w510 point n shoot cam which I got for 6,500 INR couple of years ago. So once I get an opportunity I'm going to get some photos outside and compare both at 100% crop.
The 720p video though is greater than what my point and shoot pocket cam can do. So I guess I'll test the video too on the outside. Just need to get some sun out and some good landscape to shoot. (It's rainy season, and I live in a city!) If I shoot the city traffic it would ruin both our moods.
I don't think I'll ever get to use 3G considering the rates the operators charge here. The only 3G cheap enough is BSNL 3G but then I would rather stick with edge. On Airtel edge I'm getting 10 to 12 KBps which is nothing to talk about.
On the other hand the wireless performance has been good. Also the hotspot functionality provided by Samsung is really good in helping me connect my laptop to Internet via Omnia very easily.
As a smart phone, Omnia is serving me well. I can check my mails as well as news easily on it. I can use the cellular Internet on my laptop easily via Internet sharing. Sending music to it is easy enough. Putting movies and videos on it is painful though since Zune software first cross encodes it all. So it's a time consuming process and the 6GB of storage means you have to be economical with what you put on the device. The apps are okay and I have come to an acceptable mix that I find provides best functionality.
The screen is a major point for this smart phone. The music and video functionality is good enough. Though there is no sound enhancement. I would have liked some DNIE since I'm using Klipsch image S3 these days.

The battery life is average. It lasts just about a day and you would usually put it for charge at the end of day. Again I don't mind this even though I feel it's battery life is way less since I came from dumb phones. As a comparison my secondary phone - Nokia 101 lasts 3-4 days usually and I often forget to charge it so that sometimes I find it dead and I wonder when was the last time I had charged it.

Though overall I find myself happy with my Omnia W. And the fact that there's hardly any other phone like it in its category makes it a special case. Naturally I'm a Nokian at heart and I had used almost all Nokias software wise. In fact recently when I wanted to gift a phone I gifted a Nokia C5-00 5MP which costs half the price of this phone but packs a punch functionality wise. Of course that's almost a year ago. And right now Nokia 710 gives Omnia W a tough competition. Though with announcement of Windows phone 8 we need to see what new breed of smart phones does WP manages to create.
Well I'll hold onto this Omnia for a while till the landscape becomes clear with next winner. Maybe google will get its act together and release some much needed features and performance tweaks for android. And we might have a super winner. Till then, adios.

Sent from my Windows Phone

Wednesday, June 13, 2012

Words on Linux Mint 13


LM13 was released a few days ago and me being a mint fan aptly downloaded and installed the 64-bit variant with Cinnamon Desktop. I also went through a number of reviews to see what others have noticed. The overall tone was Cinnamon Mint has come up together as a really good distro though there are many small corners that need polish.
After using Mint 13 for last couple of weeks I can see that it's true. Mint 13 is an excellent distro and the mix of applications, the usability and the character as an Desktop OS are it's main features. And no other Linux distro can beat it right now. In fact as of now I don't find myself going back to Windows or my tried and trusted Ubuntu 10.10 installation anymore.
The things that need polishing are few enough that they shouldn't prove to be a deal breaker. One thing I noticed is that we need a better interface for appearance customization. The colors and themes are good enough but we need something splashy and vibrant looking. Maybe they need some Windows Metro colors.
Right now LM 13 is very well positioned with Mate being there for people who need a fast desktop while Cinnamon being the one for people who have fast machines and like the effects.


p.s. I think I haven't been fair to Mint 13. It's an excellent OS and everyday I use it I appreciate the work done by the Linux Mint Team more and more. I think I am too tired to write anything more. 

Thursday, May 31, 2012

Oracle Drop All Tables, Views, Sequences, Triggers






1. Drop All Views




BEGIN
FOR i IN (SELECT view_name FROM user_views)
LOOP
EXECUTE IMMEDIATE('DROP VIEW ' || user || '.' || i.view_name);
END LOOP;
END;

2. Drop All Triggers

BEGIN
FOR i IN (SELECT trigger_name FROM user_triggers)
LOOP
EXECUTE IMMEDIATE('DROP TRIGGER ' || user || '.' || i.trigger_name);
END LOOP;
END;

3. Drop All Sequences

BEGIN
FOR i IN (SELECT sequence_name FROM user_sequences)
LOOP
EXECUTE IMMEDIATE('DROP SEQUENCE ' || user || '.' || i.sequence_name);
END LOOP;
END;

4. Drop All Tables

BEGIN
FOR i IN (SELECT table_name FROM user_tables)
LOOP
EXECUTE IMMEDIATE('DROP TABLE ' || user || '.' || i._table_name);
END LOOP;
END;

Monday, May 28, 2012

SchemaSpy

SchemaSpy is a very useful tool for database Administrators and Developers. The basic purpose of SchemaSpy is to auto-generate schema for any database. But it's evolved in a great tool that can give us so much valuable information about any database. The case in question is that of a complex database consisting of more than 30 tables with some tables having fields in excess of 50 and complex links.

I won't go into details of everything here but rather I'll outline major points. After successfully running SchemaSpy on a database you are presented with an output of number of HTML files in the designated folder on your PC. The index.html file is the starting point for this output. After opening it you can see following tabs.
 

And that's a lot of information that you get about the database.

The first tab - tables - lists all the tables, next one displays a relationship diagram, next lists Utility tables and details for them, the next one does constraints, after that it even shows anomalies that can affect the integrity of your data, then's one that lists all columns in your database and the last tab takes you to donate link.

Overall you can see that SchemaSpy is a powerful tool for DBA/Developers.

To use it, you need couple of things:
1. The JRE - since Schema Spy is written in Java.
2. GraphViz - Schema Spy uses graphviz to create the relationship diagram seen in second tab.

Tuesday, May 22, 2012

Tuesday, May 15, 2012

Online Syntax Highlighting

This is an amazing website that can highlight your code in various color themes.
It's really helps with readability of the code in documents.
http://tohtml.com/

Tuesday, May 8, 2012

Of bugs and bees (especially annoying bees)

Oftentimes a simple operation fails and screws a much complex operation;

Well mostly though it's the complex operation that often fails and makes life miserable.

"echo PASSPHRASE | gpg --yes --quiet --passphrase-fd 0 --simple-sk-checksum -c --no-use-agent SOURCE_FILE"

This was the monkey wrench that I managed to throw in the wheel of the tractor!

It all happened like this: I was tasked to design an encryption utility which will use gpg in the background and encrypt files with keys from a pool. So I wrote a small C program that would access the pool securely and encrypt the file. Later this file would be transferred across the network and at the receiving end there was a similar utility which would decrypt the file.

Now the problem was I didn't have enough time to go through gpg's api's and integrate it in the utility. So instead I used system function to execute the gpg command as shown above. For testing I would call this utility from terminal and it would work fine.

The thing was when I tested this utility from the main program, I found it working. So here are the two cases I tested against:
1. Call the utility from terminal and check for all OK.
2. Start the main program from terminal and test the functionality using this encryption utility.

Both tests came positive. So I okay-ed the utility and it got shipped with the main program. Now the thing was it wasn't used right away since the encryption routines remained unused for 2-3 months. Just last week though, when the field teams started using the encryption routines it started failing with consistency. Of course the buck got back to me. I was genuinely perplexed since it was all working fine. So I fire up the main program and test it and behold! The encryption part is working fine. I call up the field people and ask them what is the problem and they explain - blah blah blah.

So after a lot of head scratching and hair pulling I understood the scenario. I would always use terminal to start the main program since I would be looking out for debugging output. But we had provided a shortcut on the desktop as well as start menu which was the recommended way for starting the program.

At this insight, I started up the main program using the desktop shortcut; tested the encryption routine and it was failing. I tested the encryption routine separately on terminal and it's working. I modified the utility to throw up as much debug code; variable values etc and retested. Still nothing! In the main program it fails; and in terminal it works!

Well, after much more testing - I keep records for testing sessions; and it was 20th attempt - I figured out the problem with the command. Later it was simple, I modified the command as shown below. And after 5 more rounds of testing I confirmed the bug to be dead!

"gpg --yes --quiet --passphrase PASSPHRASE --simple-sk-checksum -c --no-use-agent SOURCE_FILE"

Lesson learned: Don't pick up code from shell script and put it in c program; always consider pipes and environment variables. And even after that when testing for functionality, test it like a user and not a developer. Developers test for bugs; users test for proper working of solution!