Wednesday, January 04, 2012

How to clean C++ projects in VS 2010

If you archive/ zip your C++ project, there are good chances that it will take a lot of time to send it via email; reason being the huge temporary files that are created with VS 2010. These temporary files shouldn't be committed to your configuration management systems (CVS, SVN and similar tools). Not only adding these temporaries to your versioning system increases the storage requirements, it also adds communication overhead whenever you checkin and checkout.

VS 2010 C++ Temporary Project Files
So, how do you get rid of these huge files? The first step is to know what these files are. Below is applicable to C++ projects created with VS 2010. Similarities as well as differences exist if you are working with other languages/ versions of VS.

Solution 
Your project solution folder contains the following temporary files:
  1. .suo: Contains "Solution User Options" --- user dependent information such as user tasks
  2. .sdf: Your code browsing database in SQL Server Compact Edition format; this file is recreated as soon as you load a project into Visual Studio
  3. .opensdf: Temporary file created as soon as you load a project into Visual Studio; usually deleted when you close the IDE
Solution\Debug 
You might like to keep the .exe (executable) but the rest are temporary files such as
  1. .ilk: Increment Like file
  2. .pdb: Program debug database file is used by the debugger
Solution\ipch
All files are temporary and can be safely deleted; in fact, the entire folder can be deleted.

Solution\Project 
Typically your project exists in a project inside your solution folder. All files in Debug folder inside "Solution\Project\Debug" are temporary and regenerated when a build command is invoked.

The Easy Way to Delete These Files
An easy way to delete a lot of these files is to "Clean Solution" from within VS 2010. Select "Build" from the menu and choose "Clean Solution." This takes care of a lot of temporary files mentioned above, and significantly reduces your project size. This, however, deletes your .exe file as well, which you might or might not want to happen. And finally, it leaves the .sdf file, which can be significantly large, and should be deleted.

Wednesday, December 28, 2011

Being Part Time Self-Employed in the UK

It's possible to work as a self-employed person while retaining your full-time employment in the UK. The combination is called as employed + self-employed. There is nothing complex about the arrangement and is perfectly acknowledged by HMRC [1].


Letting HMRC Know

If you believe that you can work as a self-employed individual/ contractor in addition to your day job, you just need to let HMRC know the change in your circumstances. You'll need to pay Class 2 NI and applicable income tax, and that's it! An accountant to file the income tax is something at your discretion---you don't need to hire an accountant if you can do the required tax calculations yourself.

Taxes

Mandatory class 2 National Insurance (NI) contribution is at the flat rate of £2.50 per week. You are exempt from this contribution if the earnings from your self-employed business are lower than £5,315 for the year 2011-2012 [2].

Examples of Work You Can Do

Some examples of self-employed work that you can do while remaining fully employed in your day job are Google Adsense based earning, developing iPhone/ Android/ Blackberry applications, writing articles, etc. Freelance websites like vWorker and oDesk can also be used to earn some extra quids.

Of course, you can also work "offline" if you want.

Business Banking Account

Though not required, it's recommend that you also make arrangements of the following:
  1. Open a business banking account and keep your self-employed revenue and expenses limited to that account. This eases all financial calculations. I have personally used (and liked) HSBC Business Banking accounts [3]. There are no charges for this account for the first 18 months of your business.

  2. Use a business name. This is not required if you are just self-employed, and are not forming a company. But it's much more professional and seems logical for future transition into a private company/ partnership. HSBC, for examples, gives a cheque book with "<your name> trading as <your business name>". Thus, cheques in your name or in your business name can both be deposited in the same account.

[1] http://www.hmrc.gov.uk/working/intro/employed-selfemployed.htm
[2] http://www.hmrc.gov.uk/working/intro/class2.htm
[3] http://www.business.hsbc.co.uk/1/2/business-home

Saturday, December 10, 2011

Free SMS Reminders for You!

Would you like Google Calendar to SMS you for events and appointments? If you live in the UK or the UAE, and you don't make use of this free service, you might be missing on something important. In fact, there is an entire list of supported countries and carriers here. In the UAE, only Etisalat is supported---bad luck du guys! Unfortunately, this feature is not available to users in Pakistan.

So, how does it work?

Assuming that you are already logged into Google Calendar, you can reach Calendar Settings by first clicking on the little arrow next to you calendar name as highlighted in the screenshot below:



The resulting screen will allow you to change various settings such as calendar name, etc. Yes, you can have more than one active calendar! However, what we are interested in right now is the Notifications link as highlighted below:


The notifications screen lets you specify Email or SMS alert preferences. There is a link on that screen to set up your mobile phone:


You choose your country and enter your mobile phone number. Google will send you a verification code via SMS which you have to enter back on the same page. When done, you can select the checkboxes shown above to get SMS alerts for your appointments and events!


If you live in the US, you can even ask about your next day appointments via texting "nday" to 48368 (GVENT). Unfortunately, this pull service is only available to the folks in the US.

Sunday, December 04, 2011

Drive: The Surprising Truth About What Motivates Us

If you have ever been interested in motivating others, "Drive" by Daniel H. Pink is an important book to read. The main theme of the book is that the Carrot and Stick model of motivation is outdated. It has outlived its usefulness and doesn't apply to modern life, specially beyond algorithmic tasks.

"Management isn't about walking around and seeing if people are in their offices," he told me. It's about creating conditions for people to do their best work.

The author argues that core human motivators are Autonomy, Mastery and Purpose. He uses the example of Wikipedia vs. Encarta to support this argument: Wikipedia was backed by autonomy, mastery and purpose, and it managed to outclass the carrot-and-stick-backed Encarta.

With this great start, the author goes on to discuss each factor in detail. A lot of real-world experiments are discussed, such as the Flow game which arose out of Jenova Chan's MFA thesis.

There are gems here and there such as this statement from a hiring manager, "If you need me to motivate you, I probably don't want to hire you."

Some information in the book comes as a pleasant surprise. For example, I was surprised to know that the famous Post-It Notes were created in 3M using the permitted bootlegging policy. Permitted bootlegging is office time where staff are allowed to spend a certain amount of their time working on 'pet-projects' in the hope that would some day bring in revenue to the company.

Having said all this, "Drive" is not without its flaws. Though the author states that the lessons from this book can be applied to life beyond the office, i.e., to social life. But I feel that the books fails to address social issues. There book remains focused on the 3 factors, which I believe is seriously limited. Things such as peer pressure, addiction/ fashion and awareness.

In summary, it's a must read book but it's not idea. Will somebody ever write the ideal book on human motivation?

Thursday, September 01, 2011

6 Months!

It's exactly 6 months since I came to England. A lot has changed for me, and a lot remains to be done before one can rise above the day-to-day issues of life and start thinking of something far-reaching---beyond the rat race.

The first month was spent looking for a job. As luck would have it, I kept looking in London and found one in Leeds. The next month was spent looking for a place one could call home. And then came the dreaded family visa thing.

When all was set, I went back to Pakistan in late June to bring over the family. NHS registration, child vaccination, buying stuff for home---there was plenty of work to keep me busy in July.

And after a month, it was Ramadan time---18 hours of fasting, and almost no-productivity at office. I wish I find a way (or the will) to remain active and productive while fasting!

While there could be other non-targetted improvements/ learning, I did work on EMV (finally!) in this time. I could say that I now having basic understanding of Field 55 of ISO 8583!