Hacker News new | ask | show | jobs
by shtopointo 1408 days ago
Yes – I believe the author took the Design Patterns book and went to town.

The classes were small (< 100-200 LOC), they fit together well, and the code was well tested. It was a SyncML parsing library developed in-house in Objective-C.

What helped, I believe, was him coming from a Ruby / RoR background (extensive OOP usage) and the fact that this was his 2nd attempt at writing this, after he wrote a similar library in Ruby.

I think about some code to this day and try to emulate wherever possible. Although I think the guy that wrote it was also a very smart person and experienced programmer, so I don't beat myself up if I can't quite make it to that standard.

1 comments

> the fact that this was his 2nd attempt at writing this, after he wrote a similar library in Ruby.

I've seen and personally experienced that again and again.

While you don't always have the luxury of doing it, I think we make a bit too much from the "Second-syndrome effect" -- that says building it a second time will invariably be over-engineered -- and not enough from "build one to throw away" -- ironically both are from Fred Brooks.

Also under-estimate the value of domain knowledge, understanding the use cases and what needs to be done. If you've already built a thing (OR have intimate knowledge of a thing), and you know where it succeeded and failed, you can often use that knowledge to figure out the elegant design that will fail less and succeed more.