<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>don&#039;t panic</title>
	<atom:link href="http://lithium3141.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lithium3141.com</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 01:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Where Aero Vacation went wrong</title>
		<link>http://lithium3141.com/2012/05/15/where-aero-vacation-went-wrong/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=where-aero-vacation-went-wrong</link>
		<comments>http://lithium3141.com/2012/05/15/where-aero-vacation-went-wrong/#comments</comments>
		<pubDate>Tue, 15 May 2012 20:00:25 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[aero-vacation]]></category>
		<category><![CDATA[chillingo]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2498</guid>
		<description><![CDATA[Aero Vacation made mistakes that are beginning to become more and more common in iOS games, and I sincerely hope the trend reverses sometime soon. <a href="http://lithium3141.com/2012/05/15/where-aero-vacation-went-wrong/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Tonight, I uninstalled <a href="http://www.chillingo.com/">Chillingo</a>&#8216;s <a href="http://www.chillingo.com/games/aero-vacation/">Aero Vacation</a>, an iOS game that guides you through the process of building your very own airship. I wasn&#8217;t the first to do so, either; a couple friends independently made this decision earlier in the evening, and I had intended to be the holdout, continuing to build my masterful work-of-art airship. But no longer.<span id="more-2498"></span></p>
<p>Aero Vacation made mistakes that are beginning to become more and more common in iOS games, and I sincerely hope the trend reverses sometime soon. They were, in no particular order:</p>
<ul>
<li><em>Requiring a constant network connection.</em> Aero Vacation would display an alert view and prevent any user interaction until it could find a network connection. This happened every time the app was opened &#8211; even if only backgrounded for a split second &#8211; and took a good three to five seconds to complete. In some cases, the network connection would fail, even with a strong WiFi signal, requiring the user to hammer a &#8220;retry&#8221; button a couple times until it finally decided to go through. And if no network was available, the app would force-close itself, requiring a much longer reloading procedure the next time it was launched.</li>
<li><em>Requiring in-app purchase for critical game function.</em> Around level 16, Aero Vacation wanted me to build a Ballroom in my airship. Unlike most other buildings (which cost regular coins), the Ballroom cost special Aero Vacation dollars, which &#8211; though you could earn them in-game &#8211; were very difficult to come by, unless you felt like paying serious cash. In my opinion, games like Tiny Tower and Cut the Rope get this right: new content is available regardless of cash spent, even if it is a bit slower or requires that you play more. I&#8217;m more than willing to play extra if I enjoy the game; I&#8217;m not always willing to pay extra.</li>
<li><em>Losing player progress. </em>This was the most critically obvious flaw in Aero Vacation, and the proverbial straw that caused me to uninstall: the app reset me two levels, representing several days of play, after a bad network-related crash (see point #1 above). For players seriously invested in the game, this can be a huge blow, and the arbitrariness of the loss makes it that much harder to come back and rebuild: why bother continuing to play if the app can just lose my work?</li>
</ul>
<p>As I continue sampling iOS games for a week or two at a time, I&#8217;m noticing more and more that they get their respective game mechanics right; I&#8217;m very rarely worried about flaws in gameplay or graphics anymore. I tend to focus more on the problems surrounding the app itself: whether it can function offline, how much it expects me to spend in an average day of play, and whether it can guarantee my progress is safe.</p>
<p>Thankfully, there are still a good number of games that get this right: Tiny Tower and Cut the Rope are two examples from above. Temple Run is another popular recent game that works well offline, making Game Center purely optional, and one I&#8217;ve never seen progress lost in. After playing these types of games, Aero Vacation served as a rather painful reminder that not every developer is quite so observant of the needs of their users. In fact, I was rather surprised (when researching for this post) that Chillingo made both Cut the Rope and Aero Vacation, as they seemed incredibly different in behavior and user-friendliness. Let&#8217;s hope their next game can return to some of their former success.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2012/05/15/where-aero-vacation-went-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfred, you&#8217;re a Genius</title>
		<link>http://lithium3141.com/2012/05/10/alfred-youre-a-genius/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=alfred-youre-a-genius</link>
		<comments>http://lithium3141.com/2012/05/10/alfred-youre-a-genius/#comments</comments>
		<pubDate>Thu, 10 May 2012 19:07:30 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[alfred]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2493</guid>
		<description><![CDATA[...I can play a song with the iTunes Mini Player, then reopen Alfred and immediately Genius the song. I can also let a playlist or album start playing through, then turn it into a Genius playlist when I hit a favorite song. <a href="http://lithium3141.com/2012/05/10/alfred-youre-a-genius/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alfredapp.com/">Alfred</a> is one of my personal favorite and most-used apps on my Mac, and with the <a href="http://www.alfredapp.com/powerpack/">PowerPack</a>, it&#8217;s become my primary portal into iTunes as well. (Those of you with Macs but without Alfred are missing out.) However, there remains one big deficiency in Alfred as it ships: there&#8217;s no ability to generate a Genius playlist from the currently playing song.</p>
<p><span id="more-2493"></span>After some digging, I discovered an AppleScript from <a href="https://getsatisfaction.com/alfredapp/topics/genius_playlists#reply_8600193">user TingTingBen on GetSatisfaction</a> that accomplishes this:</p>
<p><code>tell application "iTunes"<br />
set TheITunesWindowName to name of (first window whose its class is browser window or its class is playlist window)<br />
activate<br />
if selection is {} then reveal current track<br />
end tell<br />
tell application "System Events" to tell window TheITunesWindowName of process "iTunes"<br />
click (first button whose value of attribute "AXDescription" is "Genius")<br />
end tell</code></p>
<p>By adding this to Alfred&#8217;s extensions and binding it to the keyword <code>genius</code>, I can play a song with the iTunes Mini Player, then reopen Alfred and immediately Genius the song. I can also let a playlist or album start playing through, then turn it into a Genius playlist when I hit a favorite song.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2012/05/10/alfred-youre-a-genius/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autocompletion level: Xcode</title>
		<link>http://lithium3141.com/2012/03/21/autocompletion-level-xcode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=autocompletion-level-xcode</link>
		<comments>http://lithium3141.com/2012/03/21/autocompletion-level-xcode/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 19:52:03 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2460</guid>
		<description><![CDATA[Working on an iOS contract application the other day, I happened to create a manager class for a data collection. The purpose of the manager was to bundle a table view data source in with other convenience methods for the &#8230; <a href="http://lithium3141.com/2012/03/21/autocompletion-level-xcode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Working on an iOS contract application the other day, I happened to create a manager class for a data collection. The purpose of the manager was to bundle a table view data source in with other convenience methods for the array being managed (<code>count</code>, etc.). In the process, I stumbled across a pretty aggressive autocomplete suggestion.</p>
<p><span id="more-2460"></span>The basic class header looks like the following:</p>
<pre>@interface MyDataManager : NSObject

@property (nonatomic, strong) NSArray * collection;

- (id)initWithCollection:(NSArray *)collection;

@end</pre>
<p>Here&#8217;s where the Xcode magic kicks in: beginning a method signature with the type <code>NSUInteger</code> and name <code>count</code> produces an autocomplete suggestion for the method <code>countOfCollection</code>. The toolchain will look at the existence of the property and infer that you want methods based on that collection &#8211; something beyond any other IDE I&#8217;ve seen.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2012/03/21/autocompletion-level-xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS launch-on-boot apps: fact or fiction?</title>
		<link>http://lithium3141.com/2012/02/18/ios-launch-on-boot-apps-fact-or-fiction/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ios-launch-on-boot-apps-fact-or-fiction</link>
		<comments>http://lithium3141.com/2012/02/18/ios-launch-on-boot-apps-fact-or-fiction/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 08:17:16 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2443</guid>
		<description><![CDATA[Turns out the documentation is accurate (surprise!), and apps with the voip key do start with the system... <a href="http://lithium3141.com/2012/02/18/ios-launch-on-boot-apps-fact-or-fiction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hanging out on StackOverflow the other day, I came across this little gem of a question: <a href="http://stackoverflow.com/questions/9300815/can-iphone-apps-start-on-start-up/">Can iPhone apps start on start-up?</a></p>
<p><span id="more-2443"></span>I was a bit surprised at the rather unequivocal answers most people were giving: one comment says,</p>
<blockquote><p>I don&#8217;t think they do, look at Skype for example. There are even &#8220;jailbreak&#8221; apps that start these kind of apps for you.</p></blockquote>
<p>An answerer to the question even posted almost immediately, garnering a number of upvotes and becoming (for a short time) the top answer:</p>
<blockquote><p>Without jailbreaking the device, it is <strong>not</strong> possible to automatically start an app on start-up &#8211; except for Apps from Apple. I have no official reference for this, but just ask the mentioned person to demonstrate how to do this (he likely won&#8217;t).</p></blockquote>
<p>First off, that&#8217;s a terrible reason to assert something: the fact that some given person won&#8217;t sit down and hold your hand to an answer that should be well-documented is <strong>no indicator</strong> that the answer isn&#8217;t true, or reliable, or anything less than solid. It&#8217;s not really an indicator of the reverse, either, but doubting something documented explicitly and only because it&#8217;s rather time-consuming to prove is rather arrogant.</p>
<p>More to the point, though, what&#8217;s the answer? Common wisdom in this situation seems to say that iOS won&#8217;t start apps automagically at boot time, but <a href="https://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW1">Apple&#8217;s documentation</a> mentions a very specific circumstance that&#8217;s an exception: adding the <code>voip</code> key to the application&#8217;s property list, under the &#8220;required background modes&#8221; array key. In this one instance, the iOS documentation says that the app will be launched so that it can negotiate a background connection and handle incoming calls as soon as the device is turned on.</p>
<p>From that little piece of information, it should be pretty trivial to make an app that contains the necessary keys and hack it to track its own startup time. <a href="https://github.com/lithium3141/BootLaunch">Right?</a></p>
<p>So to test this little theory, I started with the Utility app template, with Core Data enabled (but without unit tests &#8211; shame on myself). The only entity needed was an AppLaunch class with one attribute: a timestamp. After that, it was trivial to add a tiny method in the app delegate that inserted a new instance of the AppLaunch entity into Core Data with the current time as the timestamp, and hook up the main view controller to display the most recent AppLaunch instance&#8217;s timestamp in a label. (Please don&#8217;t judge me on my UI design.)</p>
<p>Turns out the documentation is accurate (surprise!), and apps with the <code>voip</code> key do start with the system &#8211; the sample app I tested updated its own launch time after a phone reboot, but before I had the chance to open the app myself. I gave each action about a minute of wait time, so there&#8217;s little chance of fuzzing a second here or there and messing up the results. All the same, I encourage other developers interested in the app/system boot relationship to <a href="https://github.com/lithium3141/BootLaunch">clone the code</a> and try it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2012/02/18/ios-launch-on-boot-apps-fact-or-fiction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software craftsmanship</title>
		<link>http://lithium3141.com/2012/02/13/software-craftsmanship/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=software-craftsmanship</link>
		<comments>http://lithium3141.com/2012/02/13/software-craftsmanship/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 02:27:57 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[best-practices]]></category>
		<category><![CDATA[craftsmanship]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2438</guid>
		<description><![CDATA[...programmers have, much to the same extent as other engineering disciplines, a rigorous set of best practices and professional ethics... <a href="http://lithium3141.com/2012/02/13/software-craftsmanship/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Something that&#8217;s been interesting me more and more of late is the concept of &#8220;software craftsmanship&#8221; &#8211; the concept that programmers(/developers/coders/hackers) have, much to the same extent as other engineering disciplines, a rigorous set of best practices and professional ethics that differentiate mediocre workers from true software engineers.</p>
<p>That&#8217;s a lofty intro for little more than a link: I just saw <a href="http://www.youtube.com/watch?v=QJxXUQIeB6E&amp;feature=BFa&amp;list=PL5FFA2E1C10CFB527&amp;lf=plpp_play_all">this series of videos</a> by Robert &#8220;Uncle Bob&#8221; Martin, and I thought they served as a really good introduction to the concept (if a little dated). Watch and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2012/02/13/software-craftsmanship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The best reverse-interview question, or: why source control is about more than just code</title>
		<link>http://lithium3141.com/2011/10/26/the-best-reverse-interview-question-or-why-source-control-is-about-more-than-just-code/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-best-reverse-interview-question-or-why-source-control-is-about-more-than-just-code</link>
		<comments>http://lithium3141.com/2011/10/26/the-best-reverse-interview-question-or-why-source-control-is-about-more-than-just-code/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 19:39:13 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2376</guid>
		<description><![CDATA[...it doesn't really matter to me what SCM you're using, nor will your choice (on its face) affect my decision. What really matters is why. <a href="http://lithium3141.com/2011/10/26/the-best-reverse-interview-question-or-why-source-control-is-about-more-than-just-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>What source control software do you use?</p>
<p>I&#8217;ve been asking this question at the end of interviews (in the &#8220;Do you have any questions for me?&#8221; phase) for the last two weeks, and it&#8217;s turned out to be one of the most revealing questions I could possibly have asked. Answers have ranged from CVS (still!) to Git to Perforce to that Microsoft Team Foundation Server thing.</p>
<p>And those are all well and good; it doesn&#8217;t really matter to me what SCM you&#8217;re using, nor will your choice (on its face) affect my decision. What really matters is <strong>why</strong>.<span id="more-2376"></span></p>
<p>The reasoning behind your SCM choice tells me an incredible amount about you, your company, and your management, all veiled as a technical question. If it&#8217;s a tech interview, you&#8217;re likely a developer, and I can see whether you appreciate your source control, look at it as an annoyance, or just don&#8217;t care one way or the other &#8211; indicative of how important that SCM system is in the company. If you&#8217;re management, you likely had to make a choice (or deliver a decree) at some point about that system, and your reasoning tells me about how strongly you micromanage, care about centralization, and understand your own release process. Either way, it&#8217;s all good information.</p>
<p>Let&#8217;s look at a couple examples (both real companies).</p>
<p>&#8220;Company A&#8221; uses Subversion &#8211; not uncommon in the industry. In a tech interview, though, the interviewer said that they had looked at Git and wanted to migrate, but literally didn&#8217;t have enough developers to explore the switch (hence the hiring process for the company). Furthermore, on a small scale, the company allowed individual developers to use their own systems, so long as they integrated with the central repo as necessary (for Git, this means git-svn or similar).</p>
<p>&#8220;Company B&#8221; also uses Subversion. Their approach, however, is much different: the CEO made a decree that SVN was the required tool for <em>all</em> developers. He justified this due to his desire for one central, &#8220;official&#8221; repository that always had the master branch, and the need for developers to always be working against that branch.</p>
<p>As an advocate of distributed version control, Company A sounds pretty good &#8211; they allow Git or Mercurial on a small scale, and are open to newer technologies companywide, indicating an agility within their development department. Company B, on the other hand, sounds as though development is hamstrung by management, and that the people with decision-making power don&#8217;t understand the new technologies available in DVCS.</p>
<p>I extend this kind of reasoning to pretty much every company I talk to. The ones on CVS better have a good reason (large legacy code, for example); Microsoft TFS users are usually apologists as well, which has its own implications; and people on Git or Mercurial generally go into great detail about why they like it <em>and </em>what problems they&#8217;ve had recently. The last is the most encouraging, because it implies a level of software craftsmanship (caring about their tools) rather than a focus on just slinging code. There was even one company on Darcs, which was incredibly interesting just for the different perspective they offered.</p>
<p>In general, SCM choice offers an interesting window into a company from a development perspective &#8211; it speaks to the mentality of the developers and the atmosphere of the company, more than a straight-up question about &#8220;day-to-day experience&#8221; might.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2011/10/26/the-best-reverse-interview-question-or-why-source-control-is-about-more-than-just-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://lithium3141.com/2011/10/06/apple/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apple</link>
		<comments>http://lithium3141.com/2011/10/06/apple/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 22:16:56 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[steve jobs]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2359</guid>
		<description><![CDATA[Steve, and Apple, had the unique ability to take computing, devices, programs, and UI, and make them simple. And elegant. And fun. <a href="http://lithium3141.com/2011/10/06/apple/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://24.media.tumblr.com/tumblr_lqhr46trpa1qz9917o1_500.png"><img class="aligncenter size-full wp-image-2362" title="Steve" src="http://lithium3141.com/wp-content/uploads/2011/10/tumblr_lqhr46trpa1qz9917o1_500.png" alt="" width="500" height="500" /></a></p>
<p>I used my first Macintosh at the age of two &#8211; a Mac LC III, purchased in early 1993 along with an expanded hard drive. In elementary school, my friends and I stayed in during recess to install and play games on the classroom Macs. I learned to type on the early iMac G3s. I got my very own MacBook Pro in late high school, and upgraded to another Pro last year. I own an iPhone 3GS and iPad, and will place a preorder for the 4S tomorrow.</p>
<p>Steve Jobs and Apple brought something special to each one of these moments.</p>
<p><span id="more-2359"></span></p>
<p>More importantly, Steve and his company made each of these moments possible. I couldn&#8217;t imagine getting my computing start on Windows 3.1 in &#8217;93, or hacking on a Linux box in fifth grade. Steve, and Apple, had the unique ability to take computing, devices, programs, and UI, and make them simple. And elegant. And fun.</p>
<p>I&#8217;ve played with a number of systems and machines in the past 18 years. Never have I found one that&#8217;s had the same feeling as a Mac, the same intuition or style. I use a Mac now, and it&#8217;s made everything &#8211; from just plain browsing to intense coding sessions &#8211; feel incredibly natural. And it was Jobs&#8217; skill, vision, and intellect that helped guide today&#8217;s Mac into that place.</p>
<p>Apple &#8211; and the world &#8211; has lost a true leader in the technology industry. We can only hope his influence and passion remain.</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2011/10/06/apple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Credit where credit&#8217;s due</title>
		<link>http://lithium3141.com/2011/09/21/credit-where-credits-due/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=credit-where-credits-due</link>
		<comments>http://lithium3141.com/2011/09/21/credit-where-credits-due/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 23:28:33 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[best-practices]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[source-control]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2341</guid>
		<description><![CDATA[In a pull request, though, there are two key people: the author and the committer... Both of these people should have their names attached to the commit. <a href="http://lithium3141.com/2011/09/21/credit-where-credits-due/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>GitHub pull requests are a marvelous thing. They&#8217;ve taken cross-team contribution and random patches and made a system, built on Git, that simplifies bugfixes and new features down to the push of a button.</p>
<p>In a pull request, though, there are two key people: the <strong>author</strong> and the <strong>committer</strong>. The author is the one actually responsible for writing the code; the committer is the one that sticks it in a repository (usually a privileged or &#8220;main&#8221; repository for release purposes). Both of these people should have their names attached to the commit, but by default in a pull request, only the author&#8217;s name appears &#8211; the committer is ignored entirely.</p>
<p>This article lays out a series of Git commands to resolve this problem and mention both contributors on a single commit in GitHub, using a recent patch to <a href="https://github.com/Herocraft/Multiverse-Portals">Multiverse-Portals</a> as an example.</p>
<p><span id="more-2341"></span>In this case, a friendly dev named VibroAxe added support for portal cooldowns. (What they are isn&#8217;t important; the important part comes next.) This support was spread across two patches, and regrettably used tabs instead of spaces, so there was still some work to do.</p>
<p>Let&#8217;s first lay out the existing situation:</p>
<ul>
<li>Central repository managed by myself and <a href="http://fernferret.com/">FernFerret</a></li>
<li>Forked repository for VibroAxe with two new commits</li>
<li>Fix implemented but with poor tabbing practices</li>
</ul>
<p>And what do we want to happen?</p>
<ul>
<li>Central repository gets <strong>one</strong> new commit</li>
<li>New patch contains content from both VibroAxe&#8217;s patches <strong>and</strong> fixed tabbing</li>
<li>New commit mentions VibroAxe as author, myself as committer</li>
</ul>
<p>As mentioned, we <strong>can&#8217;t</strong> use GitHub&#8217;s built-in merge button, since that just does a branch merge with fast-forwarding; it has no mention of the committer anywhere.</p>
<p>So let&#8217;s start by checking out the primary repository, then adding a remote for VibroAxe&#8217;s repository:</p>
<pre>git clone git@github.com:Herocraft/Multiverse-Portals.git
cd Multiverse-Portals
git remote add vibroaxe https://github.com/VibroAxe/Multiverse-Portals.git</pre>
<p>Now we can fetch the contents of his repository, which contains the commits we&#8217;re merging:</p>
<pre>git fetch vibroaxe</pre>
<p>Once fetched, we need to work with the new code, so we can check out a branch. However, since we fetched without explicitly branching to track VibroAxe&#8217;s repository, we need to create a branch name while checking out:</p>
<pre>git checkout -b vibroaxe-cooldowns vibroaxe/master</pre>
<p>Now we&#8217;re on a branch with the new code that needs to be merged back. Before we combine, though, let&#8217;s fix the spacing issues &#8211; we alter any code that needs to be changed and create another commit. Now we&#8217;re <strong>three commits ahead</strong> of the upstream master branch.</p>
<p>From this point, getting those commits onto master involves a simple rebase:</p>
<pre>git rebase -i master</pre>
<p>While rebasing, we can leave the first commit as &#8220;pick,&#8221; but &#8220;squash&#8221; the next two commits down onto the first &#8211; this will leave us with only one commit on master that combines the work done in VibroAxe&#8217;s two commits and the spacing work done in the third.</p>
<p>After fixing up the messages for our new combined commit, we simply push back to master and call it a day:</p>
<pre>git push origin master</pre>
<p>And voila! GitHub shows VibroAxe as the committer of a <strong>single commit</strong> combining <strong>all work needed</strong> for the new cooldowns feature.</p>
<div id="attachment_2342" class="wp-caption aligncenter" style="width: 956px"><a href="http://lithium3141.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-21-at-7.25.18-PM.png"><img class="size-full wp-image-2342" title="GitHub: Committer-author" src="http://lithium3141.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-21-at-7.25.18-PM.png" alt="" width="946" height="114" /></a><p class="wp-caption-text">Github commit with committer and author</p></div>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2011/09/21/credit-where-credits-due/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PneumatiCraft 1.8</title>
		<link>http://lithium3141.com/2011/09/16/pneumaticraft-1-8/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pneumaticraft-1-8</link>
		<comments>http://lithium3141.com/2011/09/16/pneumaticraft-1-8/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 19:56:34 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Minecraft]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2333</guid>
		<description><![CDATA[Note: this post is for PneumatiCraft players on the Minecraft 1.8 update. It will have little relevance or meaning outside that group. Hello happy players! This post is meant to be a pretty in-depth explanation of what&#8217;s new in Minecraft &#8230; <a href="http://lithium3141.com/2011/09/16/pneumaticraft-1-8/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>Note: this post is for PneumatiCraft players on the Minecraft 1.8 update. It will have little relevance or meaning outside that group.</em></p>
<p><span id="more-2333"></span></p>
<p>Hello happy players! This post is meant to be a pretty in-depth explanation of what&#8217;s new in Minecraft 1.8 on our server. It assumes you have a passing familiarity with the upgrade already, but even that isn&#8217;t 100% required.</p>
<p>The biggest change by far is in the &#8220;game mode.&#8221; Minecraft 1.8 introduces an experience bar, a food/hunger bar, and a difference between creative and survival modes. The server integrates all of these in some way.</p>
<p>First off, all existing worlds will play in <strong>survival mode</strong> by default. This is most similar to the Minecraft experience you&#8217;re familiar with; the only addition will be the hunger and experience bars. Mob settings remain the same; there will continue to be no hostile mobs in the main world, but new hostile mobs will begin appearing in the hostile worlds (including &#8220;hostile,&#8221; &#8220;scratch,&#8221; and &#8220;skyland&#8221;).</p>
<p>We will be creating a new &#8220;creative&#8221; world. This world will be the <strong>only world</strong> to play in creative mode, and we will be <strong>separating its inventory</strong> from all the other worlds. This means that, even though you can have an unlimited number of any block in creative mode, you can&#8217;t bring them back to other worlds and sell them for a profit.</p>
<p>Unfortunately, the terrain generator changed in Minecraft 1.8, and there&#8217;s no option to keep the old generator. This means that land outside the current world boundaries will behave as it has in past updates, and will generate new 1.8-style chunks. This will lead to some pretty sharp edges (cliffs and the like) in all existing worlds. I&#8217;m sorry, but there&#8217;s no way to avoid this &#8211; players can choose to just deal with it, stay within existing world boundaries, or (my personal favorite) build cool walls/stairs/transports across chunk edges.</p>
<p>In order to avoid the inevitable issues with hiking 20 minutes to get to 1.8-style chunks in the main world, we will also be creating a <strong>new peaceful world </strong>that will be completely unoccupied. The rules will be the same as the current peaceful world: it will play in survival mode, and players must respect each other&#8217;s territory. The purpose of this world is to allow players to get new materials from 1.8-style chunks more easily. Its inventory will be shared with the current network of worlds.</p>
<p>Thankfully, all the existing plugins still work, with one exception: SignShops. There <strong>will be breakage</strong> in some of the shops that are set up; again, I&#8217;m sorry, but this is unavoidable. We are moving to a different shops plugin with a better record for supporting new Minecraft versions, and I will provide more info and help transition as soon as possible.</p>
<p>Thanks for your patience during this transition, and happy mining!</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2011/09/16/pneumaticraft-1-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby for everyday tasks</title>
		<link>http://lithium3141.com/2011/09/07/ruby-for-everyday-tasks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ruby-for-everyday-tasks</link>
		<comments>http://lithium3141.com/2011/09/07/ruby-for-everyday-tasks/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 03:25:54 +0000</pubDate>
		<dc:creator>lithium3141</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://lithium3141.com/?p=2322</guid>
		<description><![CDATA[Ever since I learned to drive, I&#8217;ve been trained to record both the trip and total mileage when buying gas. As a young driver, this was for my parents&#8217; finance tracking &#8211; they&#8217;d buy gas on their vehicles, and so &#8230; <a href="http://lithium3141.com/2011/09/07/ruby-for-everyday-tasks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever since I learned to drive, I&#8217;ve been trained to record both the trip and total mileage when buying gas. As a young driver, this was for my parents&#8217; finance tracking &#8211; they&#8217;d buy gas on their vehicles, and so it all went into the big money database somewhere.</p>
<p>Being a creature of habit, though, I kept doing this after I started buying my own gas, and eventually wound up with a stack of gas receipts with two numbers scribbled across the top. Since my parents no longer cared about them, though, I became responsible for these little scraps of paper. Why not have some statistical fun with them?</p>
<p>To satisfy my curiosity (and to be able to throw away all those crumpled-up receipts), I wrote <a href="https://github.com/lithium3141/GasTracker">GasTracker</a>, a single-serving Sinatra application that allows users to list cars and drivers, then record the gas purchases made by each driver on each vehicle. To get some usefulness out of the thing, I also made it generate summary statistics for the purchases it tracked:</p>
<div id="attachment_2324" class="wp-caption aligncenter" style="width: 650px"><a href="http://lithium3141.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-07-at-11.17.13-PM.png"><img class="size-large wp-image-2324" title="Screen Shot 2011-09-07 at 11.17.13 PM" src="http://lithium3141.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-07-at-11.17.13-PM-1024x416.png" alt="Gas tracker screenshot" width="640" height="260" /></a><p class="wp-caption-text">Screenshot of the prototype gas tracker with current data set</p></div>
<p>Yes, those numbers are accurate for my gas purchase history: I really have spent almost $1,800 on gas since September 2009, even though I got an average purchase price of $3.17 per gallon.</p>
<p>Right now, I have this deployed internally behind Apache (with <a href="http://www.modrails.com/">Passenger</a>) so that I can have some password-protection. Next steps are to clean up the UI, finish out the REST API, and write a mobile application. (Feel like contributing? <a href="https://github.com/lithium3141/GasTracker/fork">Fork it on GitHub</a>!)</p>
]]></content:encoded>
			<wfw:commentRss>http://lithium3141.com/2011/09/07/ruby-for-everyday-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

