<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Programming on Jeremy's Programming Blog</title><link>https://www.jeremymorgan.com/tags/programming/</link><description>Recent content in Programming on Jeremy's Programming Blog</description><generator>Hugo</generator><language>en-us</language><copyright>Jeremy Morgan</copyright><lastBuildDate>Fri, 07 Jun 2024 09:49:10 -0700</lastBuildDate><atom:link href="https://www.jeremymorgan.com/tags/programming/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Read Text File Go</title><link>https://www.jeremymorgan.com/tutorials/go/how-to-read-text-file-go/</link><pubDate>Sat, 31 Dec 2022 16:14:07 -0800</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/how-to-read-text-file-go/</guid><description>&lt;p>If you want to read text data in Go, it&amp;rsquo;s incredibly easy. In this guide I&amp;rsquo;ll show you my favorite way to open and read text files with Go.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> &lt;em>If you&amp;rsquo;d rather watch a video for this tutorial, it&amp;rsquo;s available here: &lt;a href="https://www.youtube.com/watch?v=X1DV9ZXinaU">How to Read a Text File with Go&lt;/a>&lt;/em>&lt;/p>
&lt;h2 id="the-text-file-were-using">The Text File We&amp;rsquo;re Using&lt;/h2>
&lt;p>I&amp;rsquo;ll be using a (fake) customer list that&amp;rsquo;s in a CSV format. It looks like this:&lt;/p></description></item><item><title>How to Optimize JPG Images</title><link>https://www.jeremymorgan.com/blog/programming/how-to-optimize-jpg-images/</link><pubDate>Sat, 27 Nov 2021 15:54:51 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-optimize-jpg-images/</guid><description>&lt;p>Want fast loading web pages?&lt;/p>
&lt;p>You probably aren&amp;rsquo;t optimizing your images enough. Image optimization is frequently overlooked because it&amp;rsquo;s only a small difference and takes some time to do. But a series of small changes will lead to a screaming fast website. It&amp;rsquo;s worth it. Your pages will load faster.&lt;/p>
&lt;h3 id="why-does-this-matter">Why does this matter?&lt;/h3>
&lt;ul>
&lt;li>It&amp;rsquo;s better for your user&lt;/li>
&lt;li>It makes your page more accessible in low bandwidth situations&lt;/li>
&lt;li>It&amp;rsquo;s better for SEO&lt;/li>
&lt;/ul>
&lt;p>All this in exchange for a few minutes of your time. Do you need any more reasons to optimize your images?&lt;/p></description></item><item><title>What Not to do in a Coding Interview</title><link>https://www.jeremymorgan.com/blog/programming/coding-interviews-advice/</link><pubDate>Fri, 17 Sep 2021 12:12:49 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/programming/coding-interviews-advice/</guid><description>&lt;p>On Twitter, a friend of mine &lt;a href="https://twitter.com/sthmrrll/status/1438369209285632000">shared a Twitter thread about interviews&lt;/a>. While it wasn&amp;rsquo;t explicitly related to &lt;em>tech&lt;/em> interviews, my ears perked up because I&amp;rsquo;ve seen it. So many times. Here&amp;rsquo;s what he said in its entirety:&lt;/p>
&lt;blockquote>
&lt;p>My favorite thing about LinkedIn and Twitter posts where people ask &amp;ldquo;What&amp;rsquo;s your favorite question to ask in a job interview, and why?&amp;rdquo; is seeing people earnestly share some of the worst job interview questions I&amp;rsquo;ve ever seen in my life&lt;/p></description></item><item><title>Introduction to Golang Slices</title><link>https://www.jeremymorgan.com/tutorials/go/golang-slices/</link><pubDate>Wed, 15 Sep 2021 13:14:44 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/golang-slices/</guid><description>&lt;p>Slices in Go can be awesome yet confusing at the same time. It&amp;rsquo;s a funky datatype for sure but extremely powerful once you get the hang of using them. Today we&amp;rsquo;re going to talk about what they are, why you would use a slice in Go, and some of the cool things you can do with them.&lt;/p>
&lt;h2 id="what-is-a-slice">What is a Slice?&lt;/h2>
&lt;p>A slice is a data type in Go that points to an underlying array. Think of it as a &amp;ldquo;view&amp;rdquo; of an array. To appreciate what a slice does, you must know how an array works.&lt;/p></description></item><item><title>Processing IOT Data with SQLite and Golang</title><link>https://www.jeremymorgan.com/tutorials/go/how-to-iot-data-go-sqlite/</link><pubDate>Sun, 11 Jul 2021 00:06:18 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/how-to-iot-data-go-sqlite/</guid><description>&lt;p>An &lt;a href="https://wpde.com/news/nation-world/sunday-will-be-hottest-day-ever-for-portland-other-pacific-nw-cities">unprecedented heat wave&lt;/a> rocked the Pacific Northwest in June. Oregon turned into an oven. This gave me yet another reason to break out a Raspberry Pi and collect some data. I sent it to &lt;a href="https://io.adafruit.com/">Adafruit&lt;/a> because it remains one of the greatest places to send and look at IoT data.&lt;/p>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/tutorials/go/how-to-iot-data-go-sqlite/how-to-iot-data-go-sqlite-00.webp" alt="Processing Iot Data Sqlite and Golang">&lt;/p>
&lt;p>During the first day I placed a Raspberry Pi under my deck to collect and send temperature and humidity data.&lt;/p></description></item><item><title>Easy IoT with Adafruit IO and a Raspberry Pi</title><link>https://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-iot-adafruit-raspberrypi/</link><pubDate>Wed, 02 Dec 2020 16:30:39 -0800</pubDate><guid>https://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-iot-adafruit-raspberrypi/</guid><description>&lt;p>There are a ton of IoT solutions in the cloud. Azure, AWS, and Google Cloud all have great and complex IoT platforms out there. They&amp;rsquo;re fantastic for doing enterprise IoT.&lt;/p>
&lt;p>But what about folks who just want to dip their toes into IoT? What if you just want to do a small hobby project to learn IoT before jumping into the big stuff??&lt;/p>
&lt;p>&lt;a href="https://io.adafruit.com/">Adafruit&lt;/a> has your solution. They have a fully functional, easy to use IoT platform for hobbyists who just like to mess around and learn things. This platform is so good, you could use it for enterprise stuff as well.&lt;/p></description></item><item><title>Golang: Building a Go Web API with the Digital Ocean App Platform</title><link>https://www.jeremymorgan.com/tutorials/go/how-to-go-web-api-digital-ocean-app/</link><pubDate>Wed, 14 Oct 2020 22:03:06 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/how-to-go-web-api-digital-ocean-app/</guid><description>&lt;p>Recently, Digital Ocean announced they&amp;rsquo;re entering the PaaS market with their &lt;a href="https://www.infoq.com/news/2020/10/digital-ocean-app-platform/">new application platform&lt;/a>. They&amp;rsquo;ve hosted virtual machines (droplets) and Kubernetes based services for years, but now they&amp;rsquo;re creating a platform that&amp;rsquo;s a simple point and click to get an application up and running.&lt;/p>
&lt;p>So I decided to try it. In this tutorial, we&amp;rsquo;re going to build an application on that platform. I will use Go to make a small web API and have it backed by a SQLite database. I&amp;rsquo;ll show you the steps required, and we&amp;rsquo;ll see just how easy it is (or isn&amp;rsquo;t) to deploy applications on the platform.&lt;/p></description></item><item><title>Optimizing String Comparisons in Go</title><link>https://www.jeremymorgan.com/blog/golang/optimizing-string-compare-go/</link><pubDate>Fri, 04 Sep 2020 12:07:35 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/golang/optimizing-string-compare-go/</guid><description>&lt;p>Want your Go programs to run faster? Optimizing string comparisons in Go can improve your application&amp;rsquo;s response time and help scalability. Comparing two strings to see if they&amp;rsquo;re equal takes processing power, but not all comparisons are the same. In a previous article, we looked at &lt;a href="https://www.jeremymorgan.com/tutorials/go/how-do-i-compare-strings-go/">How to compare strings in Go&lt;/a> and did some benchmarking. We&amp;rsquo;re going to expand on that here.&lt;/p>
&lt;p>It may seem like a small thing, but as all great optimizers know, it&amp;rsquo;s the little things that add up. Let&amp;rsquo;s dig in.&lt;/p></description></item><item><title>Golang: How Do I Compare Strings in Go?</title><link>https://www.jeremymorgan.com/tutorials/go/how-do-i-compare-strings-go/</link><pubDate>Mon, 17 Aug 2020 18:59:35 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/how-do-i-compare-strings-go/</guid><description>&lt;p>So you&amp;rsquo;re just learning Go and how things work. You need to compare two strings to see if they&amp;rsquo;re equal. You want to do it as simply and quickly as possible.&lt;/p>
&lt;p>In this tutorial we&amp;rsquo;re going to learn:&lt;/p>
&lt;ul>
&lt;li>Different ways to compare Strings&lt;/li>
&lt;li>Comparing strings ignoring case&lt;/li>
&lt;li>Measuring performance of different methods.&lt;/li>
&lt;/ul>
&lt;p>So let&amp;rsquo;s get started.&lt;/p>
&lt;p>Note: There&amp;rsquo;s a &lt;a href="http://bit.ly/CompareTwoStringsGo">video version of this article&lt;/a> as well.&lt;/p>
&lt;h2 id="basic-string-comparison">Basic String Comparison&lt;/h2>
&lt;p>So you need to compare a string. You can use comparison operators:&lt;/p></description></item><item><title>Golang: 7 Reasons Why Front End Developers Going Full Stack Should Choose Go</title><link>https://www.jeremymorgan.com/blog/golang/why-choose-go-backend/</link><pubDate>Wed, 12 Aug 2020 10:54:13 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/golang/why-choose-go-backend/</guid><description>&lt;p>So you&amp;rsquo;re a front end developer, and you want to learn some backend stuff. You want to become a &lt;em>full stack&lt;/em> developer someday, so where do you start? Google&amp;rsquo;s Go language is an excellent place.&lt;/p>
&lt;p>For instance, let&amp;rsquo;s say you want to build a RESTful API to test the calls from your React Application. You could use &lt;a href="https://jsonplaceholder.typicode.com/">JSONPlaceholder&lt;/a>, &lt;a href="https://reqres.in/">Reqres&lt;/a>, or even &lt;a href="https://www.soapui.org/">SoapUI&lt;/a>. All excellent options.&lt;/p>
&lt;p>Or you could spend an evening take &lt;a href="https://tour.golang.org/welcome/1">A Tour of Go&lt;/a> and follow a &lt;a href="https://tutorialedge.net/golang/creating-restful-api-with-golang/">tutorial like this one&lt;/a> to build a local API that does exactly what you want, and mocks whatever you want. Right on your local machine!&lt;/p></description></item><item><title>Golang: Better Title Case in Go</title><link>https://www.jeremymorgan.com/tutorials/go/learn-golang-casing/</link><pubDate>Mon, 03 Aug 2020 10:15:43 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/learn-golang-casing/</guid><description>&lt;p>In this article, I&amp;rsquo;ll show you how you can create better titles in Go. We&amp;rsquo;ll be using the strings library from the &lt;a href="https://bit.ly/GoStandardLibrary">Go Standard Library&lt;/a> for this tutorial.&lt;/p>
&lt;p>You&amp;rsquo;ll often have a string input that you want to change the casing of, and it&amp;rsquo;s easy with Go.&lt;/p>
&lt;h4 id="lower-case">Lower Case&lt;/h4>
&lt;hr>
&lt;p>If you want to change your text to lowercase, use the &lt;strong>strings.ToLower&lt;/strong> method:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-go" data-lang="go">&lt;span class="line">&lt;span class="cl">&lt;span class="kn">package&lt;/span> &lt;span class="nx">main&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kn">import&lt;/span> &lt;span class="p">(&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">	&lt;span class="s">&amp;#34;fmt&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">	&lt;span class="s">&amp;#34;strings&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">func&lt;/span> &lt;span class="nf">main&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">fmt&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">strings&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">ToLower&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Change THIS strING to lowErCase&amp;#34;&lt;/span>&lt;span class="p">))&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Your output should look like this:&lt;/p></description></item><item><title>Golang: Get and Store Temperature from a Raspberry Pi with Go</title><link>https://www.jeremymorgan.com/tutorials/go/get-temperature-raspberry-pi-go/</link><pubDate>Tue, 09 Jun 2020 10:08:19 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/get-temperature-raspberry-pi-go/</guid><description>&lt;p>In this tutorial, I&amp;rsquo;ll show you how to grab temperature from a Raspberry Pi and build an endpoint to store the data, with Go. You will learn:&lt;/p>
&lt;ul>
&lt;li>How to retrieve the temperature from a sensor&lt;/li>
&lt;li>How to send that data in JSON&lt;/li>
&lt;li>Build an API endpoint to receive it&lt;/li>
&lt;li>Store the data in SQLite database&lt;/li>
&lt;/ul>
&lt;p>And we&amp;rsquo;ll do it all with &lt;a href="https://pluralsight.pxf.io/jWmm96">Go&lt;/a>. I did a live stream of the entire process that &lt;strong>&lt;a href="https://bit.ly/JuneRPIReplayYT">you can watch here&lt;/a>&lt;/strong>.&lt;/p></description></item><item><title>How to Install Go on the Raspberry Pi</title><link>https://www.jeremymorgan.com/tutorials/raspberry-pi/install-go-raspberry-pi/</link><pubDate>Tue, 02 Jun 2020 11:20:33 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/raspberry-pi/install-go-raspberry-pi/</guid><description>&lt;p>If you want to install Go on your Raspberry Pi you have a few options. In the past there was a lot of cross compiling and hacking to get it done, but now you can install it through Apt. However, you&amp;rsquo;re likely to find an older version.&lt;/p>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/install-go-raspberry-pi/install-go-raspberry-pi-01.jpg" alt="How to install Go on Raspberry Pi">&lt;/p>
&lt;p>For instance at the time of this writing, an updated Raspberry Pi OS shows a version of 1.11.1 in the repositories. However the current version is 1.14.3 so if the latest version is important to you, here&amp;rsquo;s your solution.&lt;/p></description></item><item><title>Web Development: How to Build Your First JAMstack Site</title><link>https://www.jeremymorgan.com/blog/programming/how-to-build-jamstack-site/</link><pubDate>Fri, 29 May 2020 15:51:07 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-build-jamstack-site/</guid><description>&lt;p>Are you wondering what all this new hype is over JAMstack? What is a JAMstack site? How do I build one? Where do I deploy it?&lt;/p>
&lt;p>If you&amp;rsquo;ve asked any of these questions over the last couple of months, this article is for you. We&amp;rsquo;re going to learn what JAMstack is, and how to build our first JAMstack blog.&lt;/p>
&lt;p>If you already have an idea what a JAMstack site is, you can skip this section and go directly to:&lt;/p></description></item><item><title>Web Development: What Is Deno and Why Is Everyone Talking About It?</title><link>https://www.jeremymorgan.com/blog/programming/what-is-deno/</link><pubDate>Fri, 15 May 2020 08:48:14 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/programming/what-is-deno/</guid><description>&lt;p>Deno is a hot new runtime that may replace Node.js. Everyone&amp;rsquo;s talking about it like it&amp;rsquo;s the next big thing. It likely is. Here&amp;rsquo;s why.&lt;/p>
&lt;h2 id="what-is-deno">What Is Deno?&lt;/h2>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/what-is-deno/what-is-deno-01.jpg" alt="What is Deno">&lt;/p>
&lt;p>From the manual:&lt;/p>
&lt;blockquote>
&lt;p>Deno is a JavaScript/TypeScript runtime with secure defaults and a great developer experience.&lt;/p>
&lt;p>It&amp;rsquo;s built on V8, Rust, and Tokio.&lt;/p>&lt;/blockquote>
&lt;p>&lt;a href="https://deno.land/v1">Deno&lt;/a> is designed to be a replacement for our beloved Node.js, and it&amp;rsquo;s led by Ryan Dahl, who started the Node.js project way back in 2009. The design stems from &lt;a href="https://www.youtube.com/watch?v=M3BM9TB-8yA">10 things he regrets about Node.js&lt;/a>.&lt;/p></description></item><item><title>How to set up Pop!_OS for Front End Development</title><link>https://www.jeremymorgan.com/blog/linux/pop-os-front-end/</link><pubDate>Mon, 11 May 2020 13:29:29 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/linux/pop-os-front-end/</guid><description>&lt;p>If you&amp;rsquo;ve heard all the chatter lately about Pop!_OS and have been wanting to try it out, here&amp;rsquo;s a good guide to setting up a front end development machine.&lt;/p>
&lt;p>If you&amp;rsquo;re relatively new to Linux and are just trying it out, I suggest building this in a Virtual Machine. I have the full instructions for &lt;a href="https://www.jeremymorgan.com/blog/linux/how-to-install-linux/">installing Pop!_OS in a virtual machine here&lt;/a>. This is the best way to dip your toes in without significant modifications to your computer.&lt;/p></description></item><item><title>Golang: The Best Editors for Go Programming</title><link>https://www.jeremymorgan.com/tutorials/go/editors-go-programming/</link><pubDate>Fri, 01 May 2020 15:33:08 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/go/editors-go-programming/</guid><description>&lt;p>So I&amp;rsquo;m &lt;a href="https://x.com/intent/follow?screen_name=JeremyCMorgan/status/1256334497026437122">running a poll right now&lt;/a> to see what editor Go programmers prefer. Vote for your favorite and I&amp;rsquo;ll post the results here.&lt;/p>
&lt;p>I write go with several different editors. But here are some of my favorites for Go programming:&lt;/p>
&lt;h2 id="goland">Goland&lt;/h2>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/editors-go-programming/editors-go-programming-01.jpg" alt="Editors for Go Programming">&lt;/p>
&lt;p>Goland is by far my favorite editor, especially for larger projects. It&amp;rsquo;s tailor made for Go programming and has some excellent features like:&lt;/p>
&lt;ul>
&lt;li>Built-in debugging&lt;/li>
&lt;li>Smart completion&lt;/li>
&lt;li>Inspections&lt;/li>
&lt;li>Refactoring tools&lt;/li>
&lt;/ul>
&lt;p>It&amp;rsquo;s the best IDE I know of right now for serious Go development. It&amp;rsquo;s the one I use the most right now.&lt;/p></description></item><item><title>9 Courses You Can Take to Become a JavaScript Wizard</title><link>https://www.jeremymorgan.com/blog/javascript/learn-javascript/</link><pubDate>Sat, 25 Apr 2020 14:19:15 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/javascript/learn-javascript/</guid><description>&lt;p>There are tons of front end frameworks to choose from, and getting good with them is no small task. But sharpening your &lt;em>core JavaScript skills&lt;/em> can make you better at &lt;strong>all front-end frameworks&lt;/strong>. By thoroughly understanding JavaScript at its core, you will write better programs, faster, with less struggle.&lt;/p>
&lt;p>If you aren&amp;rsquo;t sure where you stand, you can &lt;strong>&lt;a href="https://bit.ly/JavaScriptSkillIQ">take a JavaScript Skills Test&lt;/a>&lt;/strong> to find out!&lt;/p>
&lt;p>Here are nine great courses to help you become a JavaScript wizard.&lt;/p></description></item><item><title>I Took a COBOL Course and I Liked It</title><link>https://www.jeremymorgan.com/blog/programming/cobol-programming/</link><pubDate>Wed, 15 Apr 2020 19:02:13 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/programming/cobol-programming/</guid><description>&lt;p>COBOL is in the news again. &lt;a href="https://www.theverge.com/2020/4/14/21219561/coronavirus-pandemic-unemployment-systems-cobol-legacy-software-infrastructure">Millions of people&lt;/a> are filing unemployment claims nearly all at once, and the systems to process them are failing. Why? They need to scale to unprecedented levels, they&amp;rsquo;re written in COBOL, and&amp;hellip; &lt;a href="https://www.kcci.com/article/wanted-urgently-people-who-know-a-half-century-old-computer-language-so-states-can-process-unemployment-claims/">we don&amp;rsquo;t have enough COBOL programmers&lt;/a>.&lt;/p>
&lt;p>Here&amp;rsquo;s a look at the increase in searches for &amp;ldquo;COBOL programmers&amp;rdquo;:&lt;/p>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/cobol-programming/cobol-programming-00.jpg" alt="Cobol Programming">&lt;/p>
&lt;p>Most COBOL programmers are retired. The pipeline of new COBOL programmers is nearly nonexistent. Many are coming out of retirement just to help.&lt;/p></description></item><item><title>Stay Home and Learn JavaScript</title><link>https://www.jeremymorgan.com/tutorials/javascript/learn-javascript-intro/</link><pubDate>Tue, 24 Mar 2020 13:32:38 -0700</pubDate><guid>https://www.jeremymorgan.com/tutorials/javascript/learn-javascript-intro/</guid><description>&lt;h3 id="if-youre-quarantined-at-home-and-always-wanted-to-learn-to-code-nows-your-chance">If you&amp;rsquo;re quarantined at home and always wanted to learn to code, now&amp;rsquo;s your chance.&lt;/h3>
&lt;p>I&amp;rsquo;ll be creating a series of tutorials designed to take you from &amp;ldquo;zero to hero&amp;rdquo; as a React Developer. Before you start with React you should know some JavaScript. Unlike many front end frameworks/libraries React is uses JavaScript patterns extensively. So we&amp;rsquo;ll cover some JavaScript basics.&lt;/p>
&lt;p>In this tutorial, you will learn:&lt;/p>
&lt;ul>
&lt;li>How to get your first webpage set up&lt;/li>
&lt;li>How to write text to the browser&lt;/li>
&lt;li>How to write text to the console&lt;/li>
&lt;/ul>
&lt;p>We will cover some of the basics of JavaScript but won&amp;rsquo;t get too deep. Some of the content of this tutorial comes from the new &lt;a href="https://bit.ly/JavaScriptGettingStarted">JavaScript: Getting Started&lt;/a>
course by Mark Zamoyta. If you&amp;rsquo;d like to dig deeper, I would recommend taking it.&lt;/p></description></item><item><title>How to Find Your Browser Developer Console</title><link>https://www.jeremymorgan.com/tutorials/javascript/finding-developer-console/</link><pubDate>Sun, 22 Mar 2020 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/javascript/finding-developer-console/</guid><description>&lt;p>Debugging web applications can be tricky. Accessing your browser&amp;rsquo;s developer console is the easiest way to &amp;ldquo;pop the hood&amp;rdquo; and see what&amp;rsquo;s going on with your application. It&amp;rsquo;s like a secret backdoor that isn&amp;rsquo;t very secret.&lt;/p>
&lt;h2 id="google-chrome">Google Chrome&lt;/h2>
&lt;p>Google&amp;rsquo;s browser is one of the most popular out there, and it&amp;rsquo;s easy to access the developer console:&lt;/p>
&lt;p>In the upper right hand corner of the browser, click the 3 dots:&lt;/p>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/find-developer-console/find-developer-console-01.jpg" alt="How to find browser developer console">&lt;/p></description></item><item><title>Donate Your Unused CPU Cycles to Fight Coronavirus</title><link>https://www.jeremymorgan.com/blog/programming/donate-cpu-help-coronavirus/</link><pubDate>Sun, 15 Mar 2020 15:45:41 -0700</pubDate><guid>https://www.jeremymorgan.com/blog/programming/donate-cpu-help-coronavirus/</guid><description>&lt;p>The &lt;a href="http://bit.ly/FoldingAtHomeCovid">Folding at Home&lt;/a> research project uses crowd sourced CPU power to help model simulations to develop treatments for diseases. You can help them by taking 5 minutes to download their client, and donate some CPU Cycles.&lt;/p>
&lt;p>For more info:&lt;/p>
&lt;blockquote>
&lt;p>After initial quality control and limited testing phases, Folding@home team has released an initial wave of projects simulating potentially druggable protein targets from SARS-CoV-2 (the virus that causes COVID-19) and the related SARS-CoV virus (for which more structural data is available) into full production on Folding@home. Many thanks to the large number of Folding@home donors who have assisted us thus far by running in beta or advanced modes.&lt;/p></description></item><item><title>Programming: Stop Fearing the Whiteboard. Conquer It.</title><link>https://www.jeremymorgan.com/blog/programming/whiteboard-interview-tips/</link><pubDate>Sat, 22 Feb 2020 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/whiteboard-interview-tips/</guid><description>&lt;p>It&amp;rsquo;s time we stopped fearing, complaining, and arguing about whiteboard coding interviews.&lt;/p>
&lt;p>With a solid plan, a little skilling up, and some practice, you can master the whiteboard interview. We can argue for days about the validity of this type of interview, but the fact is many organizations require it. So are you going to let this obstacle stop you from getting the job you want? Of course not. Let&amp;rsquo;s tackle the whiteboard interview, and defeat it.&lt;/p></description></item><item><title>Programming: The Developer Tool You Can't Live Without</title><link>https://www.jeremymorgan.com/blog/programming/tools-csv-text-nimbletext/</link><pubDate>Fri, 10 Jan 2020 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/tools-csv-text-nimbletext/</guid><description>&lt;p>I&amp;rsquo;m introducing a text / code generation tool that you will fall in love with. If you&amp;rsquo;re a developer or someone who works with text or tabulated data you &lt;strong>need&lt;/strong> this tool.&lt;/p>
&lt;!-- more -->
&lt;p>It&amp;rsquo;s called &lt;a href="http://bit.ly/NimbleText">Nimble Text&lt;/a> and it&amp;rsquo;s awesome. Here&amp;rsquo;s how the developer of Nimble Text describes it:&lt;/p>
&lt;blockquote>
&lt;p>You can be more awesome at your job by keeping this tool always within reach.&lt;/p>
&lt;p>NimbleText is a text manipulation and code generation tool available online or as a free download. It magnifies your ability to perform incredible feats of text and data wrangling.&lt;/p></description></item><item><title>How to Code in Haxe</title><link>https://www.jeremymorgan.com/blog/programming/getting-started-haxe/</link><pubDate>Sat, 02 Nov 2019 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/getting-started-haxe/</guid><description>&lt;p>The Haxe Foundation recently released &lt;a href="http://bit.ly/2oHuDRk">Haxe 4.0&lt;/a> and I decided to check it out. Here&amp;rsquo;s &lt;a href="http://bit.ly/2Wxiafk">what&amp;rsquo;s new in version 4&lt;/a>.&lt;/p>
&lt;p>Haxe runs on Windows, Mac, and Linux. You can &lt;a href="http://bit.ly/GetHaxe">download it here&lt;/a>.&lt;/p>
&lt;h2 id="what-is-haxe">What is Haxe?&lt;/h2>
&lt;p>According to the website:&lt;/p>
&lt;blockquote>
&lt;p>Haxe is an open-source high-level strictly-typed programming language with a fast optimizing cross-compiler.&lt;/p>&lt;/blockquote>
&lt;p>So the high level strictly typed programming language makes sense, but a fast optimizing cross compiler? What&amp;rsquo;s that about?&lt;/p>
&lt;p>So the general idea here is &amp;ldquo;one language to rule them all&amp;rdquo;. You write your application in Haxe, then it compiles to another language to target a platform. Basically it treats the output language (like JavaScript, C#, Python, etc) as bytecode for your application.&lt;/p></description></item><item><title>Programming: How to Nail Your Next Coding Interview</title><link>https://www.jeremymorgan.com/blog/programming/how-to-coding-interview/</link><pubDate>Mon, 29 Jul 2019 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-coding-interview/</guid><description>&lt;p>The room is silent except for the buzzing of the fluorescent lights. The judges across the table are staring at you, expressionless. Some have pen and paper, some don&amp;rsquo;t. They&amp;rsquo;re all staring at you. Your mouth is so dry it feels like you&amp;rsquo;ve been eating sawdust all day. You grab the marker and head for the whiteboard. One judge is staring at a laptop. It&amp;rsquo;s time to show them a quicksort.&lt;/p></description></item><item><title>You Can Get the Source Code for Apollo 11 and Take a Course on It</title><link>https://www.jeremymorgan.com/blog/programming/apollo-moon-landing-source-code/</link><pubDate>Fri, 19 Jul 2019 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/apollo-moon-landing-source-code/</guid><description>&lt;p>In software development you&amp;rsquo;ll hear the term &amp;ldquo;moon shot&amp;rdquo;. If something is a &amp;ldquo;moon shot&amp;rdquo; it&amp;rsquo;s something that&amp;rsquo;s extraordinarily difficult, like landing on the moon. We say this about some app doing something cool, but what about the software that&amp;hellip; landed us on the moon? What was the original &amp;ldquo;moon shot&amp;rdquo; all about? &lt;/p>
&lt;h3 id="the-software-that-put-us-on-the-moon">The Software That Put Us on the Moon&lt;/h3>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/apollo-moon-landing/margaret-hamilton.jpg" alt="Margaret Hamilton">&lt;/p>
&lt;p>Meet &lt;a href="https://en.wikipedia.org/wiki/Margaret_Hamilton_(software_engineer)">Margaret Hamilton&lt;/a>. She was the director of Software engineering at MIT Instrumentation Laboratory, which was contracted to build the onboard software for the Apollo Space Program. This is her standing with the stack of source code used to launch us to the moon. Today we complain when Visual Studio runs slow. &lt;/p></description></item><item><title>Forget What You've Heard, Now Is the Best Time to Become a Coder</title><link>https://www.jeremymorgan.com/blog/programming/get-started-coding/</link><pubDate>Tue, 16 Jul 2019 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/get-started-coding/</guid><description>&lt;p>Do you want to be a coder? Are you on the fence about trying it? Nervous to get started?&lt;/p>
&lt;p>The time is now. Time to pull the trigger.&lt;/p>
&lt;p>There has never been a better time to become a coder.&lt;/p>
&lt;p>And I&amp;rsquo;m going to tell you how to get started.&lt;/p>
&lt;h3 id="my-history-as-a-coder">My History as a Coder&lt;/h3>
&lt;p>I started writing code professionally in 2002. Before that, I was building (terrible) websites for myself and friends. I even ran a business for a few years crapping out HTML/Perl sites in the late 90s for good money. I built shoddy software in Visual Basic for businesses.&lt;/p></description></item><item><title>Thinking About Reusable Code</title><link>https://www.jeremymorgan.com/blog/programming/reusable-code/</link><pubDate>Mon, 03 Jun 2019 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/reusable-code/</guid><description>&lt;p>The mythical &amp;ldquo;reusable code&amp;rdquo; idea has existed for decades. It showed up shortly after the first lines of code were written. We preach re-usability and sometimes strive for it but it rarely becomes a reality. I&amp;rsquo;ve seen various levels of success with this over the years. Everything from &amp;ldquo;we have a reusable library that 75% of us use&amp;rdquo; to &amp;ldquo;we have shared code libraries here, but never use them in your projects&amp;rdquo;.&lt;/p></description></item><item><title>C#: Easy CRUD for your Web API with Dapper</title><link>https://www.jeremymorgan.com/blog/programming/how-to-dapper-web-api/</link><pubDate>Sat, 13 Feb 2016 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-dapper-web-api/</guid><description>&lt;p>Full disclosure here: I don&amp;rsquo;t like ORMs. If you&amp;rsquo;re building an enormous enterprise project, you should absolutely use an ORM. If you have data you really care about and a complex, monstrous system using something like Entity Framework can save you a lot of frustration. If you&amp;rsquo;re building a simple application, or some home project it&amp;rsquo;s really unnecessary.&lt;/p>
&lt;p>Recently I found an ORM that I really like: &lt;a href="https://www.nuget.org/packages/Dapper">Dapper&lt;/a>. It&amp;rsquo;s small, simple, and fast. It can be useful on even the smallest of projects. Dapper is a simple object mapper for .Net that extends the IDbConnection interface. It contains helpers that execute queries and map results in a very elegant way. The best part is the performance is close enough to plain old SQL that it&amp;rsquo;s well worth it. It will reduce the amount of code you write as well, by a long shot.&lt;/p></description></item><item><title>Setting up the Adafruit Huzzah ESP8266 Breakout</title><link>https://www.jeremymorgan.com/tutorials/arduino-projects/huzzah-esp8266-breakout/</link><pubDate>Tue, 12 Jan 2016 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/arduino-projects/huzzah-esp8266-breakout/</guid><description>&lt;p>Recently I showed a friend of mine some of the projects I&amp;rsquo;ve working on with Arduino and Wifi, and he introduced me to the &lt;a href="http://www.esp8266.com/">ESP8266 chip&lt;/a>. I found them all over the internet ranging from $1.50 US to $20, with a variety of configurations and manufacturers. I decided to go with a company I trust, Adafruit Industries, and see what their offering is like.&lt;/p>
&lt;p>Full disclosure: I was not paid or compensated by Adafruit, I purchased this product. You can &lt;a href="https://www.adafruit.com/products/2471">grab one for $9.95 here&lt;/a>.&lt;/p></description></item><item><title>How to add WiFi to your Arduino</title><link>https://www.jeremymorgan.com/tutorials/arduino-projects/how-to-wifi-arduino/</link><pubDate>Sat, 19 Dec 2015 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/arduino-projects/how-to-wifi-arduino/</guid><description>&lt;p>If you want to add internet connectivity to an Arduino, you have quite a few options. Since most Arduino models are not bundled with Ethernet or WiFi a market has developed for it, and I decided to try one out and share my thoughts.&lt;/p>
&lt;p>For this article I&amp;rsquo;ll be using the Adafruit CC3000 &lt;a href="https://www.adafruit.com/products/1469">breakout board found here&lt;/a>. For the platform I&amp;rsquo;m using an Arduino Mega 2560 I received from &lt;a href="http://www.newark.com">Newark element14&lt;/a>.&lt;/p>
&lt;h3 id="assembling-the-cc3000">Assembling the CC3000&lt;/h3>
&lt;p>The CC3000 comes shipped with the board and pins like so:&lt;/p></description></item><item><title>Arduino Project: LCD Shield Kit</title><link>https://www.jeremymorgan.com/tutorials/arduino-projects/arduino-lcd-shield-kit/</link><pubDate>Sat, 14 Nov 2015 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/arduino-projects/arduino-lcd-shield-kit/</guid><description>&lt;p>I recently picked up an &lt;a href="https://www.adafruit.com/products/772">Arduino LCD shield kit&lt;/a> from Adafruit. I&amp;rsquo;ve wanted to play around with some LCD screens and since this was a self contained kit for $20, I thought I&amp;rsquo;d try it out. Here&amp;rsquo;s my thoughts on it.&lt;/p>
&lt;p>For this article I&amp;rsquo;m using an Arduino Mega 2560, obtained from &lt;a href="http://www.newark.com/">Newark Element 14&lt;/a>&lt;/p>
&lt;h3 id="the-arduino-lcd-shield-kit">The Arduino LCD Shield Kit&lt;/h3>
&lt;p>The kit comes with the following items:&lt;/p>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/arduino-lcd/arduino-projects-01.jpg" alt="Arduino Projects - LCD Shield Kit">&lt;/p></description></item><item><title>Web Development: Brief Introduction to REST</title><link>https://www.jeremymorgan.com/blog/programming/intro-restful-web-services/</link><pubDate>Thu, 21 May 2015 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/intro-restful-web-services/</guid><description>&lt;p>Perhaps you&amp;rsquo;ve seen the term REST being thrown around lately and have been a little curious what it&amp;rsquo;s all about. If that&amp;rsquo;s the case, or you know a little about it but never used it, this article is for you. Today I&amp;rsquo;m going to give a small overview of what REST services are, and why it&amp;rsquo;s awesome.&lt;/p>
&lt;h2 id="so-long-rpc-hello-rest">So long RPC, hello REST&lt;/h2>
&lt;p>If you&amp;rsquo;ve been in the web game a while, you may remember when RPC took over the web about 10 years ago. I myself remember it being one of the most exciting things of it&amp;rsquo;s time. Although the pattern has been around since the 80s it started popping up on the web in the early 2000s, and for it&amp;rsquo;s time RPC was a great solution. In fact it&amp;rsquo;s still in use all over the place.&lt;/p></description></item><item><title>How to Write Better Unit Tests</title><link>https://www.jeremymorgan.com/blog/programming/how-to-write-better-unit-tests/</link><pubDate>Sun, 24 Aug 2014 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-write-better-unit-tests/</guid><description>&lt;p>In working with some unit testing fairly extensively lately, I&amp;rsquo;ve gathered some guidelines I&amp;rsquo;ve tried to stick with over the years for writing better tests. Remember poorly written tests are a waste of time, and cause major problems down the road. It&amp;rsquo;s best to keep some of these guidelines in mind.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Unit tests should not be written to pass&lt;/strong> - They should be written to fail. You can make any set of tests pass in minutes but you&amp;rsquo;re only cheating yourself.&lt;/li>
&lt;li>&lt;strong>Tests should only test one thing&lt;/strong> - You should be testing a single method with a single function. If not you may be violating the &lt;a href="https://www.jeremymorgan.com/blog/programming/single-responsibility-principle/">Single Responsibility Principle&lt;/a>&lt;/li>
&lt;li>&lt;strong>Readability in your tests&lt;/strong>- make sure they&amp;rsquo;re commented and easy to understand, just like any other code.&lt;/li>
&lt;li>&lt;strong>Good Naming conventions&lt;/strong> - Again tests should be just like any other code - easy for humans to understand.&lt;/li>
&lt;li>&lt;strong>Asserts are separated from actions&lt;/strong> - Your assert should be looking for a result, and not performing logical operations&lt;/li>
&lt;li>&lt;strong>Use concrete inputs&lt;/strong>- Don&amp;rsquo;t use any dynamic data for inputs, things like date() can introduce variance.&lt;/li>
&lt;li>&lt;strong>Group locations of tests&lt;/strong> - from a logical standpoint this makes things easier to find when there aren&amp;rsquo;t errors pointing towards the problem.&lt;/li>
&lt;li>&lt;strong>Good tests are isolated from everything&lt;/strong> - You should have no reliance on other tests, environment settings, etc. This creates multiple points of failure.&lt;/li>
&lt;li>&lt;strong>Do not include private methods&lt;/strong> - They are implementation and should not be included in Unit Tests&lt;/li>
&lt;li>&lt;strong>Don&amp;rsquo;t connect to databases or data sources&lt;/strong> - This is unreliable because you cannot be certain the data served will always be the same, and can create points of failure.&lt;/li>
&lt;li>&lt;strong>No more than one mock per test&lt;/strong> - Again we&amp;rsquo;re trying to eliminate points of failure and inconsistenties.&lt;/li>
&lt;li>&lt;strong>Unit tests are not integration tests&lt;/strong> - You want to test results, not implmentation with Unit Tests.&lt;/li>
&lt;li>&lt;strong>Tests must be deterministic&lt;/strong> - You need a solid predictable result, so if it only passes sometimes, it&amp;rsquo;s not done.&lt;/li>
&lt;li>&lt;strong>Keep your tests idempotent&lt;/strong> - you should be able to run it multiple times without changing any outcomes, and it should not change any data or increment anything. One time or a million times should have the same effect.&lt;/li>
&lt;li>&lt;strong>Classes only test one class at a time, methods only test one method at a time.&lt;/strong> - An organizational method to pinpoint problems when they arise and help you identify dependencies in testing.&lt;/li>
&lt;li>&lt;strong>Include exceptions in your tests&lt;/strong>- You&amp;rsquo;re going to have exceptions so don&amp;rsquo;t ignore them, use them.&lt;/li>
&lt;li>&lt;strong>Don&amp;rsquo;t test functionality of 3rd party libraries with your own tests&lt;/strong> - Most quality libraries should have their own tests. If not consider mocks to produce consistent results&lt;/li>
&lt;li>&lt;strong>Always limit values&lt;/strong> - When working with values be mindful of your limits and set them (min max) for maximum consistency.&lt;/li>
&lt;li>&lt;strong>Tests should not require configuration or custom setup&lt;/strong> - Anyone should be able to jump in and make your tests work. &amp;ldquo;Works on my machine&amp;rdquo; should never apply here.&lt;/li>
&lt;/ul>
&lt;p>I hope this helps some of you out there learning and working with Unit Tests.&lt;/p></description></item><item><title>Dotnet: Common C# Interview Questions</title><link>https://www.jeremymorgan.com/blog/programming/c-sharp-interview-questions/</link><pubDate>Sun, 03 Aug 2014 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/c-sharp-interview-questions/</guid><description>&lt;p>I was reading a post about some common C# interview questions, and thought I&amp;rsquo;d share some of mine. These are questions that I asked in interviews, or was asked in past interviews. Try them out and see you how you do! I&amp;rsquo;m not going to post the answers here, if you don&amp;rsquo;t know them, find out!&lt;/p>
&lt;h3 id="common-c-and-net-interview-questions">Common C# (and .Net) Interview Questions&lt;/h3>
&lt;ul>
&lt;li>What are the different types of collections in .Net?&lt;/li>
&lt;li>What are the benefits offered by generics as opposed to other collections?&lt;/li>
&lt;li>What is the difference between a class and a struct?&lt;/li>
&lt;li>When calling a function, are parameters passed by value or by reference?&lt;/li>
&lt;li>What are the different ways to pass a parameter by reference?&lt;/li>
&lt;li>What are the mechanisms for maintaining state in an asp.net application?&lt;/li>
&lt;li>Describe inheritance. Describe different ways you can implement inheritance.&lt;/li>
&lt;li>What is dependency injection?&lt;/li>
&lt;li>How do you override a static method?&lt;/li>
&lt;li>Name some of the parts of the page life cycle in ASP.NET.&lt;/li>
&lt;li>Where I would validate something like an email address?&lt;/li>
&lt;li>What is the difference between public, static and void?&lt;/li>
&lt;li>What are Jagged Arrays?&lt;/li>
&lt;li>What is serialization?&lt;/li>
&lt;li>Can &amp;ldquo;this&amp;rdquo; be used within a static method?&lt;/li>
&lt;li>What is the difference between Array and Arraylist?&lt;/li>
&lt;li>Can a private virtual method be overridden?&lt;/li>
&lt;li>Describe the accessibility modifier &amp;ldquo;protected internal&amp;rdquo;.&lt;/li>
&lt;li>What are the differences between System.String and System.Text.StringBuilder?&lt;/li>
&lt;li>What&amp;rsquo;s the difference between the System.Array.CopyTo() and System.Array.Clone()?&lt;/li>
&lt;li>What&amp;rsquo;s the difference between an interface and abstract class?&lt;/li>
&lt;li>What is the difference between Finalize() and Dispose() methods?&lt;/li>
&lt;li>What&amp;rsquo;s an object pool?&lt;/li>
&lt;li>What is the difference between method overriding and method overloading?&lt;/li>
&lt;li>What is the difference between a Struct and a Class?&lt;/li>
&lt;li>What are Indexers?&lt;/li>
&lt;/ul>
&lt;h3 id="ms-sql">MS SQL&lt;/h3>
&lt;ul>
&lt;li>What are the different ways for storing behaviors in SQL?&lt;/li>
&lt;li>What are the different kinds of SQL joins? When would you use each?&lt;/li>
&lt;li>If you have a slow running query that looks at seldom changed data, how might you speed it up?&lt;/li>
&lt;li>Describe the different types of joins?&lt;/li>
&lt;li>What is the no-lock feature?&lt;/li>
&lt;li>How do you make sure you maintain your referential integrity?&lt;/li>
&lt;li>He asked me to describe the Controller?&lt;/li>
&lt;li>What is a clustering index?&lt;/li>
&lt;li>How do you handle an error in a SQL query?&lt;/li>
&lt;/ul>
&lt;p>{% include custom/asides/dotnet-newsletter-banner.html %}&lt;/p></description></item><item><title>Programming: Properties vs Fields in C#</title><link>https://www.jeremymorgan.com/blog/programming/properties-vs-fields/</link><pubDate>Sun, 04 May 2014 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/properties-vs-fields/</guid><description>&lt;p>&lt;em>Note: Updated for 2023&lt;/em>&lt;/p>
&lt;p>One of the areas that cause a lot of confusion for new C# developers is the idea of properties and fields. It&amp;rsquo;s an easy thing to mess up or get confused about. Here are some general guidelines to help you decide how to use these members in your project.&lt;/p>
&lt;h2 id="fields-the-basics">Fields: The Basics&lt;/h2>
&lt;p>Fields are variables that belong to a Class or a Struct. They&amp;rsquo;re like little storage containers that hold the data for your class.&lt;/p></description></item><item><title>Programming: Smell It Before You Eat It</title><link>https://www.jeremymorgan.com/blog/programming/smell-it-before-you-eat-it/</link><pubDate>Tue, 29 Apr 2014 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/smell-it-before-you-eat-it/</guid><description>&lt;p>Whether you&amp;rsquo;re developing for a personal project, small business or Fortune 100, you should take the time to make sure your changes aren&amp;rsquo;t going to break things. In times past this usually meant spending lots of money. These days the only thing you&amp;rsquo;ll need to spend for quality is time, and not much of it.&lt;/p>
&lt;h3 id="how-the-web-commando-publishes-a-web-page">How the web commando publishes a web page&lt;/h3>
&lt;p>We all know how the web commando works. You have a website with files on it, and you download them via FTP (gotta have that latest copy!) edit it in a text editor and push it back up. .Net folks: edit and quick publish. You open up the browser and check it to make sure it looks good, and move on.&lt;/p></description></item><item><title>Programming: Hazardous Attitudes in Software Development</title><link>https://www.jeremymorgan.com/blog/programming/hazardous-attitudes-in-software-development/</link><pubDate>Sat, 07 Dec 2013 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/hazardous-attitudes-in-software-development/</guid><description>&lt;p>With software projects it&amp;rsquo;s rare that a failure points to a single cause or person. Usually it&amp;rsquo;s a culmination of many smaller mistakes. With technology and formal project management best practices are usually well documented and available. One thing that isn&amp;rsquo;t talked about as much is attitude. The attitude of persons in your group or your group as a whole is one of the biggest factors of your success.&lt;/p>
&lt;p>As a volunteer firefighter my training often intersects with my career in development. Today while taking a class (L-180 Wildland Fire Leadership Development) I learned about a set of &amp;ldquo;hazardous attitudes&amp;rdquo; that get teams in trouble. Reading through it saw a parallel with software development. These attitudes on the fireground can get yourself or others killed so they&amp;rsquo;re especially important. Why not apply them to software development?&lt;/p></description></item><item><title>Common Code Smells with Programming</title><link>https://www.jeremymorgan.com/blog/programming/common-code-smells/</link><pubDate>Wed, 28 Aug 2013 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/common-code-smells/</guid><description>&lt;p>You may have heard the term &amp;ldquo;code smells&amp;rdquo; lately, it seems its being talked about frequently again. In this short post I&amp;rsquo;ll explain what they are, and a few of them you may run across.&lt;/p>
&lt;h2 id="what-is-a-code-smell">What is a Code Smell?&lt;/h2>
&lt;p>A Code Smell is just a fancy word for an indicator of a bigger problem with your code. It&amp;rsquo;s language agnostic because you can have code smells in any application. It&amp;rsquo;s just a sign of bad construction that you can spot fairly quickly.&lt;/p></description></item><item><title>Programming: Dont Build El Caminos</title><link>https://www.jeremymorgan.com/blog/programming/dont-build-el-caminos/</link><pubDate>Wed, 29 May 2013 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/dont-build-el-caminos/</guid><description>&lt;p>The quickest way to disappoint everyone is by trying to please everyone and software is no different. Sometimes trying to make a &amp;ldquo;one size fits all&amp;rdquo; solution can get you into trouble.&lt;/p>
&lt;h3 id="remember-the-el-camino">Remember the El Camino?&lt;/h3>
&lt;p>Back in the late 60s GM made the El Camino, which was part car and part truck. While they were wildly popular with some, the fact is it wasn&amp;rsquo;t a car or a truck and didn&amp;rsquo;t do either very well.&lt;/p></description></item><item><title>Programming: The Single Responsibility Principle</title><link>https://www.jeremymorgan.com/blog/programming/single-responsibility-principle/</link><pubDate>Wed, 20 Mar 2013 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/single-responsibility-principle/</guid><description>&lt;p>There&amp;rsquo;s a lot of genius in simplicity. This applies to many things in life and definitely in software development. SRP, or Single Responsibility Principle is one of the foundations building better software. It&amp;rsquo;s a good way to keep code working as expected, and to avoid painting yourself in a corner.&lt;/p>
&lt;!-- more -->
&lt;h3 id="do-one-thing-and-do-it-well">Do one thing and do it well&lt;/h3>
&lt;p>The Single Responsibility Principle guides simplicity, and the rule itself is strikingly simple: There should never be more than one reason for a class to change. This is easier said than done of course, but the idea is if you have more than one reason to change a class, then you should break it into two classes.&lt;/p></description></item><item><title>Programming: What is a Polyglot Programmer?</title><link>https://www.jeremymorgan.com/blog/programming/what-is-a-polyglot-programmer/</link><pubDate>Thu, 17 Jan 2013 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/what-is-a-polyglot-programmer/</guid><description>&lt;p>The similarities between spoken or written language and computer code are amazing. Someone writing code can range from a terrible amateur to a polished professional. When speaking someone can range from barely comprehensible to giving speeches like an art form. Both an author and a software developer are artists in their own right, if they choose to be.&lt;/p>
&lt;p>The term &amp;ldquo;Polyglot&amp;rdquo; originated with spoken language to describe someone who is fluent in many languages. Surely few need convincing of the benefits of this: they enable greater travel opportunities and communication with a wider range of people with each language you know.&lt;/p></description></item><item><title>C++ A Cleaner Display of Your IP in Windows</title><link>https://www.jeremymorgan.com/tutorials/c-programming/a-cleaner-display-of-your-ip/</link><pubDate>Wed, 12 Dec 2012 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/c-programming/a-cleaner-display-of-your-ip/</guid><description>&lt;p>If you&amp;rsquo;re like me, you constantly need your IP in Windows. When working with network interfaces and multiple servers, I find myself checking my IP a lot.&lt;/p>
&lt;p>I built a little utility for myself that only shows the IP addresses on the host, rather than typing ipconfig and getting a long list, I can simply type &amp;ldquo;ip&amp;rdquo; and it will only show IP addresses.&lt;/p>
&lt;h3 id="c-version-of-the-tool">C++ Version of the Tool&lt;/h3>
&lt;p>The following compiles with &lt;a href="https://gcc.gnu.org/install/binaries.html">GCC for Windows&lt;/a>, and probably a lot of other compilers as well. This utility is standalone and only needs to be copied into a folder within your path.&lt;/p></description></item><item><title>An Introduction to Object Oriented Programming</title><link>https://www.jeremymorgan.com/blog/programming/an-introduction-to-object-oriented-programming/</link><pubDate>Thu, 31 May 2012 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/an-introduction-to-object-oriented-programming/</guid><description>&lt;p>Today I&amp;rsquo;m going to talk about Object Oriented Programming (OOP). This is the first in a series of articles that will aim to teach you more about OOP and how you can use it to develop better software.&lt;/p>
&lt;h3 id="what-well-learn-with-this-article">What we&amp;rsquo;ll learn with this article:&lt;/h3>
&lt;ol>
&lt;li>What is OOP?&lt;/li>
&lt;li>What is an object?&lt;/li>
&lt;li>What is a class?&lt;/li>
&lt;li>What is inheritance?&lt;/li>
&lt;li>What is an interface?&lt;/li>
&lt;/ol>
&lt;p>This quick intro will lay a foundation of understanding so you can start learning this exciting way of developing.&lt;/p></description></item><item><title>Python For The Absolute Beginner</title><link>https://www.jeremymorgan.com/tutorials/python-tutorials/python-for-beginners/</link><pubDate>Mon, 21 May 2012 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/python-tutorials/python-for-beginners/</guid><description>&lt;p>If you&amp;rsquo;re a Programmer / Developer, chances are you&amp;rsquo;ve at least heard of this neat little program called Python. Those who know it sing it&amp;rsquo;s praises, and it can be found in some very powerful applications. If you&amp;rsquo;ve been curious about how to get started with Python I have built this tutorial to help you on your way to becoming a text manipulating ninja.&lt;/p>
&lt;p>Ok, that sounded a little corny but Python is really, really good at parsing and manipulating text. It&amp;rsquo;s one of the duties you&amp;rsquo;ll see it doing often. Let&amp;rsquo;s get started.&lt;/p></description></item><item><title>Setting up Linux: Use a Package Manager or Build From Source?</title><link>https://www.jeremymorgan.com/blog/programming/setting-up-linux-use-a-package-manager-or-build-from-source/</link><pubDate>Sat, 12 May 2012 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/setting-up-linux-use-a-package-manager-or-build-from-source/</guid><description>&lt;p>There are a few different ways to do things in the Linux world and if you ask for the best way, you&amp;rsquo;ll get several different answers. Linux folk tend to be pretty opinionated and become polarized about issues, which creates difficulties and makes for one more thing to add to the list of reasons the masses don&amp;rsquo;t publicly adopt Linux.&lt;/p>
&lt;p>How you build your software is one of those dividing issues. People who favor package managers talk of ease of upgrading, not thinking about dependencies and stability. People who favor building from source talk of control and peak performance. The purpose of this article is to help you figure out which camp you should be in.&lt;/p></description></item><item><title>How to Capture the Output of a Linux Command in C++</title><link>https://www.jeremymorgan.com/tutorials/c-programming/how-to-capture-the-output-of-a-linux-command-in-c/</link><pubDate>Fri, 23 Sep 2011 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/c-programming/how-to-capture-the-output-of-a-linux-command-in-c/</guid><description>&lt;p>Ok, I admit this is a pretty obscure one, but this came up for a task at work today, and I had forgotten how to do this. I Googled around a bit and found many answers I either didn&amp;rsquo;t understand entirely or just seemed too complicated for what I was trying to accomplish. I had done this with the boost libraries before, but I didn&amp;rsquo;t have them on this machine, so I wanted a clean, stdlib type solution.&lt;/p></description></item><item><title>7 Ways to Make your Website Faster</title><link>https://www.jeremymorgan.com/blog/programming/7-ways-to-make-your-website-faster/</link><pubDate>Thu, 31 Mar 2011 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/7-ways-to-make-your-website-faster/</guid><description>&lt;p>Having a fast website has tons of advantages. Besides being better for SEO and getting crawled by search engines, it&amp;rsquo;s without a doubt better for your visitors. So here I will give a list that will explore some free ways to make your website faster.&lt;/p>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/7-ways-website-faster/how-to-make-your-website-faster-01.jpg" alt="How to make your website faster">&lt;/p>
&lt;h3 id="1-image-optimization">1. Image Optimization&lt;/h3>
&lt;p>Undoubtedly one of the most important areas to focus on when optimizing is images. They&amp;rsquo;re considerably larger than text files, and small image optimizations can go a long way towards making a site faster. Some ways you can do this:&lt;/p></description></item><item><title>How to Write Text Files with C++</title><link>https://www.jeremymorgan.com/tutorials/c-programming/how-to-write-text-files-with-c/</link><pubDate>Sat, 31 Jan 2009 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/tutorials/c-programming/how-to-write-text-files-with-c/</guid><description>&lt;p>If you&amp;rsquo;re reading this tutorial, it&amp;rsquo;s likely because you googled how to read and write text files with C++.  And it&amp;rsquo;s probably a pretty lucky guess you&amp;rsquo;re a beginner, so I&amp;rsquo;ll try to explain as much as I can here to make it clear.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> &lt;em>I wrote this article over ten years ago, and I&amp;rsquo;m re-writing it. &lt;a href="https://x.com/intent/follow?screen_name=JeremyCMorgan">Let me know&lt;/a> what you think it should include.&lt;/em>&lt;/p>&lt;/blockquote>
&lt;p>If you&amp;rsquo;re thinking of &lt;a href="https://pluralsight.pxf.io/ZnW9K">getting into C++&lt;/a>, hopefully this example will show you that it&amp;rsquo;s not as complicated as commonly thought. C++ can be tough, but the performance advantages are worth the effort. Java and C# are stealing market share from C++, but it still has its place in the software development world, mainly in applications that require high performance. But that&amp;rsquo;s for another article. Let&amp;rsquo;s get started.&lt;/p></description></item><item><title>Programming: How to use OR operator with Strings in C#</title><link>https://www.jeremymorgan.com/blog/programming/how-to-use-or-operator-with-strings-in-c/</link><pubDate>Mon, 08 Dec 2008 00:00:00 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-use-or-operator-with-strings-in-c/</guid><description>&lt;p>I just had this problem tonight, so I thought I&amp;rsquo;d share the solution. In many languages you can just drop in a string and compare it like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-csharp" data-lang="csharp">&lt;span class="line">&lt;span class="cl">&lt;span class="k">if&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="err">$&lt;/span>&lt;span class="n">city&lt;/span> &lt;span class="p">==&lt;/span> &lt;span class="s">&amp;#34;Portland&amp;#34;&lt;/span> &lt;span class="p">||&lt;/span> &lt;span class="err">$&lt;/span>&lt;span class="n">city&lt;/span> &lt;span class="p">==&lt;/span> &lt;span class="s">&amp;#34;Seattle&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// do something if city is Portland or Seattle&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;span class="k">else&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// do something else&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>And this works just fine. But in C#, strings are treated as &lt;em>objects&lt;/em>, so you have to do the same comparison as such:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-csharp" data-lang="csharp">&lt;span class="line">&lt;span class="cl">&lt;span class="k">if&lt;/span> &lt;span class="p">((&lt;/span>&lt;span class="n">city&lt;/span> &lt;span class="p">==&lt;/span> &lt;span class="s">&amp;#34;Portland&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">||&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">city&lt;/span> &lt;span class="p">==&lt;/span> &lt;span class="s">&amp;#34;Seattle&amp;#34;&lt;/span>&lt;span class="p">))&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// do something if city is Portland or Seattle&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;span class="k">else&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// do something else&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You have to put the parenthesis around it.&lt;/p></description></item><item><title>How to Learn Computer Programming</title><link>https://www.jeremymorgan.com/blog/programming/how-to-start-programming-for-free/</link><pubDate>Thu, 27 Dec 2007 13:29:51 +0000</pubDate><guid>https://www.jeremymorgan.com/blog/programming/how-to-start-programming-for-free/</guid><description>&lt;p>So you want to be a computer programmer? Want to write software? Here is how you can get started with this awesome hobby / profession right away, for next to nothing. I first wrote this article back in 2008 and a lot has changed since then, so I decided to start it over completely.&lt;/p>
&lt;p>&lt;em>Last update in 2016&lt;/em>&lt;/p>
&lt;h2 id="tips-for-getting-started">Tips for getting started&lt;/h2>
&lt;p>&lt;img src="https://www.jeremymorgan.com/images/how-to-learn-computer-programming/computer-programming-1.jpg" alt="How to learn Computer Programming">&lt;/p>
&lt;p>If I were to narrow down the two things that will ultimately determine your success here it&amp;rsquo;s this:&lt;/p></description></item></channel></rss>