Archive for October, 2011

How to deal with busybodies at work

October 17, 2011

They’re young or old, male or female. Every workplace has them. They’re the busybodies who want to tell you how to live.

  • “I can’t believe you’re using an iPhone.”
  • “Are you and Kathy going to get married some time?”
  • “Another diet Coke? That aspartame is no good for you.”
  • “You’re going out without a coat?”
  • “You’re eating THAT?”
  • “Your kids shouldn’t be watching that much TV.”
  • “Why wouldn’t you drive an American car?”
  • “Have you thought about exercising?”

The busybodies at work can find anything to discuss and let you know what we should be doing differently. They tell us that we should be doing things their way. The right way.

As geeks, we are good at discussing the merits of an argument. We think we can explain our point of view and the other person will leave us alone, having seen the logic of our answers. We might think that explaining “I’m well-versed in vi, I have a large ~/.vim directory of plugins, and it fits my work style” will leave the emacs fan satisfied that we’ve made the right choice for us.

But it doesn’t work that way. The busybody comes back with an answer that takes ours into account, but still tells us we’re wrong. “Sure, but emacs probably also has all those plugins, and it can also…” For every argument we make, the busybody has a counter-argument.

It’s an interesting game, but the only way to win is not to play.

The way I don’t play this game is with a simple, non-judgmental response of “Thanks, but I don’t care to discuss that.” It doesn’t give the busybody any foothold to argue further. If he comes back and says “Oh, I know, but don’t you think you’d feel a lot better if you just smoked less?” I can reply, unchanged, with “Thanks, but I don’t care to discuss that.” If he still comes back, I can say “Thanks, but I don’t care to discuss that. I need to get back to work now.”

I’ve also found that providing justifications for our choices in life has a negative effect. Explaining our actions to others who have no business in our lives tells the busybody that he is right to be meddling in our lives. This is the wrong message to send, as no justification is necessary. It only encourages him in the future.

If you’re old enough to have a job, you’re old enough to make decisions about your life by yourself.

I don’t begrudge the nosy their motivations. I like to assume that they’re only looking out for what they imagine are my best interests. It doesn’t make their comments any less rude, but it does make it easier for me to not feel insulted by them.

On technical issues, I have to give the busybodies a little leeway, but not much. If a co-worker wants to turn me on to a new tool or technique, then that’s certainly OK. What’s not OK is badgering me about it after I’ve made my choice. I typically will say something like “I see that there are merits to using zsh over bash, but I prefer bash. If you think that zsh should be mandated in the department, why don’t you take it up with Dave and we’ll see if we should set shell choice as a standard.” That often gets the busybody to back off because he doesn’t want to risk losing his own freedom to choose.

Advertisements

Jobs vs. Ritchie

October 16, 2011

Tired of hearing that “Steve Jobs was just a marketer, Dennis Ritchie was a real programmer.” Both men were necessary to our industry’s growth. It’s not a competition.

The difference in media coverage of each was more about the visibility of each man, not a reflection of their relative importance.

Dennis Ritchie, pioneer of programming, has died

October 13, 2011

Dennis Ritchie, pioneer of programming, creator of the C programming language and one of the creators of UNIX, has died.

Tim Bray said it best: “It is impossible — absolutely impossible — to overstate the debt my profession owes to Dennis Ritchie. I’ve been living in a world he helped invent for over thirty years.”  If you’ve written a program on any computer in any language since the mid-1970s, you’ve been influenced by the man’s work.

In his honor, the choir will now sing one of my favorite programming songs, “Write in C”.

When I find my code in tons of trouble,
Friends and colleagues come to me,
Speaking words of wisdom:
“Write in C.”

And as the deadline fast approaches,
And bugs are all that I can see,
Somewhere someone whispers:
“Write in C.”

Write in C, write in C,
Write in C, yeah, write in C.
Don’t even think of COBOL
Write in C.

If you’ve just spent 30 hours
Debugging some assembly,
Soon you will be glad to
Write in C.

I used to write a lot of FORTRAN,
For science it worked flawlessly.
Try using it for graphics!
Write in C.

Write in C, write in C,
Write in C, oh, write in C.
BASIC’s not the answer,
Write in C.

Now, let’s move forward with our lives, and remember to always place the opening brace of a block on the same line as the control statement, as he would have wanted it.

Which of my PostgreSQL indexes are getting used most heavily?

October 10, 2011

Ever since we got the fast new database server with SSDs, I’ve been monitoring which tables are getting heavy traffic and should go live on the SSDs. We have two tablespaces, “fast” which is faster but smaller, and “slow” which is bigger but slower. I’ve been using this query to determine which indexes should live in which tablespace. There are different forms of this query around the web, but I needed to see the tablespaces, too.

SELECT
    i.idx_scan,
    i.idx_tup_read,
    i.idx_tup_fetch,
    i.indexrelname AS index,
    it.spcname AS index_tablespace,
    i.relname AS table,
    tt.spcname AS table_tablespace,
    pg_size_pretty(pg_relation_size(i.indexrelname::text)) as index_size
FROM pg_stat_all_indexes i
    INNER JOIN pg_class ic ON (i.indexrelid = ic.oid)
    LEFT OUTER JOIN pg_tablespace it ON (ic.reltablespace = it.oid)
    INNER JOIN pg_class tc ON (i.relid = tc.oid)
    LEFT OUTER JOIN pg_tablespace tt ON (tc.reltablespace = tt.oid)
ORDER BY 1 desc, 2 desc, 3 desc

The output looks like this (in x mode because of the width):

-[ RECORD 1 ]----+----------------------------------------------------
idx_scan         | 395974172
idx_tup_read     | 432974893
idx_tup_fetch    | 426070104
index            | testbook_pkey
index_tablespace | fast
table            | testbook
table_tablespace | fast
index_size       | 289 MB
-[ RECORD 2 ]----+----------------------------------------------------
idx_scan         | 133416135
idx_tup_read     | 133441801
idx_tup_fetch    | 133413399
index            | lists_listid_custid
index_tablespace | fast
table            | lists
table_tablespace | fast
index_size       | 7096 kB
-[ RECORD 3 ]----+----------------------------------------------------
idx_scan         | 50310975
idx_tup_read     | 1286116
idx_tup_fetch    | 742639
index            | listdetail_bkkey_listid_where_ctr2_is_zero
index_tablespace | fast
table            | listdetail
table_tablespace | fast
index_size       | 682 MB

I have one case where a heavily-trafficked table is still staying on the slow tablespace. It’s a log of user login history that is only ever appended to, and is searched only a few times a day. SSDs are great at random reads, but not much faster than physical spindles on sequential writes. Therefore, my login history would not benefit much from moving to the SSD tablespace, and I can allocate that precious space to another table or index instead.

You’re not a genius? Says who?

October 10, 2011

Who says you’re not a genius?  Who are any of us to say?  And why would anyone bother telling someone that?

In my last blog post, I talked about how it was unnecessary and counterproductive to justify your projects to your detractors. It only wastes time that could be spent doing something positive, and it’s not going to change anyone’s mind.  One of the commenters took issue with my premise, basing his disagreement on the glib comment “You ain’t Steve Jobs.”

Of course I’m not, but so what? How much of a genius do I have to be before I no longer have to justify myself to others? (Don’t answer that; it only encourages them.)

The unspoken corollary to comments like “You ain’t Steve Jobs” seems to be “Therefore, you must listen to how others want you to be.” Fortunately, even in the absence of a Jobs-level genius, we’re all able to stand on our own, to live and work as we see fit, without having to take mandatory guidance from others.

I wonder at the thought process that it takes to tell someone “You’re not as _____ as you think you are.”  Near as I can figure, comments like these have one or more of these subtexts:

  • “You need to be more like me.”
  • “I’m trying to save you wasting time or risking failure.”
  • “I have taken it upon myself to take you down a peg and put you in your place.”  (This one often appears with the phrase “I’m just saying…”)

Fortunately, none of these are valid, none of them need concern you.  You can, and should, ignore them.  Ignore them for your own sake, and for the sake of the awesome things you have in you to share with the world.

I wonder how many Jobs-level brains are out there but never flower because the person was told too many times that he (or more likely, she) isn’t as good as he thinks he is. Neil deGrasse Tyson makes a brilliant point about how we teach children, that parents spend the first years of a child’s life teaching him to walk and talk, and the rest of his life telling him to shut up and sit down, quashing their sense of wonder and thirst for knowledge. “You ain’t Steve Jobs” is the adult version of “shut up and sit down.”

Whatever your level of genius, one thing we can all share with Steve is his perseverance.  He kept working at what he believed in, despite public derision about his public failures.  Before the success of the Macintosh, Apple released the Lisa, and before the iPad, the Newton. How much poorer the world would be if Jobs had listened to his critics and packed it in!

I’m not saying that there isn’t value to be found in criticism, even unsolicited criticism, about your work.  I’m not suggesting that you shut out the world around you.  If you can take what you find useful and leave the rest, then do it.

I am suggesting that you shut out those who tell you you’re no good, or who want to put you in your place. When people tell you you’re not awesome, ignore them.  Who are they to say?  And why does it matter if they think you’re awesome or not?  Eventually, you’ll prove them wrong.

 

There’s only one useful way to handle your detractors

October 6, 2011

Here’s a Reddit/Slashdot/whatever thread that never happened:

Internet crank on Reddit: “Hey, Steve Jobs, I guess that new iPad looks cool, but I think iPad is a stupid name, it makes me think of sanitary napkins.”

Steve: “Yeah, well, here’s why we called it that. (Long explanation justifying his choices)”

Crank #2: “Well, why didn’t you call it the iTablet? I think that would have been a good name. What does everyone else think?”

Crank #3: “What does it have to be iAnything? I’m tired of the i- prefix.”

Steve: “We thought about that, but … (More explanation about his choices)”

Crank #1: “And really, isn’t it just a bigger iPod Touch? I would never carry that around with me. And come on, you’re just trying to redo the Newton anyway LOL”

Steve: “My logic behind the iPad is (vision, business plan, blah blah blah)”

Can you even  imagine Steve Jobs in this sort of time-wasting and emotionally draining tit-for-tat in a thread on Slashdot? On reddit? In some blog’s comment section? Of course not. Justification of his plans would take away from the amazing things that he needed to achieve.

Naysayers are part of every project. How many people do you think pissed on Jimmy Wales’ little project to aggregate knowledge? Nobody’s going to spend their time writing encyclopedia entries! And yet there it is.  On a personal level, if I listened to everyone who thought I was wasting my time improving on find + grep you’d never have ack.

We all have to persevere in the face of adversity to ideas, but there’s more than that.  We need to ignore our detractors. Despite how silly and time-wasting it is to argue your motivations and reasons for undertaking a project, many of us feel compelled to argue with everyone who disagrees with us.  I suggest you not waste your time.

On the Internet, the attitude is “Why wasn’t I consulted?” Every anti-social child (measured by calendar or maturity) with a keyboard thinks it’s his responsibility to piss on everything he doesn’t like. They’ll be there always. You can no more make them go away than you would by arguing with the rain.

What are you hoping to achieve by arguing with someone who doesn’t like your project? Do you expect that he’ll come around to your way of thinking? It won’t happen through words.

Not only does arguing with your critics waste your precious time, but it tells them, and every other crank reading, that you’re willing to engage in debate about what you’re doing. Don’t encourage them! Let them find a more receptive target.

I’m not saying that factual misstatements need to be ignored.  If something is provably incorrect, go ahead and counter it with facts.  However, most of the time these message thread pissing wars get down to “I would not be doing what you are doing, and therefore you are wrong for doing so.”

The only thing that has a chance of silencing your critics is success at what you do. Arguing with the naysayers doesn’t get you any closer to that.

“The only way to do great work is to love what you do.”

October 6, 2011

As most everyone who knows me knows, I wrote a book called Land the Tech Job You Love. The word “love” is in the title very specifically. As I discussed with my editors at Pragmatic what we’d title the book, the one point on which I was adamant was that “love” had to be in the title. I didn’t want you to find a job you liked, or tolerated, but one that you loved. I wanted “job you love” to be a constant reminder to the reader.

Every so often, either in person or in an online forum, someone will make a snarky comment along the lines of “Work sucks, work is supposed to suck, why fool yourself into thinking that you’ll ever enjoy going to work in the morning?” I always answer yes, I do believe that it’s possible to get a job you love, and if you’re not in one now, then you can find the next one that you do love, or you can work to make your current job into one you love.

And if you don’t believe me, perhaps you’ll believe our dearly departed Steve Jobs, from his
commencement address to Stanford in 2005:

You’ve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.

If you haven’t found it yet, keep looking. And don’t settle. As with all matters of the heart, you’ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking. Don’t settle.

The other drum that I keep beating is “Life is too short to spend in a crappy job.” Steve agrees.

For the past 33 years, I have looked in the mirror every morning and asked myself: “If today were the last day of my life, would I want to do what I am about to do today?” And whenever the answer has been “No” for too many days in a row, I know I need to change something.

Please, if you’re in a job you don’t like, change it. Change the job, or change jobs. If you’re stuck in the job because of the crappy job market, then at least make a little change in that direction. Start a side project that scratches an itch. Release it to the world. Do something awesome and spread it around.

As Steve said, quoted here: “Being the richest man in the cemetery doesn’t matter to me. Going to bed at night saying we’ve done something wonderful… that’s what matters to me.”

Thanks for everything, Steve.

Where to find me online

October 4, 2011

Although I mostly write to my blog and my Twitter feed, here’s a dump of most of my online presences.

petdance.com
My blog is where I post about technology and job hunting and careers.
@petdance on Twitter
My main outlet for posting short thoughts and links to interesting stuff. (I try not to engage in conversation on Twitter, because I think it’s annoying for everyone but the two people involved in the conversation.) If you were following @theworkinggeek or @techworklove on Twitter, switch to @petdance.
Perlbuzz
Perl news and the occasional original article. Most of the blog traffic is a weekly recap of the news bits posted to the @perlbuzz Twitter feed.
Facebook
I’ve whittled down my Facebook friend roster to mostly friends and family and people I know in day-to-day life. I’ve found that I’m not interested in the day-to-day lives of people I only know from the world of open source. Therefore, most of the friend requests I get from people I only know online get ignored.
Google+
I’m not sure how I’m going to wind up using Google+. Mostly I’ve been posting longer-form blurbs or embedding media.
Slideshare and Speakerdeck
I’ve always been posting slides of my talks on Slideshare, but Speakerdeck has just popped up and I like their interface much more, so I’ve put some content there, too. Look for Speakerdeck to gain more traction in the programming community.
LinkedIn
I have yet to have anything useful come out of LinkedIn, but I maintain a network there as well. My rule for adding someone as a contact on LinkedIn is that it has to be someone with whom I’ve actually worked on a project.
Github
Github is where I host most of my open source projects. Love love love.
Flickr and twitpic
I’m not at all a photographer, but there you go.

Did I forget one? Leave me a comment.