29 Jun 2007, 11:26pm
/dev/random
by

Comments Off

Parallels 4128 Kernel Panics

Much as I love the Parallels virtualization software after a couple weeks of using build 4128 I have to recommend any new users stay away for now. It crashes and in extreme but unfortunately not rare cases it kernel panics:

panic(cpu 1 caller 0x001A4A55): Unresolved kernel trap (CPU 1, Type 14=page fault), registers:
CR0: 0x8001003b, CR2: 0×00000007, CR3: 0×01325000, CR4: 0x000026e0
EAX: 0×00000000, EBX: 0x0686da04, ECX: 0x053161e8, EDX: 0×00000003
CR2: 0×00000007, EBP: 0x25923bb8, ESI: 0x0426d8c4, EDI: 0x04a977d0
EFL: 0×00010206, EIP: 0x00bd187f, CS: 0×00000008, DS: 0×25920010

Crashes I can live with but kernel panics hurt the children.

(Yes this has been reported to them via their online submission form. This it accepted so I assume it limits input based on submission size).)

26 Jun 2007, 8:50am
/dev/random
by

2 comments

Parallels 4128 Crashes

Seems Parallels 3 build 4128 crashes far more frequently than previous builds. Fortunately OS X generates crash logs when it happens. To the Parallels folks: I’m sure users would be happy to send their crash logs to you to help trouble-shoot or verify the problem but you need to provide a means.

Emailing support@parallels.com gets rejected, submitting the crash report via the Parallels support form at http://www.parallels.com/support/p,2? gets refused, so if you’re interested, contact me directly and I’ll pass it along.

In the meantime, here’s the interesting bits:

Exception: EXC_BAD_ACCESS (0×0001)
Codes: KERN_INVALID_ADDRESS (0×0001) at 0x01d4a000

Thread 11 Crashed:
0 <<00000000>> 0xffff0af5 __memcpy + 853 (cpu_capabilities.h:228)
1 com.parallels.desktop 0x0076c173 0×1000 + 7778675
2 com.parallels.desktop 0x00659fdf 0×1000 + 6655967
3 com.parallels.desktop 0x0096b69b QList::append(TGDev
const&) + 379
4 com.parallels.desktop 0×00725401 0×1000 + 7488513
5 libSystem.B.dylib 0×90024227 _pthread_body + 84

Thread 11 crashed with X86 Thread State (32-bit):
eax: 0xffff0ab7 ebx: 0x00659ea0 ecx: 0x0000003a edx: 0xfffff900
edi: 0x01d4a700 esi: 0x1c43edc6 ebp: 0xb0811e88 esp: 0xb0811e80
ss: 0x0000001f efl: 0×00010286 eip: 0xffff0af5 cs: 0×00000017
ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0×00000037

12 Jun 2007, 1:28am
/dev/rails /dev/ruby
by

Comments Off

The Power of rake

rake is one of those little things about Ruby on Rails that I suspect most of take completely for granted, running the odd rake tast without really ever thinking much about it. Turns out rake is pretty damned cool.

Gregg over on Rails Envy has written a very nice intro to rake in Ruby on Rails Rake Tutorial (aka. How rake turned me into an alchoholic) :

In this article we’re going to discover why Rake was created, and how it can help our Rails applications. By the end you should be able to write your own tasks, and learn how to get piss drunk using rake in no less then three steps.

He’s written well enough that by about midway down the article I was already thinking of ways to use rake to do some of the unpleasant maintenance tasks every site needs that I was consequently putting off thinking about. rake: not bad at all.

9 Jun 2007, 12:43pm
/dev/random
by

Comments Off

Digg Visitor Browser Stats

Yesterday’s open letter to Parallels about the confusion (I choose to give them the benefit of the doubt) around their upgrade pricing scheme generated a pretty good chunk of traffic, mostly from Digg (could that be considered a groundswell of in-Digg-nation?).

Thanks to FeedBurner I’ve got some pretty solid proof that at least among the core that is creating the future of the web (and is interested in Apple-related topics on Digg), Firefox is kicking some major ass:


firefox_kicking_ass

(Yes, IE use is so low that it fell into the “Other Browsers” category. I like.)

8 Jun 2007, 1:21pm
/dev/random
by

22 comments

An Open Letter to SWsoft Regarding Parallels

This is an open letter to SWsoft, makers of the Parallels virtualization software.

Before I start though, I want to say one thing: the Parallels software is brilliant, amazing stuff and a phenomenal boon to the Mac platform. In fact, for new Mac switchers Parallels has been one of the apps I’ve pointed to with pride as a reason that now is the right time to cross the floor to the Mac. It is Parallels the company that has right pissed me off, not the software.

Back in December I bought my girlfriend – a life-long Windows user – a new iMac loaded to bear with Parallels on it. Parallels was bought knowing full well it was not feature-complete software, was shipping betas, and wasn’t fully compatible with Windows XP yet. But it worked well enough to do web development and testing and was a software project well worth supporting.

The purchase confirmation email from Parallels titled “Getting Started with Parallels Desktop for Mac” contained the following:

This copy includes free Upgrade Protection for one year following the date of purchase, which entitles you to receive all major upgrades released during that timeframe at no additional cost. When a new major version is released, you will receive an email to the address you used to register the product that includes instructions on how to download and install the new version, and a permanent activation key that is compatible with the new version.

Note three key statement in there: one year, major upgrades, and no additional cost. That promise was one of the key considerations in supporting the Parallels betas: when the product was ready for prime-time it would be shipped free.

Two days ago Parallels released version 3.0. On the good faith of the promise made on purchase we downloaded and installed Parallels 3.0. It converted the Windows image to a new format, over-wrote the old Parallels and then asked for a serial number. Surprisingly our original serial number no longer worked.

Parallels customer support has this to say about it in an email titled “Activation key for 3.0″:

Parallels Desktop 3.0 is a major upgrade for Parallels Desktop and it
will work with the new 3.0 activation key that comes as separate
purchase, either full version or upgrade version that is available for
the owners of the previous Parallels Desktop versions. You can order
Parallels Desktop 3.0 US version online

Etc., etc.

Note two key statements in that email: major upgrade, separate purchase. Parallels customer support is directly contravening Parallels’ own “new buyer” policy.

So which is it Parallels? Has your customer support made an honest mistake and you’ll be providing the serial numbers you promised six months ago, or are you screwing the customers who bought your product in good faith as acts of support?

I’d really like to hear an answer to this.

Update: Ben from Parallels replied, in the comments below:

If you bought upgrade protection you WILL get a free 3.0 key! Its just taking us a day or two to get them out. Hold tight, its coming!

Welcome Digg. To clarify some misperceptions people seem to have, three things:

  1. Parallels tech support was contacted directly, twice in response to this issue. Their reply is above. It is only now, after much complaining from many people that they’ve clarified (I choose to give the benefit of the doubt and not say “done a 180″).
  2. For those who say: “then don’t upgrade!” I say: the upgrade is awesome. I want to upgrade and if we hadn’t been promised upgrades as part of the original purchase you can bet we would. This is about fulfillment of obligation.
  3. The Parallels 3.0 installer updates the VM in a manner that is not backwards-compatible with earlier versions. Install 3.0 and whether you want to or not, you’re using it, no take-backs. It was only after the complete install process that the installer tells a user their original license is no longer valid.
5 Jun 2007, 9:51pm
/dev/random
by

Comments Off

Ken Arnold: “Style is Substance”

Over on Artima Developer in Style is Substance Ken Arnolds proposes, back in 2004, that language compilers should not only enforce syntactic correctness but also stylistic correctness:

…coding style is an essentially solved problem, and we ought to stop worrying about it. And to stop worrying about it will require worrying about it a lot first, because the only way to get from where we are to a place where we stop worrying about style is to enforce it as part of the language.

Yup. I’m really saying that. I’m saying that, for example, the next ANSI C update should define the standard K&R C programming style into the language grammar. Programs that use any new features should be required to be in K&R style or be rejected by the compiler as syntactically illegal.

I absolutely love this idea, unequivocally, unapologetically.

I’ve been hacking code for about thirteen years now and I can remember back when defining my own “style” was fun and interesting and made me feel l337. That was also about the same time I thought naming all the variables after chocolate bars was a clever idea and comments were for sissies – my code was so good I wouldn’t ever need to go back into it (“experience” is understanding the difference between “won’t” and “can’t” before it happens).

Fortunately for me those heady days ended about twelve years and six months ago when I realized that my code didn’t look like most other code and I was spending an inordinate amount of time reformatting the world’s code to suit mine. Turns out it’s a hell of a lot simpler to reformat my code to suit the world. Go figure.

We programmers don’t write prose. We don’t write poetry. Admittedly we like to think we’re artists but the truth is what we write is foundations and building blocks and lots of other euphemisms from the construction industry that we like to use when describing software. Coincidence that construction standards are so incredibly rigid? I think not. (Coincidence that construction standards are also called “code”, as in “this wiring is not up to code”? I also think not.) We don’t want our electricians getting fancy with the wiring and laying out their own colour combinations – white is neutral and green is ground – so why do so with computer code?

White wires connect to white wires. Look at a circuit with white going to black and though the light may be on and everything works jim-dandy that circuit just looks wrong. Feels wrong. Worryingly wrong. Stay awake at night wondering about the quality of all the wiring in the house wrong.

As most good programmers will attest awkward but functional code tends to feel the same way. There’s even a term for it: code smell, though the term doesn’t fit with my touchy-feely metaphor anymore… but I digress. Unlike with wiring there’s no need to change bad-looking code. In fact if the code works the most common course is often to ignore it, hope it goes away, pretend it’s a black box function in the bad way, not the good way. There’s always more code that needs writing and if it works, it works right?

The beauty of making language style a condition of correctness is that it is not punitive. All code already has a style, consciously derived by the developer or not. All this would do is make that style uniform. Just one style so we’re all playing by the same syntactic rules. Let’s leave the free-form stuff for linguistic languages where the creativity is desirable, a plus, and start making

if(x<y)
    {

illegal.

If not for us, for those who’ll come after, so they don’t lay awake at night wondering if the house is going to burn down.

1 Jun 2007, 1:55pm
/dev/ruby
by

2 comments

Using a hash to count incrementally

A hash is great for keeping track of counts of things if you we already know what those things are, but how to add a new thing without a bunch of cumbersome code? Use fetch():

RUBY:
  1. count[item] = count.fetch(item, 0) + 1

If item already exists then it will add 1 to it. If item doesn't exist, it'll initialize it with a value of 0 and then add 1 to it.