<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I’m here for the cookies.</description><title>tumbljack</title><generator>Tumblr (3.0; @tumbljack)</generator><link>http://tumbljack.com/</link><item><title>MVCS</title><description>&lt;p&gt;S for Service. A new kind of thing that should also be encapsulated.*&lt;/p&gt;
&lt;p&gt;A good service layer is easy to use and has entirely out of the box functionality. I usually do this kind of thing the same every time, using a pattern I’ve seen around that works well. For every service that an app needs to connect to I have a utility class that has an API for requesting specific things from the service. All networking code required to talk to a service is encapsulated inside one of these classes and the class just exposes a nice, handy API to get things done.&lt;/p&gt;
&lt;p&gt;A good name for one of these things is usually My&amp;lt;#SERVICENAME#&amp;gt;Client  or My&amp;lt;#SERVICENAME#&amp;gt;Service, where ‘My’ is your class prefix and ‘SERVICENAME’ is the actual name of the service the app is requesting things from. I lean towards MySomethingClient because it is more correct, since our app and specifically this utility class is technically the client to the service that it&amp;#8217;s hitting.&lt;/p&gt;
&lt;p&gt;Watch out for including things like ‘REST’ in a class name, because all things network specific are an implementation detail. I would reconsider names like Fetcher and DownloadManager as well. While we know the class is doing these things, I think this behavior terminology is too specific to include in a class name. Plus Fetcher sounds kind of lame, and Manager is a name I think should only be used wisely, if ever. Also, I personally don’t think Controller makes sense here, because it is something else, and at a project level the behavior of a service class called Controller usually isn’t clear.&lt;/p&gt;
&lt;p&gt;So here’s how I do it.&lt;/p&gt;
&lt;p&gt;The client API will have methods like&amp;#8230;&lt;/p&gt;
&lt;p&gt;- (void)requestThingamajigsWithCompletionBlock:(void (^)(NSArray *thingamajigs,&lt;span&gt; &lt;/span&gt;NSError *error))block;&lt;/p&gt;
&lt;p&gt;and&amp;#8230;&lt;/p&gt;
&lt;p&gt;- (void)requestThingamajigWithName:(NSString *)name &lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;completionBlock:(void (^)(FOOThingamajig *thingamajig, NSError *error))block;&lt;/p&gt;


&lt;p&gt;All API methods call an an internal method like…&lt;/p&gt;
&lt;p&gt;- (void)requestValueForEndpoint:(NSString *)endPoint &lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;  completionBlock:(void (^)(id result, NSError *error))block;&lt;/p&gt;
&lt;p&gt;Each API method’s implementation builds an end-point, calls the request method and handles the result, which usually comes in the form of a JSON or property list object. A handy category for unpacking property list objects is arrayOfClass:forKey:. Once this internal method is set up it’s fast and easy to add more API calls. APIs that create or change things usually call an internal method like sendPOSTValues:toEndPoint:completionBlock:. And optional behavior like canceling and queueing can be added as necessary.&lt;/p&gt;
&lt;p&gt;That’s about it. Service is a new layer that should be encapsulated, clean and easy to use, like Cocoa.&lt;/p&gt;
&lt;p&gt;Here’s a quick and dirty sample I put together. If you have any opinions, feedback or better designs for this kind of thing, hit me up. &lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/joericioppo/MyThingamajigClient"&gt;https://github.com/joericioppo/MyThingamajigClient&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-&lt;/p&gt;
&lt;p&gt;* Chris Parker&amp;#8217;s great post on coding ruthlessly motivated me to finally post this.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://playswithfire.com/blog/2012/02/19/you-are-not-ruthless-enough/"&gt;http://playswithfire.com/blog/2012/02/19/you-are-not-ruthless-enough/&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;</description><link>http://tumbljack.com/post/17977256653</link><guid>http://tumbljack.com/post/17977256653</guid><pubDate>Mon, 20 Feb 2012 15:53:00 -0800</pubDate></item><item><title>Earth | Time Lapse View from Space
(@rands)</title><description>&lt;iframe src="http://player.vimeo.com/video/32001208?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://vimeo.com/32001208"&gt;Earth | Time Lapse View from Space&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(&lt;a href="https://twitter.com/#!/rands/status/135955604991774720"&gt;@rands&lt;/a&gt;)&lt;/p&gt;</description><link>http://tumbljack.com/post/12782912374</link><guid>http://tumbljack.com/post/12782912374</guid><pubDate>Mon, 14 Nov 2011 00:16:43 -0800</pubDate></item><item><title>Andy Gilmore</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lpsazpNNCx1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://crowquills.com/"&gt;Andy Gilmore&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/8794409873</link><guid>http://tumbljack.com/post/8794409873</guid><pubDate>Thu, 11 Aug 2011 15:11:49 -0700</pubDate></item><item><title>Less code, less effort</title><description>&lt;a href="http://inessential.com/2011/08/04/less_code_less_effort"&gt;Less code, less effort&lt;/a&gt;: &lt;p&gt;Brent Simmons&lt;/p&gt;</description><link>http://tumbljack.com/post/8507594683</link><guid>http://tumbljack.com/post/8507594683</guid><pubDate>Fri, 05 Aug 2011 00:54:42 -0700</pubDate></item><item><title>Sunrise - NASA</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_loodziXIqX1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Sunrise - &lt;a href="http://earthobservatory.nasa.gov/IOTD/view.php?id=51399"&gt;NASA&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/7879859015</link><guid>http://tumbljack.com/post/7879859015</guid><pubDate>Thu, 21 Jul 2011 01:52:30 -0700</pubDate></item><item><title>The Art of Drew Struzan</title><description>&lt;a href="http://blog.signalnoise.com/2011/04/26/the-art-of-drew-struzan/"&gt;The Art of Drew Struzan&lt;/a&gt;</description><link>http://tumbljack.com/post/5005967549</link><guid>http://tumbljack.com/post/5005967549</guid><pubDate>Wed, 27 Apr 2011 22:29:27 -0700</pubDate></item><item><title>Sunset over South America - NASA</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lk8rkdwR7K1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Sunset over South America - &lt;a href="http://earthobservatory.nasa.gov/IOTD/view.php?id=50205&amp;src=iotdrss"&gt;NASA&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/4948151949</link><guid>http://tumbljack.com/post/4948151949</guid><pubDate>Mon, 25 Apr 2011 21:09:49 -0700</pubDate></item><item><title> The Mountain - Terje Sorgjerd</title><description>&lt;iframe src="http://player.vimeo.com/video/22439234" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt; The Mountain - &lt;a href="http://vimeo.com/terjes"&gt;Terje Sorgjerd&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/4756834235</link><guid>http://tumbljack.com/post/4756834235</guid><pubDate>Tue, 19 Apr 2011 14:39:09 -0700</pubDate></item><item><title>Slow Company</title><description>&lt;a href="http://felttip.tumblr.com/post/3895547383/slow-company"&gt;Slow Company&lt;/a&gt;: &lt;p&gt;&lt;a href="http://twitter.com/luciuskwok"&gt;Lucius Kwok&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/3905390767</link><guid>http://tumbljack.com/post/3905390767</guid><pubDate>Wed, 16 Mar 2011 14:20:57 -0700</pubDate></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lgdm1wpNSa1qznpi1o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://tumbljack.com/post/3580104533</link><guid>http://tumbljack.com/post/3580104533</guid><pubDate>Tue, 01 Mar 2011 01:29:04 -0800</pubDate></item><item><title>fuckyeahspace:

Time-lapse of a whole night at the ALMA Array...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/Gmikl0RQP44?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://fuckyeahspace.tumblr.com/post/3385481572"&gt;fuckyeahspace&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Time-lapse of a whole night at the ALMA Array Operations Site, located on the Chajnantor plateau, in Chile.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://tumbljack.com/post/3388753655</link><guid>http://tumbljack.com/post/3388753655</guid><pubDate>Sat, 19 Feb 2011 13:44:08 -0800</pubDate></item><item><title>Vintage Future</title><description>&lt;a href="http://vintagefuture.tumblr.com/"&gt;Vintage Future&lt;/a&gt;</description><link>http://tumbljack.com/post/3359395072</link><guid>http://tumbljack.com/post/3359395072</guid><pubDate>Thu, 17 Feb 2011 23:27:27 -0800</pubDate></item><item><title>Warm Signal - Silke Sieler</title><description>&lt;iframe src="http://player.vimeo.com/video/13395858" width="400" height="225" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Warm Signal - &lt;a href="http://www.silkesieler.de/"&gt;Silke Sieler&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/3064360790</link><guid>http://tumbljack.com/post/3064360790</guid><pubDate>Tue, 01 Feb 2011 23:38:27 -0800</pubDate></item><item><title>if (!fuckingReadable) return;</title><description>&lt;p&gt;I got schooled the other day by my much respected and beloved elder. In so many words he said this..&lt;/p&gt;
&lt;p&gt;if (![you canFigureThisShitOut]) return toSchoolBitch;&lt;/p&gt;
&lt;p&gt;So after pondering the readability of &amp;#160;!this and&amp;#160;!that for a while, I realized the underlying motivations of my coding style, and why I check explicitly for aFlag == NO || aThing == nil. The thing is, I pretty much stopped caring about how readable code is ages ago. Instead, I&amp;#8217;ve found myself editing code, revisiting names, adjusting formatting, changing styles, all based on how enjoyable my code is to read. Because, presumably, if code is enjoyable to read, it&amp;#8217;s really fucking readable.&lt;/p&gt;
&lt;p&gt;So when I look at code that&amp;#8217;s banging nots in front of things all over the place, I realize, you&amp;#8217;re saying things backwards. You&amp;#8217;re actually speaking in awkward language. When I ponder the existence of self, I think, does self exist. Is this real. Is this empty. Is hope gone.&lt;/p&gt;
&lt;p&gt;Is not thing?&lt;/p&gt;</description><link>http://tumbljack.com/post/3063022547</link><guid>http://tumbljack.com/post/3063022547</guid><pubDate>Tue, 01 Feb 2011 21:38:00 -0800</pubDate></item><item><title>David Fuhrer</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lfvpbjRYUS1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://www.microbot.ch/"&gt;David Fuhrer&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/3028281319</link><guid>http://tumbljack.com/post/3028281319</guid><pubDate>Mon, 31 Jan 2011 00:38:07 -0800</pubDate></item><item><title>Kilian Eng</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lfhxfnUz4s1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://www.behance.net/KilianEng"&gt;Kilian Eng&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/2898345782</link><guid>http://tumbljack.com/post/2898345782</guid><pubDate>Sun, 23 Jan 2011 14:06:59 -0800</pubDate></item><item><title>Alexey Kurbatov</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lf8oup8fZY1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://www.kurbatov.net/graphics-2009/"&gt;Alexey Kurbatov&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/2816774392</link><guid>http://tumbljack.com/post/2816774392</guid><pubDate>Tue, 18 Jan 2011 14:23:00 -0800</pubDate></item><item><title>MyStyledView</title><description>&lt;p&gt;The first time I looked at drawing APIs I thought what the hell. They are generally quite low level, and always procedural. Even Cocoa’s Objective-C drawing APIs are very procedural in nature, because drawing is procedural. There are very few APIs that abstract this up to the styling level. One of my favorite things about CALayer is that it comes with built in styling properties. This is by far the better and more modern API because it abstracts what would be custom drawing code to the controller level where your unique code just becomes values to set.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;On iOS it’s really easy to set up a view and use the styling properties of the view’s built in layer to get simple UI elements on screen. You can even set one up to use a CAGradientLayer as its built in backing layer and get all kinds of cool stuff out of it just setting properties. Unfortunately on the desktop the integration with CALayer is not quite as awesome, and layer backed views can sometimes be problematic. I&amp;#8217;ve often ended up styling views from scratch with drawing code. &lt;/p&gt;
&lt;p&gt;&lt;br/&gt;This is a generic styled view class that I use all the time to get quick and dirty graphics on screen during development. The API has changed over time with usage, and I’m pretty happy with its current state for the most part. Styling is exposed through properties on the view. It has support for a fill color and gradient, with the gradient composited on top, and individual properties for top and bottom edges, as well as highlights. The left and right edges have gradient properties instead of colors. It also supports drawing inner shadows thanks to Sean Patrick-O&amp;#8217;Brien and his awesome bezier path category. And I recently added support for stretchable background images exposed through a leftCapWidth and topCapHeight property.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;Setting one up is just a few lines of code. I put together a simple demo with some goofy graphics I made up on the fly. The result looks like &lt;a href="http://blastastica.com/files/img/styled_view_demo_window.png"&gt;this&lt;/a&gt;. The class and categories used are &lt;a href="https://github.com/joericioppo/MyStyledView"&gt;available BSD&lt;/a&gt;.&lt;/p&gt;</description><link>http://tumbljack.com/post/2792603907</link><guid>http://tumbljack.com/post/2792603907</guid><pubDate>Mon, 17 Jan 2011 00:57:00 -0800</pubDate></item><item><title>The new Signalnoise Gallery</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lew6nx3JuL1qzzqhdo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://cargocollective.com/signalnoise"&gt;The new Signalnoise Gallery&lt;/a&gt;&lt;/p&gt;</description><link>http://tumbljack.com/post/2708386837</link><guid>http://tumbljack.com/post/2708386837</guid><pubDate>Tue, 11 Jan 2011 20:19:09 -0800</pubDate></item><item><title>jamiepinkham:

jeffrock:

rvameetups:

Some of Tumblr’s staff...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lentm02SMW1qzqtjho1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://jamiepinkham.com/post/2637963564/jeffrock-rvameetups-some-of-tumblrs-staff"&gt;jamiepinkham&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://jeffrock.com/post/2637894990"&gt;jeffrock&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://rvameetups.tumblr.com/post/2637724999/some-of-tumblrs-staff-members-from-new-york-will"&gt;rvameetups&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Some of Tumblr’s staff members from New York will be in town on Thursday. Please come to Legend Brewing starting at 6 p.m. to help us make them feel welcome and to celebrate the opening of Tumblr’s new office in Richmond. We’ll have free food, drinks, and goodies while they last!&lt;/p&gt;
&lt;p&gt;(Image courtesy of &lt;a href="http://jeffrock.com/"&gt;Jeff Rock&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is &lt;em&gt;huge&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Get ready. 2011 is going to be officially awesome for Tumblr mobile apps.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Booyah!&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://tumbljack.com/post/2649903966</link><guid>http://tumbljack.com/post/2649903966</guid><pubDate>Sat, 08 Jan 2011 01:26:40 -0800</pubDate></item></channel></rss>

