Mac Software Update Permissions Problem

May 8th, 2008

I ran into a problem installing some software updates on a Mac and thought I’d post the solution here in case anyone else runs into the same problem.

I was logged in as one user, and ran Software Update, but didn’t install the updates. I then created a new user account and logged in as this new user to actually install the updates.

But Software Update refused to install some of them, with this error: “You do not have appropriate access privileges”.

Software Update downloads updates into /Library/Updates and the updates were there, but it seems that because they belonged to someone else, Software Update was having trouble. Deleting the updates from this folder and running Software Update again fixed the problem (the updates were downloaded again the next time I ran Software Update).

Ars Technica on the .NET Framework

May 6th, 2008

Ars Technica is posting a series on Cocoa (the Mac UI framework) and part of it is a comparative look at the .NET Framework. And in my opinion, it’s not very fair.

Here’s a quote:

The .NET library does work. It more or less has all the main pieces you need, but it’s full of areas where you have to deal, directly or indirectly, with the obsolescent mediocrity of Win32. On their own, none of these issues would be a show-stopper, but they all add up. It’s a death of a thousand cuts.

He’s talking about Windows Forms, where I find some of what he says to be true. A bit too much of Win32 shines through in Windows Forms. But still, as a wrapper for the Win32 API, it takes it from the death of a million cuts which is straight Win32 development to a death of only a thousand cuts. It’s a big improvement.

And when working with the rest of Win32, things like files or sockets, it’s a much cleaner environment.

I haven’t worked with WPF, but since it’s not based on Win32 at all, I’d expect it to be a clean, well-architected UI framework. Anyone with experience working with it care to say?

In picking on Win64 he says:

Another example; Win32 has a function for getting the size of a file. File sizes on Windows are limited to 2^64 bytes, and so they need a 64-bit integer to be expressed easily. But the API call to get the size of a file doesn’t give you a 64-bit value. Instead, it gives you a pair of 32-bit values that have to be combined in a particular way. For 32-bit Windows, that’s sort of understandable; 32-bit Windows is, well, 32-bit, so you might not expect to be able to use 64-bit integers. But if you use the same API in 64-bit Windows, it still gives you the pair of numbers, rather than just a nice simple 64-bit number. While this made some kind of sense on 32-bit Windows, it makes no sense at all on 64-bit Windows, since 64-bit Windows can, by definition, use 64-bit numbers.

But .NET gives you exactly that. All integers in .NET are 64 bit, and there’s no futzing to do to get the 64 bit size of a file.

Of course:

So Windows is just a disaster to write programs for. It’s miserable. It’s quite nice if you want to use the same techniques you learned 15 years ago and not bother to change how you do, well, anything, but for anyone else it’s all pain.

As I said recently, I’m not using the .NET framework at work, so that’s the world I live in. What can you do? If you want to sell software, Win32 is still where it’s at.

Nuvi vs Mio

May 5th, 2008

Jeff Atwood has a post insanely recommending the Nuvi 200W, but I wonder if he’s ever tried a Mio.

I bought a Garmin GPS and found the startup time just too frustratingly long.

I’m still very happy with my Mio C520 GPS.

Xbox 360 with Blu-Ray Rumours

May 5th, 2008

That the Xbox 360 will be gaining Blu-Ray support is the rumour that just won’t die. But how likely is it?

I’d say about 50/50. The hardware part is easy - and the that’s the part that the rumours always focus on:

The website … states that MS has contracted Korean firm Pegatron Technology to build a Blu-ray Xbox 360. You can’t get more direct than that. They say it like it’s a FACT and 100% true.

But I doubt Pegatron is doing the firmware required to play Blu-Ray discs, a significant portion of the work. Probably an order of magnitude harder than doing the hardware portion. Blu-Ray is a complex specification.

But Microsoft is an adept implementer, and the death of HD DVD has shown the way. Future versions of Windows are going to need to play Blu-Ray, the next-gen Xbox is going to need Blu-Ray, Apple is rumoured to be building Blu-Ray drives into the next-gen Mac laptops, so any investment in developing Blu-Ray software is going to be money well spent.

So in some ways it’s really just a matter of time.

Bizarre Time Machine Error

May 2nd, 2008

This can’t be good:
200805020724
“This backup is too large for the backup volume. The backup requires 100.0 MB but only 172.3 GB are available.”

The Real World Makes Programming Less Fun

April 27th, 2008

Programming can be a great hobby. Anyone can do it, there are lots of good, free tools, and you can “scratch an itch” - write something that you need yourself. Hacking for fun is a great way to learn more about the computer you’re using, and is just an interesting mental exercise.

Let’s say you decide one day “I want to write a text editor”. Sure, there are a thousand other text editors out there - but the reason all these editors exist is because a thousand other people said “I want to write a text editor” and did it. If the existing tools don’t do exactly what you want, chances are there are other people like you, who aren’t happy with the existing tools and will like what makes yours unique.

A text editor is a great example of where the Real World makes doing the job less fun.

So you start out with a character buffer. You’re working in C++ so you have a linked list of pointer to char, an 8 bit type. You write code to let the use type characters and insert them into the buffer, track multiple lines, handle cursor movement. Handle PgUp, PgDn to move a page at a time. Cool stuff - you’ve got a marginally working editor. So you create a project at Google Code and post it.

Some users download it and start playing with it. A user in Montréal says when she reads in text files that have her city name in them with the accent, the accented character doesn’t show up right. Uh oh.

So you find a copy of Joel’s article on Unicode and read it. No problem - change that char buffer to wchar_t and you’re good.

Well, better. Your new friend in Montréal is happy, but after a little while, you’re getting email from some new friends in Turkey asking why their text doesn’t look right. Googling around a bit, you find Michael Kaplan’s blog, and reading it scares the pants off you and you give up and tell the user in Turkey that maybe they’d be happy with Notepad.

There are examples like this all over software development. Want to talk HTTP? Sure you can send GET /foo HTTP/1.1 and get stuff back most of the time, but handling every case is hard.

The best way for a hobbyist to handle these things is to reuse as much code as possible. If you’re using the .NET framework to work with strings then you don’t even have to think about most issues; they’re handled for you by the framework. Same with HTTP. The Flex framework, the various Java frameworks - as much fun it sounds like it would be to implement HTTP, find a mailing list where implementers are talking about issues, see how much fun it really is once you’re past the easy part.

Why I’m Not Using .NET

April 24th, 2008

Now that I’ve been posting things on Twitter, I notice I have a few followers. And the followers I have are mostly .NET developers. I was a bug .NET proponent a few years ago, but I haven’t actually written any C# code in a long time now, and I thought I’d talk about why.

There are two separate places I could be using .NET: For my own personal projects, and for work.

Concerning work, it’s easy to explain why I’m not using .NET, and it’s not what you think. It basically comes down to deployment.

Windows XP, still the largest market, doesn’t come with a .NET Framework installed. No matter what the penetration statistics are, this means we need to ship the framework, add it to our setup, and support users having trouble with that part of setup. Many users of the product I work on try it out using a free trial download, and the framework adds significant size to the download (or if we download it on demand, trips up the people who downloaded it to install offline).

I went through the same thing at my last company, where I managed to convince them that the framework download was worth it. In that case we were creating a brand new app, and the benefits of using .NET over starting out in C++ were clearer. At Adobe, we’d be using .NET features in a large, existing C++ application, so the benefits are less obvious.

For my own personal projects, the short answer is that I bought a Mac.

I love developing with the .NET Framework, but I don’t like Windows Vista. I had high hopes for Vista, and the final product just didn’t deliver.

My main beef with Windows is that it degrades over time. Everyone knows this, so many people just plan to re-pave their system at some regular interval. But that’s a stupid way to have to use a computer. My Vista install at work went from clean to annoyingly slow in about 6 months. Same thing happened at home.

Meanwhile, my old Mac Powerbook is running well after all the time and usage it’s seen.

It was a tough choice moving my main home system from a PC to Mac, but honestly, I do spend more time now “using” the computer and less time maintaining it. The only thing missing is Visual Studio.

What’s filled that gap for me is Flex Builder. Now that Adobe AIR exists, I can write an application in Flex on either platform, and run the application on either platform. It’s the perfect setup for someone with a foot in both worlds. It sometimes makes interop with native platform stuff difficult, but that’s already a pain with .NET and my .NET stuff would only work on Windows (I’m discounting Mono here because last I looked the Windows Forms support on the Mac wasn’t great, and deployment was even more difficult than the .NET framework).

So there you have it. I hope it doesn’t cost me all my followers. :)

Camera Buffer

April 20th, 2008

We were out and about yesterday when a photo opportunity presented itself that actually managed to saturate the image buffer in the 40D. I had to stop and wait while some of the images were flushed out to the CF card.

200804200852
High speed shooting is the only way to capture a toddler jumping in a mud puddle!

Unfortunately I had the ISO set to Auto to the camera chose 400 even though there was lots of light. I’m no sure why, but this made the pictures a bit less sharp than I would have liked.

More here

Twitter

April 17th, 2008

Almost a year ago, I wrote about Twitter:

The only reason it’s interesting is that it’s reached a critical mass - but it’s so obviously *not* got staying power that I’m amazed so many people are so interested in it. It’s fun to play with for a little while, but I seriously doubt people are going to keep posting their little life updates once the novelty wears off.

And yet here we are a year later, and Twitter is not only alive, but growing.

So why is it?

I compared Twitter to IRC, and gave some reasons IRC stopped growing years ago (to the point where most folks today have no idea what it is), but I never actually said there was anything wrong with IRC. IRC was great. And Twitter is still the closest thing we have to an IRC that works for everybody (across firewalls, with no configuration hassles).

So I’m going to hang out in Twitter for a bit, and see what it’s like. I still find the sense of community that existed in the BBS days, and again in IRC days, is missing on the Web today. Maybe this is it.

Updates here.

Winter’s Finally Almost Over

April 16th, 2008

Finally, the last remnant of the giant snow bank should be melting away today.

Before:

200804160825-1

After:

200804160827
It’s great to be able to see the neighborhood again.