movq

Wherein I Move A Lot of Words Around

Blogs

The network nightmare that ate my week | Occasionally Coherent:

I used Ubuntu as an example, but it is hardly the worst offender. We have seen Windows machines with more than 300 IPv6 addresses — which, recall, means that every 150 seconds they will be transmitting 30 multicast packets per second which have to be flooded through the network.

Quickly Setup a PPTP VPN Server for iOS

After reading a lot about various evil ISPs and other such fun I decided it would be good to have a self-controlled VPN server out there for when I am using a device of mine on a network I’m not so sure about. I could pay someone else for this, sure, but I already have a server “out there” that’s not being used to its fullest capabilities and I’m pretty handy with the Linux and the vi so … why not?

Strip Alias

Why are Mac OS X aliases so large? They’re huge! I’ve seen sizes from 1MB to 5MB for a single alias file. Back in the System 7 days, they were mere bytes in size. Their functionality hasn’t significantly 1 changed since then.

I poked around an alias file (with the help of xattr, DeRez, and GetFileInfo) and found the answer: they’re storing icons in there now.

Twice. Once in the data fork of the file and then once in the resource fork of the file.

Refactoring Life

A series of events unfolded recently that led me to reconsider a lot about my digital life. The short story — and there is a long one — is that my home was broken into and my computers were stolen. The thieves also managed to take some accessories and drives but, astonishingly, left my Time Machine drives for the two computers. While it’s bad, it could have been so much worse.

CGRect and CGGeometry

The best description of how Cocoa’s views are designed that I could find from Apple is in the Cocoa Views Guide PDF in the chapter called View Geometry. If you’re trying to get your head around what a CGRect is and why self.view.frame.origin.x++ doesn’t work, that’s required reading. (A hint to the latter: view.frame is return-by-value; CGRect is a struct, self is an object.)

That said, here’s a handy graphic to not only help you get your head around when to use frame and when to use bounds, but also what they mean in the grand scale of things. Also included are some visual guides on when to use some handy CGGeometry.h functions to do some work for you.