Wednesday, November 23, 2005

How to be a Programmer...

Yesterday I wrote about a “fake” interview with Bjarne Stroustrup.  Today, I’m writing about a real article - How to be a Programmer: A Short, Comprehensive, and Personal Summary by Robert L. Read.  Even though it says “a Programmer”, it really means “software developer” I think.  

This is an excellent paper, many people in our industry would benefit from reading it.

There are too many really good sections in this paper, so I’ll just pick a few that really struck a chord with me.

Learn to Debug - What great advice.  This is something I am personally pretty good at (very good at if I don’t say so).  I laughed when he said “Debugging is fun, because it begins with a mystery.”.  How true.  “Debugging requires creativity and ingenuity” how very very true!

How to Fix Performance Problems – “The key to improving the performance of a very complicated system is to analyze it well enough to find the bottlenecks, or places where most of the resources are consumed.”.  I think he has read Optimizing Oracle Performance (or maybe it was the other way around).  This quote sounds funny at first “Often, the bottlenecks in performance will be an example of counting cows by counting legs and dividing by four, instead of counting heads.”  But it was really insightful – given the surrounding paragraphs.  Find that quote and read the next paragraph about what to do when you run out of low hanging fruit.  In my “Is Tuning Dead” talk – this is what I talk about.  The software is getting really good at fixing low hanging fruit, there is none left for us many times.  Read states “What do you do when you start to run out of low-hanging fruit? Well, you can reach higher, or chop the tree down”.  Sometimes the tree needs to be chopped down – I call it “look to your algorithm – you want to go faster – you’ll need to take a serious look at that”.

How to Deal with Intermittent Bugs – “The intermittent bug is a cousin of the 50-foot-invisible-scorpion-from-outer-space kind of bug.”.  Good examples in there, something I spend lots of time investigating myself.

How to Conduct Experiments – Indeed!  Read that list in the paper.  “First, try to be very clear about your hypothesis, or the assertion that you are trying to test. It also helps to write the hypothesis down, especially if you find yourself confused or are working with others.

How to Stress Test – can anyone say “test to destruction”.

How to Balance Brevity and Abstraction -  “There is a certain dogma associated with useful techniques such as information hiding and object oriented programming that are sometimes taken too far.”.  Strange, I feel the same way about “generic data models” and their ilk. And then he closed with “It is relatively easy and certainly a good idea to confine non-portable code to designated areas, such as a class that makes database queries that are specific to a given DBMS.”  Yeah, “specific to a given DBMS”, that sounds so nice.

How to Tell the Hard From the Impossible – say no more.

Anyway, read the paper – you’ll either a) enjoy it because you learned it the hard way or b) appreciate it having the information/advice given to you because you are in the process of learning it.


Anonymous Mahesh Rajendran said....

This is a nice one too.

Wed Nov 23, 08:39:00 AM EST  

Blogger Thomas Kyte said....

Mahesh Rajendran said...

thanks - that was a good one. I really liked the google vs yahoo comparision. I totally agree with that - in fact I wrote about the two myself about the same time...

Wed Nov 23, 08:55:00 AM EST  

Anonymous Anonymous said....

What database does Google use?

Wed Nov 23, 10:12:00 AM EST  

Blogger Thomas Kyte said....

What database does Google use?

probably all of them - but for their "index", I suspect "home grown"

Wed Nov 23, 10:14:00 AM EST  

Blogger Danny R said....

Thanks for recommending this, i've just read through it and found it very useful.

Where do you find all this good stuff you recommend? Can you recommend any good sites for staying up to date with the latest developments in Oracle?

Danny R

My Blog

Wed Nov 23, 01:25:00 PM EST  

Anonymous Bob B said....

Its a browser plugin (works in IE and Firefox and maybe others) that allows you to "stumble" upon sites deemed interesting by the stumbleupon user base.

You can filter the types of sites you see by a rather large list of interests and you can add new sites to the list by recommending them through the UI. There are 2 buttons to rate sites (thumbs up/thumbs down) as you view them and add/view comments about the site. Its a great way to pass the time.

In fact, I stumbled upon the previously mentioned article myself a couple months ago.

Wed Nov 23, 02:28:00 PM EST  

Anonymous Anonymous said....

This is unrelated to the blog, but I thought I would get a good answer over here.

Do any of you have good suggestions for a good performance Tuning class for an intermediate level DBA?

Is it better to attend the HotSos conference or to take a course(oracle optimization). If I attend Hotsos conference I will be able to attend Jonathan's class, but I am afraid most of the sessions might be over my head.

Wed Nov 23, 03:10:00 PM EST  

Blogger Thomas Kyte said....

stumbleupon indeed does rock - that is exactly how I found it too.

great for those really important "meetings", good for really long conference calls too ;)

Wed Nov 23, 03:29:00 PM EST  

Blogger Thomas Kyte said....

Do any of you have good suggestions for a good performance Tuning class for an intermediate level DBA?

Having not really audited the available courses, I cannot really compare them.

I can say however, that the hotsos symposium appeals to a broad range of capabilities. My sessions are always for "all comers" as are many of them. And the networking during the conference along is worth something.

Wed Nov 23, 03:31:00 PM EST  

Anonymous Bob B said....

One thing I've found helpful for tuning is to challenge yourself to do as much as you can in one sql statement. You don't have to use that sql statement in your actual code, just figure out how to do it in one sql statement. Often you'll find that its not only doable, but faster and more maintainable than hand-written code.

As a further challenge, try to get the information with only one reference to each table. This is especially true when views are used to hide complex queries and then these views are joined together - resulting redundant uses of the same information.

Wed Nov 23, 04:01:00 PM EST  

Blogger Alberto Dell'Era said....

When I was young and naive, I refused an offer from a company because they wanted me to program in Pascal and I wanted OOP - and that company is now building the next generation "Marine One" chopper ...

Thinking about that, I wonder whether most companies choose the latest greatest language just to attract the young, naive but perhaps high-potential people, even if they "know" that the latest greatest language (or technology) is not the most appropriate. In general, whether even the technology market follows (is forced to follow) the same rules of fashion markets nowadays..

Wed Nov 23, 04:03:00 PM EST  

Anonymous Anonymous said....

Hi, Alberto.
Nice idea of yours. However in every company I worked all new software must be developed for yesterday so I'm not sure.
Anyway, I would love to work in a company that so machiavellian plans its future.

Wed Nov 23, 04:13:00 PM EST  

Blogger Shuchi said....

I particularly liked the section How to Evaluate Interviewees in the article.

"you should also evaluate their ability to learn, which is far more important than what they know"


"how well people communicate and work with people is more important than being up on the latest programming language"

It happens so often that a candidate is not considered for employment because she hasn't worked in a particular domain for a certain duration.

Expertise is not always proportional to years of experience. Such prerequisites/decisions are extremely short-sighted.

Wed Nov 23, 11:10:00 PM EST  

Anonymous Mr. Ed said....

The paper really butchered the counting legs joke.

Thu Nov 24, 12:47:00 AM EST  

Anonymous Anonymous said....

looks like google uses mysql for mission critical systems.

Thu Nov 24, 09:24:00 AM EST  

Anonymous H. Ananthalakshmi said....

Hi Tom,

I just read your who_am_i procedure which basically parses dbms_utility.format_call_stack output and prints the caller name.

I have a followup on your following answer in

'hi tom,
If I try to get the caller's name, and it's a procedure inside a package, what I
get is the package name. The procedure name is not in the call stack. What can I
do to figure out this name? Thank you.

you cannot.

the procedure name might not be "known" (not in the spec)
the procedure name might not be "unique" (you can have 50 procedure "p's")

you get the object (package name), the caller type, the line number in the
object of that type..'

Is it not possible to get the procedure name by the Id when it is being invoked internally by PL/SQL engine and can't the procedure name be returned by format_call_stack built-in with the procedure_id in the same callstack?

Please advise.


Thu Dec 08, 07:15:00 AM EST  


<< Home