Thursday, February 28, 2013


Forgot to put "&" in front of a line in /etc/rc.local and that caused rc.local to hang, which caused no X server! Awesome goofup!

Wednesday, February 20, 2013

QCalendarWidget CSS Stylesheeting

Recently I had to implement a calendar for a TouchScreen application. I resorted to css to modify the
calendar widget's appearance so that it would be more accessible.
Following is the code that enabled me to get a proper calendar.

calendar->setStyleSheet("QMenu { font-size:20px; width: 300px; left: 20px; }"

    "QToolButton {icon-size: 48px, 48px; font: 20px; height: 70px; width: 100px; }"

    "QAbstractItemView {selection-background-color: rgb(255, 174, 0);}"

    "QToolButton::menu-indicator{ width: 50px;}"


    "QToolButton::menu-indicator:open{ top:10px; left: 10px;}"

    "QTableView { font: 30px; }"

    "QSpinBox { width: 100px; font: 20px;}"

    "QSpinBox::up-button { width:40px;}"

    "QSpinBox::down-button { width:40px;}");

Tuesday, February 19, 2013

win phone 7.8

p.s. I don't seem to have any issue with updating of live tiles. The current apps that I have seem to be updating the tiles well.(Day Counter, gMaps and a few others. )
Just manually pushed the update to my Omnia W using Cab Sender tool. Usability is increased and the home screen appears bigger. Usability wise it's okay with one or two options here and there. The extra tile colors add a bit of freshness to the whole thing.
So overall it's a good value add update.

Tuesday, February 12, 2013


About yourself

Tell us something about yourself?
Why are you looking for a new job? What are the factors in your current job that you think are limiting you?

Diff between pointer n reference?
Can arithmetic be done with references?
Give pointers details.
Give function details.
What are functions for memory allocation and de-allocation?
Give malloc/free function example?
Explain use of malloc with respect to 2D arrays.
How to access 2D array elements initialized using pointer

What is difference between structure and class.(C++ structure and class!)
Can struct have functions? (C++ structures)
What access levels are available in structure?
What access levels are available in class?
Can a class element be initialized using pointer?
How much space a class object takes when initialized with pointer?
What is difference between overriding and overloading?
Give example for overriding and overloading?
Given two functions with same arguments but different return types, what will happen with these if they are to be put in same program?

Goldbar problem: Gold bar with max two cuts.Wage to be paid at one gold bar per day to the worker. How to do that? (cuts are 1st n 3rd position; So we have 3 bars of 1,2 and 4 units. First day pay the 1 unit bar; next give 2 unit bar and take one unit bar back; next day pay one unit bar; on fourth day give 4 unit bar and take 1 and 2 unit bars back and so on.)

Snail climbing problem: Snail climbs 5 ft up during Day and comes down 4 ft down in the night. How many days it takes to climb 20 ft? (16)

-: Got kicked out of this one :-

Monday, February 4, 2013

CV writing, or the art of selling yourself

Original Source:

Over the last few months, a few friends have asked me for help in writing a CV and applying for a job. As a person who has interviewed dozens of candidates and reviewed hundreds of CV's, I think I can safely say I know what I'm looking for and I know what makes a great CV for me. Unfortunately, most people suck at writing CV's. If you want to make it easier for a hiring manager to think he should interview you, make sure you understand the importance of the CV. There are no rules for writing one, though the following rules guidelines should help you write a great CV.

You are writing an ad. Not a CV.

Your CV is the only thing a hiring manager knows about you. After reading your CV, he needs to be willing to invite you in for an interview, so make it easy for him to decide to do so. Advertise yourself! This means:

  • Tell the hiring manager who you are
  • Give good, detailed information about you
  • Don't waste his time

I like CV's that start with an objective. What do you want in your career? This tells me a lot about whether you will fit in my team or not and whether I can give you what you want.

When reviewing CV's The worst thing there is, is a 14 page CV. Seriously. As a hiring manager I do not have enough time to waste it on 14 pages of a detailed description of your life, there are 30 other CV's waiting for me. On the flip side, I do want to know all the relevant things about you. So tell me what's relevant! For each education or experience item, tell me what you did. And tell me who you are.

Give facts about what you did, and start with important ones. Something like "Built a puppet environment for application X, allowing me and my team of 3 to install 200 servers in 3 days" is an excellent item. "Contributed to projects" (Yes, this is a quote from an actual CV) is not.

Also horrible is the common trap us techies fall into: mentioning everything we worked with. This is utterly useless. I "read" A CV the other day, which was a list 7 pages list each and every technology the person used in all of his jobs. This tells me absolutely nothing about this person, and it's really easy to make a decision: no interview. Remember: you're writing an ad for yourself. Have you ever seen an ad that was just a list of ingredients?

You don't have `a CV`

You should tailor your resume for the job you're applying for. Every job is slightly different, so you will want to present yourself slightly different, putting emphasis on what's more important for this job. For instance, if I were to apply for a sysadmin team leader position, I would start the section of my CV with:, unix team leader (2010-2012) and systems architect (2012-2013)

  • I led a team of 5 sysadmins/developers, developing tools to make system administration easier, such as a central infrastructure database, linked to our kickstart, puppet, nagios and dns infrastructures
  • Designed a database loadbalancing scheme and implemented the prototype of it, guiding other engineers in implementing it further

But if I were to apply for a python development position, I would start with:, unix admin and team leader (2006-2012) and systems architect (2012-2013)

  • Developed our central infrastructure database and management system, a python/django application, and integrated it with every service that needs server information, such as kickstart, puppet, nagios and DNS
  • Introduced Func as remote execution framework and built various deployment and monitoring tools using it.

Both are an accurate description of things I did, but emphasis is on what's relevant for the job I am applying for.

A natural follow-up of this customization per job, is that you shouldn't be sending your CV to a bajillion places. Do you really want to interview for any company that may want to hire you? Before applying, I'd rather know the company. Your personality, past results and future potential are things a hiring manager thinks about when reading about you, so why aren't the company culture, past results and future prospects important to you? If you don't know anything about the company before applying, you're only setting yourself up for failure.

Following on even further from there, I would be very careful with applying via a recruitment agency. They tend to blast your CV around to any company that has an opening that may be relevant, without doing this customization. As a hiring manager, I find the hit rate for most recruitment companies far too low. Some also insist on "fixing" your resume, turning "played with mysql once" into "advanced mysql DBA" (yes, this actually happens), or removing your contact info and replacing it with a large ad for them.

Know your CV very well

A surprising amount of people do not know their own CV, which I find mindboggling. A good hiring manager will base many of his questions on your CV, making you explain what you did, trying to find your thought patterns, your reasoning and deduction skills. If your CV starts with "designed a database for an e-commerce app", you'd better be able to explain your design. If you list an MSc. in computer science as one of your degrees, you should be able to tell me what you learned there.

So read your CV. Twice. Three times. Put yourself in the hiring managers shoes and ask yourself questions about what you did, for every job and education you list. For every hobby you list. And if you find it difficult to talk about a part of your CV: leave it out or reduce the importance of it.

Cover letter

Not many people include a cover letter with their CV, which I find a shame. Your CV is an overview of your education and experience, but equally important for the hiring manager is your motivation. Why do you want to work for me? If I can't answer that question, do I know you really want to work for me? Or are you just machinegunning your CV to all places you can find? Your cover letter should tell me you care about landing a job you want, why this job would be good for you and why you would be good for the company. The CV is the evidence to back up those statements.

And a tip I really should add here: your e-mail to HR when you apply is your cover letter. But those e-mails don't generally reach the hiring manager, especially when organizations grow and have a recruitment system. So prepend your cover letter to your CV document to make sure the hiring manager gets it too.

The dreaded soft skills part

It's a common issue for people applying for technical positions, forgetting that their awesome technical skills are not all that matters. For me it's only about a third of what I'm looking at in a resume, and especially during interviews. And it's the easy part, as most answers are verifiable and it's playing to your strengths. But there are four more questions that I need to see an answer to, and your CV should start giving those answers

  • Can I work with you?
  • Can my team work with you?
  • Can the company work with you and for you?
  • Do you understand out business?

The first three are all about your personality. How driven are you? Are you a creative or process-oriented person? What's your communication style? Do you lead or follow? All in all these questions can be summed up as "Do you fit the company and does the company fit you?". Your technical skills may be excellent, but if your personality would not fit with the rest of the team, you would not be happy at this job.

The last question I find really important and most candidates utterly fail to prepare for this. The company does not revolve around you or the position you are applying for. Do you understand how our industry works? Show it on your CV! Can you translate your contributions to improvements for customers? Make sure I know that!

It depends

I said before that there are no hard rules for the CV. So questions such as "Should I add a photo?" "Should I list hobbies?" or "How about wife & kids?" don't have an answer other than "It depends". Do they add anything to your CV? Does it tell the hiring manager more about who you are or are you wasting his time with useless trivia?

One pet peeve of mine is people who add the text "Curriculum Vitae" to their CV. Yes, I know it's one and you just look like a prick spelling out a word you had to google in the first place. Why not put something useful there, such as a one line summary of you? Instead of "Curriculum Vitae of I.M. Weasel", why not say "I.M. Weasel - Actor, Deep sea diver and Astronaut".


  • Research the company whose job opening you are responding to
  • Sell yourself! Make sure your future employer knows how awesome you are
  • Customize your CV per job, emphasize the things that are most relevant for the job
  • Know your CV and prepare to answer questions about all parts of it

Friday, February 1, 2013

What's wrong with this postgreSQL

Recently I've stumbled upon a little problem with postgresql. I was working on a simple qt utility that would check if data is being continuously entered in one of the databases. So I set up a max time query and see if everything is fine.
For normal scenarios the application worked fine. Then I started testing it for fail cases and there I observed a peculiar case. I truncated the respective table and wanted to see if my app would raise any exception or handle the situation. Funnily though I found out that my app was fetching data from a database that was seemingly empty.
I was genuinely puzzled. I had truncated the table. Then I ran VACUUM on the table just to be sure.
But the result was same. I restarted the server and tried the same situation. But result the same. Then I modified the database connection in the app and used my PC's IP 192.168.blah.blah. And I reran the app. Funnily enough the app stopped showing the ghost data and things worked out. I wondered what the hell.
Later I was testing this in live environment - this being small utility and all. There though the PC's actual IP didn't work and I had to use
So I knew something is screwed up at my end. So I start pgadmin III and try to connect to and it connects and it even shows me the ghost data. Gods!
I wonder and dig up the net trying to find out what the hell is wrong with my code. Or my postgreSQL server.
I'm still wondering...