Holy shit. A new post on my blog!
Yes, I’m as shocked as anybody.
There’s been a recent uptick in the use of BSJSONAdditions, along with quite a few patches sent my way. This may have something to do with the iPhone development. Or maybe not. But in addition to bug fixes, there’s also some speed improvements. All of that means it’s time for me to take a look at that code again, merge in those changes, and get the updates out to everybody.
To get started, I set up a public repository:
http://blakeseely.com/svn/public/BSJSONAdditions/
This will make it easier for everybody to use svn:externals to grab the latest code, or a specific version. If you are really into BJSONAdditions and want to make changes and improvements directly in subversion, let me know and I’ll set up a user for you.
I plan to get the latest patches into the repository over the next week.
I posted earlier on my general thoughts about MBAs here. But I saw this FSJ post today and made the mistake of following the links and actually reading this guy’s essay. If you can read that and don’t immediately understand what’s wrong with Microsoft, then you probably have an MBA.
I also saw this little beauty. Sigh. Microsoft is doomed.
WWDC is upon me…er, us… er, WWDC is next week! Everybody around here has been scrambling to get everything ready - including me. I’m giving the Extending the Aperture Workflow session on Thursday afternoon, so if you have any interest in Aperture’s export API, come listen. I’ll also be working the Graphics & Media lab next Friday from 2pm onward. Come say hello.
Outside of the event, one of the must-attend parties is Buzz’s annual party. Find out more here, and hope to see you there!
A few weeks ago, a co-worker and I had the opportunity to join Bill Frakes and his staff at the Kentucky Derby.
We spent three unbelievably exciting, long days working with Bill, shooting the races, and seeing how professional sports photographers work. It was an amazing experience from just about every angle - being able to get up close to the horses and the track; watching amazing photographers; seeing the time and energy that they put into a 2-minute race. It was also enlightening with respect to Aperture and what it needs to do in order to meld with their workflow.
I’ve posted some of my favorite shots (out of the 1700 I took) up on Flickr.
This is the most terrifying thing that I’ve read in a long time. Please, MBA graduates, stay away from Apple. I beg you. Apple is doing well, it’s making killer products, and your education and skill set will only serve to kill the company.
I’m only partly kidding here - but mostly not. After working at and with large consulting firms in my “previous life”, the attitudes, culture, politics, and ideas of those companies (which LOVE MBA students) do NOT belong at Apple. And the current state of MBA education does not provide the management skills it should. MBAs are not what Apple needs or deserves right now.
Please, MBA students, do not work for Apple. Please, Apple, don’t hire ‘em.
(And the book linked above “Managers Not MBAs” is an excellent book if you’re at all interested in management or getting an MBA.)
Brent Simmons makes some excellent points in his latest post - and he got me thinking. I like his recommendations about Notifications and KVO, and when to use them. What he says about Notifications is right on:
It’s difficult, when doing research, to know what’s going to happen when I encounter a notification-send… Another thing I do - which may sound like heresy - is just to admit that class x and y know about each other.
That is definitely NOT heresy! Using Notifications just to prevent two objects from talking directly to each other is a bad idea if those two objects should know about each other. Notifications work well when the sender doesn’t care about most aspects of the receiver. In fact, the only thing a Notification sender cares about is sending the message - it doesn’t want to know anything else about the receiver, the number of receivers, the types of the receivers, the interface(s) or methods on the receiver, and it especially doesn’t want to do any receiver management. That’s a VERY loose relationship - barely a first date! Are there many objects in your code that talk to each other, but meet the above criteria? There shouldn’t be many. In relationship terms, Notifications are like a good crush.
On the other hand, Brent follows that above quote with a small code example:
[[SomeClass sharedController] updateStuff]
That code scares me almost as much as notifications, but for the opposite reason. Using singleton classes basically makes a global variable, and overuse of shared singletones creates connections between lots of objects without describing an actual relationship between two objects. Does object X need to call methods on Y? Why? When? In MVC terms, most of the projects that I’ve seen that overuse the singleton pattern are abusing the C - instead of specific relationships, they create the singletons that float around, dating any old object, but never having a relationship. Unless you truly have objects that are utilities, free agents, no relationships, then you should see as few singletones as you do Notifications. In relationshiop terms, a singleton is a bachelor, a cheater… fun, and sometimes useful, but often dangerous.
Besides Notifications and singletons, KVO implies yet another kind of relationship - one that’s more intimate than a Notification and more specific than a singleton. KVO is all about specific properties of an object, and unlike Notifications, KVO implies knowing more about the type of the object, its ivars, and its method interface. Use KVO when that relationship applies to your objects: anywhere that another object knows specific details about the sender - possibly a similar class in a related area of the application, or a partner in the MVC pattern.
The more I code, the more I realize that the projects and code I’m happiest with are the ones that best describe in code the conceptual relationships between the objects that make up the code. As projects get large and complicated, patterns don’t always fit the small details of a feature or requirement. In those situations, I often end up writing code or using a pattern that also doesn’t exactly fit. But if I focus on explicitly describing the object relationships as I go, I usually have an easier time using that code later on.
Brent mentions many more tips than the Notification, singleton and KVO ones above - so definitely check it out.
Update: Daniel Jalkut weighs in here.
Update: Rentszch weighs in, too.
I submitted a version of this photo for JPG’s “Dreamscapes” theme. I don’t know if I really like this photo for the theme, so I may try to shoot something better. But for now, I do like the surreality of the speeding lights compared to the bridge. (This is a shot of the SF Bay Bridge from Yerba Buena Island).
So, as with the America shot below, if you like it, head on over to its page on JPG’s site and vote for it!
This photo is my entry to JPG Magazine’s “America” theme for the upcoming issue. It’s my somewhat cynical take on the theme - consumerism, uniformity, and pre-packaged crud.
if you like this photo and think it belongs in the issue, click here and vote for it!
And if you’re into photography, definitely subscribe to JPG - it’s been my favorite magazine since the moment I opened my first issue.
We have a rogue lily growing just outside our front door. Most mornings, I don’t even see it as I leave for work. But after it rains, the flowers and leaves always have beautiful, distinct water droplets on them and I can never resist grabbing a quick picture. This is especially true in the spring when overnight showers are followed by bright, sunny days.
My favorite picture of the lily (taken with a lowly Canon PowerShot S410) is here. I think it captured the shadows and the drops just perfetly. (It also happens to be my most favorited photo on Flickr.)





