Blind Not Dumb (Posts about geekery)https://www.feoh.org/categories/cat_geekery.atom2024-01-21T01:02:42ZChris PattiNikolaWindows Papercuts for *NIX Developershttps://www.feoh.org/posts/windows-papercuts-for-nix-developers.html2023-07-04T13:42:31-04:002023-07-04T13:42:31-04:00Chris Patti<h3>Introduction</h3>
<p>If you're used to developing on *NIX systems, coming to Windows can be a bit of
a shock.</p>
<p>My goal in writing this article is to point out some of the pain points and,
where I know they exist, some work-arounds.</p>
<p>Note that I'm talking about <em>native</em> Windows here. If WSL meets your needs and
your environment allows it (not everyone's does. Many IT orgs turn it off) then
bully for you but this article isn't about that :) I think WSL is both an
incredible tool for developers and an awesome feat of engineering. I wish more
Linux folks appreciated this. Anyway :)</p>
<p>So let's get started!</p>
<h3>The Paper Cuts</h3>
<h4>The C Compiler</h4>
<p>For most of us, having a standard raft of development tools on hand is par for
the course. We just expect gcc and make to be there at our beck and call, and
the fact that they're not can cause some tools to fail spectacularly.</p>
<p>For instance, whenever I start my editor of choice (Neovim) I'm greeted with:</p>
<p><img alt="Neovim C Compiler Error on Windows" src="https://www.feoh.org/images/windows_nvim_c_boom.png"></p>
<p>Having spoken to some experts, apparently it's considered <em>really</em> bad form to
leave your C compiler on the PATH on Windows. I suspect this is because malware
on Windows is such an incredibly pervasive problem.</p>
<p>I get that, but then we should probably either modify our tool-chains to not
expect that as a default or maybe create documentation to help people understand
the happy path.</p>
<p>As near as I can tell, the 'standard' set of c/c++ tools on Windows is Microsoft
Visual Studio. The free "Community" version works just fine though the installer
is a bit of a jank-fest.</p>
<p>That thing provides a prompt shortcut called "Powershell for VS XXXX" and you
can use that to get a shell that has the usual build tools available.</p>
<p>Not a great solution though, since the experts say not to run that way as a
default, but having your editor blow up on start just-up isn't a great feel.</p>
<h4>The Shell</h4>
<p>While you certainly <em>can</em> run tools like bash or zsh on Windows, unless you
<em>really</em> know what you're doing, this is not the happy path. You're in Rome. Do
what the Romans do and you won't regret it :)</p>
<p>The good news here is that the native tools are now really quite good. Gone are
the days when CMD.EXE was your only choice. You now have Powershell and it's
really quite awesome.</p>
<p>Here are a couple of tips to make your Powershell experience awesome and help
you appreciate what this environment has to offer.</p>
<h5>Oh My Posh</h5>
<p>This one's gotten a lot of press and let me tell you it's incredibly well
deserved. It's like the oh my zsh of Windows shell prompts :)</p>
<p>Mine shows me git status and whether my last command's exit code indicates
success or failure, as well as what Git branch I'm on. Here's what it looks
like:</p>
<p><img alt="What My Oh My Posh Prompt Looks Like" src="https://www.feoh.org/images/OhMyPoshScreenshot.png"></p>
<p>I wrote some about Oh My Posh in my <a href="https://www.feoh.org/posts/getting_started_with_python_on_windows_2021_edition_push_the_easy_button.html">previous article on Windows for Python
Developers</a>.</p>
<h5>PSFzf</h5>
<p>One of the biggest productivity boost for me in recent memory was when I
integrated <a href="https://github.com/junegunn/fzf">fzf</a> the fuzzy finder into my
workflow.</p>
<p>With a single keystroke I can find any file or directory on my system.
Navigation becomes effortless and the endless sequence of <code>cd</code> and <code>pwd</code> commands
melt away in a burst of productivity goodness :)</p>
<p>Thankfully, Powershell offers all these benefits as well via
<a href="https://github.com/kelleyma49/PSFzf">PSFzf</a>.</p>
<p>Here's what it looks like. In this case I wanted to edit my Neovim main
configuration file <code>init.lua</code>:</p>
<p><img alt="Edit my init.lua file" src="https://www.feoh.org/images/psfzf.png"></p>
<h4>The Console / Terminal</h4>
<p>For long time *NIX users, one of the biggest bones of contention for a
long time was the Windows console. To put it kindly, it was god awful, mostly
because it maintained compatibility with the Antideluvian DOS console.</p>
<p>Happily, we now have a fairly decent solution <a href="https://github.com/microsoft/terminal">Windows
Terminal</a>. I say fairly decent because
it's still not quite up to par with your favorite <em>NIX terminal, but the fine
folks behind this open source project are working </em>really* hard to change that,
and the progress they've made here has been nothing short of miraculous. Mad
props to these folks for fixing by far the biggest deal breaker for many around
working in Windows!</p>
<p>They've even recently added an easier UI for editing settings, but you can also
still go edit the JSON yourself if that's your jam :)</p>
<p>It's not perfect, but this is an incredibly flexible tool with a ton of depth
and it's been exciting to watch it evolve.</p>
<h4>The Windows Desktop/GUI</h4>
<p>I'm sure there will be folks who aren't happy with this one but my take? Just
ignore it.</p>
<p>Windows is pretty good about making EVERYTHING accessible from the keyboard, and
many things are also accessible from the command line. If you just avoid
graphical interfaces wherever possible, and if you're anything like me, you'll
see your productivity levels soar and your frustration levels plummet.</p>
<h4>Packaging</h4>
<p>One of the big pain points coming from *NIX is the lack of a 'real' package
manager.</p>
<p>I use the <code>winget</code> tool that comes bundled with Windows 11. It's officially
supported by Microsoft and lets me install most if not all of the commercial
apps I use.</p>
<p>It has the further advantage that it will write a JSON blob with all the
packages you have installed, so you can get your software up to snuff with a
single Powershell invocation.</p>
<p>But there are other popular options as well, namely
<a href="https://github.com/ScoopInstaller/Scoop">Scoop</a> and
<a href="https://chocolatey.org/">Chocolatey</a>.</p>
<p>To be honest I wish MSFT had worked a bit harder to maintain compatibility with
these other projects so we don't have multiple separate package namespaces.
Can't have everything I guess.</p>
<h4>Where Do I Put?</h4>
<p>One of the things I continue to struggle with is the simple expedient of "Where
do I PUT things?". On UNIX based systems, pretty much everything user or
configuration related lives in $HOME. Not so on Windows.</p>
<p>As just an example, my Neovim configuration lives in something like
<code>$HOME\AppData\Local\nvim.</code></p>
<p>In some respects, I get it. Keeping application configuration separate is a good
thing, but navigating where to put what can feel like a bit of a morass for the
uninitiated.</p>
<p>Maybe once I get a better understanding of the lay of the land, I can create a
cheat sheet for UNIX users.</p>
<h3>Fin</h3>
<p>That's all I have for now, but I may update this post as time permits or if
various situations I detail here improve. Thanks for reading!</p>Mis-Adventures In GatsbyJShttps://www.feoh.org/posts/mis-adventures-in-gatsbyjs.html2022-05-20T16:14:19-04:002022-05-20T16:14:19-04:00Chris Patti<figure><img src="https://www.feoh.org/images/Octopus.jpg"></figure> <div><p><img alt="Key West Octopus by oe Parks is licensed under CC BY-NC 2.0" src="https://www.feoh.org/images/Octopus-smol.jpeg"></p>
<p>Over the last few years I've been feeling like living exclusively in my Python programming happy place is something I can't afford to do.</p>
<p><a href="https://www.feoh.org/posts/mis-adventures-in-gatsbyjs.html">Read more…</a> (6 min remaining to read)</p></div>2021 - The Year Windows Became a First Class Python Development Environmenthttps://www.feoh.org/posts/2021-the-year-python-became-a-first-class-python-development-environment.html2021-06-08T22:12:00-04:002021-06-02T17:54:00-04:00Chris Patti<p><em>[06/08/2021 Update: Added a bit about Windows Terminal. Dunno how I forgot that the first time around!]</em></p>
<p>As I've written about previously and elsewhere, I felt so badly burned by Apple's laptop
hardware design decisions of a few years ago that I've rather fallen out of love with that platform for my personal work. The latest hardware is much better, but I feel like the message has been sent and received, so I'm not rushing back any time soon.</p>
<p>My first choice was the Linux desktop, and after months of struggling, instability and accessibility issues I'll admit I've been looking for stable, solid alternatives that are also powerful enough to get the job done and maybe even have something new to offer. As an old dog, sometimes it's really nice to be taught some new tricks!</p>
<p>If you've tangoed with Windows in the past, and found yourself struggling against its rather byzantine UI, I'd urge you to read on and see if maybe it's not time for another careful look.</p>
<p>Since choosing the right tools is all about your unique set of needs, I'll use those as categories to drive the discussion and showcase how Windows is doing a great job of satisfying them.</p>
<h3>In The Beginning, There Was The Command Line!</h3>
<p>One of the things that first drew me to UNIX decades ago was the shell. The ability to get pretty much ANYTHING I needed done by typing a few commands, and to create <strong>incredibly</strong> powerful mechanisms by stringing them together is downright intoxicating.</p>
<p>I still love me some Bourne shell, it's just as powerful today as it was decades ago. However <a href="https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.1">Windows Powershell</a> has some incredibly powerful paradigms of its own that are worth looking into.</p>
<p>In addition to things like object pipelines and desired state configuration that
the UNIX shell simply can't do, modern Powershell has creature comforts like <a href="https://ohmyposh.dev/">Oh My Posh</a> that make for a very comfortable work environment. Here's a screenshot of mine:</p>
<p><img alt="My Oh My Posh Prompt" src="https://www.feoh.org/images/OhMyPoshScreenshotSmol.png"></p>
<p>You can see that I get all kinds of nice status like exit code of last command, current git branch, current Python version and virtual environment, etc.</p>
<p>While Powershell is indeed a totally different beast from the UNIX shell I'm used to, its built in help for <strong>every</strong> command and understandable syntax make the learning curve feel rather shallow indeed.</p>
<p>Another gripe most UNIX users have when coming to Windows is that everything requires mousing around and futzing with a GUI, and it can feel like you're trapped in an endless series of installer screens to get even your basic working tools installed. Modern Windows obviates all that with <a href="https://www.slashgear.com/microsofts-winget-1-0-released-for-real-heres-why-you-want-it-01675425/">winget</a> a full fat package manager with tons of common applications already in there. Just <code>winget install git</code> and you're off to the races :)</p>
<h3>Before The Command Line, There Was The Terminal</h3>
<p>As anyone who's worked with Windows for a long time could tell you, in the old days, the Windows Console was pretty primitive. You were basically dealing with MS-DOS CMD.EXE with the barest modicum of window dressing. Needless to say, this is 2021 and that's just not cutting it.</p>
<p>Thankfully, there is a superlative alternative that's really come into its own in 2021 - <a href="https://github.com/microsoft/terminal">Windows Terminal</a>. Finally all the features anyone who's been working in the UNIX world have come to expect over the last 30 years are available on Windows as well. Multiple tabs, excellent terminal emulation, great theming and color support, and the ability to seamlessly handle different shells per tab. I regularly keep a Powershell and a WSL tab open for my work.</p>
<p>If you've ever struggled along with the old CMD.EXE, fighting for every cut, paste or insert, this really is a game changer.</p>
<h3>I Hate Meeces To Pieces! (Really, Don't Make Me Use the Mouse!)</h3>
<p>As someone who's partially blind and has fine and gross motor impairment, using the standard Windows Icons Mice and Pointers user interface is downright agonizing. I need to be able to launch apps with just a few keystrokes. On the Mac, <a href="https://www.alfredapp.com/">Alfred</a> fulfills this role admirably and adds a whole host of next level productivity power ups in addition to keyboard app launching.</p>
<p>A <strong>very</strong> recent addition on the Windows side that seems equally powerful and easy is Microsoft Powertoys <a href="https://docs.microsoft.com/en-us/windows/powertoys/run">Powertoys Run</a> feature. I can launch apps, bind keys to actions, and access system functions like sleep, restart and the like all 100% from the keyboard. Nice!</p>
<p>Another Powertoys addition that's frosting my Pop-tarts is <a href="https://docs.microsoft.com/en-us/windows/powertoys/keyboard-manager">Powertoys Keyboard Manager</a> which allows me to remaps the dread CAPS LOCK key to Ctrl so it's right next to my pinky as God Intended :)</p>
<p>This simple enhanment has been impossible with Windows forever without resorting to more drastic measures, so having it work pretty much out of box now is super sweet.</p>
<h3>Python - It Takes a Cast of Thousands to Raise a Platform</h3>
<p>If you'd uttered the words "Python" and "Windows" in the same sentence a few years back, the average Pythonista would have rolled their eyes or groaned and then proceeded to tell you a war story about how they had to spend weeks trying to get some critical module or other working.</p>
<p>Those days are just straight up gone. Microsoft and the Python community at large have poured countless engineer hours into making the Python ecosystem a truly first class experience under Windows. Virtual environments, poetry, and even tools for installing and managing command line scripts that integrate with the shell like <a href="https://pypi.org/project/pipx/">pipx</a> work just great under Powershell on Windows.</p>
<p>And if by chance you're coding something up that's native UNIX to its very core, Windows *<em>still</em> has you covered. Cue the Windows Subsystem for Linux!</p>
<h3>WSL - I See Penguins!</h3>
<p>With the avent of WSL2 and most recently <a href="https://github.com/microsoft/wslg">WSL-g</a> you really do have everything you need to seamlessly build, debug and run Linux programs on Windows, including those that require X/Wayland GUI support or sound.</p>
<p>It's not just some kind of compatibility shim, it's an <strong>actual</strong> Linux kernel running in Windows. The integration is so complete these days that you can run things like Docker within WSL successfully. That's a really big deal!</p>
<p>Also, most of the popular mainstream development tools like <a href="https://www.jetbrains.com/pycharm/">Pycharm</a> and <a href="https://code.visualstudio.com/">Visual Studio Code</a> have superlative support for deploying to and debugging in WSL built in.</p>
<p>The amount and quality of work Microsoft has put into this is truly impressive. And unlike the Mac, you're not actually using some oddball FreeBSD user space running atop the Mach microkernel, you're running 100% Linux. It's turtles all the way down.</p>
<h3>I Go Where The Innovation Is & Use What Works</h3>
<p>As a technologist, I'm proud of the success I've had in sniffing out pockets of high velocity, high value innovation in the technology landscape.</p>
<p>Years ago, I was running Linux when many people were either using DOS, pre OSX MacOS or super expensive prorietary vendor workstations like Sun's Sparc. Being able to have an honest to god UNIX environment on commodity hardware was like Prometheus's gift of fire to the mortals. It really was that big a deal.</p>
<p>I still think the Linux desktop has incredible potential, but for me the obstacles imposed by my disabilities and the lack of accessibility features can be a real buzz and productivity killer.</p>
<p>So here I am embracing a desktop that works, with an ecosystem that works and a rather large well heeled company pouring resources into bar raising and innovation.</p>
<p>I look forward to exploring and leveraging the incredible potential this platform represents. Stay tuned for more posts as I go!</p>Plus ça change, plus c'est la même chosehttps://www.feoh.org/posts/plus-ca-change-plus-cest-la-meme-chose.html2020-06-26T18:54:00-04:002020-06-26T18:54:00-04:00cpatti<p>I was recently in an online discussion about whether or not technologists should use "managed services" like the one I work for.</p>
<div class="line-block">
<div class="line"><br></div>
<div class="line"><br></div>
<div class="line"><br></div>
</div>
<p>One gent essentially claimed that the move towards cloud and managed services represented an end game for our industry, and that we'd automate ourselves out of a job. This is what I said:</p>
<p>Will there be job reductions and resultant economic pain as a result of the move away from the data center and towards more cloud/managed services? Hell yes there will be!</p>
<p>Those who want to work in this business will find ways to adapt and continue to add value.</p>
<p>I’ve been working in technology for about 32 years. This doesn’t make me magical or omniscient or even smart but what it does make me is a witness to several waves of seismic change.</p>
<p>I came into the job market in the early 90s when DEC was imploding, PCs were ascendant, and the large expensive workstations vendors were dead companies walking but didn’t realize it yet.</p>
<p>Everyone thought the world would end and we’d all be out of work too.</p>
<p>Will it be hard? Yes. Will there be a lot of people who can’t or don’t want to adapt and will be left behind? Undoubtedly. Is that bad? Yes. However it’s the way our industry works and has since its inception.</p>
<p>We are all turning the crank that drives the flywheel of increased automation, whether we administer our own database clusters or not. The move to managed and cloud definitely represents a notable pinch point, and we’ll see how painful the transition will be, but it’s one paradigm shift in an industry that creates paradigm shifts for a living.</p>
<p>I’ve actually thought for a while that in the longer term, as compute at scale becomes quite a bit smaller and even cheaper, we could see a move back away from cloud because when you can host your company’s compute cluster in a cube the size of a printer and we have algorithms that can encode and enact services at scale in an operationally safe way, the value cloud adds will dwindle.</p>
<p>I love my job, and I love this industry, and plan to continue playing in this pool until I die, whether someone’s willing to pay me for it or not.</p>
<p>I assert that the constant negativity many of us exhibit is neither necessary nor desirable and represents a kind of immaturity that we will eventually grow out of as our industry continues to mainstream.</p>
<p>We’ll see.</p>The Eternal Novice Traphttps://www.feoh.org/posts/the-eternal-novice-trap.html2019-12-27T01:23:00-05:002019-12-27T01:23:00-05:00cpatti<section id="introduction">
<h2>Introduction</h2>
<p>It was the dawn of a new century in the tech world. We'd just survived the great Y2K scare which, for many of us, turned out to be nothing. I spent a memorably pleasant Y2K eve playing board games and sipping champagne at my company's East Cambridge office, enjoying the company of my co-workers. I felt like I was on top of the world.</p>
<p>Right around that time I encountered a book that would change the way I thought about computing. It contained a huge amount of overall incredibly positive and helpful advice. That book was <a class="reference external" href="https://pragprog.com/book/tpp20/the-pragmatic-programmer-20th-anniversary-edition">The Pragmatic Programmer</a>.</p>
</section>
<section id="the-trap-is-set">
<h2>The Trap is Set</h2>
<p>This book contains innumerable bits of incredibly useful advice. The pearls contained within its pages will help you build a successful career as a technology professional.</p>
<p>But I write this in the hope that you won't misinterpret one particular bit of advice like I unintentionally did. In some ways it hurt my career. Thankfully I became aware of it a few years back and am now headed in the right direction.</p>
<p>Here's the advice I used to hamstring myself:</p>
<blockquote>
<p>Learn at least one new language every year. Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut.</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/The_Pragmatic_Programmer">The Pragmatic Programmer, 2nd edition</a></p>
</blockquote>
<p>This is superb advice for its time, when the majority of programmers spent their days coding away in a single language or two.</p>
<p>It's superb advice to this day for that kind of person. If you've spent years coding in Python, why not try your hand at something with a radically different paradigm? By doing so you'll learn new ways of solving problems.</p>
<p>But zooming back to post Y2K me, that picture didn't fit me at all. I'd started out as a sysadmin, learning a huge amount about the care and feeding of UNIX based systems. I'd done some simple scripting to automate administrative tasks, but nothing at all complex or strenuous. A little bit of shell, some Perl, and I had things humming along just great.</p>
<p>Only I took the advice literally, despite my total lack of mastery of any programming language. With wild abandon, I threw myself into every new programming language I encountered..</p>
</section>
<section id="the-bright-shiny-infinite-rabbit-hole">
<h2>The Bright, Shiny, Infinite Rabbit Hole</h2>
<p>I played with countless languages, FORTH, a myriad of LISPs. You name it, I played with it. If there was a new hot language on the scene you can bet I'd be downloading it and figuring out how to write Hello, World and a few other toy examples.</p>
<p>But that's as far as it went, because, if I'm honest with myself, playing with new toys doesn't feel like work. It's a shot of dopamine. It feels <strong>really</strong> good in the moment. You feel accomplished because now you can talk about $LANGUAGE along with the rest of the cool kids who are exploring it.</p>
<p>There are also external reinforcements for this behavior. By being able to talk the talk, you can appear smarter than you are. You can probably even answer surface level questions in job interviews which can, in the short term, help your career.</p>
<p>But not unlike living on sugar and caffeine, that short term buzz will wear off, leaving you feeling empty and, ultimately, like the emperor walking around with no clothes. You can talk the talk like a champ, and be up with the latest buzz, but in some corner of your mind you may recognize that your basic skills are fundamentally lacking.</p>
</section>
<section id="brush-your-teeth-eat-your-veggies-get-sleep-exercise">
<h2>Brush Your Teeth, Eat Your Veggies, Get Sleep & Exercise</h2>
<p>Thankfully, the fix is at least conceptually easy. Just <strong>stop doing that</strong> :) Pick a language that will become your daily driver, and focus on building your core skills using that language.</p>
<p>Build deep, featureful applications. Learn and exercise your skills using the full breadth of your language's ecosystem, and solve real problems using your language of choice.</p>
<p>For me, that language is Python. That's an easy choice because my day job is building infrastructure for a major cloud vendor and 90%+ of our tooling is written in Python. For the last few years I've promised myself to not learn any new programming languages until I become at least a Journeyman with Python.</p>
<p>You may find, as I did, that this is easier in concept than in practice. You may need some structure to help you achieve this goal. Everyone is different, so this isn't a one size fits all suggestion. I'll share some resources that may help.</p>
</section>
<section id="resources-to-help-sharpen-your-tools">
<h2>Resources to Help Sharpen Your Tools</h2>
<p>These days there is an embarrassment of riches out there, free for the taking to anyone with a computer and an internet connection to leverage. I'm just going to cover a few that I've found particularly helpful.</p>
<p><a class="reference external" href="https://training.talkpython.fm/courses/explore_100days_in_python/100-days-of-code-in-python">100 Days of Code with Python</a></p>
<p>If you're like me, having a free form set of exercises can be good, but adding some structure with definite time constraints and deadlines, even if you set them yourself, can be immensely helpful. This course was pretty much ideal for my needs. The idea is that you commit code every day for 100 days. This course uses that framework to take you on a guided smorgasbord tour of the incredibly rich Python ecosystem. The course introduces a particular topic or module and then has you build an interesting near real world application with it. I learned so much from this course that it alone has been a real boost to my career.</p>
<p>Completing a course like this can be a daunting task, especially while working full time. However I found the results are well worth the effort. Hopefully you can find something similar for your language of choice.</p>
<p><a class="reference external" href="https://exercism.io/">Exercism</a></p>
<p>Exercism is an incredible resource regardless of the programming language you work in. It's not just a set of practice exercises, but a community of people who'll help review your code and provide mentorship.</p>
<p><a class="reference external" href="https://projecteuler.net/">Project Euler</a></p>
<p>These are language agnostic problem sets that will stretch your skills and force you to really exercise your problem solving skills. I myself have only scratched the surface with these, and plan to delve deeper in the future.</p>
</section>
<section id="parting-thoughts">
<h2>Parting Thoughts</h2>
<p>I hope you'll find value in what I wrote here. I wish I'd had this article earlier on in my career. Maybe I can help someone avoid falling into the trap I did. To sum up:</p>
<ul class="simple">
<li><p><strong>Do</strong> learn new programming languages and paradigms, but learn them from a place of confidence and mastery with your primary tool of choice.</p></li>
<li><p><strong>Don't</strong> fall for the trap of perpetually chasing after the bright shiny thing that's hot right now. Recognize that what's new isn't necessarily better. Take what will meaningfully help you advance your career and let the rest flow by. There'll always be more tomorrow.</p></li>
<li><p><strong>Do</strong> keep having fun! You'll learn more quickly and retain more if you're finding enjoyment in what you do. Sometimes it means looking at things a little differently, but often that open mindedness can pay off.</p></li>
</ul>
</section>I don't WANT to let go! The Media Rip Saga - Part 1: Formats and Tools.https://www.feoh.org/posts/i-dont-want-to-let-go-the-media-rip-saga-part-1-formats-and-tools.html2018-03-22T09:59:00-04:002018-03-22T09:59:00-04:00cpatti<p>[caption id="attachment_498" align="aligncenter" width="300"]<img alt="image1" class="size-medium wp-image-498" src="https://feohorg.files.wordpress.com/2018/03/14119218-music-brain-as-a-musical-mind-as-a-creative-genius-with-musical-notes-representing-the-craft-of-comp.jpg?w=300" style="width: 300px; height: 300px;"> A Musical Mind[/caption]</p>
<p>A coworker at my previous job once said in response to my whining a bit about having just lost 700 songs from my digital music library "Let go of your music collection!". That got me thinking, long and hard.</p>
<p>Why?</p>
<p>Why <strong>am</strong> I lugging around this corpus of several thousand compact discs? Why <strong>do</strong> I have several shelves worth of DVDs? Why don't I simply let go of the whole idea of media ownership and just drink from the infinite fire-hose that is the internet?</p>
<p>Because, when push comes to shove, my media is <strong>part of me.</strong> My CD collection represents innumerable fond memories of places, people and moments I've moved on from but that inhabit special places in my heart and mind.</p>
<p>You may have heard the theory that when one sense is diminished, the brain compensates by heightening another. I'm partially blind, so many if not most of my fond memories have a soundtrack. Being able to listen to that particular album and feel some semblance of that moment wash over me is like having a personal time machine.</p>
<p>Oh hey, there's that Autechre album, not available anymore anywhere as far as I can tell. That was one of the first times ever that I was <strong>really</strong> turned on by electronica. Music plays in my mind's eye - one of my best friends and I walking into a record shop on Newbury Street. And there's that Boiled In Lead CD I got the day after I was invited to an incredibly cool private concert at a farm in NH by a friend who's since passed away. Neither of these things is on Spotify near as I can tell. If I let go, I lose them, and an aspect of those fond memories along with them.</p>
<p>But I'm getting older - in fact I turn 50 in a few months. Having moved countless times I have begun to feel the weight of my possessions. I recognize that I am privileged in that I <strong>can</strong> make this choice. Not everyone is lucky enough to be able to buy a NAS (Network Attached Storage) and spend their leisure time converting their media collection into a giant bag of bits. I count myself lucky.</p>
<p>So, now that you've heard way more than you ever wanted to know about <strong>why</strong> I chose to embark upon this epic project, let's talk turkey in case you're thinking about doing this for yourself.</p>
<p>Preserving all your media in virtual form can create a veritable labyrinth of choices. As with all things, I suggest keeping it simple. I'll tell you what my choices were and maybe even offer another option or two along the way, but mostly I'll be guiding you through my process as it has evolved for my purposes.</p>
<p>First let's answer a basic question: What kind of media do you want to preserve? In my case the answer is simple. My collection consists entirely of CDs and DVDs, as well as a handful of Blu-ray discs.</p>
<p>The first big choice - to compress or not to compress? Compressing your media will save you disk space, but cost you in terms of fidelity. The movies you rip won't look exactly as they did on disc, and the music you rip won't be exactly as it was in its original form either.</p>
<p>I will not go down the rabbit hole of trying to convince you of any particular absolute truth, but my ultimate destination ended up being "I <strong>never</strong> want to have to do this again and I want no loss in quality".</p>
<p>So, on the video side, I don't use any compression at all. I rip my movies straight to <a class="reference external" href="https://www.matroska.org/">Matroska</a> video or ".mkv" files. This format is incredibly rich and versatile, and also has the advantage of being open source. Why do I care one might ask? See above - I <strong>NEVER</strong> want to do this again :) So I don't want to be beholden to some company or other deciding that the format I chose is changing, going away, or under license dispute. These are <strong>my</strong> bits embodying <strong>my</strong> legally purchased media. Full stop.</p>
<p>On the audio side, I was able to take advantage of an excellent format called <a class="reference external" href="https://xiph.org/flac/">FLAC. </a>It provides some compression so as to save space, but most important for me is the fact that it's lossless, so I lose no fidelity at all in my ripped copy. This format is also open source, and the author is a fellow Somervillian :)</p>
<p>Having made the important decisions about format, let's choose appropriate tools.</p>
<p>For the video side, I chose <a class="reference external" href="https://www.makemkv.com/">MakeMKV</a>. It's cross-platform (Mac, Linux, Windows), has a very straight forward user interface, and is dirt cheap. You can download it for free, but to rip Blu-ray discs, you have to pay them $5 or $10 to unlock the decoder. Trust me, for the power this tool offers, give them their money. They've earned it. This was one of the only tools I could find that made ripping both Blu-ray and DVD discs easy while also giving me the flexibility I needed. A number of lesser tools I tried had nice user interfaces, but were rife with bugs. making it nearly impossible to extract the raw bits with no compression.</p>
<p>Another critical tool if you want to rip TV series from DVD is a little thing called <a class="reference external" href="https://www.filebot.net/">FileBot</a>. It will rename the files to conform to what Plex requires.</p>
<p>For the rare case where multiple episodes in a TV show are glommed into one big file, I chose <a class="reference external" href="https://mkvtoolnix.download/">MKVToolNix</a> to split .mkv files into usable chunks I'm unsure whether it's worth the effort, especially for series with lots of episodes.</p>
<p>On the audio side, I used <a class="reference external" href="https://tmkk.undo.jp/xld/index_e.html">XLD</a> for the Mac. It's on par with Xact Audio Copy for Windows, the most highly regarded audio ripper out there near as I can tell. It rips to FLAC effortlessly and the developer maintains a very high quality checksum database of every CD that's been ripped with the tool so you can be sure that your results are crystal clear and bit perfect. I've had Linux folks ask about something similar for them, and I haven't been able to find anything yet. Sorry about that. If someone finds something that does similar things and has a nice UI, do let me know.</p>
<p>You'll also need a place to put the resulting bits. A really safe place. This is a labor intensive effort, and you really don't want to lose all your countless hours of work due to a hard drive failure.</p>
<p>I chose a <a class="reference external" href="https://www.synology.com/en-us">Synology</a> DS216+ii for the task. It's a nice little box that holds two big hard drives that you can run as a RAID set. In addition to having hardware that meets my needs, I chose these folks because the software the NAS runs is easy to administer, incredibly flexible, and has a rich ecosystem. One great feature I've not seen elsewhere is with just a few clicks, you can back up your data to cloud services like <a class="reference external" href="https://aws.amazon.com/glacier/?sc_channel=PS&sc_campaign=acquisition_US&sc_publisher=google&sc_medium=glacier_b&sc_content=glacier_e&sc_detail=aws%20glacier&sc_category=glacier&sc_segment=86341125282&sc_matchtype=e&sc_country=US&s_kwcid=AL!4422!3!86341125282!e!!g!!aws%20glacier&ef_id=WrarjAAABQgBo0QZ:20180324194828:s">Glacier</a>. Synology has a proprietary suite of software you can use to manage your media. I chose <a class="reference external" href="https://aws.amazon.com/glacier/?sc_channel=PS&sc_campaign=acquisition_US&sc_publisher=google&sc_medium=glacier_b&sc_content=glacier_e&sc_detail=aws%20glacier&sc_category=glacier&sc_segment=86341125282&sc_matchtype=e&sc_country=US&s_kwcid=AL!4422!3!86341125282!e!!g!!aws%20glacier&ef_id=WrarjAAABQgBo0QZ:20180324194828:s">Plex</a> because it's feature rich and for a lifetime fee will automatically transcode movies and music to work with any viewing or listening device.</p>
<p>In the next installment we'll start getting into the nitty-gritty of how to get the job done. The good, the bad, and the <strong>ugly!</strong></p>Hacking the Wetwarehttps://www.feoh.org/posts/hacking-the-wetware.html2018-02-11T21:32:00-05:002018-02-11T21:32:00-05:00cpatti<p>Working for Amazon has been a revelation to me in ways large and small.</p>
<p>One of the biggest by far has been coming to the understanding that career growth was not in fact laying in wait around the next corner if only I could master the latest technology trend. There are baseline skills that can either accelerate or retard your growth in profound ways, and many of them reduce down to changing the way you think in or react to various situations. Let's walk through a few of them.</p>
<section id="taking-ownership">
<h2>Taking Ownership</h2>
<p>You are well and truly the captain of your own ship. Your performance is your responsibility. While these statements may seem blindingly self evident, in fact there are some subtle traps for the unwary who may not even realize they are rationalizing about failure by abdicating responsibility for their own success.</p>
<p>This can take the form of seemingly innocuous behaviors like not wanting to burn bridges or be the bad guy, but when push comes to shove everybody loves a winner and nobody respects a human door mat. Find ways to constructively deal with conflict head on and ultimately attain your goals. The inherent tension of conflict pales in comparison to the confidence you will gain by standing your ground.</p>
</section>
<section id="learning-how-to-learn-effectively">
<h2>Learning How to Learn Effectively</h2>
<p>What do you do when presented with a new problem that you find daunting or confusing? Most of the time this happens to me it's because there's something I'm unfamiliar with, that lies outside my current wheelhouse.</p>
<p>It's very easy to feel utterly overwhelmed by the sheer scope of a problem or by the fact that the problem seems to be so foreign as to not offer any foot holds or surfaces within reach.</p>
<p>I have found that keeping a very simple check list in mind can keep me from feeling overwhelmed and help avoid "analysis paralysis".</p>
<ul class="simple">
<li><p>Just <strong>try</strong> something. Doing literally anything can help un-stick your brain and get past a roadblock.</p></li>
<li><p>Write an outline, create a very rough draft.</p>
<ul>
<li><p>Write "throw away" code / prose fully intending to not save any of it. This can be very liberating when you're stuck!</p></li>
<li><p>Turn to novel sources of action oriented inspiration, I have found Brian Eno's <a class="reference external" href="https://lifehacker.com/brian-enos-oblique-strategies-cards-break-down-creativ-1612072551">Oblique Strategies</a> deck helpful at times like this.</p></li>
</ul>
</li>
<li><p>Narrow or broaden your focus. Are you actually concentrating on the key thing you need to accomplish? Does what you're working on create value for your stake holders?</p>
<ul>
<li><p>Is your problem well defined? Flesh out the problem statement. Even if you're working on something creative, limitations can be incredibly inspirational! (There's a pithy quote about this I can't bring to mind right now :)</p></li>
<li><p>Break off the tiniest piece of the problem. Whatever you're comfortable with. Write the introductory paragraph or a few lines of code, even if it's just the header! Sometimes the simple act of getting started can create a momentum of its own.</p></li>
<li><p>Use tools like outliners or mind maps to work out the general shape of a problem. I've often written an outline and literally cut & pasted that outline into the document or code I need to write as a starting point.</p></li>
</ul>
</li>
<li><p>Practice! The process of building a skill is universal across virtually every discipline. In <a class="reference external" href="https://www.amazon.com/Peak-Secrets-New-Science-Expertise-ebook/dp/B011H56MKS/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1520614542&sr=1-1&keywords=peak">Peak: Secrete from the New Science of Expertise</a>, Robert Pool introduces us to the idea of "deliberate practice". More than just doing a thing over and over, deliberate practice involves being taught by an expert and applying those lessons to the process of practice. While Pool specifically dresses fields like athletics or piano playing, we can apply this idea to all kinds of disciplines. One great example of applying deliberate practice in my field is Katrina Owen's superb <a class="reference external" href="https://exercism.io">exercism.io</a> which poses carefully crafted problems to students and then lets experts critique them and suggest better, more elegant or concise ways of solving them.</p></li>
</ul>
</section>
<section id="emotional-maturity">
<h2>Emotional Maturity</h2>
<p>I used to pride myself on being a passionate practitioner of my craft. Lately I've been feeling like that's less of an advantage and more of a liability. Avid Grtimm's excellent <a class="reference external" href="https://www.virtuouscode.com/2014/01/31/the-moderately-enthusiastic-programmer/">blog post on this topic</a> had a great deal to do with changing my mind, and I suggest you run out and read it and other posts he's made along those lines post haste. They're worth it.</p>
<p>In point of fact I feel as though I should strive for <strong>dis</strong>passionate responses to problems and situations, especially those that are emotionally charged.</p>
<p>Give yourself that fraction of a second to take a breath, look at the response that's on the tip of your tongue or keyboard. Ask yourself "Is this <strong>really</strong> what I want to say? Am I being fair to the person I'm interacting with? Am I <strong>really</strong> acting in the best interests of both myself and my team?"</p>
<p>This can be <strong>incredibly</strong> difficult in the heat of the moment. It's a skill I am working very hard on cultivating, and I have achieved some modicum of success here, but my personal evolution in this area is far from complete.</p>
</section>
<section id="healthy-in-body-and-mind">
<h2>Healthy in Body and Mind</h2>
<p>There was a time when the stereotypes about people working in technology were more true than not. Many of us didn't take care of ourselves all that well. Obesity and even poor sanitary habits were not at all uncommon.</p>
<p>Thankfully, I've been a member of the once a day shower club my entire adult life, but my diet and exercise regimen were pretty atrocious for quite a long time.</p>
<p>I'm still not <strong>quite</strong> as disciplined as I'd like to be where diet is concerned, but I work out every day and have been losing some weight recently. I just can't say enough about how much this one simple change has benefited my mental well being both in terms of mental acuity but also in terms of being able to handle stressful situations in a more productive and professional way.</p>
<p>I've found my <a class="reference external" href="https://www.apple.com/apple-watch-series-3/?afid=p238%7Cs2QbmM6cp-dt_mtid_1870765e38482_pcrid_224100368864_&cid=aos-us-kwgo-watch--slid--product-">Apple Watch</a> to be incredibly helpful in this regard. It tracks many different kinds of work-outs, in addition to tracking my heart rate and calories burned through the day. Its "Activity Rings" display tracks the amount of time I stand as well as how much exercise I get, and I'm a total sucker for gamification, so its achievements system keeps me motivated, pathetic though that may be :)</p>
<p>Exercising regularly is the only way to go. Full stop.</p>
<p>I still have a long way to go before I'm at my ideal weight, but I feel like I'm well and truly on the path to getting there. I start every day mentally refreshed and ready to conquer whatever challenges come my way. A big improvement over falling asleep at my desk :)</p>
<p>Another often overlooked aspect of living a healthy life is getting enough sleep. A lot has been <a class="reference external" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4426706/">written</a> about how getting enough sleep can be critical in maintaining willpower, self discipline, and self control. I definitely struggle with this, as after getting up early to work out and working a long day it can be tempting to goof off for a while rather than getting to bed.</p>
<p>Something I've found rather helpful in this regard is an app called <a class="reference external" href="https://autosleep.tantsissa.com">Autosleep</a>. It uses the data on pulse rate and movement collected from my <a class="reference external" href="https://www.apple.com/apple-watch-series-3/?afid=p238%7Cs2QbmM6cp-dt_mtid_1870765e38482_pcrid_224100368864_&cid=aos-us-kwgo-watch--slid--product-">Apple Watch</a> to give me a really rich report on not just how many hours I slept, but also the quality of sleep and periods during the night when I was awake, whether or not I was aware of it. Those old cheeky after school special slogans had some truth to them - "Because knowing is half the battle!".</p>
</section>
<section id="discipline">
<h2>Discipline</h2>
<p>Personal discipline is at the heart of good decision making and the bedrock of any successful career.</p>
<p>The most effective and productive members of my field utterly regiment their days. What goes where is of less importance than the fact that they do the same thing pretty much every day. Code reviews in the morning, followed by whatever meetings are required for the day, and then another burst of focused productivity before heading home.</p>
<p>To be honest, I have yet to attain this kind of self regimentation, but it's good to have goals to work towards :)</p>
</section>
<section id="closing">
<h2>Closing</h2>
<p>These are just a few of the things that have been on my mind of late. I wrote them down in the hope that someone else may find them useful. If I have learned anything over the last few years it is that "common sense" is anything but common.</p>
<p>"disce semper quasi victurus vive quasi cras moriturus" - Learn as if you're always going to live; Live as if tomorrow you will die.</p>
</section>IOS 11 Makes the iPad Pro Sing!https://www.feoh.org/posts/ios-11-makes-the-ipad-pro-sing.html2017-10-14T11:25:00-04:002017-10-14T11:25:00-04:00cpatti<p><img alt="image1" class="wp-image-465" src="https://feohorg.files.wordpress.com/2017/10/img_0066.jpg" style="width: 2048px; height: 1536px;"></p>
<p>A while ago I wrote a <a class="reference external" href="https://feoh.org/2017/03/04/apple-ipad-pro-smart-keyboard/">post</a> about the then new Apple iPad Pro with its awesome keyboard.</p>
<p>I gushed about it already in that post, and that aspect hasn’t changed, but I’ve gotta say, Apple’s new version of IOS really catapults this device into new planes of usefulness.</p>
<p>An issue I’ve had with IOS for as long as it’s been around is Apple’s insistence that the user forget about things like files and just let the software keep track of everything.</p>
<p>While I applaud the idea behind this, the actual implementation meant that using your iPad for actual work in day to day life became needlessly complex. Where did my file go? I have no idea! How do I get the data out of here and copy it to that app over there? Not a clue! It’s all magic and jazz hands!</p>
<p>With IOS 11, Apple has finally reconciled itself to the fact that people tend to think of their data in terms of files. It may not be the world’s most perfect abstraction for everything, but given that people have been getting on with their lives just fine with it ever since computers were a thing, it’s about time that they caved and made it actually easy for thoser of us trying to do actual work.</p>
<p>To wit - The new “Files” application. To their credit, this isn’t your ordinary file manager - it presents a unified view of your files whether they’re on your iPad or a cloud service like Dropbox, Amazon Drive, etc.</p>
<p>They’ve also added the ability to drag and drop files between applications! Finally I can write a document using my favorite editor - <a class="reference external" href="https://omz-software.com/editorial/">Editorial</a>, and check it into source control using <a class="reference external" href="https://workingcopyapp.com">Working Copy</a>.</p>
<p>The implications of this are huge. IOS has always had an incredibly rich ecosystem of very rich, high powered applications, but until now wrangling data between them was an exercise in gymnastics I could do without.</p>
<p>There are plenty of places a Google search away that will detail all the awesome features in IOS 11, but to me this is far and away the most important. Overall, the changes in 11 makes it feel like I’m working on a regular laptop when I’m working on my iPad Pro. Given how the whole thing is no bigger than any regular iPad case you might have, it’s really liberating! I could go for a walk or a bike ride, throw the iPad in a backpack, and think nothing of it.</p>Apple IPad Pro Smart Keyboardhttps://www.feoh.org/posts/apple-ipad-pro-smart-keyboard.html2017-03-04T23:50:00-05:002017-03-04T23:50:00-05:00cpatti<p>So, after suffering a few years with a flaky iPad Air 2, my lovely wife convinced me that it was OK to treat myserlf last week, and I got myself a 9.7" iPad Pro with the Smart Keyboard.</p>
<p>To be honest, I've been super unhappy with Apple keyboards of late. They seem to think that everything should be a laptop keyboard - super - <strong>compact</strong> layout and a super squishy typing feel.</p>
<p>However, i my opinion Apple's superior mechanical designers are firing on all cylinders with the new iPad Pro Smart Keyboard.</p>
<p>The layout feels like a regular laptop keyboard. The keys aren't cramped at all like the ones on the old iPad Air 2 Keyboartd case I used to own, and the typing feel is surprisingly good for a device that folds into the caser and barely adds a quarter inch to the combined thickness of the device with the case closed.</p>
<p>It's also notably lighter than the old keyboard case, which added markedly to the overall weight of my iPad.</p>
<p>As I write this I'm 35,000 feet up in an airplane on my way to a Florida vacation to visit my in-laws and two of my best friends who recently moved there.</p>
<p>Typing on this keyboard is surprisingly comfortable. In fact I'll go out on a limb and say it's the most comfortable mobile keyboard I've ever used.</p>
<p>Unlike other iPad keyboards, the Smart Keyboard mates with the iPaad Pro through a mag connector where the case attaches to the iPad. This means that Bluetooth pairing isn't required which is a big win. Anyone who's used a Bluetooth keyboard will know that they can sometimes need to be repaired, usually at the least convenie moments.</p>
<p>There's also no external power source required - no battery to worry about having to charge or fiddle extra cables to have to haul around.</p>
<p>It's more expensive than the average Bluetooth keyboard, but from where I sit you get a lot of value for those extra dollars.</p>
<p>In short, this keyboard is precisely the kind of super elegant, ergonomic design with unusual attention to detail that made me an Apple hardware fan all those years ago.</p>So I got a new keyboard (WASD Code 104 Key)https://www.feoh.org/posts/so-i-got-a-new-keyboard-wasd-code-104-key.html2017-02-23T03:00:00-05:002017-02-23T03:00:00-05:00cpatti<p>Readers of this blog will know that I love mechanical keyboards. Traditionally I go for the super clicky Cherry MX Brown switches.</p>
<p>However, my next door neighbor at work very politely informed me that I was driving him stark raving bug house with the machine gun like sound of my typing.</p>
<p>So, after some heart felt recommendations from my coworkers I bought a <a class="reference external" href="https://www.wasdkeyboards.com/index.php/products/code-keyboard/code-104-key-mechanical-keyboard.html">WASD Code 104 Key Keyboard</a>.</p>
<p>It's a nice compromise. I'll always prefer the superior tactile feedback of the Cherry MX Brown switches, but given that each key doesn't issue that satisfying (or annoying, depending on your perspective) CLICK, typing on this keyboard is still extremely comfortable.</p>
<p>The keyboard offers some great features. One of my favorites is a set of DIP switches on the keyboard's underside that allow for hardware configuration of a number of important characteristics. For instance with the flip of a switch I turned on "Mac Mode" which put the Command/Apple key in the right place among other things.</p>
<p>I also find the white backlighting this keyboard offers to be very pleasing to the eye. If I'm honest with myself the cool green backlighting is one of the features of love about my <a class="reference external" href="https://feoh.org/2015/07/28/a-few-random-thoughts-on-keyboards/">Razor Black Widow Ultimate</a>.</p>
<p>The only down sides I can cite for this keyboard are the lack of pass through connectors for USB and headphones. Both my DAS and Razer keyboards have these and they're very handy for things like hooking up your mouse.</p>
<p>Overall it's a great keyboard and I'm pleased that I can type comfortably without annoying the crap out of my coworkers :)</p>