<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: That Blair Guy</title>
    <description>The latest articles on DEV Community by That Blair Guy (@thatblairguy).</description>
    <link>https://dev.to/thatblairguy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F259442%2Fcbea8451-2159-4bb1-8ed6-50609a77343b.jpeg</url>
      <title>DEV Community: That Blair Guy</title>
      <link>https://dev.to/thatblairguy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thatblairguy"/>
    <language>en</language>
    <item>
      <title>Notes on Switching to Mac</title>
      <dc:creator>That Blair Guy</dc:creator>
      <pubDate>Sat, 23 Jan 2021 19:52:58 +0000</pubDate>
      <link>https://dev.to/thatblairguy/notes-on-switching-to-mac-3oae</link>
      <guid>https://dev.to/thatblairguy/notes-on-switching-to-mac-3oae</guid>
      <description>&lt;p&gt;[&lt;a href="https://chaosandpenguins.com/blog/2021/01/04/notes-on-switching-to-mac/"&gt;Originally posted at Chaos and Penguins.&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;A friend recently announced her job was requiring her to use a Mac, but she'd only ever used Windows and could anyone help her get started?&lt;/p&gt;

&lt;p&gt;A similar work-related transition caused me to add Mac to my skillset a couple years ago and this request for assistance was the final push I needed to get my notes organized; here they are in a form that will perhaps help others as well.&lt;/p&gt;

&lt;p&gt;I'm keyboard-oriented, so a lot of this focuses on using the keyboard and keyboard shortcuts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keyboard Navigation
&lt;/h2&gt;

&lt;p&gt;One of the biggest changes from Windows to Mac is that for most things, where Windows uses the control (Ctrl) key, Mac uses the command (Cmd) key. It's the one that looks like a square with loops on the corners. (If you plug a Windows keyboard into a Mac, you'll use the "Windows" key as the command key.)&lt;/p&gt;

&lt;p&gt;The control key does still get used, but it tends to be more dependent on the individual program.&lt;/p&gt;

&lt;p&gt;Here's a quick list of common keyboard shortcuts. &lt;a href="https://support.apple.com/en-us/HT201236"&gt;Apple has a longer list in a support document&lt;/a&gt; at &lt;a href="https://support.apple.com/en-us/HT201236"&gt;https://support.apple.com/en-us/HT201236&lt;/a&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Windows&lt;/th&gt;
&lt;th&gt;Mac&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Copy&lt;/td&gt;
&lt;td&gt;Ctrl-C&lt;/td&gt;
&lt;td&gt;Cmd-C&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cut&lt;/td&gt;
&lt;td&gt;Ctrl-X&lt;/td&gt;
&lt;td&gt;Cmd-X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paste&lt;/td&gt;
&lt;td&gt;Ctrl-V&lt;/td&gt;
&lt;td&gt;Cmd-V&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move to start of line&lt;/td&gt;
&lt;td&gt;Home&lt;/td&gt;
&lt;td&gt;Cmd-left arrow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move to end of line&lt;/td&gt;
&lt;td&gt;End&lt;/td&gt;
&lt;td&gt;Cmd-right arrow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move to previous word&lt;/td&gt;
&lt;td&gt;Ctrl-left arrow&lt;/td&gt;
&lt;td&gt;Option-left arrow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move to next word&lt;/td&gt;
&lt;td&gt;Ctrl-right arrow&lt;/td&gt;
&lt;td&gt;Option-right arrow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Undo&lt;/td&gt;
&lt;td&gt;Ctrl-Z&lt;/td&gt;
&lt;td&gt;Cmd-Z&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Redo (undo the undo)&lt;/td&gt;
&lt;td&gt;Ctrl-Y&lt;/td&gt;
&lt;td&gt;Shift-Cmd-Z&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Switching between programs
&lt;/h2&gt;

&lt;p&gt;On Windows, you can "Alt-Tab" to switch between programs. On Mac, you use Command-Tab to switch between programs, but it doesn't work the way Windows does. If you have multiple copies of Word open, Command-Tab will bring them ALL to the foreground.&lt;/p&gt;

&lt;p&gt;To switch between instances of the same program (e.g. Switch between a meeting agenda and a report) use Command-` (That's the key in the far upper-left of the keyboard, usually between Escape and Tab. It's also known as the "backtick" or accent key. The "uppercase" version of that key is the tilde.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigating the file system
&lt;/h2&gt;

&lt;p&gt;On Windows, you navigate the file system with Windows Explorer. On Mac, it's the Finder. This is the blue "smiley face" which appears in the "Dock." (When I started using Mac, this was at the bottom of the screen, with the Finder icon on the left. Your mileage may vary.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Launching Programs
&lt;/h2&gt;

&lt;p&gt;There are at least two ways to launch applications&lt;/p&gt;

&lt;p&gt;I find the fastest way to launch a program is by holding down the command key and pressing the space bar. This causes a prompt to appear where you can type the name of the program you want to run. As soon as you've typed enough for the program name to be selected, hit the Enter key to launch it. (This is the "Spotlight Search.)&lt;/p&gt;

&lt;p&gt;Alternatively, in the finder, the area on the left includes an "Applications" tab. If you click on that, you'll be presented with a list of installed applications.&lt;/p&gt;

&lt;p&gt;Once a program has been launched, it will appear in the dock. You can right click on the application and choose to have it remain in the dock, even if it's not running.&lt;/p&gt;

&lt;p&gt;Macworld has a list of five ways to launch an app at:&lt;br&gt;
&lt;a href="https://www.macworld.com/article/3108469/5-ways-to-launch-mac-apps-from-the-keyboard.html"&gt;https://www.macworld.com/article/3108469/5-ways-to-launch-mac-apps-from-the-keyboard.html&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;Mac keyboards don't have a print screen button. If you plug in a Windows keyboard, that button won't do anything.&lt;/p&gt;

&lt;p&gt;To take a screenshot in Mac, hold down the Command and Shift keys and then press the 4. You then use the mouse to select the area of the screen you wish to capture. Afterward, a thumbnail image will appear at the bottom right of the screen for 5-10 seconds. Click on the thumbnail to access the full-size image which you can then perform some rudimentary editing on before using Command-C to copy it into another program. (This is similar to the Windows-Shift-S functionality recently added to Windows 10.)&lt;/p&gt;

&lt;p&gt;Along with Cmd-Shift-4, &lt;a href="https://support.apple.com/en-us/HT201236"&gt;Apple's list of keyboard shortcuts&lt;/a&gt; says you can also use Cmd-Shift-3 and (in newer versions of the OS) Cmd-Shift-5. (This latter apparently gives you an ability to record the screen which I wasn't aware of before writing this.)&lt;/p&gt;

&lt;p&gt;Apple offers a &lt;a href="https://support.apple.com/en-us/HT201361"&gt;support article on screenshots&lt;/a&gt; at &lt;a href="https://support.apple.com/en-us/HT201361"&gt;https://support.apple.com/en-us/HT201361&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Program preferences
&lt;/h2&gt;

&lt;p&gt;In Windows, programs are free to use whatever conventions they wish to launch program settings (generally a "Settings" item in the "File" menu, or sometimes "Preferences" under the "Edit" menu).&lt;/p&gt;

&lt;p&gt;On Mac, program preferences are always (almost always?) accessible via a "Preferences" item on the menu item with the program's name. This may also be accessed via the Command-Comma keyboard shortcut.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing the Menu Bar
&lt;/h2&gt;

&lt;p&gt;As mentioned at the beginning, I'm keyboard-oriented. I've not found a reliable way to do this. According to an article on c|net titled "&lt;a href="https://www.cnet.com/news/access-menus-via-the-keyboard-in-os-x/"&gt;Access menus via the keyboard in OSX&lt;/a&gt;", you can use Command-F2.&lt;/p&gt;

&lt;p&gt;Unfortunately, on newer Macbooks equipped with a touchbar, the function keys aren't always available. As an alternative, you can use Command-Shift-/ (aka "Command-?") to get into the Help search menu item. I find that to be enough of a hassle that using the mouse is easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Helpful Bookmarks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://osxdaily.com/"&gt;OS X Daily&lt;/a&gt; (&lt;a href="https://osxdaily.com/"&gt;https://osxdaily.com/&lt;/a&gt;) has a lot of useful "How do I do [X]?" articles. Google frequently lands me there (or you can also specify "site:osxdaily.com" as one of your search criteria).&lt;/li&gt;
&lt;li&gt;Ask Different (&lt;a href="https://apple.stackexchange.com/"&gt;https://apple.stackexchange.com/&lt;/a&gt;) is a community support site for Apple products.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
    </item>
    <item>
      <title>Why do DNS changes take so long to show up?</title>
      <dc:creator>That Blair Guy</dc:creator>
      <pubDate>Tue, 14 Jan 2020 08:01:42 +0000</pubDate>
      <link>https://dev.to/thatblairguy/why-do-dns-changes-take-so-long-to-show-up-4d35</link>
      <guid>https://dev.to/thatblairguy/why-do-dns-changes-take-so-long-to-show-up-4d35</guid>
      <description>&lt;p&gt;My project manager asked me yesterday, "Why do DNS changes take so long to show up?" We were in the process of moving a web site to a new server and he hadn't expected it to take 90 minutes for all the traffic to move to the new server.&lt;/p&gt;

&lt;p&gt;As background, let's talk about what the Domain Name System (DNS) is for a moment. Every computer connected to the internet has a unique address, called an IP address. You can think of this as being similar to a telephone number. For &lt;a href="https://www.example.com"&gt;www.example.com&lt;/a&gt;, the IP address is &lt;code&gt;93.184.216.34&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The problem with IP addresses is, they're hard to remember, which is why we have a system of domain names (example.com) for groups of computers and host names for individual computers. This is similar to a person having a family name and a given name.&lt;/p&gt;

&lt;p&gt;The DNS system is similar to your phone's contact list. Most people don't know all the phone numbers in their phone's contact list; instead, they know to look up Bob Smith in the contact list and when they press the dial button, the phone looks up Bob's phone number and dial's 732-555-1234.&lt;/p&gt;

&lt;p&gt;Similarly, when you type &lt;a href="https://www.example.com"&gt;www.example.com&lt;/a&gt; into the web browser, your computer contacts the DNS system, looks up the IP address, and connects the browser to 93.184.216.34.&lt;/p&gt;

&lt;p&gt;Rather than look up the IP address on every request, your computer will remember (or cache) the address for a while. How long it should remember the address is controlled by whoever owns the domain name, it can range anywhere from a few seconds, up to days or longer. Commonly, it's set to several hours. This is called the DNS record's "time to live."&lt;/p&gt;

&lt;p&gt;So if you run &lt;a href="http://www.example.com"&gt;www.example.com&lt;/a&gt; and move the website to a new host (this could be a new hosting provider, or simply a new server at the same provider), part of the move will be to update the DNS system (contact list) with the new server's IP address (phone number).&lt;/p&gt;

&lt;p&gt;Because of the DNS time to live, other computers may continue to contact the old server until the DNS record expires, at which time they'll look up the address again and find the new IP address. (This is an important consideration when moving a web application which maintains any sort of application state information.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus: Looking up IP addresses&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most Linux and OSX computers will have a program called dig installed. (Alternatively, you can also use the &lt;a href="https://toolbox.googleapps.com/apps/dig/#A/"&gt;Dig tool from Google's online "G Suite Toolbox"&lt;/a&gt;) You can use this to look up the IP address of any computer connected to the internet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;blair@Squawk:~$ dig www.example.com

; &amp;lt;&amp;lt;&amp;gt;&amp;gt; DiG 9.10.3-P4-Ubuntu &amp;lt;&amp;lt;&amp;gt;&amp;gt; www.example.com
;; global options: +cmd
;; Got answer:
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 16595
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;www.example.com.               IN      A

;; ANSWER SECTION:
www.example.com.        80319   IN      A       93.184.216.34

;; Query time: 7 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Jan 14 02:01:45 EST 2020
;; MSG SIZE  rcvd: 60

blair@Squawk:~$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In the part labeled &lt;code&gt;;; ANSWER SECTION&lt;/code&gt;, there's a line which reads:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;www.example.com.        80319   IN      A       93.184.216.34
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The the server's IP address is  93.184.216.34 and the computer will remember the IP address for another 80,319 seconds (about 22 hours). If you look up the same record several times in a row, you'll notice that the number decreases over time. (It appears the record for &lt;a href="http://www.example.com"&gt;www.example.com&lt;/a&gt; is configured with a time to live around 24 hours.)&lt;/p&gt;

</description>
      <category>dns</category>
      <category>web</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Code review checklist</title>
      <dc:creator>That Blair Guy</dc:creator>
      <pubDate>Mon, 28 Oct 2019 03:16:13 +0000</pubDate>
      <link>https://dev.to/thatblairguy/code-review-checklist-4akg</link>
      <guid>https://dev.to/thatblairguy/code-review-checklist-4akg</guid>
      <description>&lt;p&gt;Recently, I've been doing code reviews for a group of junior devs. I'm pleased to have the opportunity, but I find we're spending more time on fundamentals than the actual stories.&lt;/p&gt;

&lt;p&gt;To address this, I've put together a checklist of things to check before submitting your code to be reviewed. It's not meant to be exhaustive, just a short list intended to help us spend less time reviewing the basics and more on the parts the basics are supporting.&lt;/p&gt;

&lt;p&gt;Are there other items you'd include on this list?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is the code up to date with &lt;code&gt;master&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Does the code run? Do all the tests pass? (This also means no "expected failures.")&lt;/li&gt;
&lt;li&gt;Do all the classes and methods have comments?&lt;/li&gt;
&lt;li&gt;Have you removed all of your "debugging" code (e.g. System.out, console.log, or other platform equivalent).&lt;/li&gt;
&lt;li&gt;There should not be any outstanding changes from previous reviews.&lt;/li&gt;
&lt;li&gt;There should not be changes which aren’t part of the specific ticket you're working on.&lt;/li&gt;
&lt;li&gt;There should be no blocks of commented out code.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>mentoring</category>
      <category>codequality</category>
      <category>bestpractices</category>
    </item>
  </channel>
</rss>
