Ik ben Peter Breuls. Ik schrijf webapplicaties in PHP, filmreviews en onregelmatig iets op deze weblog. Welkom!
Onder de naam Devize ben ik beschikbaar als developer of consultant voor websites of webapplicaties.
Ik ben werkzaam als Administrator bij online community FOK! en als Lead Developer bij frontoffice-leverancier SIMgroep.

Ik moest kloppen want de bel deed het niet

Macreageer

Knock is een handige app die ervoor zorgt dat je niet je wachtwoord hoeft in te typen als je je Mac wilt unlocken. In plaats daarvan klop je gewoon even op je telefoon. Superhandig! Maar er zijn een paar kleine verbeteringen nodig om deze app echt goed te laten werken. Welke dat zijn licht ik hier toe.

Knock, knock? Not there!

Macreageer

Thanks to a tip coming from one of my favorite podcasts, I've started to give the Mac/iPhone application Knock a try. I'd like to tell you why it's awesome, but also why it's not there yet. So it's not awesome, yet, but it's promising.

What Knock does is really simple: it lets you unlock your Mac by knocking on your iPhone. That's it. And it's brilliant. When you're at the password screen for your Mac, instead of typing your password, you just knock on your phone and the Mac unlocks itself. No password hassle needed.

In theory, this is absolutely perfect. You can protect your Mac with a really strong password that you'd (almost) never have to type yourself. In practice, however, it doesn't work as well as it should, which is why it "almost works", therefore it's "almost awesome" or "actually not awesome at all".

The application works as two apps: a free OSX background app that sits in your menu bar (yet another icon up there? yup) and an iOS app that costs a couple of euros. You install the OSX app first, to check if your Mac is recent enough to support Bluetooth Low Energy, which is the technology that's used by the apps to communicate. The OSX app tells you if your Mac is supported. If it is, you can go ahead and buy/install the iOS app on your phone. You run both, they tell you about how to do the setup, you follow it and you lock your Mac.

Then, you knock on your phone twice. If everything's going as it should, your Mac should now unlock. Yay! But there are cases in which this doesn't work.

You have to be logged in
The first case is mentioned in the FAQ on the Knock website: your Mac needs to already have been running before locking. So a fresh boot, leading to the login screen, won't work. But to be fair: that's also not an 'unlock', that's a 'login'. So there's that.

Hello? Someone there?
The second case is a variety of situations in which you're actually better off just going ahead and typing your password, making the app obsolete. I've experienced quite a lot of times, when I wanted to unlock my Mac, that the Mac and the iPhone hadn't found each other yet. There's a green ring around the avatar in the login screen that circles around until there's a connection. When the connection has been made, the ring turns completely green and I can knock. But it can take a couple of seconds before the connection is made. Seconds I could have shortened myself by just typing my password. And that action is almost second nature for me, so why bother waiting for my phone to connect?

Nobody home
Sometimes, there's no connection at all. I just wait and wait, and give up. Turns out, and this is not so much surprising as experience-lessening, the Knock iOS app has to be up and running. When I close it, there will never be a connection between Mac-Knock and iPhone-Knock. It's perhaps understandable; iOS doesn't like stuff happening in the background, but to be honest, having to make sure the app keeps running kind of defeats the purpose of the application. This stuff needs to "just work" for it to be really powerful.

Additionally, sometimes when the iOS app is running, my Mac still can't connect to it. That just feels buggy.

Just keep knocking
The final annoyance might just be a bug, so let's hope it is so it can be fixed quickly. Sometimes, just knocking twice won't work. The unlock screen shows that the knocks are registered, but there's no unlockin' happenin'. So I knock again, twice. And again, now harder. And then I knock thrice, or four times, before Knock registers the knocks as valid and unlocks me. It's annoying; again; that time could have been spent just typing the password.

So, in summary, Knock is a brilliant app, in theory. I hope it's possible to fix some of these issues, because those are the only things keeping me from absolutely loving the app.

Tools of the trade

Macreageer

It's always fun to compare tools. Who works with what and especially, why? Following the example of Flickr and some others, let me list my tools, see if you match:

Working:


  • Main machine: MacBook Pro. I have an Ubuntu PC, but that's just 'extra'. I do everything on my Mac, from working to living.

  • Editors: Zend Studio 6 for all the main development tasks, completed by TextMate (and the handy 'mate' cli-command) and vim for serveral minor things.

  • Transmit: used for access to (s)FTP code locations, and to manually check whether (s)FTP import applications do what they should

  • iTerm with usually about six tabs. I traverse folders, grep through them, use CVS/SVN commands and access MySQL from the commandline. And of course I connect to development and production servers using ssh, but that goes without saying.

  • MySQL Query Browser: I can usually do what I want by just using the commandline client, but every now and then I need a little more visual help.

  • Zend Core: used as an all-in-one package for Apache and PHP. I also use MAMP to run a good old PHP4 environment because at one of my employers we're still in the midst of upgrading to PHP5 (I know, shut up).

  • Xdebug: I use it for profiling and I love the way it adapts var_dump() to a more usable way of displaying variables

  • FireFox and FireBug: very important indeed. I can't image having to work without FireBug. I still remember trying to think really hard about my HTML/CSS and placing alerts in my JS as a way of doing some poor-mans-debugging. FireBug is a godsend.

  • YSlow: a man needs performance, and YSlow helps me determine what to do. Very nice!

  • CSSedit: editors for CSS don't do a lot more than text editors, but they help a little and a little is enough.

  • OPML Editor: I keep my notes, todo's and more in outlines. The best outline editor used to be the one from Radio UserLand, until Dave Winer took the tool and released it apart from the weblog editor.

  • VMWare Fusion: although I love working on my Mac, I'm still missing what I already mentioned before: the combination of Krusader and Kompare (and to a lesser degree, Cervisia) for development work. For that, I am trying out using an Ubuntu virtual machine which uses the three beforementioned apps and sshfs to mount the (development) servers I'm working on. Works like a charm!

Living and working:
I take my Mac everywhere. I work on it at work, even though it is a private machine. At home, I use VLC to watch video's and DVD's, NetNewsWire for the daily read, Celtx for screenwriting, Mail.app for.. well duh, RealPlayer to listen to BBC Radio 1 or iTunes for my music collection, Twitterific for Twitter and Unison to eh, browse newsgroups.

Well, that's most of it. What about you?

Links for this week

Macreageer

» MacGDBp - a PHP debugger using XDebug
» Dutch PHP Conference 2008 - The Video - I was interviewed. Did I make the cut?
» DPC'08 review by Rick Buitenman
» It's About Time You Learned Javascript (for real) - I think I'm gonna read that book
» The Top Ten Subversion Tips for CVS Users
» The Subversion Book
» Running multiple FireFoxes on your Mac
» PHP Performance Series: Maximizing Your MySQL Database
» Which is the fastest browser?

Wubi: the new way of dual-booting

Macreageer

When I work, I usually use two computers: an Ubuntu-powered PC and my MacBook Pro. Of those, the Mac is my main machine: I have all my development tools and environments running on it, I use it for mail and documents, my music is on it (because I can't work in silence), etcetera. It has this value to me because I can carry it to wherever I need to, which means I can use it at both of my two jobs, plus on location if I ever need to (and sometimes I do).

But there's one thing missing: although Mac OSX is a very nice OS, probably the best I've worked with, I still need Linux to complete my wishlist. The combination of Krusader and Kompare, for instance, is a golden one if you need to organize your development projects. Krusader is a two-pane file manager, with the option to use FTP and SFTP or just local files. Whenever I need to examine the difference between two versions of the same file (and I need to do that a lot: before commiting my changes to version control, I want to know exactly what I'm doing), I set up Krusader to have a folder with one version of the project on the left and one version on the right. I then select the files I want to compare and the magic happens: Kompare starts.

Kompare is a frontend to the diff tool and as such not that special: if I just want to quickly see the difference between foo.php and it's current state in CVS I can just use the built-in comparison tools from Zend Studio for Ecplise. But: Kompare is so much better! It has coloring to differentiate between additions, removals and changes, is more precise (due to the tried-and-tested diff being the backend) and has the ability to apply some of my changes to the other file, which enables me to be more exact in what I commit (you know, sometimes you have several changes in a file, but just a few of them belong to that relevant bugfix and the others are for that new feature that's still unfinished, so you want to do a partly commit).

So, I need Linux next to Mac, because those tools don't run on Mac OSX. When at home (for Job #1), that's no problem. My only PC is an Ubuntu machine. But at work (at Job #2), I have an old PC which is kinda slow which I use for this. And the slow part, that's annoying. Because whenever I need to use Kompare, I need five to ten minutes to boot the thing, and every action after that needs a lot of patience.

But, I share my desk with a colleague who sits there when I'm at Job #1. And he has his own PC, stalled under the desk next to mine. A new, fresh one, nice and fast, running Windows, and I already discussed making that one a dual-boot so we can share not just the desk, but the PC as well. But I don't have the time to go and install Ubuntu next to Windows, carefully selecting partitions, making sure I don't nuke his installation, and whatnot. So even months after "Hey, can I make that one a dual-boot?" - "Sure!" I'm still working on the slow machine.

Enter Wubi. Shipping with Ubuntu 8.04 next week, it's an Ubuntu installer for Windows. And it does exactly (exactly!) what I need:

When I rebooted my machine, an option to boot Ubuntu was added to my Windows boot list, and after selecting it, Ubuntu started loading just as it would if installed on a dedicated drive. I was even given the normal GRUB menu.
(Linux.com)

So now I can just boot my colleage's machine, put in the Ubuntu CD, click through the installer and enjoy Ubuntu. No need for me to run the Ubuntu installer, carefully selecting drives, doing all kinds of stuff that costs me time. Just click-click-install, the Windows way.

Life really does get better with every Ubuntu release.

Life after kill -9

Mac1 reactie

I don't get this. I've had this on servers, on desktops, now I have it on my Mac: a process froze, didn't do a thing and just ignored the hell out of me. So what do you do? Kill it!

In Mac OSX, there's a little interface which allows you to choose an application and force it to quit. Works every time. So far. But how do you solve the frozen-process problem with a fullscreen application that won't let you switch to another application, like Front Row?

Tonight, my Mac froze on Front Row. I was comfortably sitting in bed, ready to watch an episode of a tv show on DVD, when Front Row just froze up. Silent. Nothing. No response. So I got out of bed, walked to my Linux PC and logged into my Mac using SSH. And I looked up the logs. And there it was:

Mar 31 22:41:46 Yoda2 diskarbitrationd[43]: Front Row [4394]:40707 not responding.

Non-responsive. That's fine, I thought, I'll just kill it, get back into bed and start over. But Front Row didn't let itself be killed:

breuls@Yoda2: ~ $ ps aux | grep Front
breuls 4435 0.3 0.0 590472 84 s005 R+ 10:43PM 0:00.00 grep Front
breuls 4394 0.2 3.8 430184 78816 ?? U 10:39PM 0:11.11 /System/Library/CoreServices/Front Row.app/Contents/MacOS/Front Row
breuls@Yoda2: ~ $ kill 4394
breuls@Yoda2: ~ $ ps aux | grep Front
breuls 4394 0.0 0.0 0 0 ?? E 10:39PM 0:00.00 (Front Row)
breuls 4440 0.0 0.0 590472 204 s005 R+ 10:44PM 0:00.00 grep Front

That's right. Didn't listen to the kill command. Now, I know about the several options to kill. I tried several, including the -9 switch. Didn't work. Front Row ignored me, all the way through my giving up and pressing the reset button.

I hate that. That's not supposed to happen. Kill -9 is supposed to be the last way out of trouble. It-should-work. But it didn't. Why am I not in control of my own laptop? Why is there an afterlife to kill -9?

I'm a snob

Macreageer

Well, no, I'm not a snob, but I'm getting close, according to this list:

Mac owners are more likely:
1. to be perfectionists
2. to use notebooks
3. to use teeth whitening products
4. to drive station wagons
5. to pay for downloaded music
6. to go to Starbucks
7. care about "green" products and the environment
8. to own a hybrid car
9. and last but not least ... to buy 5 pairs of sneakers in a year

I'm a Mac owner. In fact, I recently replaced my MacBook Pro with.. well, a MacBook Pro. You know, "it was time" for a new one. So I should have a look at the list:

1. Perfectionist: a bit. Sometimes. When time allows, I want what I do to be done well. And that borders on perfect. So yeah, check this box.
2. Duh.
3. Apart from tooth paste: no.
4. I don't have a car. Hell, I don't even have a driver's license.
5. Yup. Sometimes I grab an album from Usenet, but most of the time I get my music through iTunes.
6. Whenever I'm near a Starbucks, which is at least a few days a year (there's no Starbucks in my city), I'll get me a Caramel Macchiato. Yummie!
7. Green-ish. Maybe a bit. I have some CFL bulbs in my lamps, and I turn down the heating when I open the window, and I separate used paper from the regular waste, but apart from that.. nah, not more than others.
8. I don't have a car, so no.
9. I don't own five pairs of sneakers, but I do wear Converse Chuck Taylor All-Stars. Exclusively. And in the last year I bought three pairs. And yeah, within a few months I will probably have bought another pair. So let's check this box.

So, that's about five out of nine. Does that make me a snob? I'll leave others to be the judge of that.

Software developers: please log everything

Macreageer

Okay, this annoys me. Since a few hours, the wireless connection on my MacBook Pro is gone. No reason given. Of course I'm trying to connect back, while I'm using Google to find solutions when it seems I can't solve this on my own.

MacBook ProThe problem is, my Mac recognises my wireless network. It can see my accesspoint, read its name and it asks me kindly if I would like to connect to it. Sure I would, so I press Yes. It then tries a couple things and comes up with the message that tells me connecting failed. No reason given.

Being both a Linux desktop user and Linux server admin, I have seen my share of failing pieces of software or equipment, and one of the reasons I like Unices to much is that there's a whole bunch of logiles being kept in the /var/log folder, providing me with the how and why of these errors. Mac runs on a Unix-type OS, so during my wireless-problem I'm listing the files in that folder, sorted by date and time, and I'm using tail to view the latest entries in what seems to be the only active log file: system.log. Indeed it shows me some errors, but there's nothing corresponding to the pop-up message that told me the connection to my accesspoint failed. Nothing! Not a single logfile seems to have updated with information I can use to solve this problem.

And I've seen that before: software that's dealing with its problems all on its own, without asking for help or enabling the user, me, to find out more using Google or my own knowlegde. That is a mistake. If you create software, make sure you have nice friendly error messages for the average user. That's important. But the "extra mile" in this is just as important: make sure you write every error into a log file and point me to it in case it's not system.log (or syslog or messages or anything that can be considered a default). Make sure enough information is in there to enable me to exactly understand what's going on. I am a technical user. I understand technical information if it's described in a human-readable way. I can think for myself and come up with solutions, or spend time pasting the log entry in search boxes to I can find other people's solutions.

To me, having enough information is very important. So, software developers, please log all those information somewhere.

Read my CD's, please!

Mac5 reacties

I'm having serious trouble with my Mac. It won't read some of my CD's, which severely limits the possibilities of iTunes shuffling through my entire music collection. Or my iPod, for that matter.

It's really strange, too. When I insert a CD into the drive, it makes some noise, which indicates that the CD is being read. After about 20 seconds, the CD ejects. Just like that. No reason given. I have tried to look up any form of logged error, but the usual place where errors are supposed to be written down, the /var/log folder, doesn't mention any problem at all. Just accept the CD being inserted, make noise, eject CD and don't tell the user.

Why is that? Why does it eject the CD's at all? When it has a problem reading them, pop up some message explaining it, or put an entry in the system.log. Don't just go ignoring the fact that I want to read that CD!

Anyway, half of my CD collection is useless this way, because I never play CD's on a regular CD player. I hate that. I love my Mac, but this is really annoying.

MacBook heating

Mac1 reactie

I've seen some posts, on some blogs, about the SMC firmware upgrade that Apple released this week. I installed it, so whatever has been written about it, I should be able to check. TUAW and others write that the upgrade causes the MacBook Pro to run cooler.

Well, I still think it's a bit hot at times, but yes, it is cooler. Not very much, but I think it's just enough to make it slightly more comfortable. So thanks, Apple, for the upgrade.

Guess what? No whine!

Macreageer

Allright, the MacBook Pro arrived yesterday, and like a kid at Christmas, I was very happy to be able to start using it. What a great machine. It's thin, light-weight, looks great and is really fast. Also, Mac OSX is quite nice to work with, although I still need some getting used to.

The problems I was afraid of? Almost none. Really! There's no noise. Not from the screen, not from the CPU, fans, harddrive, etcetera. It's silent, and I like it. There's only one thing: it's hot. The left-hand side of the body gets considerably hotter than the right hand side, and when resting my hand on it for a while, it gets irritated a bit. I don't know if that's just getting used to, or really a manufacturing mistake. I'll see how it works out for me the next couple of days.

All in all: I'm very happy. It's a cool machine, nice to work with, fast, easy... I love it!

MacBook in transit

Mac1 reactie

I've been looking at a TNT tracking page for the past few days. My MacBook is paid for, assembled and on its way to me. Today it arrived in Amsterdam:

02 May  13:18  Rotterdam   Delivered 
02 May 09:57 Rotterdam Out For Delivery
02 May 05:52 Rotterdam Import Received
01 May 19:38 Arnhem Hub Consignment Received At Transit Point
01 May 19:35 Arnhem Hub Consignment Passed Through Transit Point
01 May 14:21 Amsterdam Consignment Received At Transit Point
30 Apr 14:32 Shanghai Shipped From Originating Depot
29 Apr 10:06 Shanghai Consignment Received At Transit Point

Now, I live in Rotterdam, and I assume that all TNT has to do is bring the thing to me. So I might have it tomorrow, unless for some reason it doesn't get picked up from Amsterdam. To save myself from dissappointment, I won't get my hopes up too high, but I'm getting really excited now...

Update: okay, it's in Arnhem now. That's not closer to where I live, but hey, if that's the way it works, fine. Google searches on the phrases in the tracking table make me believe I'll receive it tomorrow. Will I?

Update 2: and now it's in Rotterdam. Unless something weird happens, it will be delivered today.

Update 3: out for delivery. That's right. Give it to me baby. ;)

Update 4: it's here. Time to have some fun.

The Mac story begins

Macreageer

It's kind of official now: My MacBook Pro is on its way. I've ordered it, paid for it, so all I have to do now is wait for it to arrive.

Update on saturday the 29th: it's being sent out. Expected arrival: this week.

MacBook Large

Mac3 reacties

While I was busy deciding about my MacBook Pro purchase, Apple released a 17" Macbook Pro today. I'm not getting one that large, it won't fit in my backpack. But it's still cool.

About my decision: I am getting the 15" version. I do care about the possibility of suffering from a whining noise, but I'll just go through several tech support phone calls if any of that happens.

I wish I could say here that I ordered the thing already, but I don't. Well, I do, but not entirely. My payment bounced because I hit a limit on my credit card. Need to fix that first, so the order will complete probably somewhere this week. I hope.

Becoming a Mac user means that I will start reading more Mac related web sites and blogs, and subscribing to some feeds. Milo already suggested a nice one: Macupdate.com. What else do I really need to start visiting regularly?

Mac means OPML

Mac1 reactie

OPML logo Should I buy a MacBook, I will have the possibility of using the OPML Editor again, something I've missed doing since I threw out Windows and started using Ubuntu.

MacBook Pro: do or don't?

Mac2 reacties

So here's the issue: I have a laptop, and it's getting old. Very old. Falling apart-old. For instance, every now and then, the thing won't boot normally, because of some harddisk problem. This usually means I have to do some fsck-repairs, reboot and hope for the best. Also, I have less time when running on just the battery than when it was new.

Of course, if it's just this, and I think it is, it can be fixed by just getting a new battery and a new harddisk. But the laptop is over two years old, and who knows what the next failure will be. Also I have never liked the fact that it weighs about 4 kilo's, which is kind of heavy to be just carrying around all the time. So I decided I needed a new laptop. A fresh one, with new technology, a slick design, good features.. And I chose: a MacBook Pro.

MacBook ProThere's just one problem. I've been reading several blogs, forums and news sites, and a lot of them report about a whining noise when the MacBook is on, making work on the laptop a lot less comfortabe. Also, it tends to get too hot to put it on your lap.

These complaints, which seem to be very serious, make me doubt whether I want to buy a MacBook or not. A lot of people have the problems, so chances are I will too. And Apple doesn't seem to care about it either, because I can't find a public statement about it anywhere. I don't know if they're busy fixing it, or recognize the problem at all. So, when I buy one, will I be able to use the thing comfortably, of do I have to return it to Apple to get a new one, over and over again, until it's finally fixed?

Still doubting..