Indelible Blue Pen

Jason C. McDonald (CodeMouse92)


January 23, 2018

A Trendy Article From 2048

Thanks to a glitch in the time-space continuum (which apparently operates on C code, who knew?), I accessed the following article, written by some random coder, from a version of dev.to 30 years in the future.

The most interesting part to me is the comment section on that article. Just goes to show you, the more things change, the more things stay the same.

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
January 20, 2018

Please Reinvent The Wheel

Don’t reinvent the wheel.

I submit the aforementioned for admittance into the “Terrible Folk Wisdom Hall of Fame.” We bandy the phrase about as if it is holy scripture, but think about it…

How many times in the history of the world have we literally reinvented the wheel?

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
January 09, 2018

Attack of the Focus Leeches

For me, the single most difficult thing to regulate is my focus. I’m beginning to suspect that, after my head injury in high school, I may have picked up a shard of ADD, or at least something functionally resembling it, along with the other new challenges. As soon as a random thought appears in my mind, I feel immediately compelled to follow up on it.

I’ve isolated a few major focus leeches that suck up my productivity during work hours:

  • Infinitely distracting sites, such as social media: for me, that’s Twitter, YouTube, and GoComics.

  • Random IRC discussions that have nothing to do with anything.

  • Trivia dives: reading plot notes for various films and books, learning who invented marbles, or finding the GNP of Brazil.

Controlling these distractions is an ongoing uphill battle for me, but I have found a few tactics which help keep these in check. The trick, and perhaps a good personal goal for 2018, is implementing them.

Actively Block Distractions

The first step is also the easiest: making it difficult to access timesinks. For me, this means installing distraction blocking plugins (Leechblock NG on Firefox, and Stayfocusd on Chrome-based browsers).

Both plugins allow me to set specific blocking hours and time limits on sites, and even subsites, that are distracting to me during work hours. Twitter, YouTube, and all of my favorite comics go on this list.

The catch, of course, is that I sometimes need Twitter and YouTube from a professional standpoint. This is why it’s important that I have time limits, giving me 15 minutes in total across all blacklisted sites during work hours.

I also only block YouTube URLs containing /watch/, thereby allowing me unlimited access to my own control panels, as well as the search index itself (for finding links for other people). On Twitter, I’ve similarly whitelisted the api. subdomain, since I need this for IT work.

I do have other ways of accessing any site. Technically, between my two main browsers (Firefox and Vivaldi), I have a total of 30 minutes. I can also access freely via Chromium or Opera, which I retain for webmastering work, or through Tor. However, I find that these alternative routes don’t harm this strategy for me personally:

  • I don’t consider deliberately bypassing my distraction filters to be a viable option. It feels like cheating and lying to myself.

  • I never login to anything on Chromium, Opera, or Tor, thereby still blocking social media.

  • I’ve found my self-control is at least decent enough to not cheat. This is also why I leave Leechblock’s controls unlocked, in case I need to tighten controls or fix a mistake.

Distraction blockers are also helpful for me in that, when I really need to focus, I just engage “nuclear mode” on both, immediately blocking everything in my blacklist.

Cut Down On Bookmarks

Unfortunately, there are things I cannot add to my blacklists. For work, I often require unlimited access to sites like Wikipedia, CodinGame, StackOverflow, and dev.to(). Of those, Wikipedia is the worst offender, fueling many a “trivia dive”.

Similarly, those necessary 15 minutes of access to my blacklisted sites can even become a springboard for distraction. Twitter is a veritable rainforest of distracting off-links. I cannot reasonably check the box to block “outlinks” from blacklisted sites, because sometimes I use Twitter to find a link I need for work!

The solution to this conundrum proved quite simple. I had to renovate my bookmarks. Everyone’s bookmarking habit is different. Some people leave tabs open, others curate lists on Pocket or their sidebar. For me, I use the bookmarks bar, omitting most works and just relying on website icons and Unicode symbols.

Take a look at my Vivaldi bookmarks bar. (By habit, I use Firefox when working.)

A cluttered bookmarks bar

Last month, when I habitually clicked on Twitter for what much have been the twentieth time in one day, and reached the same “site blocked” page I’d already hit countless times before, I realized my problem: my distractions were too visually available. Every time I felt aimless when bringing up a new tab, I’d click on something towards the middle, and that was usually Twitter.

If it wasn’t Twitter, it was any of the other dozen or so focus leeches I’d pinned to my bookmarks bar. (That smiley-face folder is my list of bookmarked comics, also a major clickhole for me.)

So, when I set up Firefox Quantum for a new work year, I decided to limit what bookmarks I’d bring over.

A controlled bookmark bar

I now find that I access Twitter deliberately only, maybe two or three times a day. Instead of clicking the bookmark, I have to actually start typing in “twitter.com”, and that extra effort lengthens my Moment of Choice: I often stop myself and ask, “why am I walking into a known distraction?”

Also, note what is on that trimmed down bookmarks bar: only things for work! DuckDuckGo, Archive.org, StackOverflow, CPlusPlus.com, dev.to(), GitHub, Authorea, our company work websites, and then my folders of Things To Process (!!!), documentation, and tools. I have cut out all games, all social media, and anything else that might distract me during work.

Yes, I still leave these things in place on Vivaldi, which is basically my “recreational” browser. I may trim it down later, or I might not. By habit, I don’t use Vivaldi during work hours, unless a technological need calls for it.

Unplug

I do not own a smartphone anymore. I did once, and it sucked up a LOT of my attention. There were a few techniques that I had to use to keep it under control:

  • If I didn’t need to take calls or texts, I turned off the smartphone and put it away.

  • As much as I loved Angry Birds, I actually removed it and many other games for a time. I did keep a couple of games around, such as Angry Birds Go!, because the microtransactions blocked me from playing after a certain amount of time or lives.

  • I removed social media apps from my home screen. The effort of finding the icon increased my moment of choice, just like with the bookmarks. I even uninstalled YouTube altogether.

  • While I never did this personally, if you find yourself getting distracted on your phone a lot and you can’t put it away, consider purchasing and installing a distraction blocker such as Freedom.

Remind Yourself Of Work

This still leaves a few focus leeches in place: StackOverflow and dev.to especially. I need these for work, but I also lose a lot of time browsing them.

Besides this, I have IRC to contend with. I live, play, and work on IRC. It is as vital to my workflow as coffee. Disconnecting simply isn’t an option.

To keep myself on task, I have to use a more positive approach: remind myself of work. For me, this takes the form of Hamster, a desktop time tracking tool which can also periodically flash a notification reminding me of my current task.

I find that, when Hamster is running, I am at least twice as focused. If I find myself drawn into a scintillating IRC conversation, or reading one-too-many dev.to() articles, the timely “You’re working on code” notification brings me back to earth.

Schedule Curiosity

Perhaps the most insidious focus leech is my vicious Curiosity. Just when I get flow, it’ll sneak up behind me and demand to know how many companions Doctor Who had, and it won’t rest until satisfied. I call these “trivia dives” because they never stop with one question. A mention of Donna will lead to my wanting to rewatch that epic time she beat the Daleks, and that will lead to curiosity about when the Daleks first appear, and that’ll lead into wondering what other famous roles were performed the original actor playing Davros………..

(It doesn’t help that I have two ways of accessing YouTube, and no way to plug that gap. I’m not describing the other method, lest I lead others astray.)

I can’t really get rid of that Curiosity. It’s part of who I am, and one of the driving forces behind my career progression. Instead, I have to control it.

One of the most effective, if personally underused, ways of doing this is to keep a notebook handy. Whenever my Curiosity demands to know how large the biggest Amazonian spider is, I can jot a note to look up the fact later.

I also have specific times that are free for me to exercise that ravenous Curiosity. This is one reason why I get up at 6 AM every weekday. I find that if I get it out of my system before starting work, the Curiosity has something to chew on throughout the day.

To put it another way, having a Curiosity such as mine is like owning a very large husky. The only way to keep it from destroying your house when you’re at work is to ensure it gets plenty of exercise, and that you leave it with things to play with. You can’t suppress the energy of a husky, you can only redirect it.

Limit Aimlessness

I find I cannot focus if I don’t know what I’m working on in advance, the time spent trying to remember (or think of) what to work on is a prime opportunity for focus leeches to move in.

At the start of the week, I like to write down everything I want to get done that week. Then, every morning (or the night before), I set specific goals for the day. I actually write down more things than I know I’ll achieve, so if something doesn’t take long to complete, I have no shortage of other things to work on.

Putting This In Use

Obviously, the exact nature of my focus issues are unique to me. However, this is something many of us struggle with to varying degrees. Here’s my tips again, in a more generic form.

  1. Identify unproductive distractions, and cut back on them using distraction blocker tools. Customize their strictness as necessary for your level of self-control. However, be careful not to lock yourself out of things you need for work!

  2. Configure your bookmarks, icons, and shortcuts to increase the time it takes to start something distracting. It’s all about increasing your Moment of Choice.

  3. Mobile devices are major enemies of focus. Employ the other tactics on your devices, and unplug whenever you can.

  4. Set positive reminders about what you’re working on, to snap you out of distractions. You might use time tracking tools, alarms, or even typing break reminders – whatever will frequently remind you you’re working.

  5. Tame your Curiosity. Write down things to look up later, and set times to take your inquiring mind for a “run”.

  6. Plan your workday in advance. Don’t give yourself opportunities to not know what you’re doing, because that’s a prime opportunity for focus leeches.

Facebooktwittergoogle_plusredditpinterestlinkedinmail
January 02, 2018

Gallifreyan Software Project Management

I first picked up programming in my junior year of high school — perhaps better understood as my second junior year, as a traumatic brain injury [TBI] two years prior had set me lightyears back academically, from 4.0 Sophomore and college-level reading to failing pre-K material. I had crawled, hand-over-claw, back to the same level of coursework I had once been able to work with. In the process, I had lost my ability to fully grasp the biological sciences I’d once loved, but I had gained a tremendous understanding of math. Along with it, I now had the ability to visualize algorithms in higher dimensions. I’ve had it compared to a superhero origin story, albeit without the tangible powers.

It was during this “second junior year” of high school, during which time I was playing around with Visual Basic, that I picked up a copy of Dreaming in Code by Scott Rosenberg.

In the very first chapter, Rosenberg describes something he calls “Software Time”…

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
December 12, 2017

IRC Netiquette and You

Like it or not, IRC is still one of the predominant chat protocols in the computer industry. Hundreds of others have come and gone, but none have ever truly replaced it. It lacks the bells, whistles, and gongs of many other protocols, but that only seems to add to its value. It’s decentralized, virtually bug free, and it works with nearly everything, on any box with an internet connection.

That’s why this will always be true…

XKCD: Team Chat

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
December 05, 2017

10 Principles of a Good Code Review

Nearly any healthy programming workflow will involve code review at some point in the process. This may be a Pull Request on GitHub, a Differential Revision on Phabricator, a Crucible Review on Atlassian, or any number of other review tools. But however you do it, not all code reviews are created equal.

At MousePaw Media, we have a strictly enforced workflow that includes a mandatory pre-commit code review. These have helped us catch many bugs and sub-optimal code.

Yet many interns are afraid to do code reviews, fearing they have little to contribute, especially when reviewing code written by developers who have been there much longer than they have! Meanwhile, the quality of code reviews – even my own – can vary greatly depending on many factors: familiarity with the code, time of day, time of day, you name it.

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
June 20, 2017

3 Cool Things To Do With PawLIB

I should probably slap a huge disclaimer on this post: I helped write PawLIB, a new C++ programming library from MousePaw Media. It contains some of my favorite code I ever wrote. Besides wanting to build high-performance data structures, we really wanted to make C++ fun again.

Instead of trying to describe what makes the library cool (I’ve already tried in the official press release), I’d rather demonstrate some of my favorite little tricks.

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
June 07, 2017

Go In This Your Strength

The LORD looked at [Gideon] and said, “Go in this your strength and deliver Israel from the hand of Midian. Have I not sent you?” (Judges 6:14, NASB)

What an utterly strange thing for the LORD to say. Here is Gideon, hiding in a wine press, threshing wheat so the marauding Midianites don’t steal or destroy it. Gideon, scripture tells us, is the youngest son in the least family in the tribe of Manasseh (Judges 6:15). He’s certainly not great among men, nor great in stature.

Truth be told, Gideon isn’t even great in faith! Just one verse prior, he asked the angel of the LORD where God was in all of this.

“O my lord, if the LORD is with us, why then has all this happened to us? And where are all His miracles which our fathers told us about…?” (Judges 6:13, NASB)

If any of us were tasked with selecting a man of strength in Israel at the time who would deliver them from the Midianites, Gideon probably would have been the first man eliminated. So why did the LORD say “Go in this your strength”? What strength?
(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
March 13, 2017

Onboarding New Developers

It’s a surreal thought that I’ve been running MousePaw Media’s internship program for nearly four years. In that time, I’ve learned a lot about hiring, management, and training, often purely through trial-and-error.

We invest most of our personnel efforts into interns; it’s actually the only way into the company. By time an employee has completed the year-long internship program, we know they are ready for the responsibilities of a senior development position. Not only are they well-versed in our company’s practices and methodologies, but they understand what the internship program is about.

That second point is important: whether you plan it or not, your entire staff is involved with internship and employee training. By making the internship standard at our company, I know our entire staff is familiar with the challenges and expectations. They can empathize with current interns, and they know how to come alongside and offer support.

Today, MousePaw Media now has one of the most robust internship programs in the Spokane/Coeur d’Alene area. To date, almost a dozen programming students have graduated from our program, and many went on to full-time positions at other firms. About half of them, I’m happy to say, have stayed on with us.

Objectively, there’s very little difference between a successful internship and a successful training program. So long as the compensation is reasonable for the individual’s existing skill level, I believe any developer without an overgrown ego will be open to working through a formal training program at the start of their job.

I hope by sharing my experiences and hard-won lessons with you, you can ease the process of onboarding new developers at your company.

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail
February 18, 2017

Icons, Python, and Ubuntu Unity

In my free time (yes, I actually managed to scrape some together!), I’ve started work on a project I’ve been planning for quite some time – building the music library application of my dreams! I picked up my favorite language, Python, and dove right in.

As to the GUI, I recently swore off GTK in all forms, after a particularly aggravating incident with my company’s Infiltrator game project. One of my IRC friends pointed me to Kivy, a modern GUI library for Python, and I immediately fell in love.

The challenge is, Kivy still has some rough edges which, while a potential source of frustration, also means lots of opportunities for adventure!

(more…)

Facebooktwittergoogle_plusredditpinterestlinkedinmail