A few attempts to make some code less dense. Thoughts welcome.
http://twitter.com/CocoaKevin/status/605061973647237123
@CocoaKevin Exactly that. It's unreadable, has no error path, hard to comment, hard to convey thought process
— ericasadun (@ericasadun) May 31, 2015
http://twitter.com/CocoaKevin/status/605063998757826560
@ericasadun How about parsing the json into a Product struct first, then add ShowPrices & CheckRatings as methods on the struct?
— Al Skipp (@al_skipp) May 31, 2015
@ericasadun I would break it down a bit. Have a struct that knows how to initialise itself from JSON rather than just Parsing and printing.
— Joseph Lord (@jl_hfl) May 31, 2015
Comments are closed.