This repository has been archived on 2025-02-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
swift-mhoush.com/deploy/articles/2023/introduction-to-programming-for-hvac-2/index.html

214 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8"/>
<meta content="#0e1112" media="(prefers-color-scheme: dark)" name="theme-color"/>
<meta content="#566B78" media="(prefers-color-scheme: light)" name="theme-color"/>
<meta content="Michael Housh" name="author"/>
<meta content="Mhoush" name="apple-mobile-web-app-title"/>
<meta content="initial-scale=1.0, width=device-width" name="viewport"/>
<meta content="telephone=no" name="format-detection"/>
<meta content="True" name="HandheldFriendly"/>
<meta content="320" name="MobileOptimized"/>
<meta content="Mhoush" name="og:site_name"/>
<meta content="hvac, developer, swift, home-performance, design" name="keywords"/>
<title>
mhoush: Introduction to Programming for HVAC Part-2
</title>
<link href="/static/favicon.ico" rel="shortcut icon"/>
<link href="/static/output.css" rel="stylesheet"/>
<link href="/static/style.css" rel="stylesheet"/>
<link href="/articles/feed.xml" rel="alternate" title="mhoush" type="application/rss+xml"/>
<link href="/static/prism.css" rel="stylesheet"/>
<meta content="In this article, learn about installing a package manager. If you missed it, check out the
first article in the series where we learned about using your terminal.
This article builds upon that foundation.
What is a Package Manager
A package manager..." name="description"/>
<meta content="summary_large_image" name="twitter:card"/>
<meta content="http://localhost:3000/articles/images/2023-09-22-introduction-to-programming-for-hvac-2.png" name="twitter:image"/>
<meta content="Introduction to Programming for HVAC Part-2" name="twitter:image:alt"/>
<meta content="http://localhost:3000/articles/images//articles/2023/introduction-to-programming-for-hvac-2/" name="og:url"/>
<meta content="Introduction to Programming for HVAC Part-2" name="og:title"/>
<meta content="In this article, learn about installing a package manager. If you missed it, check out the
first article in the series where we learned about using your terminal.
This article builds upon that foundation.
What is a Package Manager
A package manager..." name="og:description"/>
<meta content="http://localhost:3000/articles/images/2023-09-22-introduction-to-programming-for-hvac-2.png" name="og:image"/>
<meta content="1014" name="og:image:width"/>
<meta content="530" name="og:image:height"/>
<script crossorigin="anonymous" src="https://kit.fontawesome.com/f209982030.js">
</script>
</head>
<body class="bg-page text-white pb-5 font-avenir articles">
<header class="bg-nav text-gray py-4 text-base/6 lg:fixed w-full lg:h-[62px]">
<nav class="container flex gap-x-5 lg:gap-x-y items-center">
<ul class="flex flex-wrap gap-x-2 lg:gap-x-5">
<li>
<a class href="/">Home</a>
</li>
<li>
<a class="active" href="/articles/">Articles</a>
</li>
<li>
<a class href="/about/">About</a>
</li>
</ul>
</nav>
</header>
<div class="container pt-12 lg:pt-28">
<article class="prose">
<h1>
Introduction to Programming for HVAC Part-2
</h1>
<div class="-mt-6">
<div class="text-gray gray-links text-sm">
<span class="border-r border-gray pr-2 mr-2">September 22, 2023</span>537 words, posted in <a href="/articles/tag/hvac/">HVAC</a>, <a href="/articles/tag/programming/">programming</a> and <a href="/articles/tag/software/">software</a>
</div>
</div>
<img alt="banner" src="http://localhost:3000/articles/images/2023-09-22-introduction-to-programming-for-hvac-2.png"/>
<p>In this article, learn about installing a package manager. If you missed it, check out the
<a href="https://mhoush.com/posts/introduction-to-programming-for-hvac-1/">first</a> article in the series where we learned about using your terminal.
This article builds upon that foundation.</p>
<h2>What is a Package Manager</h2>
<p>A package manager is a piece of software that helps to install software and manage updates for your system. For me, the first thing that I
do with a new machine is install <code>Homebrew</code>. <a href="https://brew.sh">Homebrew</a> is my preferred package manager for <code>macOS</code>.</p>
<h2>Why</h2>
<p>A package manager is nice because often software relies / requires other dependencies in order to work properly. By using a package manager
it will make sure that the correct dependencies are installed for the software that you need to run. It allows you to be able to update and
manage software through a centralized interface.</p>
<h2>Installation</h2>
<p>Installation is simple. Open up your terminal and enter the following command (easiest to just copy / paste from the homepage linked above).</p>
<pre><code class="language-bash">/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;
</code></pre>
<p>This will prompt you for your password in order to create some directories and install the required software for <code>brew</code> to work. The
installation may take some time, while it downloads the command line tools for <code>Xcode</code>.</p>
<p>When completed, follow the <code>Next Steps</code> and copy / paste the command listed, that should look like below.</p>
<pre><code class="language-bash">(echo; echo 'eval &quot;$(/opt/homebrew/bin/brew shellenv)&quot;') &gt;&gt; /Users/&lt;you&gt;/.zprofile
eval &quot;$(/opt/homebrew/bin/brew shellenv)&quot;
</code></pre>
<p><img src="/articles/images/2023-09-22-brew-output.png" alt="brew-output" /></p>
<p>The first line of this command sets up some things in your shell profile (which we have not discussed yet) that will make <code>Homebrew</code>
available to you anytime you start a new session in your terminal. The second line of the command makes it available in your current
terminal session.</p>
<p>Next run the following command and make sure that everything is setup correctly.</p>
<pre><code class="language-bash">brew doctor
</code></pre>
<p>Which should output the following:</p>
<pre><code>Your system is ready to brew.
</code></pre>
<h3>Terminology</h3>
<p>Homebrew calls command line applications <code>formula</code> and normal graphical applications <code>casks</code>. It has the ability to install both styles of
applications.</p>
<h2>Search Command</h2>
<p>The following command is used to search for software packages:</p>
<pre><code class="language-bash">brew search chrome
</code></pre>
<h2>Open a Homepage</h2>
<p>The following command can be used to view the homepage of a formula or cask in your browser:</p>
<pre><code class="language-bash">brew home google-chrome
</code></pre>
<h2>Update Homebrew</h2>
<p>The following command is used to update homebrew:</p>
<pre><code class="language-bash">brew update
</code></pre>
<h2>Update packages installed on your system</h2>
<p>The following command is used to update software that is installed / managed by homebrew.</p>
<pre><code class="language-bash">brew upgrade
</code></pre>
<p>You can combine the update and upgrade commands, which will update homebrew and upgrade all the software it manages on you machine with the
following command.</p>
<pre><code class="language-bash">brew update &amp;&amp; brew upgrade
</code></pre>
<h2>Conclusion</h2>
<p>That is it for this article. I will say that for me, when I find a piece of software that I want to use, I generally try to search for it in
<code>brew</code> first, before installing it via other means.</p>
<p>I hope youve found this article helpful. In the next article we will start to use the skills that weve learned in these first two articles
and write our first program / script.</p>
</article>
<div class="border-t border-light mt-8 pt-8">
<h2 class="text-4xl font-extrabold mb-8">
Written by
</h2>
<div class="flex flex-col lg:flex-row gap-8">
<div class="flex-[0_0_120px]">
<img class="w-[120px] h-[120px] rounded-full" src="/static/images/avatar.png"/>
</div>
<div class="prose">
<h3 class="!m-0">
Michael Housh
</h3>
<p class="text-gray">
HVAC business owner with over 27 years of experience. Writes articles about HVAC,
Programming, Home-Performance, and Building Science
</p>
</div>
</div>
</div>
<div class="mt-16">
<h2 class="text-4xl font-extrabold mb-8">
More articles
</h2>
<div class="grid lg:grid-cols-2 gap-10">
<section>
<h2 class="text-2xl font-bold mb-2">
<a class="[&:hover]:border-b border-orange" href="/articles/2025/vapor-htmx-todo-app/">Vapor + HTMX</a>
</h2>
<div class="text-gray gray-links text-sm mb-4">
<span class="border-r border-gray pr-2 mr-2">January 05, 2025</span><a href="/articles/tag/general/">general</a>, <a href="/articles/tag/programming/">programming</a> and <a href="/articles/tag/software/">software</a>
</div>
<p>
<a href="/articles/2025/vapor-htmx-todo-app/"><div>
Build an example application using Vapor and HTMX.
</div></a>
</p>
</section>
<section>
<h2 class="text-2xl font-bold mb-2">
<a class="[&:hover]:border-b border-orange" href="/articles/2024/free-as-in-freedom/">Free As In Freedom</a>
</h2>
<div class="text-gray gray-links text-sm mb-4">
<span class="border-r border-gray pr-2 mr-2">April 09, 2024</span><a href="/articles/tag/general/">general</a>, <a href="/articles/tag/open-source/">open-source</a> and <a href="/articles/tag/software/">software</a>
</div>
<p>
<a href="/articles/2024/free-as-in-freedom/"><div>
Salute to open-source software engineers
</div></a>
</p>
</section>
</div>
<p class="prose mt-8">
<a href="/articles/"> See all articles</a>
</p>
</div>
</div>
<div class="site-footer container text-gray gray-links border-t border-light text-center pt-6 mt-8 text-sm">
<p>
Copyright © Michael Housh 2023-2025.
</p>
<p>
Built in Swift using
<a href="https://github.com/loopwerk/Saga" rel="nofollow" target="_blank">Saga</a>
(<a href="https://github.com/m-housh/mhoush.com" rel="nofollow" target="_blank">source</a>).
</p>
<p>
<a href="http://localhost:3000/articles/feed.xml" rel="nofollow" target="_blank">RSS</a>
|
<a href="https://github.com/m-housh" rel="nofollow" target="_blank">Github</a>
|
<a href="https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA" rel="nofollow" target="_blank">Youtube</a>
|
<a href="https://www.facebook.com/michael.housh" rel="nofollow" target="_blank">Facebook</a>
|
<a href="mailto:michael@mhoush.com" rel="nofollow">Email</a>
</p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/keep-markup/prism-keep-markup.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js">
</script>
</div>
</body>
</html>