Wednesday, September 18, 2013

Removing the BRS scanner from ubuntu

I just ran into this problem of brsscanner needed to be removed to install skype/google talk plugin in ubuntu. But I tried to remove it it gave me following error.


 sudo apt-get --purge remove brscan
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following packages will be REMOVED:
  brscan
0 upgraded, 0 newly installed, 1 to remove and 158 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
sh: 0: getcwd() failed: No such file or directory
(Reading database ... 184801 files and directories currently installed.)
Removing brscan ...
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/BHL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/BHL2': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/BHL2FB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/BHLFB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/BHMFB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/BHminiFB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/YL4': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/YL4FB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ZL2': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ZL2FB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ZLe': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ZLeFB': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane': No such file or directory
dpkg: error processing brscan (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 brscan
E: Sub-process /usr/bin/dpkg returned an error code (1)


After searching several links I figured out that only way to remove is actually to create those folders and then execute the commands as below



sudo mkdir -p /usr/local/Brother/sane/GrayCmData/BHL
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/BHL2
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/BHL2FB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/BHLFB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/BHMFB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/BHminiFB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/YL4
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/YL4FB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/ZL2
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/ZL2FB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/ZLe
sudo mkdir -p /usr/local/Brother/sane/GrayCmData/ZLeFB
sudo mkdir -p /usr/local/Brother/sane/GrayCmData


$sudo apt-get --purge remove brscan
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
brscan 

0 upgraded, 0 newly installed, 1 to remove and 158 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
sh: 0: getcwd() failed: No such file or directory
(Reading database ... 184801 files and directories currently installed.)
Removing brscan ...



Thursday, August 15, 2013

Fascinating memory



While I was driving home today after work, I was listening to the radio, which played Dido's "white flag". It was fascinating how my memory was drawing pictures from my past sweet memories. This song became popular during my university life and was frequent hit in radio stations. I used to hear it a lot during a period of semester exam .. almost every day. 
Similarly few there are few more songs which links my memory way back until early 90's. 

Fascinating this about these things is that even though we do no recall these events in day today lives, how nicely they are stored in memory?  In a way this is like unlimited backup of memory :)

After hearing this I actually typed all the songs in youtube and played them and brought those sweet memories back... may be you should try that too.....



Tuesday, August 13, 2013

GIT - a tool for rapid development and integration

Few years back I had the first taste of GIT. At that time GIT was more to geeks that anyone else, it was basic and tools were not that policed, documentation was limited to man pages, etc. But things have changed it has come long way. Based on the experience I also wrote a blogpost mentioning GIT is not enterprise ready.

Well have I changed my mind? Not exactly! Some of the concerns still exists, but definitely with more experience in different working environments help me realize that there are few other concerns that some enterprises may come up like extensive branching and merging which outweigh the minor problems of one centralized repo concept.

In all most of all of the companies that I know does keep a central repository of the their code base. And I'm yet to meet anybody who says that his/her company is looking for distributed repository. But there is a quite burning questions that I hear from lot of my colleagues, that is how you keep different versions of active development, merge  and release them, do bug fixes and patch them. So I was very interested what would be the best tool for this in terms of version control.

I was using SVN first at my office, then I joined a company which uses CVS. It was like going back in time for me. So many things I did easily seems to be very difficult. Keeping track of changes and location them was nightmare. Out of all of it, worst nightmare was merging. It was so difficult and we had to invent our own procedures to make sure nothing is missed and no neck breaking conflicts. Even though we came masters of it, process was very tedious and not easy to follow. Also there could be so many human errors. Thus it became evident that we handover over burden to a repo which could handle it and simplify and improve our process. So after few studies and trials we moved to GIT.

GIT is no doubt is a wonderful tool, but we had to look into few things before migration. Some of them I have listed below

  1. Migration support - CVS to GIT in our case but there are other migrations also 
  2. Support for main operations like branching, merging, conflict resolution, tagging, history, etc
  3. IDE support 
  4. Access control and security
  5. Integration support for bug tracking and other systems 
  6. Help and resources

After the migration no major problems were detected. Only thing that we should keep in mind is that even though your existing repo (CVS) might have merged branches to head, those changes might not reflect in GIT. Thus existing branches be good if you want to keep history only. Also leaving merging after the migration is a very bad idea if you have already done partial merge of that branch. Anyway anything after migration is working great for us.

Out of all the things about GIT most valued feature for us is the branching and merging. Clearly it is designed by people who really knew what is branching and what is merging and whom should do it. Also in addition that low bandwidth usage and performance is great.

Also once you switch to GIT some of things that you might have done in other version control system like CVS no longer needed. But usually it take some time to get whole team to make the switch. But sooner the better, otherwise even tool is good, your process might be screwing up things.

May be in coming days I will write about what are the lessons learnt from migration and things to do and not to do!


Wednesday, July 3, 2013

Travel check list

Being a non frequent traveller, I tend to miss out on some of the most important things to carry in my short trips and face difficulties. So for sake of all for whom that forgets.. here is my check list.

Planning and confirming the trip 

These steps are mostly performed by HR coordinating with employee. But inexperienced HR or last minute travel plan can throw things out of order. So here is the things to do when confirming the trip

  • Air travel tickets
    • Oneway booking or return booking - Some countries when issuing visa ask for a onward ticket (return ticket). So beware of this and you can also give a dummy ticket for visa approval. But when you travel, best is to keep a copy of actual ticket.  
    • Meals - On board meals are usually offered in full carriers and need to be purchased separately in low cost airlines. Full carriers if you book or not meal is usually served  but if you need a special meal like vegi meal, you will have to book it!
    • Baggage allowances - Check the airlines baggage allowance is enough for you to carry in you baggage. Usually full carrier airlines allow 7 kg hand luggage and 30 kg of checked in allowance. For low cots this differs and for both best to check their websites. 
    • Transits - But transit comes with set of pros and cons. Some transits there are free city tours and good duty free shops. These are best if you have substantial transit time like 8 - 12 hrs. But some transits there are nothing to do. And worse you might need to obtain visa for the transit. My opinion it's best to avoid these sort of annoying transit unless you have no other options.
    • Seats - Seats are that important if you are travelling in business class :). Unless those lucky few, others have to be aware of common pitfalls in seating. Other than your preferences of travel like window or isle seat, we have to look into other comfort factors of seats. For example, seats located near emergency exits are non reclining. Also some  seats do not have adequate leg space. So in such case best is to choose an isle seat. Windows seats are nice if you want to see outside and journey is short. 
  • Hotel bookings/Accommodation
    • Check-in/Check-out - Hotel booking should be placed based on the correct time of your arrival and departure. Normal hotel check-in start from 12:00 noon every day. If you are arriving early than 12:00 noon be sure to check whether they allow early check-in or you will have to pay additionally. Same apply to checkout. 
    • Food - Check whether type of food available at the hotel is matching with your preferences. Outside Sri Lanka, I have never seen a hotel offering Sri Lankan food. So my preferred options are either Indian or American food. Hotels can be booked with breakfast only or with all three meals. Unless you are planning to stay close to hotel, breakfast only is the best way. 
    • Logging and other means of accommodation - When you are planning to stay in a place for longer period, usually logging and other accommodations like flats may be cheaper option. But these will most likely not having any catering service  One option is cook your own meals. But for that you will need a kitchen with appliances. Second is to look for restaurants  Either case make sure that you have all things in place before going for this option, otherwise you will be paying more compared to good hotel even.
    • Power - Power will be important factor when need to charge your laptop or mobile phone. Our country's voltage standard is 220v/50Hz. And some countries you will have 110v/60Hz. Also based on the standards sockets might take different shapes and sizes. Just make sure that you have correct adapters converters before the journey or make sure that you buy them at arrival. 
  • Visa
    • Applying - When applying for Visa's make sure that you have required documents. Check their website and better if you call the embassy and cross check too. I have come across scenario where website is outdated and you have to have company leaves, bank statements etc... 
    • Type of Visa - For business you will need a business visa. In addition to that you might need transit visa. Just check with travel agency/ embassy of transit regarding the visa requirement for your transits. You could obviously travel under visit visa and do business work. This is illegal. And it's not advisable that you do this to countries like Iran, Afghanistan if you have plans to travel to US or UK. It's best you get a business visa in such cases. 
  • Money/Cards 
    • Cash/Cheques/Cards - You can take foreign currency or travelers cheques. Also you should be able to use your credit cards. Just check with your credit card issuing bank whether they have restricted card usage in the country that you are about to visit. 
    • Foreign Currency - If you've got the same currency that is used in the country you wish to visit, it the best option. But if you don't have that currency, next best option is US Dollars  Because USD's will give you the best exchange rates. Believe me taking a stable currency to a country that does not use it frequently will hurt you when exchanging. So always prefer USD. 
    • Where to change Currencies - You get the best exchange rates from money dealers inside country, NOT at the airport. So do not change all of your cash at airport. If required, change only that is necessary until you get to the local money exchange. 

So if itinerary is ready and everything in place before travel, last thing before travel would be to pack your bags..

  • Cloths - Pack enough cloths to the journey. If your journey is relatively long, then you will have to look for a laundry service. Most hotels offers laundry services, but outside is always cheaper than hotels. 
  • Shoes/Slippers - I have fallen into this trouble of not taking appropriate shoes several times. Usually I wear running shoes when I travel. But if you are travelling for a official meeting you will need decent shoes. Also in between you will need slippers or sandles to walk around hotel etc.
  • Belts - Same as above you will need one set for official attire and another set for denims etc.
  • Toiletries and others - Perfume, Toothpaste, Brush, Razor, Shaving cream are most important items. Always check your bathroom before travel :)
  • Mobile charges and converters - Don't forget them
  • Pad lock for bag/Baggage wrapping- I have had a personal experience where person opened by bag in front of me (with my permission) even though it's pad locked. But still this is the first form of defense. Better to wrap the baggage at the airport if it's a hard board or contain valuables. 
  • Name tag for bag - You wouldn't consider this an important thing until you lost your baggage or mis-handle it. 



Tuesday, March 26, 2013

Estimation Dilemma!

Estimation itself is a profession. There are many fields which employs expert estimators to accurately predict cost and deliveries. But unfortunately in software industry this is not the case. Reasons are obvious, there are no standards in software industry as in other industry, thus estimation techniques won't match from one company to another or even from one  project to another inside the same company. Since software development techniques, tools and methodologies distributed across vast area, standardization is not anyway going to work. Even worse part of software industry is the fact that at the start we (both customer and developer) have no clear cut idea of what exactly need to be done. That is the reason why majority of the companies work on iterative software process like agile. But for these kinds of project estimation can only be done for iteration and not for the whole project. Even though as developers we may agree and accept that, no business man will want to hear that. Business people always want to know how much it cost even though they are not sure what exactly they want. This is one of the burning question I seek answer in my day to day life as IT professional. So this is how I solved my problem.

First case was to understand where actually the estimation went wrong. For us it was many factors. Following are few of them

  • Bad scoping - Requirements are not properly understood
  • Poor understanding of product or requirement
  • Over confidence
  • Not considering the overhead of design/documentation/review/implementation/support
  • No resource categorization
  • No statistical analysis
  • Poor estimation techniques 
Bad scoping obviously need to be addressed by business analyst or anyone who gather requirement. Who ever plays this role should have a fair understanding of the project/product and should be good communicator. All the requirements should be properly documented and validated through few faces until no clarifications are pending before  sending it to the estimation team. 

Estimation software is tricky and as I see it there are no right or wrong way. If you are an estimator my suggestion is stick to the estimation technique that produce correct results for longer period. To do that obviously you need to have good understanding on available estimation techniques and statistical analysis of estimation data with actual project data. For estimation I would suggest this book. It's wonderful read if you are really suffering from the estimation problems. 

Lastly estimation should be an estimation. It's not exact figure! You cannot give an estimate without a probability. And getting your estimations to continuously hit 80-120% of actual targets are the best estimations. But still there may be odd project that shoots off the tracks. Thus controlling the project through correct project management techniques in mandatory even if you have the best developers in the word. 

Even though we follow a waterfall approach on estimation to be given out to the customer, we do not use it for the internal work planing as it self. After the estimation is done there might be more in depth analysis or changes to scope. So we will re estimate iteration wise with the detailed work breakdown and project planning will happen to match or control the project within the acceptable level of deliverables/etc. This has helped us to get feedback on the original estimation errors and take corrective actions. Also it has enabled us to follow an iterative process even though the original process is waterfall. 

So that is how it works! 

But I have a complaint to lodge with current university curriculum which grossly ignore critical engineering practices like estimations which should be covered at least in brief as it's a core role of any software engineer. Anyway hopefully in future this will be corrected for the betterment of the industry!

Monday, March 25, 2013

And........I am Back! :)


Well.. it's been about 4 years since I last blogged. I have been honestly rather lazy to do it rather than busy or something (Terrible .. i know). Even though blogging has stopped, all the wonderful things in life always kept us alive and interested.

So in coming weeks I though of sharing those wondeful stories one by one.. I also have a great collection of pics that I have gathered but not published. So coming weeks keep an eye on this.. it might be a embarrassing photos of u! ;)