Jekyll2017-05-13T22:40:15+00:00/Daniel TreacyDo you care enough?2016-10-17T00:00:00+00:002016-10-17T00:00:00+00:00/2016/10/17/care-enough<p>Some folks use the word “craftsperson” to describe what they do as programmer. Up until recently, I thought it was a dubious way to describe what we do.</p>
<p>However, recent reflections have led me to realize that, of all the silly titles programmers use to describe themselves, “craftsperson” is actually one of the more instructive<sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup>, for a simple reason:</p>
<p><strong>A craftsperson cares deeply about their work.</strong></p>
<p>Everyone should have a craft, and aspire to greatness in it. And that greatness comes from caring.</p>
<p>Do you find yourself mostly trying to hack together something that works, or do you really care whether you’ve found the best solution for the problem, one that will stand the test of time, other programmers, and – most of all – change?</p>
<p>If so, then congratulations, you can (correctly) call yourself a craftsperson. If not, you may have some work to do.</p>
<p>Caring leads to better systems.</p>
<p>It leads to deeper knowledge, better skills, and richer experience.</p>
<p>When we care, we become concerned with how things work, not just the high level interfaces we need to accomplish a task. We are mindful about how we go about our work, and we constantly look for better ways to accomplish our goals. Each step of our journey is meaningful for the improvement it brings to our craft.</p>
<p>So how do you “care” more? Fortunately, in this case, I think caring has much more to do with how we <em>act</em> rather than how we <em>feel</em>. The idea is to generate a positive feedback loop where improving our work habits leads to heightened care, which in turn leads to further improvement in our habits, and so on.</p>
<p>Which actions to take depend on where you typically least demonstrate care in your work. Here are some things I remind myself to do:</p>
<ul>
<li>Read the full documentation, and not just the section that relates to your current problem.</li>
<li>Plan before your code. Write pseudo-code. Sketch out diagrams. When you think you’re ready, try to come up with <em>one more</em> alternative solution.<sup id="fnref:2"><a href="#fn:2" class="footnote">2</a></sup></li>
<li>Read science and technology papers. This can do wonders for filling important knowledge gaps.<sup id="fnref:3"><a href="#fn:3" class="footnote">3</a></sup></li>
<li>Get more disciplined about code quality (testing, code reviews, pair programming)</li>
<li>Continuously improve your tools (editors, automation, hardware)</li>
</ul>
<p>I’m still not going to call myself a craftsman, even of software, but I try every day to care as much as one.</p>
<hr />
<div class="footnotes">
<ol>
<li id="fn:1">
<p>How exactly do you “spin” code? <a href="#fnref:1" class="reversefootnote">↩</a></p>
</li>
<li id="fn:2">
<p>See Rich Hickey’s talk <a href="https://www.youtube.com/watch?v=f84n5oFoZBc">“Hammock-driven development”</a>. <a href="#fnref:2" class="reversefootnote">↩</a></p>
</li>
<li id="fn:3">
<p>If you’re wondering where to start, try Werner Vogel’s Back-to-Basics reading lists on <a href="http://www.allthingsdistributed.com/archives.html">All Things Distributed</a>. Just search the archives - unfortunately there’s no index post. <a href="#fnref:3" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>Some folks use the word “craftsperson” to describe what they do as programmer. Up until recently, I thought it was a dubious way to describe what we do.Be careful what you wish for2014-10-14T00:00:00+00:002014-10-14T00:00:00+00:00/2014/10/14/changing-the-world<p>The agenda for most ambitious startups is to “change the world”, which usually means creating products or services that will improve people’s lives and make them happier.</p>
<p>Capitalism never sounded so altruistic.</p>
<p>In reality, the impact of true change is never simple. It is a complex butterfly effect.</p>
<ul>
<li>
<p>The automobile helped us reach our destinations faster, but now road injury is one of the leading causes of death worldwide.<sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup></p>
</li>
<li>
<p>On one hand, social media has fostered greater communication and awareness between peoples, and democratized the dissemination of news and information. On the other hand, it has enabled (and continues to enable) systemic, anonymous, and unregulated bullying and harrassment.<sup id="fnref:2"><a href="#fn:2" class="footnote">2</a></sup></p>
</li>
<li>
<p>Smartphones have brought humanity’s collective knowledge to our literal fingertips, but we are quickly becoming addicted to our devices, and conditioning ourselves to expect instant gratification. <sup id="fnref:3"><a href="#fn:3" class="footnote">3</a></sup></p>
</li>
</ul>
<p>If you really want to change the world, keep in mind that you will not only change it in ways you intend, but in ways you won’t intend. Some of those ways you may not even <strong>like</strong>.</p>
<p>So ask yourself <strong>why</strong> you want to change the world, and be careful what you wish for.</p>
<hr />
<div class="footnotes">
<ol>
<li id="fn:1">
<p><a href="http://www.who.int/mediacentre/factsheets/fs310/en/">World Health Organization</a> <a href="#fnref:1" class="reversefootnote">↩</a></p>
</li>
<li id="fn:2">
<p><a href="http://www.theatlantic.com/technology/archive/2014/10/the-unsafety-net-how-social-media-turned-against-women/381261/?single_page=true">“The Unsafety Net: How Social Media Turned Against Women”, Catherine Buni and Soraya Chemaly, The Atlantic</a> <a href="#fnref:2" class="reversefootnote">↩</a></p>
</li>
<li id="fn:3">
<p><a href="http://theamericanscholar.org/instant-gratification/">“Instant Gratification”, Paul Roberts, The American Scholar</a> <a href="#fnref:3" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>The agenda for most ambitious startups is to “change the world”, which usually means creating products or services that will improve people’s lives and make them happier.Trimming the fat2013-03-23T00:00:00+00:002013-03-23T00:00:00+00:00/2013/03/23/trimming-the-fat<p>Last week I read an article on <a href="https://medium.com/">Medium</a> by <a href="https://twitter.com/jakek">Jake Knapp</a> about his experience removing all but the <em>essential</em> apps from his iPhone. I won’t repeat his story here. You should just <a href="https://medium.com/life-hacks/80f8d525b0d8">go read it</a>. I was inspired, so I did the same.</p>
<p>I switched off <strong>all</strong> push notifications (even email, as it is by far the worst) and removed all apps except for ones I use for some constructive purpose (read: browsing Facebook is not a constructive purpose). The others I classified as noise and deleted.</p>
<p>Here’s my home screen now:</p>
<p><img src="/assets/homescreen1.png" alt="Alt text" /></p>
<p>(The second screen is just folders of Apple apps I can’t delete)</p>
<p>No Tweetbot (that was a hard one), Instagram, Facebook, games, news apps (I allowed myself to pick one and one only - I went with Prismatic), location apps (don’t use them any more), and a host of other apps that, while they may be ‘cool’, resulted in a net loss for my productivity and mental health. My newly trimmed screen is not as extreme as Jake’s (his criteria were far stricter), but it still took some courage hit ‘X’ on some of those shaking app icons. I actually started by removing Chrome and disabling Safari, but I reinstalled Chrome as I was finding there were legitimate, non-time-wasting times I needed a mobile browser (but it means I need to be disciplined in how I use it).</p>
<p>The results?</p>
<p>I am no longer distracted by an email notification whilst concentrating or socializing. (If you honestly ask yourself, there are very few emails that are <strong>that</strong> important to notice right <strong>now</strong>). I check my email on my phone when <strong>I decide</strong>. It’s empowering.</p>
<p>I spend my “down-time” waiting in line at a cafe or on the train thinking, talking with people, reading (a book), enjoying a podcast, or just appreciating my surroundings.</p>
<p>I don’t spend hours per week sifting through photos of other people’s lives that don’t mean much to me.</p>
<p>I engage with social networks when I choose to, not when I receive a notification, or am bored.</p>
<p>I have a newfound respect for my time and energy.</p>
<p>I have a newfound respect for my phone, and try to ensure that I’m not filling it up with stuff I don’t use.</p>
<p>Are there any downsides?</p>
<p>I haven’t encountered any yet. At least, they haven’t been significant enough to warrant me going back.</p>Last week I read an article on Medium by Jake Knapp about his experience removing all but the essential apps from his iPhone. I won’t repeat his story here. You should just go read it. I was inspired, so I did the same.People you follow whom you love to hate2012-11-14T00:00:00+00:002012-11-14T00:00:00+00:00/2012/11/14/people-you-love-to-hate<p>If you use a social network in earnest I’d wager that there is someone you follow whom you can’t stand. Everything they say online <sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup> comes across as condescension, ignorance, or downright stupidity. They may be someone well-known in society, they may be someone familiar. I find this behaviour exceedingly common amongst programmers and geeks, for reasons probably best left undiscussed here.</p>
<p>Now, I’m as guilty of this as the next opinionated programmer, but there came a point when I felt enough was enough. I was <strong>tired of it</strong>. Whilst the emotion in the moment is strong, over time it damages the value you get through those social networks, and maybe even damages relationships. Plus, it’s <em>exhausting</em>.</p>
<p>Internet rage is unbecoming, not very Zen (if that matters to you), and, like real-life hatred, hurts you more than it does the recipient. This applies even if you never actually post anything but let yourself quietly simmer in the emotion without trying to get past it.</p>
<p>If you are struggling with getting angry or upset at people online, you have two options <sup id="fnref:2"><a href="#fn:2" class="footnote">2</a></sup> 1) you can “unfollow” or “unfriend” that person, which is the dignified thing to do (don’t like, don’t listen), or 2) you could try to resolve it, an option, in my opinion, much better for everyone, especially you. So, I have a simple lifehack that worked for me, and may help to resolve your feelings towards the object of your ire:</p>
<p><strong>Give the person a compliment</strong>.</p>
<p>It may not work all the time, and it certainly won’t work if the compliment is insincere. But it is much better for you (and them) than wishing a pox on their house, silently or not. If that person responds to you with thanks or a kind word, I can guarantee even if you previously hated their guts, your anger will fizzle out almost instantly. You may even find a new, valuable relationship.</p>
<div class="footnotes">
<ol>
<li id="fn:1">
<p>It is much easier to get angry at someone on the Internet as there is no face-to-face contact. If that person said the same infuriating comment in person, your reaction may well be different. <a href="#fnref:1" class="reversefootnote">↩</a></p>
</li>
<li id="fn:2">
<p>The implicit third option is to follow your emotions and “engage the rage”, but since these suggestions imply you are trying to <em>overcome</em> rage, I left it out. <a href="#fnref:2" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>If you use a social network in earnest I’d wager that there is someone you follow whom you can’t stand. Everything they say online 1 comes across as condescension, ignorance, or downright stupidity. They may be someone well-known in society, they may be someone familiar. I find this behaviour exceedingly common amongst programmers and geeks, for reasons probably best left undiscussed here. It is much easier to get angry at someone on the Internet as there is no face-to-face contact. If that person said the same infuriating comment in person, your reaction may well be different. ↩On temptation2012-02-22T00:00:00+00:002012-02-22T00:00:00+00:00/2012/02/22/on-temptation<p>We commonly think of temptation having the upper hand when people are down, weak, and fragile. In this state our emotions seem more powerful than the muscle of our conscience and willpower thus making us more vulnerable to the temptation of making regrettable mistakes, or giving up whatever work we are doing.</p>
<!-- more start -->
<p>A mentor of mine once told me that there is another state of mind in which temptation can easily usurp us: when we’re strong. This may sound like a paradox, but you’ve heard it before. It’s the classic hare and tortoise fable. Get too far ahead and you become lazy.</p>
<p>I’ve been going to the gym recently, in an attempt to complement my relatively inactive lifestyle. One week I went to the gym several times, each for a substnatial workout. Felt pretty good about myself too. Can you guess what happened the next week? I didn’t go at all. I succumbed to laziness because I felt like I had achieved a lot the previous week.</p>
<p>Another example. I was working last year on an app for myself. Since this was a side project, the time I spent working on it were irregular and squeezed between the rest of my daily schedule. Some weeks I worked on it consistenly, others not at all. The same scenario was at play as the gym example: after a week of solid investment in the app, the subsequent week (or two, or more) was lazy at best.</p>
<p>It’s also not just in human lives we can see this dynamic. In business strategy, there’s this concept of leapfrogging, in which a new entrant to a market overtakes the incumbent leader in market share. One of the main reasons the incumbent fails to maintain their position is essentially arrogance. They becoming too comfortable with their success and ignorantly dismiss the new entrant as a threat based on their <em>current</em> position. Rather than give an example of a company who fell to this sword, I’ll do the opposite. IBM is a company who dominated hardware in the 1980s, largely thorugh an (initially) exclusive agreement with Microsoft. They were able to carry this success forward in the 90s as well, even after they lost exclusivity with Redmond. Toward the end of the 90s, however, they realised that the future of the hardware industry would not remain the cash cow it had been for two decades. So they sold off their consumer hardware business to Lenovo to become primarily a software and consultingbusiness.</p>
<p>What’s the solution? “Don’t hold on to your achievements” comes to mind. “Slow and steady wins the race” is another. But as all wisdom it’s easier said than done and most of the time we know the right thing to do already. We just choose to do otherwise in the moment.</p>
<p>So choose differently.</p>
<!-- more end -->We commonly think of temptation having the upper hand when people are down, weak, and fragile. In this state our emotions seem more powerful than the muscle of our conscience and willpower thus making us more vulnerable to the temptation of making regrettable mistakes, or giving up whatever work we are doing.On back-end vendors2012-02-16T00:00:00+00:002012-02-16T00:00:00+00:00/2012/02/16/on-backend-vendors<p>I get how companies like <a href="http://www.stackmob.com">StackMob</a> are trying to make it easier for developers to get their apps up and running quickly and take a lot of the hassle out of setting up boilerplate services. I’ve played around with StackMob and the tools certainly seem helpful and easy to use. Wholistically, I think they’re doing a good thing.</p>
<!-- more start -->
<p>The disappointing side of the rise of these kind of services is that new developers may be tempted to opt in for a vendor like StackMob to provide an API endpoint rather than face the challenges and thought-processes involved in writing it themselves.</p>
<p>Writing a core service yourself gives you fine-grain control over your business logic. StackMob does let you upload custom code, a feature I admittedly haven’t tried yet, but the concept seems clumsy (you have to JAR up your code then upload it).</p>
<p>Further, needless to say, you learn a lot when you do something yourself. You don’t just gain mastery over the technical steps involved, you can also achieve big conceptual milestones when you need to deeply think about a problem on your own. There’s a big difference between hearing someone tell you that HTTP is a stateless protocol and learning <a href="https://twitter.com/#!/danieltreacy/status/129080404480241664">what that actually means</a>.</p>
<p>In doing something like setting up a REST endpoint you will probably reach the same ultimate destination as the current best-practice thought, simply because you will make mistakes that teach you <em>why</em> these patterns are considered best practice. More power to you.</p>
<p>At the end of the day, think of it this way: which would a potential employer value more: your familiarity with a vendor SDK or some lessons learned from the school of hard knocks?</p>
<!-- more end -->I get how companies like StackMob are trying to make it easier for developers to get their apps up and running quickly and take a lot of the hassle out of setting up boilerplate services. I’ve played around with StackMob and the tools certainly seem helpful and easy to use. Wholistically, I think they’re doing a good thing.The problem with job applications using a GitHub account2012-02-02T00:00:00+00:002012-02-02T00:00:00+00:00/2012/02/02/job-applications-github-account<p>Not all of us have very much (or very recent) code there.</p>
<p>Personally speaking, most of the code I’ve written (and therefore most of the systems I’ve built) in the last 2 years is the property of my employer at the time and I either do not have access to the code any more, and/or I am not allowed to show anyone outside the company.</p>
<!-- more start -->
<p>I admit I could be contributing more to open source - in which case I would have something to show on GitHub, but for one reason or another, I haven’t done much thus far. It’s unfortunate because I think evaluating a developer’s code is a great way to gauge competency and depth of understanding.</p>
<p>Guess I should start contributing more open source.</p>
<!-- more end -->Not all of us have very much (or very recent) code there.iTunes lack of streaming service is a game-changer2012-02-01T00:00:00+00:002012-02-01T00:00:00+00:00/2012/02/01/itunes-no-streaming-service<p>I’ve been using <a href="http://www.rdio.com">Rdio</a> for the last few weeks and have recently signed up as a subscriber after trying it out. Having access to virtually any artist or album on demand, with the ability to sync with my iPhone for offline listening is seriously rad. I’ve almost never opened iTunes (for music, that is) in the last few weeks and unless Apple can offer a superior subscription-based streaming service, I don’t see that changing.</p>I’ve been using Rdio for the last few weeks and have recently signed up as a subscriber after trying it out. Having access to virtually any artist or album on demand, with the ability to sync with my iPhone for offline listening is seriously rad. I’ve almost never opened iTunes (for music, that is) in the last few weeks and unless Apple can offer a superior subscription-based streaming service, I don’t see that changing.MySQL scales because Facebook uses it.2012-01-24T00:00:00+00:002012-01-24T00:00:00+00:00/2012/01/24/mysql-scaling<p>When people talk about MySQL and it’s ability to scale they often refer to Facebook’s <a href="https://www.facebook.com/MySQLatFacebook">extensive use</a> of it to power most of their database infrastructure.</p>
<!-- more start -->
<p>What many fail to mention is that Facebook’s <a href="http://gigaom.com/cloud/facebook-trapped-in-mysql-fate-worse-than-death/">MySQL implementation</a> is split into around 4000 shards that sit behind 9000 instances of Memcached that are required to service the traffic volume. So simply stating that MySQL scales fine because Facebook uses it is rather shallow and quite inaccurate.</p>
<p>It’s a shame that posts like <a href="http://tatiyants.com/nosql-no-more-lets-double-down-with-moresql/">these</a> only paint the “MoreSQL” movement as simply a rebuttal of the NoSQL hype rather than an eloquent discourse on the many benefits of using a relational database.</p>
<!-- more end -->When people talk about MySQL and it’s ability to scale they often refer to Facebook’s extensive use of it to power most of their database infrastructure.Last quarter Apple grossed approximately $21M per HOUR.2012-01-24T00:00:00+00:002012-01-24T00:00:00+00:00/2012/01/24/apple-results<p>Or $514M per day.</p>
<p>Or $15B per month.</p>
<p><a href="http://tumblr.com/ZEMtbyFI_zWd">Holy shit</a> indeed.</p>Or $514M per day.