May 16th, 2008

Review of the MacBook.5

My MacBook arrived Mondayafternoon, nicely timed to coincide with an extremely busy week for me. Fortunately, Oliver was so kind as to babysit my door.

Let me tell you right away: I can’t believe this marvelous little gem is being sold for only 1100 EUR/USD. I prefer this thing to a 15″ MacBook Pro and those cost 2600, give or take.

Finish

A major complaint I had with my old iBook (latest model 12″) involved the finish of the notebook casing. Others gawking and oogling the quant little iBook noticed these things as well - seams that didn’t quite close properly, filling up with dust. A battery that sticks out a tad due to being supported by only a single locking brace, and a large and slanted gap between the screen and the case when closed. Through personal use other things are noticed - the keyboard, while beating out EUR 50 USB models with ease for feel and comfort, did feel a bit cheap. One of the keys (left cursor) actually tore almost in half over use, which didn’t help, obviously. Also, pushing down on the casing or the trackpad also clicked the mousebutton. The space bar was drooping to the left, and the trackpad button drooped right. These last points are but pet peeves, really - hardly noticable, but still there.

The MacBook suffers from none of these problems. Its built like an iPod shuffle - the base is a solid plastic brick, the battery is lodged tight with 2 brackets, the keyboard feels very robust and is perfectly symmetrical, and the trackpad feels much more solid.

In fact, the MacBook feels like a PowerBook in this regard - one of the big differences between the old 12″ PowerBook and 12″ iBook (which are extremely similar to each other in layout and build) was this feeling of sturdiness.

Of course, the magnetic auto-latch means the screen now closes more neatly than any other Apple laptop ever built.

GlossBook?

Yes, the screen is glossy. Yes, having a tube-shaped lightsource behind you means you have to fiddle around with the angle of the screen. However, aside from that one problem, this screen easily matches old PowerBook screens, and even facing a MacBook Pro 15″ screen, the MacBook puts up a fair fight. Contrast this to the old iBook, which had one serious failing: The screen sucked. This screen is so bright, it hurts your eyes unless you’re looking at it in daylight. I normally operate near the lowest brightness setting. iBook: Always the highest.

Comparing gloss to PCs, there is definitely less of it, as well.

Ports

Again, the MacBook really doesn’t lose any significant advantage here compared to more than double the price MacBook Pro. Unlike the old iBook, you can connect an external microphone. Unlike the old iBook, you get optical audio in and out. You also get gigabit ethernet and an iSight camera. You even get a MagSafe power connector, and a full mini DVI video out - another feature that the iBook never had.

Mactel stability

Mactels aren’t quite as stable as MacPPC systems. However, according to Cristiano who has owned a MacBook Pro for a couple of months now, every new automatic system upgrade improves stability by leaps and bounds. Even so, mactels are almost as stable as older macs - certainly the MacBook does not sport any driver troubles like so many Windows notebooks. The MacBook has crashed twice so far, forcing a hard reset, but on the other hand I was installing a load of applications and trying to move over old files from my iBook.

heat and speed

The MB features a processor almost as fast as the MBP: A 1.83 or 2Ghz intel core duo. Given the MBP’s almost ridiculous heat generation, the less heat conductive plastic casing had me worried that the fans would be on nearly all the time.

Fortunately, for some reason, MBs run even colder than iBooks. The heat is focussed around the edges, meaning the wrist rests do not get hot like on the iBook. The bottom of the case gets a bit hotter than an iBook but it’s very managable. Contrast this to the MBP, which fries your legs (and definitely your nuts) after even moderate use. The fan hasn’t kicked in yet, even during movie playback. I have no clue how Apple managed it.

Speedwise I can only report that day to day operations are very quick. I tried to run Quake 4. This doesn’t work well due to the hugely inferior graphics engine. That, then, is also the only major area where the MBP wins out. But, is that worth 1400 euros?

Running windows

With parallels, windows runs side by side with mac os x, and runs smoothly. Excellent for quickly checking if your site works well in IE6 for the stragglers amongst the internet crowd.

MBP or MB?

I truely think the MB wins this battle. Here’s what the MacBook is actually better at than its larger, far more expensive cousin:

  • Batterij Life (5 vs. 3.5 hours)
  • wireless range (plastic case helps)
  • Powerpack (60W small profile pack vs. 85W almost twice the size. Airplane sockets can only power up to 75W)
  • User servicable HDD bay. Swapping out your harddrive on a MacBook Pro voids your warranty and takes many hours
  • Keyboard. The MB keyboard is full size, spanning the entire base. The MBP keyboard is of similar size to old 12″ iBooks, with large speaker grilles on the sides
  • speakers. Eventhough the MBP has a much more obvious speaker grille, the speakers tucked away on the backside sound very crisp and produce just as much volume.
  • Trackpad. Aside from the extremely useful 2-finger tap = rightclick feature only available to the MB, the trackpad’s size beats the MBP. Also, unlike the iBook, the trackpad remains completely responsive even around the edges
  • Magnetic latch is more stylish and locks better compared to the physical latch of the MBP.
  • heat. This is a huge issue. The MB is almost as fast as the MBP on non-game performance, yet it doesn’t get even remotely close to the MBP’s temperature during operation. See previous section
  • Looks. This is a tossup. I personally prefer the white plastic case to the anodized aluminum. I guess this one comes down to personal preference
  • Regrets?

    Comparing the MacBook to my old trusty iBook, there are some areas where the iBook actually outperforms the MacBook. First and foremost is the bulkiness of the MacBook. While the MacBook actually occupies less space than the 12″ iBook due to it being thinner and a bit shorter, it’s far bulkier. Compare trying to lug a deck of cards around with trying to lug a sheet of A4-sized metal around. yes, the sheet is volumetrically speaking smaller, but it is just more unwieldy compared to the deck of cards. While I frequently carried an opened iBook by holding a wrist-rest, trying to do that with a MacBook is uncomfortably heavy due to the increased torque exerted by the wider MacBook. It requires a larger bag as well.

    Another obvious problem of the MacBook is the edge of the notebook itself - whereas both the MBP and the old iBook have a more or less smooth edge, the MacBook’s single seamless case schtick leaves a sharp edge which is irritating on the wrists when typing. I think it’ll dull quickly with use to be less of a problem, but a smoother edge would definitely be welcome. The MacBook still has an enter that’s too small and a number of irrelevant keys that could have been left off to i.e. increase the size of the enter key and the left shift. iBooks have this problem as well but for those 2 keys the full size keyboard is actually making matters worse.

    Conclusions

    I’d have to say that no notebook in the world, including apple’s own Macbook pros, can hold a candle to this thing. It’s ridiculously cheap for the power it packs, and eventhough its a new case design, it feels like they’ve already worked out virtually all the kinks. Apparently the many troubles with the MBP series helped a lot. There is absolutely no need to own a desktop as well, a MacBook is the only computer hardware you really need. The added benefit of supporting bootcamp and parallels also means this notebook is still an excellent deal, easily capable of going toe to toe with dell notebooks on price, and lightyears ahead in every other way, if you just need a windows notebook.

    It’s just that good.

    Back when some of us apple junkies met at ‘De Balie’ in Amsterdam to hold our own little MacWorld gathering, unable to actually attend Steve Jobs’ presentation where the MBP was unveiled, I secretly hoped for a magic bullet notebook sporting all the benefits of apple’s powerbooks, along with faster chips, the capability to run windows in a pinch, and yet a price tag of about a 1000 bucks. The MBP (with its hefty pricetag) thoroughly disappointed me, but the wait is over: This is the magic bullet notebook.

The MacBook Mini?4

upfront note: This is pure conjecture.

This new macbook is bigger than the iBook. It’s also sufficiently powerful to act as your only computer with ease.

Which makes this macbook overpowered, really, for a lot of notebook target audience: Those who only use their notebook as a quick way to check email, take presentations and some files on the road, and possibly to use for watching a movie or 2 while on the road.

The macbook is ridiculously cheap for what it packs - apparently, apple either wants market share, or they have their suppliers and construction process very streamlined. Either way, it opens the door to a new notebook. A Macbook mini.

It would cost around the same price, and similar hardware, as a Ordinary Mac Mini - about 600 bucks. From iBook experience, I know OS X will run just fine on a 40GB slow (4200 rpm) harddrive, with 512MB soldered right onto the mainboard, with a core solo 1.5Ghz processor. Combine this with a much smaller, cheap 10 or 9″ screen, and voila. A macbook mini.

To make sure everything fits, it might be possible to ditch the CD/DVD drive. Apple’s original eMac was the first mainstream computer to forego the floppy drive entirely. iTunes Music Store’s video sales would help market it - get your videos that way instead of using DVDs. Any software that can put movies on a video iPod can put movies on this notebook.

Marketing would then heavily rely on the iPod. Perhaps this thing will be called ‘iBook’ to try and keep the link to the iPod.

I wouldn’t buy it myself (I’m quite happy with my macbook), but I know plenty of people who need a notebook not as main PC but for certain relatively simple things. The handheld revolution isn’t happening, probably because it just isn’t possible to reasonably type and read on such a small device, so a very portable and cheap notebook would be the better alternative then.

That particular market is also wide open. Very few notebook hardware makers make cheap, tiny notebooks.

‘less code is the only metric’0

The title of this blog is an oft-repeated mantra, originally said by Bill Gates. It is a large part of the design philosophy behind languages like python and ruby, and it is a significant player in those arguing against languages like Java or C#.

So, is it true?

Well, let’s try an example to show you!

Imagine a hook function (think the comparator function that you supply to a sort function, for example - that’s what we’ll term a hook for this exercise) that needs to return one of 3 different possible values. Something like ‘IGNORE’, ‘ABORT’, ‘RETRY’, to use a familiar little ditty.

How would you make this hook function return its choice?

Our options:

Namespacing

We probably want some sort of ‘RETRY’, ‘IGNORE’, and ‘ABORT’ identifiers that can be used as return value. We can choose to throw these into a namespace directly accessible to the hook function, which would allow the hook function to write ‘return RETRY’ or some such - all done.

Alternatively, we make a new namespace for this, and make THAT accessible, possibly accessible on a global scale, which might even take some sort of ‘import’ or ‘require’ statement. The code in the hook function itself would look something like ‘return ProblemAction.RETRY’.

Structure

Those identifiers have to translate to something. In the old days of C yore, this stuff pretty much always went thusly: You declare (in C, with a more or less global #define) an integer constant named ‘RETRY’.

An alternative is to just make those identifiers link to strings. (ie: string constants). The advantage of that, is that printing the return value or otherwise inspecting it produces a very nicely readable ‘RETRY’ instead of an utterly useless ‘2′. The disadvantage is that in extreme situations all those strings might start making a performance impact. These days, that doesn’t tend to become a problem for many projects, so that’s looking interesting as an option.

A third structural option is some sort of compiler-assisted enum construction. Plenty of languages have specific constructs to make enumerated types. Python doesn’t have this, but java1.5 for example does (public enum ProblemType {RETRY, IGNORE, ABORT;} would do it). Those enum thingies tend to keep even more of their structure than the strings (they both print their name AND they have a unique ‘type’). A good compiler or runtime environment should be able to make these even more efficient compared to the string variant in practical use.

Sounds good.

Decision time

So, what option do we take? I had to make this decision today, and I ended up making a full namespaced enum - it would look like ‘return ProblemAction.RETRY’, it would print ‘RETRY’ if you were to print the return value, and its type would be ‘ProblemAction’. You could make a comparison with the usual == as makes sense. So, mostly, this shows how nice java1.5’s enums are, except for this bit:

return ProblemAction.RETRY

is a lot longer than what one would probably see in similar situations for python:

return RETRY

Our, uh, friend, Bill Gates, would seem to prefer the second option because its shorter, and just as readable.

But from a maintainance standpoint, that’s actually the wrong call.

First, a simple thing you’ll have to take on faith: the slightly longer variant isn’t LESS readable just because it consists of a few more characters. The interesting bit is in all caps, the text in front of it makes sense and in some situations might even add some meaning, and the top version is STILL a fairly short one-liner.

So then the main argument for the shorter version is because its easier to type.

But that’s not true. It’s HARDER to type. The reason is this:

In eclipse, I’d type ‘return Pro’, hit ctrl+space, and pick one of the three options from a popup menu. Then I’m done. I only have to ‘remember’ that the return type starts with Pro something*. For this particular example, it seems moot, but imagine there are 20 or so different options. Or it’s a big project and there are about 30 different situations with these things, each with on average 4 options.

So, this means three things:
1) In a good IDE, either option is easy to type. There’s no difference in writing.
2) Given a normal human being, either option is just as easy to read.
3) Given a good IDE, and either a large project or a project you haven’t looked at in a bit, the longer option is easier to remember.

*) In fully static languages + tomorrow’s IDEs, your IDE could reasonably figure out that you must return ProblemActions and just require you to type ‘ret’, and that’s all it takes for the popup menu to be available. Eclipse isn’t there yet, but there’s no reason why it won’t happen eventually. Due to java’s forced declaration (you have to make an interface to contain the structure of the hook function, along with its return type, but on the plus side, the existence of that gives an IDE the knowledge of that structure as well). This is what I think is principally wrong (but fixable) in the very statical and declarative world of languages like java: All that extra information you’re stuffing in your code is not actually being used like it could be.

Practical Security0

Computer Security is an ill-understood subject. Generally, one is either utterly clueless about it (and movies aren’t helping, spewing forth such misguided wisdom as ‘any system, given enough time, can be cracked’), or quite the expert, and the initiated have a tendency to overdo it a bit, putting it mandatory password changes every month and such.

The security aspect that interests me personally involves ‘painless’ security - security measures that don’t really inconvenience anyone or anything. Easy to implement, fire and forget, hard to screw up. Stuff like that.

You may have heard about research to fully and irreversibly erase harddrives in minutes.

I don’t know how much it costs to have such a system installed next to a computer, but it sounds very expensive. I don’t know exactly how much was spent on research, but it sounds expensive.

A shame really, because that research was utterly useless - a real example of completely overdoing the security aspects without thinking. Here’s where practical security rears its head: Using the worlds most formidable magnets to try and toast a drive is ludicrous and decidenly unpractical.

So here’s the practical security method:

During Operating System installation, the user is to randomly smash away at his keyboard for a while until 256 bits of random data are acquired. This does not take long at all - less than a minute of random whacking. This key is stored, in the clear, on 20 different locations on the harddrive.

From then on, ALL data written to and read from the HDD is run through AES-256, a simple but effective encryption system. If you’re worried about speed, it’s very fast, but if need be, you can buy off-the-shelf chips that do the work for you - they can be soldered directly onto the harddrive control board by a harddrive manufacturer for a dollar, if that. So, you can build this right into the harddrive, or the operating system can rewrite its file system driver (in a day or so, this is very simple, there’s free, open source, off the shelf code) and do it that way.

If the data is to be erased, overwrite the 20 areas holding the key with random data, each area about 50x. That takes a modern drive about a second. Well within the contraints of wiping your drive FAST when neccessary. There’s no way you’re ever going to recover the key from those areas again.

From there on out, the system will write random data in random locations forever, until the power is pulled. Shouldn’t be neccessary, really - AES-256 is in practice unbreakable. In the unlikely event some magic bullet comes around to solve this problem (faster computers won’t do, the only way is a mathematical break, very unlikely given the exhaustive research done on AES, or a huge quantum computer array which may not even be physically possible, we (science) just don’t know yet).

Et voila. Should work better than the big magnet, is just as secure (I’d rate the chances of AES-256 being broken about equal to the chance you can still read some data off of that magnetized drive) and it’s completely painless. The biggest problem is the generation of that key. You could take some shortcuts for the common user and generate it by timing when the device is turned on for the first time and using that for random data.

Because the key is stored on the drive itself, you’ll never notice. The drive can be copied, mounted on other systems, whatever you like. Totally transparent. It’ll keep working until you hit the big red button - then the data is gone. Forever.

That’s practical security. It’s simple, free, yet very very effective.

Blast. I should have applied for a 5 million research grant first before writing this. Silly me.

The truth about programming languages10

This is a somewhat in depth response to a post made by Mike Bowler here.

I’ll conclude that no one programming language is ‘better’, which is generally common knowledge except for Mr. Bowler, apparently, but also that such evangelism isn’t all that bad for you.

(more…)

The final spam solution: Social networking.0

Seth Godin reports on the spammers having found news aggregators. As you may have guessed, the news isn’t good for the aggregators.

Seth suggests counting a ‘known’, ‘respected’ voice more than a total stranger’s, where those terms (known/respected) are defined by their previous submission’s performance. The problem with that tactic, while it would work, is that you get into the groupthink problem: Only a small set of people will bother to submit news, because the rest would have to be noticed amongst an onslaught of SPAM. It’s been proven, time and time again, that making SPAM irrelevant through the use of spam filters and such doesn’t stop them: It’s so cheap for spammers to do it (they’ve aready written their scripts) that they’ll continue for the benefit of those few who check new submissions regardless of reputation of the submitter.

Another problem is hopping sites: If a reputable contributor from one thing decides to get into something else, he has to start all over again. Inefficient. A third problem is for those beginning their foray into internet contribution: They do have to start from scratch, but if you need a reputation with at least one site to get into others, our pilgrim will never get there.

What we really need is a leaf from the real world: Trust.

Here’s how it works: If a friend (or someone else I trust ‘in real life’ OR from the web) points me to something interesting, it tends not to be a spammer. We can use the web to extend this principle to half to all of the entire world population by using the social web: If a friend of a friend of a friend of a friend finds something interesting, its not spam.

if it does end up being spam, then I tell my friend that his friend’s friend needs to be told about a spam linkage in my social web. At some point in the chain, the spammer is found out, and either the spammer’s friend drops his trust, or he convinces the spammer to stop, or if spammer’s friend is unwilling to rat out the spammer, the spammer’s friends’ friend drops the trust of the spammer’s friend.

The problem is that it only works exactly as described if everyone’s personal social web is unique. This is a non-trivial computing issue, in that it requires huge resources and no small amount of cryptography to ensure that identities are reputable without also making people identifiable without being asked for it.

I have no definitive solution for how to set it all up technically, but I do think such a system is utterly impervious to spammers and widely applicable, from blog commenting to news aggregators to the original: email.

The traffic fine money machine is friendly and courteous on the phone0

As many of my friends know, I’m not entirely happy with the dutch sanctions system for minor traffic infractions.

One of the problems I have with the system is the notification: It comes with sparse information, months after the infraction, by standard postal mail. Which can get lost and has no actual guarantee.

Turns out some camera appears to have been misconfigured as I received notice I ran a red light. It’s at zuidwal, which has seen major construction work done, which might be part of the problem.

Unfortunately, the notice I received was a notice of raising the fine because I didn’t pay before the deadline. I never received the original notice though. The failure of not requiring signature at the door for receiving it shows its ugly head. Worse, this version has no information whatsoever about what to do to at least get the picture, and there’s a deadline on challenging the fine.

So, I called up the CJIB, the central organization that takes care of foisting a billion euros of fines on the dutch populace every year. They were actually quite friendly, and, get this, their policy on missing letters is this:

no problem, we’ll just send you a new one and start the whole process from scratch - revert the fine to the original amount, reset your 6 weeks of challenge time, the works.

Because they are 3 to 4 weeks worth behind on correspondence (apparently, few of those billion bucks a year are going into the CJIB itself), the second ‘first notice’ will arrive well after the deadline for this second notice has ran out. After the second you get a very pricey third, and after that, I’m not sure what’ll happen. I guess they’ll go and impound something or other. She did warn me to keep placing lots of calls to make sure that doesn’t happen (oh great, that makes me feel safe) but basically my simple telephone call has put the whole process on indefinite hold until they resend that first notice.

Well, that’s certainly a creative way to avoid paying some fairly serious money to the post office for getting signed delivery of notices. I wonder how long that will remain an effective tactic if everyone and their uncle knows about it, but given the history of fines in the Netherlands, turns out the vast majority consider it a sort of shadow road tax and just pay it up without either learning any lessons (difficult if you disagree with the fine + don’t know when the heck that happend + don’t get a picture) or taking too much trouble to try and get the whole thing wiped clean. The fact that the dutch system does not bother with ‘points’ on a driving licence that could lead to losing it for too many minor infractions also doesn’t help motivate people to challenge their fines.

The upshot being a significant boost to the national budget stemming from traffic fines. But that’s neither here nor there in this discussion. I’ll keep you posted about my further exploits in trying to get this thing set to rights.

The rich get richer. An analysis of a paycheck.1

These days there are lots of waves about CEOs of big companies earning bizarrely large paychecks. This kind of thing has been going on for a very long time, but only now do people take notice.

Here’s a breakdown of why these large paychecks occur.
(more…)

Throwing a surprise party: A math paradox3

Here’s the plan: It’s sunday, and its your birthday. You know your work buddies will throw you a surprise party during lunch one day in the upcoming workweek.

Now, lunch always starts at 12:00 sharp, and you are absolutely certain that one of the five upcoming workdays will feature the surprise party.

One of your workbuddies calls you later today and hints at the surprise party. However, you confidently explain that they cannot possibly throw one. You proceed to explain exactly why this is impossible. Then, on tuesday, they throw the party and you are surprised anyway, mostly at the sudden fallability of your math skills.

Here’s the explanation you give:

Let’s say its thursday, 12:01. In that case you know with certainty that the party has to be on friday, but then it wouldn’t be a surprise when you walk into the lunch area, so the surprise party couldn’t possibly be on friday.

Knowing that, however - let’s say it wednesday, 12:01. In that case its either thursday or friday. But you know it can’t be friday, so it’ll have to be thursday. Except, then, it won’t be a surprise, again.

yadayada - using the exact same reasoning you eliminate all 5 days as a possible opportunity to throw a surprise party - because you’ll be certain that it has to be that day BEFORE you walk into the lunch area.

Quite elated at your advanced understanding of the theory of induction, you smugly walk to lunch on tuesday, and stand flabbergasted as your work buddies throw you a surprise party.

How’d that happen?

I don’t actually know. Discuss.

Imhotep theme designed by Chris Lin. Proudly powered by Wordpress.
XHTML | CSS | RSS | Comments RSS