HNHacker News
TopNewBestAskShowJobs

donmcc

2,475 karma · joined April 11, 2009

https://donm.cc
submissionscomments
donmcc··on A standing desk killed my productivity
I recently got a very nice motorized standing desk. It definitely helps to be able to lower it and sit when I get fatigued, though after having it for more than a month, I find I spend most of my time standing now.

I have polished concrete floors in my apartment. Concrete is VERY hard and very fatiguing to stand on for long periods. I got a large cork mat (http://www.amazon.com/gp/product/B001QGYIDW/) to stand on which makes a big difference -- I think standing on something too spongy is just as bad as standing on something too hard. Many of the commercial standing mats looked too soft.

I'm also in very good physical shape (I routinely squat more than my body weight of 180), but there is an adjustment period when you go from sitting all day to standing. Taking frequent breaks is key -- every hour or two, sit or walk around for 10 or 20 minutes.

donmcc··on Why not to use ARC in Objective-C
Great review of ARC's pitfalls. I still think that ARC is overall a big win for Objective-C development.
donmcc··on Software Inventory by Joel Spolsky
Wherein Joel espouses an agile software development methodology and invokes the Toyota Production System.

And pictures of Taco the Husky are always appreciated :-)

donmcc··on Ask HN: Is any bootstrapped startup running their own servers?
We had over 1000 downloads direct from our server of our first free issue, and hundreds more from the iBookstore. Our second issue sold around 40 so far at $5 through the iBookstore and Amazon (with direct sales coming soon).

We're gearing up to publish our next issue at the end of July and do a big marketing/PR push around Photoshop World in September. I'm confident our one little server will hold up just fine.

The bulk of the 1000 downloads came over a couple days after we were mentioned in Adobe's Photoshop.com blog. According to Google Analytics we had on the order of 20 simultaneous visitors at times without a hiccup. That's actually a pretty light load for a modern PC server -- I didn't even bother to ssh into our mini to check performance stats. We do have CloudFlare proxying the site, so undoubtedly that helps.

donmcc··on Ask HN: How to start iOS development ?
I'm a big fan of Erica Sadun's "iOS 5 Developers Cookbook" http://www.amazon.com/The-iOS-Developers-Cookbook-ebook/dp/B... She starts off showing you how an iOS app works from main() on up, which gave me an understanding of how some of the "magical" parts of iOS work, like nib loading. The bulk of the book is a decent cookbook that you can cherry pick from as needed.

If you've worked with other event-driven GUI frameworks in the past, check out Sadun's book.

donmcc··on Ask HN: Is any bootstrapped startup running their own servers?
We're currently running most of our stuff from a Mac Mini we own (about US$1500) that's co-located with macminicolo.com in Las Vegas (about US$30/mo). It's mostly a static sight right now, though we'll be setting up an online store to do direct e-book sales in a few weeks. We will also get a second Mac Mini sometime soon to use as a staging/emergency replacement server.

We're selling e-books to a niche market (check out www.photoshopdimensions.com) so we're not worried about runaway traffic growth, though of course we'd love to have that problem.

This has worked out well for us so far. Setting aside our questionable server OS choice, the downside of owning your server is the higher up-front cost and responsibility for the hardware. You can reduce this by leasing a physical server from a hosting company.

The upside is you have the full server CPUs/memory/disk at your disposal; a modern server can support a pretty sizable load if you don't have to share it. I believe StackOverflow got pretty far in their early days on a single app server and a single DB server.

donmcc··on WWDC 2012 Session Videos
Always a good source for iOS devs. A (free) Apple developer account is required. Previous years are also available.
donmcc··on Ask HN: Best iOS resource for non-iOS-developers?
Kochan's "Programming in Objective-C" is decent http://www.amazon.com/Programming-Objective-C-Edition-Develo... and I'm a big fan of Erica Sadun's "iOS 5 Developer's Cookbook" http://www.amazon.com/The-iOS-Developers-Cookbook-ebook/dp/B....

If you've never programmed in C, you may want to seek out a good C tutorial. You can get pretty far in iOS working only with Objective-C objects, but plenty of C-isms leak through so it helps to be familiar with pointers, structs, functions and memory management.

Objective-C isn't too hard to get up to speed with, especially if you've ever worked in both C and a dynamic language like Python or Ruby. Wrapping your head around Cocoa Touch is a little more daunting, but Sadun's book does a good job of building up the basics step by step, then providing chapters on specific frameworks you can page-fault in as needed.

Apple recently added "Start Developing iOS Apps Today" https://developer.apple.com/library/ios/#referencelibrary/Ge... which is probably worth taking a look for a beginner.

donmcc··on Ask HN: Apple WWDC, MacBook Retina, Siri, Eyes Free, Which one is game changing?
The Passbook app struck me as a big deal.
donmcc··on Why Objective-C is Hard
Awesome! Thanks for the example. Painfully long but a lot easier to understand in situ than something like CreateWindow().
donmcc··on Why Objective-C is Hard
True, "verbose" isn't really the correct term, "explicit" better describes Objective-C. Here's an example where I think Objective-C's explicitness is helpful. The Windows API CreateWindow() function call in C:

  HWND hwnd = CreateWindow("MainWClass", "Sample",
                           WS_OVERLAPPEDWINDOW,
                           CW_USEDEFAULT, CW_USEDEFAULT,
                           CW_USEDEFAULT, CW_USEDEFAULT,
                           (HWND) NULL, (HMENU) NULL,
                           hinstance, (LPVOID) NULL);
And here's a long method call in Objective-C:

  NSString *filtered = [unfiltered stringByReplacingOccurrencesOfString:@"verbose"
                                   withString:@"explicit"
                                      options:NSCaseInsensitiveSearch
                                        range:NSMakeRange(0, [unfiltered length])];
Admittedly not equivalent examples, but I couldn't quickly find a Cocoa method call with eleven parameters. My argument is that if you're not intimately familiar with these two calls, CreateWindow() is pretty cryptic. You only get the most general sense of what it's doing without consulting a reference. Objective-C's strange method naming scheme (taken from Smalltalk) makes complex method calls much easier to understand in situ.
donmcc··on Why Objective-C is Hard
You do get used to it. Because it's a superset of C, Objective-C has all the syntactic noise of C and some of its own. Ruby is certainly more compact, though with its Perl influence, you can write very cryptic Ruby code. You do pay a price in Objective-C in order to have C directly and immediately available.

FWIW, extracting nested expressions into local variables helps a lot with nested method calls.

donmcc··on Why Objective-C is Hard
The idea is that code is written once but read many times. Objective-C's verbose naming make you work a little more when writing it (though a good programmer's editor or IDE like Xcode or AppCode greatly eases this) but it pays off each time you need to read the code, especially code you're not familiar with.

With it's C-based syntax, Objective-C isn't as clean as Python or Ruby, but due to the explicit naming conventions, I think it's more readable than Java or JavaScript.

donmcc··on The Unfamiliar (Objective-C & Cocoa)
I think Gruber would elaborate by mentioning that garbage collection has a real and measurable cost in terms of performance and Apple would rather have a development environment that allows devs to produce the smoothest UI performance over one like Java or C# that is novice friendly but harder to get the highest level of performance out of.

Personally I really enjoy working in Objective-C and Cocoa/Cocoa Touch. I think they both hit sweet spots in language/framework design and give you just enough high level abstractions to make developing easier without getting in the way. But then again, I program in C for fun :-)

donmcc··on How are you ever going to manage Python Packages? PyPi and pip
I'm relatively new to using virtualenv myself, but I think you replicate a virtualenv on a different os, architecture or location by creating a new virtualenv on the target machine then using pip to reinstall all the packages. You use "pip freeze" in your source environment to generate the package list then "pip install --requirements=<filename>" to reinstall packages on the target.
donmcc··on Ask HN: Do you need to be a "jerk" to get a complex project done?
Some people confuse leadership with being a jerk or making arbitrary decisions. That kind of abrasive approach is far more likely to result in a failed project than a successful one.

On a complex creative project like yours, it's far more important to make sure the lines of communication are flowing and the right people are talking to each other. You can't micro-manage everyone's work, but if you have good people on your team and your people are talking to each other (and listening to each other) on a weekly or even daily basis, a lot of problems will sort themselves out.

Make sure everyone's work is reviewed on a frequent basis. It's far less painful to tell someone they've gone down the wrong path and wasted a week than a month. The shorter you can make that feedback the better. (Take a cue from Pixar, where they review work in progress daily and have a culture of constructive criticism.)

The key thing you can do as the team leader is to build a bubble around them so they can do their work uninterrupted. This can mean anything from arranging for food and snacks to reducing unnecessary meetings and outside distractions to making sure everyone has all the computers, software and tools they need to do their jobs. Work hard to eliminate low value work such as voluminous requirements documents that no one reads or long boring reporting meetings where everyone is tuned out with their heads in their laptops.

Sometimes to do these things effectively you need to stand your ground, but there's no reason to be a jerk about it.

donmcc··on Poll: Which iOS version do you require?
We currently target 3.0 and later, but we will probably move to 4.0+ later this year for all new and updated apps. Our analytics is showing that the bulk of our users are on 4.0, in line with what Bump and others are seeing.
donmcc··on First Glance at Objective-C and the iPhone SDK (by a Java and C Developer)
With gc enabled, [autoreleasePool drain] asks the gc to run (IIRC), with gc disabled, it releases everything currently owned by the pool. Even on the Mac, you may still want to build your app without gc for performance reasons, and Apple gives you that option.

I'm sure we'll see gc on iOS devices eventually, but it's probably too memory hungry to be practical on the phone right now.

donmcc··on Ask HN: We're building a real-life, location-based MMORPG. Will you play?
Do you have a web site, mailing list or Twitter account?
donmcc··on Is the SSD worth the extra $$ on a new MacBook Pro?
Ten or twenty years ago, replacing the drive in my laptop and reinstalling the OS would have been a fun project, but I've got other demands on my time now, so I'm planning to stick with what Apple installs. Besides, I understand that the firmware on Apple drives is customized for their hardware/OS.
donmcc··on Is the SSD worth the extra $$ on a new MacBook Pro?
Mounting a RAM drive as /tmp is probably a good idea.
donmcc··on Objective-C Tuesdays: atomic and nonatomic properties
I agree. I think it gives the false impression that your properties are "thread-safe".
donmcc··on Objective-C Tuesdays: local variables and functions parameters
I'm trying to provide a concise overview of different language features and to highlight some common gotchas when using them. I'm assuming that most of my readers already know how to program well in at least one language, but are inexperienced with C and Objective-C. I agree that it's not a good tutorial for people just learning to program.
donmcc··on Objective-C Tuesdays: local variables and functions parameters
True, but Objective-C is a strict superset of C, and there are a large number of new Objective-C programmers that never learned C, or only used C in a class or two at school, and need a refresher.
donmcc··on Ask HN: Objective-C programming book
For learning your way around Cocoa Touch, I highly recommend Erica Sadun's "The iPhone Developer's Cookbook". I reviewed the first edition last year on my blog (http://blog.ablepear.com/2009/03/book-review-iphone-develope...). She recently released a second edition, which I haven't had a chance to read through yet, but is nearly twice as big as the first edition.
donmcc··on Objective-C Tuesdays: The for loop
If anyone has a good examples of strange for loop idioms, please send them my way.

For example, the infinite for loop:

  for (;;) { /* do something forever */ }
donmcc··on Objective-C Tuesdays: The for loop
Yeah, this series might be too elementary for "Hacker News", but I'm thinking there are some hackers out there doing iPhone development who are new to Objective-C and/or C or just not very experienced working in it.
← PreviousPage 2 of 2