Older blog entries for MichaelCrawford (starting at number 166)

Spring is in the Air!

I was incredulous to hear it was the first day of Spring a few days ago. It was still bitterly cold and there were several inches of snow left on the ground.

But today it is sunny and, while not warm, I could go outside comfortably in a sweater.

I don't think I mentioned it here before, but Bonita got me a guitar for Christmas. I had mentioned in the Fall that I'd like to learn an instrument more portable than a piano. I've been working through a beginning guitar book, and can play some simple songs like Yankee Doodle.

So today I sat out on the front porch and practiced my guitar. It was joyous.

With the coming of each winter, I am always entranced to see the first snowfall, but by the end of it I am always very weary and eager to see the Spring.

It's a good day today.

24 Mar 2004 (updated 24 Mar 2004 at 22:28 UTC) »
Recommend a Digital Camera?

My wife wants a digital camera for various reasons. I've put off buying one for quite some time because cameras as fancy as I would like, to prefer them over film cameras, are still very expensive. But my wife has proposed we get an inexpensive one for her use, and I get my fancy one later.

But still I will be using it sometimes. There is one feature I absolutely require in a digital camera, that is surprisingly hard to find - the option to take uncompressed images.

Most cameras offer JPEG file formats, which is a lossy compression. Now suppose you resize a picture in the Gimp or Photoshop, and save as a JPEG again so you can put it on the web - then you've done lossy compression twice and introduced artifacts.

A friend has a camera (an old model now) that offers both JPEG and TIFF formats, and close examination showed that we could find artifacts in the highest quality JPEG setting that were not in the TIFF files.

It can be difficult to shop for cameras when this is a factor, at least when shopping in brick-and-mortar stores. We went to wal-mart yesterday, and they had a handy booklet of data sheets, so one could check the file formats, but only one camera offered RAW format, and they didn't actually have that camera in stock.

We went to Staples today and the file format wasn't listed on the product display. I asked a salesclerk and he said "just a couple of the high-end cameras have it". He seemed a little vague as to which cameras exactly, and recommend that we "could always convert JPEG to TIFF". When someone makes such a statement, I know not to listen to anything else he says.

Is there a website somewhere that lists which cameras offer RAW or TIFF format?

It really seems to me that a camera should not have to be expensive to offer RAW format. Very little extra work would be required in developing the firmware to support RAW. After all, the image starts out uncompressed. I could see how an embedded TIFF encoder could be hard to write, but certainly it won't be as difficult as encoding JPEGs.

Other features we would like are optical zoom, a threaded hole for tripod mounting, and somewhere around three megapixels.

Cameras that have all of the above except for the uncompressed format cost about CAD$300, which my wife seems comfortable spending.

A camera for me that I'm waiting to buy would have lenses you can change, adjustable exposures, including the ability to take long exposures at night, uncompressed format of course, and higher resolution. The Sigma SD9 is my current favorite. It costs around a thousand dollars - I'm not sure if that includes a lens or not. Maybe if work goes real well this year.

Oh yeah - one more thing. My wife hates it when I get involved with the purchase of any sort of consumer electronics. I just about drove her around the bend while shopping for her recent laptop purchase. She is threatening that, if I give her too much trouble over her choice of camera, she'll run out and buy some random one when I'm not looking.

She actually did that when she wanted a new boom box, because I wanted to select one that had quality audio fidelity. She bought one for $69 that sounds like absolute crap but she is very happy with. She finds it hard to understand why I care about shooting uncompressed digital photos, in much the same way that I think she really can't tell the different between good and poor audio quality.

Music

I talk about how my piano lessons are going in my kuro5hin diary.

Work is Going Better Now

I'm doing much better at my work than when I posted What to Do With Myself.

I've been able to focus on the work at hand and do a good job at it. I'm even enjoying what I'm doing. I have a good contract now, and good prospects for more work when I'm done with this job.

I discovered and have worked around a bug in the C++ compiler for Code Composer Studio, TI's IDE for its DSP chips. Depending on what was exactly in a source file, the compiler would either crash while compiling, or it wouldn't report any errors but no object file would be produced.

I seemed to have made it stop happening by changing an inline function to a non-inline, regular function.

During the times I've had when I couldn't concentrate on my work, such a problem would have stopped me cold, but the way things are now, I just kept poking and prodding at it until I found a solution.

I checked the knowledgebase at TI's website, and didn't find any reports of this happening, so it looks like I found a new bug in Code Composer.

I got my copy of the book Flow: the Pyschology of Optimal Experience and have been reading it. It's a good book, and I think I will find it helpful. I'll have more to say about it when I'm done reading it.

The happiest news is that I'm able to experience flow while working on my code. Before it was like trying to push water uphill.

Blizzard

A heavy storm dumped a half meter of snow all over Nova Scotia yesterday. There were widespread power outages. The government declared a state of emergency.

Besides the snow there were 100 km/hour winds. My poor dog Jacob was afraid to go outside when I tried to take him out to relieve himself.

Fortunately today was clear, sunny and calm, actually a very nice day. Bonita and I spent the whole afternoon shoveling the snow away from our driveway. The whole neighborhood did the same, and we finally met the lady next door as she shoveled her driveway too.

We threw the snow we dug up on either side of the driveway, which along with the snow that the plows pushed off the street, blocks the view up and down the street when we back out of the driveway, so we can't see oncoming cars.

I got pretty tired shoveling so much snow, but I can tell that even the short time I've been working out at the gym has helped, as I didn't get as tired as other times this winter I've shovelled off the driveway, when there was less snow.

What To Do With Myself

I've been doing a lot of soul-searching. That's no surprise. You've probably figured out by now that I'm a soul-searching kind of guy.

What do I really want to do for a living? I've been so unhappy. How can I be happy, in particular happy in my work?

I've been struggling with this question for years. I've already written here about my (apparently successful) transition from GUI to embedded development. Well, it solved some problems (I'm able to please my embedded clients in a way I never seemed to be able to please my GUI clients), but I'm still not happy.

I wrote a few months ago about how maybe I really should go back to GUI. I've toyed with the idea of being a professional writer. In my more outrageous fanstasies, even a musician or a composer. From time to time I think of going to graduate school, maybe even going back into physics.

But lately I've been thinking that maybe I can find happiness doing just what I'm doing now.

I was talking to my new psychiatrist last week. We've mostly been talking about my work. He said, "You know, lots of people have crap jobs, but they're able to find happiness in other ways". I told him about my love for the piano, and how I'm taking lessons now. My p-doc thought the piano lessons were a great idea, and strongly encouraged them.

Here's the problem I have: I'm not exactly unhappy with my work. When I'm able to work productively, I actually enjoy it just fine. The problem I have is that I spend so much time not working at all, feeling like I ought to be working, but filled with despair at the prospect of doing so. Many days go by that I don't even crack open my development environment.

Instead, I post to Advogato, Kuro5hin, Slashdot, mailing lists and the Usenet, I write articles, I analyze my web server statistics. I have found all manner of things to do while sitting at my computer which keep me occupied but don't contribute to the bottom line.

What's crazy is that when I can get into my work, I actually really enjoy it, and I'm very productive. When I merely try to work, I find it incredibly boring and frustrating, and the smallest problems completely stymie me.

But when I am in the groove, I am unstoppable. It's not that the code gets easier, or that I have no problems, but that I have no problem making the needed effort. Whereas I would otherwise throw up my hands and say "I can't do this", instead I say, "Well that didn't work, I'll try this instead". I'm able to get by at all because I'm so productive on the days when I can be productive at all.

What is ironic is that, when I am able to work, I am a far better programmer than I was back in the old days when I was a far more productive, but far less skilled programmer. I wasn't so good, say, ten years ago, but I really did enjoy it. For most things, it doesn't matter if there's a few bugs, if you're able to ship the product on time. Now my code is far more reliable, performant and maintainable than it ever used to be - but it is always late, and I spend most of my time at my computer in a state of hopeless despair.

I tell Bonita that I do all these other things because they're contributing to my community, socially useful, or just because I enjoy them, but you know, I really don't enjoy the experience that much. In the end I just feel tired and guilty.

But day before yesterday I spent the morning saying to myself, I want to get this one thing working in my code. I'm just going to focus on this one thing. When I went to my office, I did some of my busywork, like checking my mail, but soon set into productive work. And worked late into the night. I enjoyed it, I really did.

I didn't figure out the problem with my code, but somehow that didn't matter much, I knew I would eventually. What mattered is I spent an evening feeling good about what I was doing, able to focus completely on the work which I do to provide for myself.

What was different? Why were things so different two days ago than on so many other days? (Yesterday I took the day off because I have a bad cold, and expect to take the rest of today off too.) Over the years I've developed all kinds of little strategies to help me get started at my work, only to find that none of them really help when I'm faced with such despair.

The only difference I can find is that I just decided I was going to focus effectively on my work. Everything else followed from that.

That's when I started thinking maybe I'm doing the right thing for myself after all. I've contemplated so many ways to go chasing after happiness - but as Buckaroo Bonzai said, "Wherever you go to run away from your troubles, there you are." Maybe I can find happiness right where I am.

There are many advantages to programming, even being a software consultant. I can't pretend that any of the alternatives I imagine would earn as much money. As a consultant, working out of my home, I can live anywhere I want, and have been living in the most out-of-the-way places since I've been consulting.

I truly love to write, but I have doubts that I would still love it if it were the way I was making my living. I also write very obsessively - it would be very hard for me to write in any kind of balanced, measured way. I fear that if I were to ever write a book I would either starve to death or die of exhaustion.

I have had a plan, throughout the entire economic downturn, that I had been on the verge of abandoning now that things seem to be getting better. My plan was that I would do whatever it took to get by somehow, to provide for myself and for Bonita, even if I didn't like my work - but I would get by by writing code.

I felt that if I could just keep body and soul together for a few years, and (importantly) keep my skills current, then when the recovery inevitably happened, I would be in a very good position to do very well for myself. I could steadily raise my consulting rates, and get enough work not just to get by, but to pay off my debts, and save up money so that if the economy collapsed again I would be prepared, and never have to suffer again what I have these last few years.

But the last few months, since things have been starting to get better for most people, I've been increasingly sick of my work, and ready to abandon it.

I asked Bonita why I should dislike it so, when I used to find great joy in programming. She seems to find it unsurprising - my transition to embedded development was pretty damn hard, with not just one but two projects taking far longer than expected (or bid for). We spent quite a few months doubting for our economic survival, with both of us feeling quite desperate all the time. Earlier, before I started the embedded work, I was able to get by OK but I hated the work I was doing, writing a specialized financial database. Frankly I resented doing it at all, and got out of it at the first opportunity.

Bonita seems to think it should make a lot of sense that I should feel despair when I contemplate my work. She also points out that as long as she's known me, I've never spent much of my free time doing anything but hanging out on my computer, so I am at my keyboard for both work and play. She thinks that's very unhealthy.

I think it is already helping that I am finding other ways to enjoy myself, like my music. Ways that don't involve computers. But that can't be all there is, I won't be able to continue to tolerate programming unless I can find some joy in it too.

Maybe I can find it again.

Perhaps not at all coincidentally, I'm going to be forty years old in a week. That's very old for a working coder. Bonita thinks I'm having a midlife crisis.

Yesterday I ordered Mihaly Csikszentmihalyi's book Flow, which I first heard about after someone mentioned it in their diary here. What Czikszentmihalyi calls "flow" is precisely the experience of being "in the groove" that makes my coding enjoyable, during the rare times it is.

I've been strangely hesitant to order it. I felt it would be helpful to read it, but I've read all manner of books - technical books, self-help books, books on productivity and organization - and worried it would be just another book full of good advice that somehow did not address whatever problem I was really having.

I really wanted to find a copy in a brick-and-mortar bookstore that I could leaf through before purchasing, but I never could find one. Finally yesterday I decided it would be worth giving it a try.

Any advice you may have for me is greatly appreciated. My email is crawford@goingware.com

What Bonita Says About Valentines Day

I had to wait until today to post this because part of my Valentine's Day gift for Bonita was that I stayed off the computer for the entire day and instead spent it with her.

Yesterday Bonita said:

You know how they say Valentine's Day is for lovers? I think instead they should say "Get off your ass, you lug, and show some appreciation for all the shit she does for you".

Or maybe "Valentine's Day: because sleeping in the basement is just no fun".

Writing

A popular website has invited me to write for them. It wouldn't be for pay, as the site is all volunteer, but it would be very good exposure for me.

I really enjoy writing for Kuro5hin, and sometimes for Advogato, but I think this site that contacted me gets much more traffic.

I don't want to say who yet until I've spoken to them more about what they have in mind.

But I've been thinking I should write another article soon. Some of my articles are very popular, but I've got to keep writing if I don't want readers to lose interest in what I have to say.

California Gubernatorial Campaign

I'm making progress in my campaign to replace Governor Schwarzenegger. I've been going to the gym very faithfully, ever other day for two weeks now.

I'm not sore all day any more like I was. Right after I work out, I feel very weak for a little while, but then feel very good. That good feeling is why most people like to work out I think.

I'm still not lifting very heavy weights, but I'm gradually increasing my repetitions, and will add some weight after a couple more workouts, then drop the repetitions back to where I started. That way the transition is more gradual.

This is a Googlebomb

I've been watching the server logs of my music downloading article pretty carefully. It's been Google's #1 hit for the query legal music downloads for quite some time now. Lately it's been getting about a thousand hits a day, far, far more than anything else I've ever published on the web.

However, although my article doesn't rank so well (ranging from #15 to #20), it's been getting far more referrals for the query free music downloads than any other. Many, many more people must be using that query than any other, with 4442 referrals coming the month of January. In comparison, there were 1251 referrals for legal music downloads.

I'm sorry to be posting the link here again (and have stopped posting it so often at kuro5hin and slashdot, after some complained they were weary of seeing it), but many of the people who have read my article wrote to tell me they felt I had something valuable to add to the debate over copyright, the RIAA, file sharing and the future of music in general.

I worked hard to educate the readers I was targeting, as I think most p2p users aren't that well-informed about the issues. Many, if not most of the posts I see in the p2p message boards aren't very eloquently, or even coherently stated. I wanted to give the typical p2p user some useful arguments to use in the propaganda war being waged by the record industry, lest they fall victim to better educated attorneys, political lobbyists and PR flacks.

If you agree that what I wrote was valuable, you can encourage others to read it if you'll Googlebomb it too:

<a href="http://www.goingware.com/tips/legal-downloads.html">free music downloads</a>

Yes, I admit to being quite shameless, in the way I attract readers by promising them lots of free tunes but deliver a sermon on copyright and political activism while I've got their attention. It is easy to find lots of other articles on the p2p controversy that are much more respectable - but I don't think they're getting attention from the people who need to be reading them, the people who are facing lawsuits because they are trading files.

Please note that I didn't write the article for any commercial purpose. It has only three really bare links to the rest of my site at the top. It's quite likely that any of my clients would be quite appalled if they read what I had to say:

... I feel that the awesome political power possessed by the large corporations is the greatest challenge my nation faces...

The fact that people aren't already dying in the streets in the struggle against the corporations and their intellectual property is not because the struggle is not one worth dying for, but because most people have not yet awakened to the problem.

Recently, a pay site operator offerred me a considerable amount of money if I'd refer traffic to his (rather questionable) site. It was a tempting offer because I could really use the cash. But after much soul searching I turned him down, and have further decided I won't accept paid advertising from anyone.

Thanks for your help.

Got a Mac? Help me out by testing iRATE

Version 0.3 of iRATE radio is just now being released, but the Mac OS X version that is built using Eclipse's SWT toolkit is being held up a couple days because I found a bug.

But a test build has been posted on iRATE's unstable downloads page. As long as you read the ReadMe file, you shouldn't have any trouble. It's working well enough to be useful and enjoyable.

It would be very helpful to me to get some more widespread testing, because the OS X SWT version hasn't been tested by anyone but myself so far. (Previously iRATE for OS X was only available in the version built with Swing).

It's likely that there are some other bugs that I could fix before the release, if only I knew about them.

Thanks for your help.

Want to Use SWT in OS X?

If you try to use SWT's OS X build you are likely to think it's not really ready for use. It will seem as if your user interface is really brain-damaged. But that's not really the case.

The reason is that SWT uses native widgets, sorta like AWT does. For OS X, it makes calls to Carbon. This is done by supplying a dynamically loaded native code library for each platform and widget set, that is loaded via the Java Native Interface.

The way Java applications are built in application bundles on OS X (to make a program you can run by double-clicking it) has the threads set up wrong for the native widgets to be able to process the events.

What you need to do is read the instructions in Eclipse Bug #40003.

In short, what you need to do is use an executable called java_swt instead of Apple's JavaApplicationStub. Both these programs launch the Java VM and tell it to run your java jar, but java_swt will set up the threads to make SWT happy.

I thought I should post this here so someone with the same trouble I had will find it with Google. It's a simple solution but apparently not too well known yet.

157 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!