Friday, May 27, 2011

Bill Gates on What Makes a Good Software Manager

source: http://www.worklifecoach.com/bill_gates.pdf


From the New York Times: What Makes a Good Manager (10/8/97) By BILL GATES.

RECENTLY I wrote about 10 qualities of a good employee, which prompted quite a few people to ask about the attributes of a good manager.

There isn't a magic formula for good management, of course, but if you're a manager, perhaps these tips will help you be more effective:

1 Choose a field thoughtfully. Make it one you enjoy. It's hard to be productive without enthusiasm. This is true whether you're a manager or employee.

2 Hire carefully and be willing to fire. You need a strong team, because a mediocre team gives mediocre results, no matter how well managed it is. One mistake is holding on to somebody who doesn't measure up. It's easy to keep this person on the job because he's not terrible at what he does. But a good manager will replace him or move him to where he can succeed unambiguously.

3 Create a productive environment. This is a particular challenge because it requires different approaches depending on the context. Sometimes you maximise productivity by giving everybody his or her own office. Sometimes you achieve it by moving everybody into open space. Sometimes you use financial incentives to stimulate productivity. A combination of approaches is usually required. One element that almost always increases productivity is providing an information system that empowers employees. When I was building Microsoft, I set out to create an environment where software developers could thrive. I wanted a company where engineers liked to work. I wanted to create a culture that encouraged them to work together, share ideas and remain motivated. If I hadn't been a software engineer myself, there's no way I could have achieved my goal.

4 Define success. Make it clear to your employees what constitutes success and how they should measure their achievements. Goals must be realistic. Project schedules, for example, must be set by the people who do the work. People will accept a "bottoms-up" deadline they helped set, but they'll be cynical about a schedule imposed from the top that doesn't map to reality. Unachievable goals undermine an organisation. At my company, in addition to regular team meetings and one-on-one sessions between managers and employees, we use mass gatherings periodically and E-mail routinely to communicate what we expect from employees. If a reviewer or customer chooses another company's product , we analyse the situation. We say to our people, "The next time around we've got to win. What's needed?" The answers to these questions help us define success.

5 To be a good manager, you have to like people and be good at communicating. This is hard to fake. If you don't enjoy interacting with people, it'll be hard to manage them well. You must have a wide range of personal contacts within your organisation. You need relationships - not necessarily personal friendships - with a fair number of people, including your own employees. You must encourage these people to tell you what's going on and give you feedback about what people are thinking about the company and your role in it;

6 Develop your people to do their jobs better than you can. Transfer your skills to them. This is an exciting goal, but it can be threatening to a manager who worries that he's training his replacement. If you're concerned, ask your boss: "If I develop somebody who can do my job super well, does the company have some other challenge for me or not?" Many smart managers like to see their employees increase their responsibilities because it frees the managers to tackle new or undone tasks. There's no shortage of jobs for good managers. The world has an infinite amount of work to be done.

7 Build morale. Make it clear there's plenty of goodwill to go around and that it's not just you or some hotshot manager who's going to look good if things go well. Give people a sense of the importance of what they're working on - its importance to the company, its importance to customers.

8 Take on projects yourself. You need to do more than communicate. The last thing people want is a boss who just doles out stuff. From time to time, prove you can be hands-on by taking on one of the less attractive tasks and using it as an example of how your employees should meet challenges.

9 Don't make the same decision twice. Spend the time and thought to make a solid decision the first time so that you don't revisit the issue unnecessarily. If you're too willing to reopen issues, it interferes not only with your execution but also with your motivation to make a decision in the first place. People hate indecisive leadership; However, that doesn't mean you have to decide everything the moment it comes to your attention. Nor that you can't ever reconsider a decision.

10 Let people know whom to please. Maybe it's you, maybe it's your boss, and maybe it's somebody who works for you. You're in trouble and risking paralysis in your organisation when employees start saying to themselves: "Am I supposed to be making this person happy or this other person happy? They seem to have different priorities.

"I don't pretend that these are the only 10 approaches a manager should keep in mind. There are lots of others. Just a month ago I encouraged leaders to demand bad news before good news from their employees. But these 10 ideas may help you manage well, and I hope they do."

-- Bill Gates

Thursday, January 6, 2011

Friday, December 31, 2010

groovy: get your classpath right!

Here’s some basic, basic groovy code with a simple SQL query to retrieve some data from an oracle DB:
import groovy.sql.Sql
def sql = Sql.newInstance("jdbc:oracle:thin:@hostname:1521:testdb", "user", "pass", "oracle.jdbc.driver.OracleDriver")

def query = "select * from tablename where name='Beta 1'"

row = sql.firstRow(query)

println row

However, despite various attempts, I couldn’t even establish a DB connection because of this annoyingly persistent exception:
Caught: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
        at sql1.run(sql1.groovy:13)

So of course, I immediately googled the rather-descriptive error message, and quickly learnt that Groovy didn't know where to find the oracle jdbc driver. With a few more searches, I discovered that the missing driver was located inside a jar that was called something like “ojdbc14.jar” or something.

I found where the jar was on my file system:
”C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0” contained ojdbc14-10.2.0.1.0.jar that seemed like a good candidate for the jar containing the required oracle jdbc driver. Seemed like I’m making progress, good.

Now how could I tell Groovy/Java to search this path? I figured that I had to include the jar’s file-system path into my Java CLASSPATH, so that groovy would know where to find missing classes.

Okay, so I added “C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0” to my CLASSPATH environment variable, but that didn’t seem to work.

Still no good :-(

Hmmm, “groovy –h” indicates that I can specify a classpath on the command line with the –cp or –classpath parameters. So let’s try that:
$ groovy -classpath C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0  sql1.groovy
Caught: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at sql1.run(sql1.groovy:2)

Dammit work already! :P

I realized that I must be missing something very basic. It had to be a total n00b Java/Groovy problem. C’mon it can’t really be so hard to specify a path can it?!?

So I started googling about setting the java CLASSPATH correctly and then I stumbled on why it wasn’t’ working for me:


JARs on the classpath
Java compiler and run-time can search for classes not only in separate files, but also in `JAR' archives. A JAR file can maintain its own directory structure, and Java follows exactly the same rules as for searching in ordinary directories. Specifically, `directory name = package name'. Because a JAR is itself a directory, to include a JAR file in the class search path, the path must reference the JAR itself, not the directory that contains the JAR. This is a very common error.

Suppose I have a JAR jarclasses.jar in directory /jarclasses. The Java compiler look for classes in this jar, we need to specify:

javac -classpath /jarclasses/jarclasses.jar
and not merely the directory jarclasses.

Thank you, http://www.roseindia.net/java/java-classpath.shtml, for saving me from a lot of frustration!
Voila! Finally it works!
$ groovy -classpath C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0\ojdbc14-10.2.0.1.0.jar sql1.groovy
[NAME:Summary, PATH:Snapshot, MAPPINGKEY:26, VERSION:v9]

It’s even easier with the CLASSPATH environment variable set correctly like this:
CLASSPATH=C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0\ojdbc14-10.2.0.1.0.jar;

Now I don’t even have to type the –classpath parameter out on the command line each time:
$ set | findstr CLASSPATH
CLASSPATH=C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0\ojdbc14-10.2.0.1.0.jar;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;.

$ groovy sql1.groovy
[NAME:Summary, PATH:Snapshot, MAPPINGKEY:26, VERSION:v9]

Tuesday, December 28, 2010

windows: setting environment variables from the command line

The standard route is rather slow and painful, even on Win7:
“MyComputer | Properties | Advanced System Settings | Environment Variables”… that’s a lot of clicks just to get to the point where you can add/edit an environment variable.

Thankfully, there’s a much easier alternative via the command line.

But first, did you know where the environment variables are stored on the file system? Until now I thought they were in some system config file, but it turns out they're actually stored in the registry itself (which technically is a system config file).
  • The logged-in user’s env variables go here:
    HKEY_CURRENT_USER\Environment
  • The machine-wide env variables go here:
    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
The setx utility lets you change env variables for either the user or machine. The good old set command let’s you add/edit env variables too, but there are a few major differences from setx:
  • setx will permanently change the value of an env variable. The changes made by set last only for the current session.
  • Changes made by setx are not immediately visible – that is, they are not available to the current session. However, set’s changes are immediately visible.
  • You can’t delete env variables with setx, like you can with set. For example:
    set someVar=
    will delete the environment variable ‘someVar’ for the current session, but you can’t do something like this with setx.

    Instead, you have to use the “reg” utility to delete environment variables (that may or may not have been created with setx):
    REG delete HKCU\Environment /V someVar
Okay, so do you create a permanent environment variable via setx? It’s pretty straightforward:
  • To set an env variable for the current user:
    SETX <Variable> <Value>
  • To set an env variable for the machine (i.e. globally):
    SETX <Variable> <Value> -m
Example:
setx  CLASSPATH  C:\Users\ambars\.m2\repository\com\oracle\ojdbc14\10.2.0.1.0\ojdbc14-10.2.0.1.0.jar;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;.

source: http://ss64.com/nt/setx.html

Wednesday, November 24, 2010

performance appraisals: the critical incident method

What Is The Critical Incident Method of Performance Appraisal?

The critical incident method of performance appraisal involved identifying and describing specific events (or incidents) where the employee did something really well or something that needs improvement. It's a technique based on the description of the event, and does not rely on the assignment of ratings or rankings, although it is occasionally coupled with a ratings type system.

The use of critical incidents is more demanding of the manager since it requires more than ticking off things on a form -- the manager must actually write things out. On the other hand critical incidents can be exceedingly useful in helping employees improve since the information in them is more detailed and specific than in methods that involve rating employees.

Some managers encourage employees to record their own critical incidents (where the employee excelled, situations that did not go well). That's an interesting variation that places more responsibility with the employee, and also does not require the manager to have been present when the incident occurred.

Generally, it's important that incidents be recorded AS THEY OCCUR, and not written at or around the annual performance review. Delaying the recording of critical incident reports (either good incidents or not so good) means a loss of detail and accuracy.

 

source

Tuesday, November 2, 2010

coming soon! the awesome galaxy tab!

a thing of beauty...
The iPad seems to be taking forever to arrive on Indian shores. The so-called "Global iPad Launch" (that happened in May 2010) left out India egregiously and Apple fanboys here have been waiting ever since. Nearly 6 months on, there isn't so much as an iPad launch date on the Apple India website. So India doesn't seem to figure much in Apple's plans.

Which is GREAT as far as Desi Droidheads are concerned :)

Samsung has always given India a high priority, and the launch of the awesome Android2.2-powered Galaxy Tab is no exception. According to Samsung Mobile India, the Galaxy Tab is launching on Friday, 10th November - almost a week from now!

The make-or-break metric for a country like India is price, and this too seems to be in the favor of the Galaxy Tab. It's priced at Rs 38,000. This isn't exactly cheap, but it's not exorbitant either.

the Layar reality browser in action
The iPad 64GB (with WiFi and 3G) version costs $829 in the US (which roughly translates to Rs 37,000), so it will definitely retail for more than 40k, if-and-when it gets here. In fact, a quick ebay.in search reveals that the iPad 64GB (+WiFi +3G) is available in India  (US purchases being re-sold here, presumably) for around Rs. 50,000. The better price point for the Galaxy Tab, coupled with its early launch should well entrench Samsung on Indian soil to take on the iPad (assuming it even gets here :)

Check out this nice side-by-side comparison of the two tablets by PCWorld. And here's a beautiful tech spec comparison that might help you decide which is better for you.

In my mind, the Galaxy Tab is a clear winner thanks to its:
  • higher pixel density
  • front-and-rear cameras
    (hence video-calling, videoconferencing ability, which the iPad sorely lacks)
  • expandable microSD storage
  • smaller, lighter frame
    (hence a more comfortable form-factor)
  • better price point

Way to go, Samsung!

(Galaxy Tab pictures courtesy of Samsung)

Monday, November 1, 2010

android: already leaving iphone in the dust?

I couldn't be happier for my favorite mobile platform.

According to this news article on the Wall Street Journal, as far as Q3 2010 sales go, Android has finally leapt ahead of all other smartphone platforms.

According to that same article, Mr. Jobs isn't happy and is railing Android over how developers need to release various versions of apps to support the multitude of Android variants in the market. Well, yeah, that is a bit of an issue, but some work around it by just releasing for the very first Android releases: Donut (1.6) or cupcake (1.5). This way you're a bit limited by features, but you're assured of forward-compatibility. Also, I don't think too many developers are really bothered by this issue, at least going by the explosive growth of the Android Market :)

Ever since I got my Eclair (Android 2.1) smartphone a couple of months ago, I've known that this is going to be the future of mobile computing. I bet Samsung's Galaxy Tab (which has generated huge buzz in pre-release) will only consolidate my hopes for the platform.

Woohoo, Android!