<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Matt Layher on Medium]]></title>
        <description><![CDATA[Stories by Matt Layher on Medium]]></description>
        <link>https://medium.com/@mdlayher?source=rss-9c4b364e2944------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wvEOBlofoewJu-CU2EdrAg.jpeg</url>
            <title>Stories by Matt Layher on Medium</title>
            <link>https://medium.com/@mdlayher?source=rss-9c4b364e2944------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 22:59:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mdlayher/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Matt's remote workspace in 2020]]></title>
            <link>https://medium.com/@mdlayher/matts-remote-workspace-in-2020-8bbaa60a6a0b?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bbaa60a6a0b</guid>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[audio]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 20:41:08 GMT</pubDate>
            <atom:updated>2020-03-27T20:41:08.853Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks! I published a blog today that details the equipment I use to work remotely. Here’s a sneak peek, so enjoy!</p><p><a href="https://mdlayher.com/blog/matts-remote-workspace-in-2020/">Matt&#39;s remote workspace in 2020</a></p><figure><img alt="Matt’s workspace" src="https://cdn-images-1.medium.com/max/1024/1*kVjiMtCVW_12eLDteVM5Jg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bbaa60a6a0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hey all, just wanted to share my new project with you. Enjoy!]]></title>
            <link>https://medium.com/@mdlayher/hey-all-just-wanted-to-share-my-new-project-with-you-enjoy-fb7b20306bf7?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb7b20306bf7</guid>
            <category><![CDATA[ipv6]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Tue, 11 Feb 2020 21:28:01 GMT</pubDate>
            <atom:updated>2020-02-11T21:28:01.250Z</atom:updated>
            <content:encoded><![CDATA[<h3>CoreRAD: a new IPv6 router advertisement daemon</h3><p>Hey all, just wanted to share my new project with you. Enjoy!</p><p><a href="https://mdlayher.com/blog/corerad-a-new-ipv6-router-advertisement-daemon/">https://mdlayher.com/blog/corerad-a-new-ipv6-router-advertisement-daemon/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb7b20306bf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving my blog away from Medium]]></title>
            <link>https://medium.com/@mdlayher/moving-my-blog-away-from-medium-19e3425db263?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/19e3425db263</guid>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Thu, 18 Apr 2019 16:17:43 GMT</pubDate>
            <atom:updated>2019-04-18T16:20:22.040Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks! First, I’d like to thank my Medium followers for all of your readership and comments over the past few years.</p><p>I’m writing to let you all know that I’ve decided to move my blog content away from Medium, and to my personal site: <a href="https://mdlayher.com/">mdlayher.com</a>. While this site has been great for allowing me to quickly produce and publish content to a wide audience, it lacks some of the flexibility I desire.</p><p>I’m switching to a <a href="https://gohugo.io/">Hugo</a> and <a href="https://www.netlify.com/">Netlify</a> powered site, which you can now find at <a href="https://mdlayher.com/">mdlayher.com</a>. The front page contains aggregated open source, blog post, and talks content, and the blog specifically can be found at <a href="https://mdlayher.com/blog/">mdlayher.com/blog</a>.</p><p>I’m a big fan of this workflow, because I’m able to write markdown documents, preview them locally with hugo serve, and then push git commits to <a href="https://github.com/mdlayher/mdlayher.com">github.com/mdlayher/mdlayher.com</a> in order to publish them with Netlify. Having my documents in markdown format is great: it’s much easier to edit them locally with proper version control tooling and such.</p><p>I may continue to publish stub articles here to link to my blog, for those who have followed me on this platform, but any new content will be available on <a href="https://mdlayher.com/">mdlayher.com</a> only. Thanks for your support!</p><ul><li>Matt Layher</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19e3425db263" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring byte parsing APIs in Go]]></title>
            <link>https://medium.com/@mdlayher/exploring-byte-parsing-apis-in-go-a0a57abd7ef2?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0a57abd7ef2</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[go]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 18:07:35 GMT</pubDate>
            <atom:updated>2019-04-18T16:25:25.866Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I am moving my blog content to <a href="https://mdlayher.com/">mdlayher.com</a>. Please see the updated version of this content at:</blockquote><blockquote><a href="https://mdlayher.com/blog/exploring-byte-parsing-apis-in-go/">https://mdlayher.com/blog/exploring-byte-parsing-apis-in-go/</a></blockquote><p>I recently contributed a post to Gopher Academy’s annual advent series about building safe and ergonomic byte parsing APIs in Go. Enjoy!</p><p><a href="https://blog.gopheracademy.com/advent-2018/exploring-byte-parsing-apis-in-go/">Exploring byte parsing APIs in Go</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0a57abd7ef2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Network Protocol Breakdown: NDP and Go]]></title>
            <link>https://medium.com/@mdlayher/network-protocol-breakdown-ndp-and-go-3dc2900b1c20?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dc2900b1c20</guid>
            <category><![CDATA[go]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[ndp]]></category>
            <category><![CDATA[ipv6]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Wed, 30 May 2018 14:41:32 GMT</pubDate>
            <atom:updated>2019-04-18T16:25:08.797Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I am moving my blog content to <a href="https://mdlayher.com/">mdlayher.com</a>. Please see the updated version of this content at:</blockquote><blockquote><a href="https://mdlayher.com/blog/network-protocol-breakdown-ndp-and-go/">https://mdlayher.com/blog/network-protocol-breakdown-ndp-and-go/</a></blockquote><p>If you’ve ever studied the fundamentals of computer networks, you may be familiar with the <a href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol">Address Resolution Protocol</a>, or “ARP”. ARP is a crucial piece of IPv4 designed to allow computers on the same network to discover each other’s MAC addresses using their IPv4 addresses. IPv4 itself remains a crucial component of computer networks today, but how does IPv6 perform this task?</p><p>This is where the <a href="https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol">Neighbor Discovery Protocol</a>, “NDP” (sometimes just “ND”), comes into play. You can think of NDP as a more flexible, IPv6-only, modern version of ARP. It performs all of the same functions that ARP does for IPv4 while also enabling some interesting new functionality for IPv6.</p><p>In this blog, you will learn about some of the fundamentals of NDP, how NDP is used with IPv6, and how to work with NDP using the Go programming language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lGubeeqt2kl6E9M7Sqg8uQ.png" /><figcaption>Using the “ndp” tool (github.com/mdlayher/ndp) to send Router Solicitation messages.</figcaption></figure><h4>An introduction to NDP</h4><p>NDP is specified in <a href="https://tools.ietf.org/html/rfc4861">IETF RFC 4861</a>. In many ways, NDP is the spiritual successor to ARP for IPv6. It is used to help computers find the MAC addresses of their neighbors on a local network, but it also has much more to offer thanks to its added flexibility and extensibility.</p><p>To start, machines that make use of IPv6 always assign a <a href="https://en.wikipedia.org/wiki/Link-local_address#IPv6">link-local IPv6 address</a> to each of their enabled network interfaces. Addresses in this block reside in fe80::/10, and can often be easily identified by their prefix alone. Because of the existence of this address, NDP can be transported over <a href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6">ICMPv6 </a>and IPv6. The ICMPv6 packet header contains:</p><ul><li><strong>Type:</strong> a general class of messages (indicates NDP message types).</li><li><strong>Code:</strong> a sub-class of messages within a type (always 0 for NDP).</li><li><strong>Checksum: </strong>used to verify the integrity of an ICMPv6 message.</li><li><strong>Data:</strong> an arbitrary payload (contains NDP message structures).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C32RcIWzNBtSjeaLr-mXyg.png" /><figcaption>An ICMPv6 header. NDP uses ICMPv6 for transport.</figcaption></figure><p>NDP has several different message types which allow it to be used for discovering IPv6 neighbors and routers on a local network. These include:</p><ul><li><strong>Neighbor Solicitation: </strong>ask a neighbor for its MAC address using its IPv6 address.</li><li><strong>Neighbor Advertisement: </strong>inform a neighbor of an interface’s MAC address.</li><li><strong>Router Solicitation: </strong>request that routers generate router advertisement messages.</li><li><strong>Router Advertisement: </strong>inform neighbors that a router is available to be used as a default IPv6 router.</li><li><strong>Redirect: </strong>sent by a router in response to an IPv6 packet to inform an interface of a better first hop router. This message won’t be covered in detail in this post.</li></ul><p>In addition, NDP supports options in a flexible TLV (type, length, value) format, making the protocol extremely extensible. Some commonly used options include:</p><ul><li><strong>Source/Target link-layer addresses:</strong> the source or target (depending on solicitation/advertisement messages) link-layer address of an IPv6-speaking interface.</li><li><strong>Prefix information: </strong>sent by routers to inform neighbors if an IPv6 prefix is “on-link”, and if it can be used for <a href="https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)">Stateless Address Autoconfiguration (SLAAC)</a>.</li><li><strong>MTU:</strong> sent by routers to inform neighbors of the expected MTU on a network.</li><li><strong>Recursive DNS servers (RDNSS): </strong>specifies recursive DNS servers for this network, for use with SLAAC-configured interfaces.</li></ul><h4>Using NDP in Go</h4><p>Now that we’ve learned that some of the fundamentals of NDP with IPv6, let’s examine a Go package, <a href="https://github.com/mdlayher/ndp">github.com/mdlayher/ndp</a>, which allows NDP to be used in Go programs.</p><p>The fundamental type of the NDP package is ndp.Conn. An ndp.Conn is used to bind an ICMPv6 connection on a network interface for the purposes of sending and receiving NDP messages.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/edbaaef6979dfba5855613b3ab670878/href">https://medium.com/media/edbaaef6979dfba5855613b3ab670878/href</a></iframe><p>The typical use case of an ndp.Conn is to send and receive NDP messages which implement the ndp.Message interface. The messages implemented in the package mirror the name and structure of the messages defined in the NDP specification. Within these messages, NDP options can be specified using types which implement the ndp.Option interface.</p><p>As an example, let’s demonstrate use of the package by sending a Neighbor Solicitation message to discover the MAC address of an IPv6 neighbor, using its link-local address.</p><p>When using ARP, the equivalent message would be broadcast to all machines on the same local network. With IPv6, broadcast is completely eliminated in favor of increased use of multicast groups. With NDP, we can use an interface’s <a href="https://en.wikipedia.org/wiki/Solicited-node_multicast_address">solicited-node multicast address</a> to greatly reduce the amount of network traffic required for this operation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a903f0e718a041ac25ee96674c2b9006/href">https://medium.com/media/a903f0e718a041ac25ee96674c2b9006/href</a></iframe><p>As a final example, let’s send a Router Solicitation to discover routers and IPv6 prefix information on our local network. When the “autonomous address autoconfiguration” flag is set in a Router Advertisement, IPv6-enabled interfaces can use it to configure their own IPv6 addresses automatically; no DHCPv6 server required!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5fcc9ab52e10381f4b2226601d75c8dd/href">https://medium.com/media/5fcc9ab52e10381f4b2226601d75c8dd/href</a></iframe><h4>Summary</h4><p>The Neighbor Discovery Protocol is a crucial and fundamental part of IPv6 networking. Compared to ARP and IPv4, NDP and IPv6 offer numerous advantages:</p><ul><li>NDP builds on top of ICMPv6 using link-local addresses, instead of dealing with a totally different protocol on top of Ethernet frames.</li><li>IPv6 makes smart use of multicast to eliminate the need for broadcast, preventing a lot of unnecessary network noise.</li><li>NDP can be easily extended because new options can be added in a backward-compatible way.</li></ul><p>Although your operating system will take care of NDP on your behalf for normal applications, it can occasionally be useful to exercise the power of NDP and other low-level networking protocols directly. If you’re interested in exploring NDP traffic on your local network, check out the ndp tool included in my repository.</p><pre>$ go get -u github.com/mdlayher/ndp/...</pre><p>Here’s an example of using ndp to send Router Solicitations on interface eth0 from the interface’s link-local address until a Router Advertisement is received:</p><pre>$ sudo ndp -i eth0 -a linklocal rs<br>ndp&gt; interface: eth0, link-layer address: 04:18:d6:a1:ce:b8, IPv6 address: fe80::618:d6ff:fea1:ceb8<br>ndp rs&gt; router solicitation:<br>    - source link-layer address: 04:18:d6:a1:ce:b8<br><br>ndp rs&gt; router advertisement from: fe80::201:5cff:fe69:f246:<br>    - hop limit:        0<br>    - flags:            [MO]<br>    - preference:       0<br>    - router lifetime:  2h30m0s<br>    - reachable time:   1h0m0s<br>    - retransmit timer: 0s<br>    - options:<br>        - prefix information: 2600:6c4a:7002:100::/64, flags: [], valid: 720h0m0s, preferred: 168h0m0s</pre><p>If you’d like to make use of NDP in your own applications, I encourage you to try out my Go package, <a href="https://github.com/mdlayher/ndp">github.com/mdlayher/ndp</a>.</p><p>It is currently used in <a href="https://github.com/google/metallb">MetalLB</a> to expose Kubernetes services over IPv6 addresses, and for internal projects at DigitalOcean. Perhaps it could also be used as a model to implement your own NDP library in your programming language of choice!</p><p>This blog provides a high-level overview to get readers started with NDP, but if you’d like to learn more about some of the common use cases for NDP in computer networks today, check out <a href="http://packetlife.net/blog/2008/aug/28/ipv6-neighbor-discovery/">Jeremy Stretch’s blog on the topic at PacketLife</a>.</p><p>Thank you very much for reading this post. I hope you’ve enjoyed it and learned something new along the way. If you have, you may also be interested in <a href="https://medium.com/@mdlayher">some of my other posts</a> about using low-level networking primitives with the Go programming language.</p><p>Finally, if you have questions or comments, feel free to reach out via the comments, <a href="https://twitter.com/mdlayher">Twitter</a>, or <a href="https://gophers.slack.com/">Gophers Slack</a> (username: mdlayher).</p><p>Thanks again for your time!</p><h4>Links</h4><ul><li>Package/command ndp for Go: <a href="https://github.com/mdlayher/ndp">https://github.com/mdlayher/ndp</a></li><li>PacketLife: IPv6 neighbor discovery: <a href="http://packetlife.net/blog/2008/aug/28/ipv6-neighbor-discovery/">http://packetlife.net/blog/2008/aug/28/ipv6-neighbor-discovery/</a></li></ul><h4>References</h4><ul><li>Wikipedia: ARP: <a href="https://en.wikipedia.org/wiki/Address_Resolution_Protocol">https://en.wikipedia.org/wiki/Address_Resolution_Protocol</a></li><li>Wikipedia: NDP: <a href="https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol">https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol</a></li><li>IETF RFC 4861: <a href="https://tools.ietf.org/html/rfc4861">https://tools.ietf.org/html/rfc4861</a></li><li>Wikipedia: Link-local address (IPv6): <a href="https://en.wikipedia.org/wiki/Link-local_address#IPv6">https://en.wikipedia.org/wiki/Link-local_address#IPv6</a></li><li>Wikipedia: ICMPv6: <a href="https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6">https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6</a></li><li>Wikipedia: IPv6: SLAAC: <a href="https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)">https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)</a></li><li>Wikipedia: Solicited-node multicast address: <a href="https://en.wikipedia.org/wiki/Solicited-node_multicast_address">https://en.wikipedia.org/wiki/Solicited-node_multicast_address</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dc2900b1c20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A programmer’s journey with RSI]]></title>
            <link>https://medium.com/@mdlayher/a-programmers-journey-with-rsi-c73628eed0c4?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/c73628eed0c4</guid>
            <category><![CDATA[ergonomics]]></category>
            <category><![CDATA[cubital-tunnel-syndrome]]></category>
            <category><![CDATA[rsi]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Mon, 12 Feb 2018 16:58:05 GMT</pubDate>
            <atom:updated>2019-04-18T16:24:52.682Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I am moving my blog content to <a href="https://mdlayher.com/">mdlayher.com</a>. Please see the updated version of this content at:</blockquote><blockquote><a href="https://mdlayher.com/blog/a-programmers-journey-with-rsi/">https://mdlayher.com/blog/a-programmers-journey-with-rsi/</a></blockquote><p>In 2013, I began to notice a bit of discomfort in my hands while typing. I requested a mechanical keyboard at work, and that seemed to make a difference. I brushed the pain off and continued to spend countless hours hacking away at work projects, open source side projects, and my university capstone project. So far, so good.</p><p>Shortly after, I joined the team at <a href="https://digitalocean.com/">DigitalOcean</a>. During my onboarding trip to New York, I spent many long hours in the office ramping up on internal systems during the day, and hacking on side projects in the evening. I returned home at the conclusion of the 5-week trip, and began working remotely for the first time.</p><p>That’s when I first noticed that something was truly amiss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5HAutNIVSM0texVNXIZPNQ.jpeg" /><figcaption>Thanks, Fatih Arslan, for the opening image suggestion.</figcaption></figure><h4>What is RSI?</h4><p>After working remotely for some time at home, I began to notice a cold, dull feeling in my left hand and arm after a long day of work. Initially, I shrugged it off, but these episodes became more frequent over time. On top of that, I would occasionally feel a jolt of pain shoot up my fingers when I pressed a key with a bit of force. I have always been a heavy-handed typist, but I figured I could just lighten up my keystrokes to reduce the occurrence of the problem.</p><p>After dealing with these problems for some time, and the mental anguish that came alongside them, I decided to see a doctor. This is where I first discovered that I was facing a <a href="https://en.m.wikipedia.org/wiki/Repetitive_strain_injury">repetitive strain injury</a>, or <strong>RSI</strong>.</p><p>What exactly is RSI? Wikipedia describes it as:</p><blockquote>A <strong>repetitive strain injury (RSI)</strong> is an &quot;injury to the musculoskeletal and nervous systems that may be caused by repetitive tasks, forceful exertions, vibrations, mechanical compression, or sustained or awkward positions&quot;.</blockquote><p>Unbeknownst to me, those countless hours of hacking away at a keyboard had taken their toll, and I was suddenly facing a long-term injury which had the potential to greatly limit or perhaps even end my programming career.</p><p>I was only 23 years old, and I was completely overwhelmed. What could I do to right my course and continue my career?</p><h4>Dealing with RSI symptoms</h4><p>I tried a wide variety of different approaches to deal with the symptoms and to improve my comfort while typing.</p><p>First, I tried taking more breaks during the work day. I tend to “get in the zone” when I’m working on something I find interesting, and this meant that I may spend long periods of time typing continuously. I tried to actively limit the amount of typing I would do in a single session, and I restricted my time on computers to working hours only. No more late-night hacking, and no more working on side projects on the weekends.</p><p>This seemed to work for a time, but it really bothered me that I could not spend more time working on passion projects due to the state of my hands. I tried a couple of other things, like therapy putty and using a hot/cool pack on my hands after work. These seemed to help a little bit, but I was later told to avoid therapy putty in my particular case. Finally, I forced myself to take some time off work, just so I could give my hands a rest.</p><p>But over the course of a couple of years, nothing seemed to make a dramatic difference. The physical symptoms of RSI caused me a lot of mental and emotional turmoil. It’s amazing how much of a physical impact your mental state can have on your body.</p><p>In 2017, I decided that enough was enough and that I would do whatever I could to be able to work comfortably and prolong my career. I booked an appointment to see an orthopedic hand, wrist, and arm specialist. After a couple of visits, I came away with some valuable insight on my condition.</p><h4>Building an ergonomic workstation</h4><p>To start, my work area at the time was far from <a href="https://www.merriam-webster.com/dictionary/ergonomics">ergonomic</a>. There’s an awful lot to be said about the subject, but the basic idea is that you should maintain a comfortable, relaxed, and proper posture during computer use. <a href="https://www.uhs.umich.edu/computerergonomics">This article from the University of Michigan</a> covers many of the major points.</p><p>I have a decent office chair, but the rest of my workstation consisted of an IKEA table for a desk, a Das Keyboard 4, and a Logitech Performance MX mouse. The table was far too tall for use as a desk, and had no keyboard tray. The keyboard was nice, but I exerted too much pressure typing on it and (in retrospect) my wrist placement felt awkward.</p><p>I knew that the time had come to make a strong investment in my future, and began pursuing a more ergonomic workstation. I now use the following equipment in my every day work:</p><ul><li><a href="https://www.upliftdesk.com/adjustable-height-desks/">Uplift standing desk</a> (~$1200): motorized standing desk with keyboard tray, a long warranty, and lots of bells and whistles. Expensive, but hugely beneficial from an ergonomic perspective. Comfortable to use while standing or sitting, with plenty of space for all of my gear.</li><li><a href="https://www.kinesis-ergo.com/shop/advantage2/">Kinesis Advantage 2 keyboard</a> (~$350): ergonomic, split, mechanical keyboard. I didn’t think I would ever get used to it, but after a month or two, it became a dream to type on.</li><li><a href="https://www.logitech.com/en-us/product/mx-ergo-wireless-trackball-mouse">Logitech MX Ergo Plus trackball</a> (~$100): ergonomic trackball with a stand that allows it to be tilted up to 30 degrees. Although I haven’t had much pain from mouse use, I decided to give a trackball a try and have been pleased with the purchase.</li></ul><p>The Uplift desk is amazing. My particular desk is 72x30&quot;, and has enough room for three 24&quot; monitors, a stereo receiver, and a large amount of space for notes, paperwork, and documentation. I added a memory control keypad to my desk, so I have presets available for my preferred sitting and standing desk heights. I’d like to buy some monitor mounts so I can fine-tune the positions of my monitors and tidy up their cabling, but I haven’t done that yet.</p><p>The Kinesis keyboard’s design is very unusual, but I’ve come to really love it. In fact, it taught me that I had incorrectly learned to type ‘C’ using my index finger instead of my middle finger, and forced me to break that habit. The split design is so much more comfortable for my arms and wrists, and the unique key placement and key “wells” mean less travel per finger when typing. I’ve remapped some frequently used modifier keys (Shift, primarily) to the thumb areas, and I use macros to deal with any awkward key combinations, so I don’t have to contort my hands. I have macros for opening terminals, various tmux and window manager operations, and even starting up my work VPN connection in a background terminal.</p><p>Having used this set of equipment for roughly 6 months at the time of writing, I can’t believe I made it this far without it. These items have improved my computer’s usability, but I also wanted to pursue ways to make phone use and video gaming more comfortable:</p><ul><li><a href="https://www.amazon.com/AmazonBasics-Capacitive-Stylus-Touchscreen-Devices/dp/B008HJGPVO">AmazonBasics stylus</a> (~$8): works great with my Google Pixel. I use it for browsing and swipe-typing (or I just use voice to text) instead of mashing my fingers into the screen (which was surprisingly painful).</li><li><a href="https://www.amazon.com/DualShock-Wireless-Controller-PlayStation-Black-4/dp/B01LWVX2RG/">PlayStation 4 DualShock 4 controller</a> (~$36): works well for most Steam games (Skyrim, Stardew Valley, Final Fantasy games, etc.), and is much more comfortable for me while gaming than using a mouse and keyboard. Most console controllers are quite comfortable, and since I was never big into FPS games anyway, I don’t mind giving up most mouse and keyboard games.</li></ul><p>I can’t say I’m quite free of pain while typing and using a computer at this point, but improving the ergonomic properties of my workstation has made a tremendous difference in my life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhuHx_GVW0XWEymjvzQS7g.jpeg" /><figcaption>My workstation in 2018.</figcaption></figure><h4>Software efficiency and ergonomics</h4><p>Now that we’ve talked about hardware, let’s move on to software. I was a vim user for roughly 8 years.</p><p>I can decisively say that I was never really any good at using vim.</p><ul><li>I never learned how to use “hjkl” for movement, even though this is almost certainly more ergonomic than using arrow keys. I tried, but just couldn’t get used to it.</li><li>I never learned any of the “advanced” editor features, except regex search and replace.</li><li>My vimrc was a total “copy/paste from random blogs” mess, and Vimscript confounds me to this day.</li></ul><p>I was always impressed by programmers who knew all the best tricks for getting the most out of vim, but I never really understood the need to optimize every single aspect of your editor. A quote comes to mind:</p><blockquote>Weeks of programming can save you hours of planning. — unknown</blockquote><p>Proper planning and design ahead of time can save you countless hours of hammering away at a keyboard. As you grow as a programmer, less and less of your time should be spent hammering out code anyway.</p><p>I wanted to optimize for <strong>typing less</strong> and <strong>thinking more</strong>.</p><p>And so, I switched to <a href="https://code.visualstudio.com/">Visual Studio Code</a> and never looked back. I personally find it quite a bit more usable than vim right out of the box. I have since learned how to set up code snippets, Go-specific features, etc. that make my daily workflow much easier.</p><p>I also look forward to seeing how voice to text software evolves in the future. It seems lacking for programming today, but perhaps there will come a point where I hardly have to use a keyboard at all!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p42yDTAuA8AQXkns9linzw.png" /><figcaption>https://github.com/mdlayher/ndp in Visual Studio Code.</figcaption></figure><h4>Dealing with cubital tunnel syndrome</h4><p>Finally, my visit to see a specialist provided me with a key insight: I was also dealing with <a href="https://en.wikipedia.org/wiki/Ulnar_nerve_entrapment#Cubital_tunnel_syndrome">cubital tunnel syndrome</a> in my left elbow. Essentially, the nerve that provides feeling to my left ring and pinky fingers was being compressed, causing a cold, dull feeling in these fingers. The probable causes are:</p><ul><li>Poor ergonomic posture during work.</li><li>My tendency to sleep on my side; most likely with the elbow bent for hours at a time.</li><li>Leaning on my elbows, thus, putting pressure on the nerve. This was a tough habit to break, especially while driving.</li></ul><p>I was given a custom-molded elbow brace and cloth sleeve to sleep in at night. It took some getting used to, but it honestly isn’t as bad as you might think.</p><p>I’ve been wearing the brace most nights for about four months now, and I’ve noticed a significant decrease in the amount of dullness and numbness in my fingers. My specialist mentioned that 70% of cubital tunnel syndrome cases can be resolved with splinting. Hopefully I won’t need surgery to correct the issue in the future, but it remains a possibility at this time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0KvRauL7JVNUZRDHJIbx-A.jpeg" /><figcaption>My cubital tunnel elbow brace and sleeve. The sleeve is quite well-worn.</figcaption></figure><h4>The physical and mental battles</h4><p>Last, but not least, I’ve begun a regular exercise regimen, and it’s worked wonders for both my physical and mental well-being. I’m going to the gym at least three times a week to lift weights and perform cardiovascular exercises.</p><p>As it turns out, regular exercise is a great way for me to combat several problems at the same time:</p><ul><li>I love craft beer, but I don’t feel as much of a desire to drink beer now that I’m physically active. I’ve lost some weight, I’ve made beer less of a priority in my life, and I plan to keep it up as long as I can.</li><li>Weight lifting strengthens my muscles and seems to have reduced the nagging pain in my hands and fingers. I don’t worry as much about my hands because of it, which breaks the self-defeating mental/physical cycle.</li><li>I’m in a better mood overall, because I can go to the gym to lift weights, run, etc. to combat stress at work and in my personal life.</li></ul><h4>The journey continues</h4><p>I’ve been dealing RSI and cubital tunnel syndrome in some form or another for roughly 4.5 years now, and I’m only 26 years old. My journey is far from over.</p><p>These days, thanks to the measures I’ve taken so far, I’m able to work comfortably the majority of the time. I spend more time planning and less time typing. I have a journal on my desk that I use to write down and think through ideas, before I spend hours trying to implement something I’m satisfied with.</p><p>I’m still able to create and contribute to open source software, but I have certainly cut back on recreational programming activities. I make an active effort to be off the computer at 5:30pm each day, and try to avoid spending any time on a computer at all on the weekends. Sure, there are plenty of projects I’d love to work on, but my health matters the most.</p><p>Even as I type this now, I can feel a bit of dullness in my left pinky, and some minor aches in the joints in my fingers. With all that I’ve been through and learned so far, I believe that I can beat these conditions — or at least make them bearable. If it turns out that I am unable to program at some point, so be it, but I certainly don’t intend to give up my craft any time soon.</p><p>I hope that others who suffer from computer overuse injuries are able to learn from my story. I cannot stress enough that the mental battle is just as important as the physical one. It’s all about maintaining a positive outlook, and doing what you can to take a step forward each day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5qkI3LDEvGS0drXCkJaaiA.jpeg" /><figcaption>Journal sketches for an <a href="https://godoc.org/github.com/digitalocean/go-openvswitch/ovsdb">OVSDB client in Go</a>.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c73628eed0c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accessing SMBIOS information with Go]]></title>
            <link>https://medium.com/@mdlayher/accessing-smbios-information-with-go-30658fac7151?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/30658fac7151</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[idm]]></category>
            <category><![CDATA[smbios]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Tue, 19 Dec 2017 22:38:29 GMT</pubDate>
            <atom:updated>2019-04-18T16:24:31.634Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I am moving my blog content to <a href="https://mdlayher.com/">mdlayher.com</a>. Please see the updated version of this content at:</blockquote><blockquote><a href="https://mdlayher.com/blog/accessing-smbios-information-with-go/">https://mdlayher.com/blog/accessing-smbios-information-with-go/</a></blockquote><p>I recently contributed a second post Gopher Academy’s annual advent series about accessing SMBIOS/DMI information with Go. Enjoy!</p><p><a href="https://blog.gopheracademy.com/advent-2017/accessing-smbios-information-with-go/">Accessing SMBIOS information with Go</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30658fac7151" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[unsafe.Pointer and system calls]]></title>
            <link>https://medium.com/@mdlayher/unsafe-pointer-and-system-calls-3f034395709d?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f034395709d</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[system-call]]></category>
            <category><![CDATA[pointers]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Fri, 15 Dec 2017 16:07:00 GMT</pubDate>
            <atom:updated>2019-04-18T16:23:54.754Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I am moving my blog content to <a href="https://mdlayher.com/">mdlayher.com</a>. Please see the updated version of this content at:</blockquote><blockquote><a href="https://mdlayher.com/blog/unsafe-pointer-and-system-calls/">https://mdlayher.com/blog/unsafe-pointer-and-system-calls/</a></blockquote><p>As part of Gopher Academy’s annual advent series, I contributed a blog post that shares my experiences using package unsafe , and in particular, the unsafe.Pointer type. Enjoy!</p><p><a href="https://blog.gopheracademy.com/advent-2017/unsafe-pointer-and-system-calls/">unsafe.Pointer and system calls</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f034395709d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Source at DigitalOcean: Introducing go-qemu and go-libvirt]]></title>
            <link>https://medium.com/@mdlayher/open-source-at-digitalocean-introducing-go-qemu-and-go-libvirt-7f4639f11631?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f4639f11631</guid>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[qemu]]></category>
            <category><![CDATA[libvirt]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Sat, 21 Oct 2017 01:25:12 GMT</pubDate>
            <atom:updated>2017-10-21T01:34:39.964Z</atom:updated>
            <content:encoded><![CDATA[<p>Last year, I co-authored this blog post with fellow DigitalOcean engineer Ben LeMasurier. It describes some of the tooling we’ve created in Go to work with QEMU and libvirt. Enjoy!</p><p><a href="https://blog.digitalocean.com/introducing-go-qemu-and-go-libvirt/">Open Source at DigitalOcean: Introducing go-qemu and go-libvirt</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f4639f11631" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cthulhu: Organizing Go Code in a Scalable Repo]]></title>
            <link>https://medium.com/@mdlayher/cthulhu-organizing-go-code-in-a-scalable-repo-63d89a8d28b?source=rss-9c4b364e2944------2</link>
            <guid isPermaLink="false">https://medium.com/p/63d89a8d28b</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[monorepo]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Matt Layher]]></dc:creator>
            <pubDate>Sat, 21 Oct 2017 01:16:18 GMT</pubDate>
            <atom:updated>2017-10-21T01:35:42.260Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently authored a blog for DigitalOcean that describes how we work on cthulhu, our monolithic Go repository, or “mono repo”. Enjoy!</p><p><a href="https://blog.digitalocean.com/cthulhu-organizing-go-code-in-a-scalable-repo/">Cthulhu: Organizing Go Code in a Scalable Repo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63d89a8d28b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>