<?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 Janel Brandon on Medium]]></title>
        <description><![CDATA[Stories by Janel Brandon on Medium]]></description>
        <link>https://medium.com/@janelbrandon?source=rss-d6d3d6615883------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1iAKgp6O5IWKmGNVZoBdZA.jpeg</url>
            <title>Stories by Janel Brandon on Medium</title>
            <link>https://medium.com/@janelbrandon?source=rss-d6d3d6615883------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:00:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@janelbrandon/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[Understanding environments]]></title>
            <link>https://janelbrandon.medium.com/understanding-environments-c16e4c703e4e?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/c16e4c703e4e</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Mon, 01 Mar 2021 03:49:19 GMT</pubDate>
            <atom:updated>2021-03-01T03:49:19.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwTPx2riF7Y_xx1BxERBkA.png" /></figure><p>Even if you are new to software development, you may have heard about running your code in a development environment versus a production environment. You may have even deployed something you have written somewhere like <a href="https://www.heroku.com/">Heroku</a> or <a href="https://www.netlify.com/">Netlify</a>, or in <a href="https://pages.github.com/">GitHub pages</a> — which is running your application in a production environment.</p><p>What are these environments and why do we care as developers?</p><p>An environment is just a system or configured set of resources on which your code executes, and from which it is accessed by users.</p><p>In this article, I will focus on four general types of environments — development, test, staging, and production — named for their purpose. I will give a short explanation of each and how they are used.</p><h3>Development</h3><p>The <strong>development environment</strong> is where you develop and test your code, generally on your laptop (although you may develop your code on a remote system in some cases). It is where you run your code editor (like VS Code), and where you run and test your application locally (using localhost for web applications).</p><p>Each developer on a team has their own development environment, and each developer is responsible for making sure that their development environment is in sync with the appropriate source code repository.</p><h3>Test</h3><p>There are often multiple <strong>test environments</strong> that are used to test different configurations or releases of an application. A test environment will be used by quality assurance (QA) engineers and developers to run automated and manual tests on application code before changes are signed off as complete and ready for production.</p><p>Test environments are also a crucial part of integration testing, to make sure code changes to one part of the application by one developer work with changes made in other parts of the application by other developers.</p><p>Test environments are the gatekeeper to production. It is a common practice to use a Continuous Integration (CI) pipeline that deploys the application code to a test environment and runs automated tests before it is released to production.</p><h3>Staging</h3><p>A <strong>staging environment</strong> is another type of test environment, but some of our customers and business partners have access to this environment so they can run their own testing. Partners and customers run their own tests to make sure any changes made will not break their specific use cases, and because they often use their own proprietary data in the testing, to make sure the changes work with their data.</p><p>Because our customers have access to a staging environment, we treat it a lot like a production environment — carefully. After code “passes” in the test environment, it is released to the staging environment, and our special partners are given some period of time to run their own tests and report any issues.</p><h3>Production</h3><p>When our code is running in a <strong>production environment</strong>, our end users are accessing our application. A production environment also stores customer data and our production business data. You can probably imagine that this makes it very risky to test in a production environment. It is important to be VERY CAREFUL running any type of testing in a production environment because of concerns about security, stability, and availability of the application.</p><p>Harming a production environment can destroy an entire business (which is why enterprise businesses spend a lot of money on high availability).</p><p>So, should you test in a production environment? Yes! But the focus of testing is often different in production, and it has to be done in different ways to maintain the carefully controlled configurations in production.</p><p>Read more about <a href="https://opensource.com/article/19/5/dont-test-production">testing in production in this great article</a> by <a href="https://opensource.com/users/annmarie99">Ann Marie Fred</a> on opensource.com.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c16e4c703e4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the PATH variable]]></title>
            <link>https://janelbrandon.medium.com/understanding-the-path-variable-6eae0936e976?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/6eae0936e976</guid>
            <category><![CDATA[path]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[environment-variables]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 21:23:30 GMT</pubDate>
            <atom:updated>2020-03-27T21:51:31.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DKiXDsKo8dlFHa99jMZxCA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@stephenleo1982?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Stephen Leonardi</a> on <a href="https://unsplash.com/s/photos/path?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>You may have seen a message like the one below when you try to execute a file from the command line:</p><pre>bash: hello.sh: command not found</pre><p>What does that mean?</p><p>If you tried to search for help online, you may have seen advice to “add the file to the PATH”. This will fix the problem, but what does it mean to add it to the PATH, and should you always do that? In this post, I’ll explain what the PATH is, and how you should use it.</p><h3>File execution requires the full path</h3><p>By default, executing any file that you create or download onto your system requires that you specify the full path to that file. This is a safeguard to prevent you from executing something you don’t intend to execute, because anything that executes on your system has the potential to cause damage if it isn’t used correctly.</p><p>This is why if you create a program or script, or download one from the internet, and try to execute it with just the executable file name, it doesn’t work, and you see the error shown above.</p><h3>PATH environment variable</h3><p>Any operating system (Windows, MacOS, Linux) uses an environment variable called PATH to determine where executable files reside on your system. An environment variable is just a named value that can be referenced by your operating environment. Developers commonly use environment variables to store information used by their applications, but they are also used by the operating system to store and use configuration.</p><p>You can see the PATH set on your system by typing the following in a terminal session:</p><pre>echo $PATH</pre><p>You should see something like this (the directories listed for you will likely be different):</p><pre>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</pre><p>PATH contains a string of directories separated by colons. The way that PATH is used is that any <strong>executable files</strong> in the directories listed in PATH can be executed without specifying the full path to the file. This allows you to run those executables with only the file name from the command line, or for other applications to run those executables without knowledge of their directory path.</p><p>When you type anything on the command line that does not include a directory path, the operating system searches for an executable with that name using the PATH. It starts from the beginning of the PATH, and as soon as it finds an executable file that matches what you typed, it executes that file.</p><h3>When should I update the PATH?</h3><p>If you are writing a script or program that will only ever be executed from a single location, you may not need to add it to the PATH. You can just specify the full directory when you execute the file. It is a best practice to keep your PATH variable as clean as you can, with only directories that you or installed applications have designated to be the home of executable files.</p><p>If you are creating a script or application that you want to be able to execute without typing the full directory path, for example, if it will be executed from multiple locations (by multiple other scripts or programs) you should first consider moving that file to one of the directories already in your path, or creating a new directory (such as /home/local/bin) to store your script or program file, and add that directory to your PATH.</p><h3>How do I update the PATH?</h3><p>To update the PATH temporarily (in the terminal session you are using and only that session), you can just use <strong>export </strong>from the command line. For example, if you have created a directory called <strong>/home/local/bin</strong>, and put your executable <strong>hello.sh</strong> in that directory, you could update the PATH in your current terminal session like this:</p><pre>export PATH=$PATH:/home/local/bin</pre><p>Once that is done, you will be able to execute <strong>hello.sh</strong> without specifying the full path.</p><p>If you want to permanently add a directory to your PATH, you will have to update it in one of your system initialisation files, such as your user profile or rc file (i.e., bash_profile, .bashrc — on the latest MacOS, this will be the .zshrc file in your home directory). This file will vary depending on your environment.</p><p>At the bottom of the initialisation file for your environment, add the export line shown above and it will permanently update the PATH with your new directory.</p><p><strong>It is very important that you include $PATH somewhere in that export statement, usually at the beginning.</strong></p><blockquote><strong>If you don’t include the default PATH by including $PATH in your export statement in an initialisation file, you will delete the system directories from the PATH and everything will break!</strong></blockquote><p>If this makes you nervous — don’t update your PATH permanently until you understand it well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6eae0936e976" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up a python development environment]]></title>
            <link>https://janelbrandon.medium.com/setting-up-a-python-development-environment-2e18447cbc24?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e18447cbc24</guid>
            <category><![CDATA[pip]]></category>
            <category><![CDATA[programming-tips]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[venv]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Sat, 03 Aug 2019 00:48:46 GMT</pubDate>
            <atom:updated>2019-08-03T00:48:46.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*buYS2zSedTa1jbZ_57DTrA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@davidclode?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">David Clode</a> on <a href="https://unsplash.com/search/photos/python?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I’ve recently started becoming reacquainted with python after a very long time. I want to share a simple post on setting up an environment for python development.</p><p>In my example, I’m assuming you are using either a Linux distro (I’m using Ubuntu 18) or the Ubuntu 18 WSL (on Windows 10). There wouldn’t be many changes if you are using a Mac.</p><p>I’m going to describe setting up a local development environment (using virtual environments), because it is nice to learn, and comes in handy when you develop lots of different python projects on a single machine and may want to use different versions of packages in different projects.</p><p>The things we’ll cover are:</p><ol><li>Installing python3 (3.3+)</li><li>Creating virtual environments with python3 -m venv</li><li>Activating and deactivating virtual environments</li><li>Installing dependencies with pip in the virtual environment</li><li>Running applications in the activated virtual environment</li><li>Collaborating on projects (what to store in the cloud, and how to let others know what is needed to run your application)</li></ol><p>I’ll cover these items with a simple example to demonstrate the concepts.</p><h3>Installing python3</h3><p>The steps for installing python in Ubuntu are simple:</p><ol><li>See if it’s already installed: python3 -V<br>If it returns a version, and that version is 3.5 or higher, you are done!</li><li>If it isn’t installed (the command returns an error or nothing), use apt to install:<br>sudo apt-get update<br>sudo apt-get install python3</li><li>If it is already installed, but the version is less than 3.5, then upgrade it:<br>sudo apt-get update<br>sudo apt-get upgrade python3</li></ol><p><strong>Note</strong>: If you look at other resources, they may mention installing pip, but python 3.4 and later include pip by default.</p><p><strong>Important</strong>: On Ubuntu, if you run <em>python</em> instead of <em>python3</em>, you will be running the 2.7 version of python (by default). Make sure when you run a python script or command, you always using <em>python3</em>.</p><p><a href="https://docs.python-guide.org/starting/install3/osx/">Here’s an article on installing python3 on MacOS</a>.</p><h3>Create a project directory</h3><p>I’ll do a simple hello world in this post, so create a directory called hello-python somewhere on your system. I have a projects directory in my home directory, so I’m going to create it there:</p><pre>mkdir ~/projects/hello-python</pre><h3>Creating virtual environments for python3</h3><p>Some people like to use pipenv to manage virtual environments, but I had some frustration with it. <a href="https://docs.python-guide.org/dev/virtualenvs/#virtualenvironments-ref">You can read more detail about how to install and use pipenv on Ubuntu here if you’re interested</a>.</p><p>Instead I’ll describe how to use venv directly (the python3 version of virtualenv).</p><p>There are a number of ways to manage virtual environments for python, and some debate about which is best. In truth, which way is best depends on the situation. In this post, I’m going to suggest putting the virtual environment inside of the project directory. The reasons are:</p><ol><li>It makes collaboration easier (you can just add the venv directory to your .gitignore, and anyone who pulls down your project can generate their own)</li><li>You can replace/recreate your virtual environment without disturbing your project files</li><li>The virtual environment is directly co-located with your project, which feels like a cleaner and easier to understand implementation to me for a beginner</li></ol><p><strong>Note</strong>: I’m suggesting using at least python 3.5 because <a href="https://docs.python.org/3/library/venv.html">using the venv module to create virtual environments is recommended with python 3.5 and later</a>.</p><p>You can create a simple, lightweight, project virtual environment with python 3.3 and later using the venv module. First change to your project directory, then run the command shown:</p><pre>cd ~/projects/hello-python<br>python3 -m venv venv</pre><p>This will create a subdirectory in <em>~/projects/hello-python</em> named <em>venv</em>. It is a common convention to call the virtual environment directory venv when created as a subdirectory of a project.</p><p>You can learn more about what is in this venv directory on your own, but what you need to know for now is that it will be where any dependencies for your project are installed, and it will be used to set path variables used by python when it is activated that allow your application to run with those dependencies.</p><p>At any time, you can just remove this venv directory and recreate it, using the steps shown here. Remember that if you do, you will have to reinstall any dependencies with pip install after recreating and activating the venv. We’ll look at activating and deactivating a virtual environment to use it next.</p><h3>Activating and deactivating a virtual environment</h3><p>To install dependencies for your projects in your virtual environment, and to run your application using those dependencies, you have to activate the environment. As mentioned, this will set path variables required for those dependencies to be used.</p><p>To activate your virtual environment, from your project directory, simply run:</p><pre>source venv/bin/activate</pre><p>Once you do this, you will see an indication that the virtual environment is being used:</p><pre>(venv) ~/projects/hello-python</pre><p>When you are finished working on your application, you should deactivate the virtual environment with the deactivate command:</p><pre>deactivate</pre><h3>Installing dependencies</h3><p>To install dependencies, activate the virtual environment in your project directory first. When this is done, a <em>pip install</em> will install the dependency in that virtual environment (instead of globally). For our hello-python project, we will install pyfiglet to create an ASCII art “hello”:</p><pre>cd ~/projects/hello-python<br>source venv/bin/activate<br>pip install pyfiglet</pre><h3>Write and run the application</h3><p>The code we write will be very simple in this post, because we are focusing on the setup and management of a python project using virtual environments. Create and open a file called hello-python.py in your ~/projects/hello-python directory. I’m going to use VSCode. I’m assuming your virtual environment is already activated (from the previous step) and that you are already in your project directory:</p><pre>code hello-python.py</pre><p>Add these lines to that file, then save it:</p><pre>import pyfiglet</pre><pre>hello_ascii = pyfiglet.figlet_format(“Hello!”)<br>print(hello_ascii)</pre><p>See if it works! Run your application with:</p><pre>python hello-python.py</pre><p>You should see something like this:</p><figure><img alt="Output of python hello-python.py is ASCII Hello!" src="https://cdn-images-1.medium.com/max/492/1*LCX7u7GrM9BtEnR_ZzDPWw.png" /><figcaption>Expected output of python hello-python.py</figcaption></figure><p>A couple of things to note:</p><p>We didn’t have to run ‘python3 hello-python.py’, why?<br>Because we have activated the venv, which is using the python executable in our venv path. That python executable points to python3, because we created the venv with python3. You can see this if you run <em>which python</em> and <em>python -V</em>. You should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*S9YhAotwFJ1upvVkX61oUA.png" /><figcaption>Output of ‘which python’ and ‘python -V’ in activated venv</figcaption></figure><p>The pyfiglet module is available because we have the venv activated. If we deactivate, our application won’t run because the dependency will not be available. Try it:</p><pre>deactivate<br>python hello-python.py</pre><p>You should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*xDM4vqXe1EUxg6JR5GsqXQ.png" /><figcaption>Output when venv is deactivated — application doesn’t run</figcaption></figure><h3>Storing our project in the cloud (GitHub)</h3><p>I won’t go into detail in this post about using GitHub (I may write another simple Git/GitHub post, but there are plenty of good resources out there, <a href="https://guides.github.com/activities/hello-world/">like this one</a>.)</p><p>If you look in the venv directory in your project, you’ll notice there’s a lot of stuff in there, about 12MB of stuff on my system. There is no need to push all that up to your repository. Instead, just add <em>venv</em> to your .gitignore:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*lTkRp9lXh-Nkfk2ZPJLgqw.png" /><figcaption>Add venv to .gitignore in project directory</figcaption></figure><p>In your README.md, add the list of dependencies for your application. This will allow anyone who pulls down your project to know what needs to be installed for it to run (including your future self). In this case, the only dependency is pyfiglet. You can use the command <em>pip list</em> in your activated venv to get a list of installed modules (or just look at what you import into your application files). Note that some of the installed modules shown by <em>pip list</em> come by default and are not explicitly installed by you.</p><h3>Now, go play!</h3><p>I hope you find this post helpful and were successful in following along. If you have questions, you can follow me and send me a message in Twitter at @JanelBrandon12.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e18447cbc24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Small project development flow]]></title>
            <link>https://janelbrandon.medium.com/small-project-development-flow-86a3b3d9723a?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/86a3b3d9723a</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[gitflow]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Mon, 10 Jun 2019 23:01:45 GMT</pubDate>
            <atom:updated>2019-07-02T11:43:07.714Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RR_wWAz7w5ObHIKD--aEdw.jpeg" /><figcaption>Image from the <a href="https://es.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow">Atlassian Git flow tutorial</a></figcaption></figure><p>A lot of new developers work on projects — for class, for their portfolio, to learn, by themselves, and with others. Mastering a good development flow can save a lot of frustration and panic, helping to ensure that your code remains stable and that your hard work isn’t lost.</p><p>In this article I’ll describe a flow that works really well when working on small to medium size projects. In larger projects, there would be more automation involved, but some of these practices would hold there too.</p><h3>Git flow and repository</h3><p>When you are working on a project alone or in a small group, it often makes sense to use a basic <a href="https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow">feature branching git workflow</a>. I’m going to assume you are using this type of workflow, but there would just be a few changes if you are using a different kind of workflow.</p><p>In a feature branching workflow, there is one project repository that each team member clones directly (without forking). The master branch is considered the official project branch and should be kept as pristine as possible.</p><h3>Deployment</h3><p>In this article I’m going to talk about deploying to <a href="https://www.heroku.com/">heroku</a>, because it is commonly used for deployment by new developers (it’s free, easy to use, and there are lots of tutorials online). This article assumes you already have a heroku account, have installed the heroku CLI, and have logged in with heroku login.</p><p>To set up deployment on heroku you start from an established project git repository. From the repo directory, run:</p><p><em>heroku create &lt;app-name&gt;</em></p><p>The app name is optional — heroku will make one up if you don’t specify one, and you can change it later. This will create a remote connection to a repository hosted by heroku (you can see it with <em>git remote -v</em>). This is where your deployed code will go.</p><p>Depending on the type of app you’re deploying, you may have to set up some configuration variables (like the master key for a Rails project). You may have to run some commands on your deployed project (like <em>heroku run rails db:migrate</em> for a Rails project). There are lots of tutorials that can help you with these steps for the stack you are deploying.</p><p>When you want to deploy your latest code on heroku, just run:</p><p><em>git push heroku master</em></p><h3>The workflow</h3><p>For this example, assume we have a small team of developers, Jill, Tammy, and Jason, working together. Here’s how the development flow would go.</p><h4>Jill wants to add the authentication feature</h4><ol><li>Pull down the latest from master: <br><em>git checkout master &amp;&amp; git pull origin master</em></li><li>Create a feature branch: <br><em>git checkout -b authentication</em></li><li>Jill does some code changes and tests in her local dev environment</li><li>Add the change and commit to the local repo: <br><em>git add . &amp;&amp; git commit -m “added basic authentication support”</em></li><li>Someone else may have updated master while Jill was working. Jill pulls master into her local feature branch and addresses any merge conflicts, and tests again if necessary: <br><em>git pull origin master</em></li><li>Push to the remote(origin) feature branch: <br><em>git push origin authentication</em></li><li>Jill raises a pull request and adds reviewers (in GitHub)</li><li>Tammy and Jason review Jill’s change. If necessary, they pull the feature branch into their local repo and test it themselves: <br><em>git pull origin authentication</em></li><li>Tammy or Jason may request some changes. It is possible to add comments directly to the pull request and to request changes. If they do, Jill will follow steps 3–6 each time she makes a change. Every time Jill pushes a commit to the same feature branch, it will automatically update the pull request.</li><li>When done, Tammy and Jason and approve Jill’s pull request (in GitHub)</li><li>Jill merges her pull request into the project(origin) master (in GitHub)</li><li>Jill pulls down project master her local (everyone else will need to also, but if everyone starts with step 1 every time, this is taken care of): <br><em>git checkout master &amp;&amp; git pull origin master</em></li><li>Jill tests one last time in local</li><li>It all looks good! Deploy! <br><em>git push heroku master</em></li><li>Test the deployed version</li><li>If all is well, delete the local feature branch:<br><em>git branch -d authentication</em></li></ol><p>Complications can occur — but mostly if you stick to this workflow, things will go smoothly and your development experience with git and deployment will be less frustrating and more productive. My last piece of advice about this is to <strong><em>deploy early and often</em></strong>. Happy developing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86a3b3d9723a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get employed as a new developer]]></title>
            <link>https://janelbrandon.medium.com/how-to-get-employed-as-a-new-developer-639481ff63a1?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/639481ff63a1</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[get-a-job]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Sun, 24 Mar 2019 00:08:03 GMT</pubDate>
            <atom:updated>2019-03-24T00:08:03.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3K3oAwFhEHYK8KFCakU5pg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/E3XtCQXEYMA?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Lindsey LaMont</a> on <a href="https://unsplash.com/search/photos/developer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I’m currently a lead educator at Coder Academy, and I have been a software engineer for over twenty years. For a lot of those years, I led development teams and for some of them I was an engineering manager — both roles came with responsibility for making sure I had the best people on my teams for the project, and that they worked together well to get things done. I’ve worked with hundreds of other developers in my career, and I’ve mentored at least fifty individuals, all at different points in their career journey. Over the past nine months since I’ve been at Coder, I’ve talked with many companies in Brisbane about what they look for in a junior dev for their team.</p><p>I have some insight on what will make you really stand out when you are applying for jobs and at interviews as a new developer.</p><p>It’s important to understand what qualities most companies are seeking in applicants for junior development positions. Let’s look at three important qualities, how you can develop those qualities, and how to demonstrate that you have them.</p><h3>Connections, fundamentals, and enthusiasm</h3><h4>Connections</h4><p>In this field particularly, human connections are important. As developers we work so closely together. We face challenges together. We celebrate victories together. We share our weaknesses and strengths with each other so that we can support each other in ways that will help us solve problems together. Very few programmers work alone — I’ve never met one.</p><p>Go to meetups and hackathons. They are free, and typically provide food and drinks. At a meetup, people who are interested in the same technologies get together and share their knowledge and connect. At hackathons, people get together to solve problems, often for the greater good.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*taPPrvpSzEGkQTM9TvZ4kA.jpeg" /><figcaption>Coder Academy Brisbane students and alumni at the Tech Newbie Meetup</figcaption></figure><p>Here in Brisbane, the meetup communities for technology are vibrant and welcoming. From what I hear, they are in other cities too. You will always learn something new at a meetup or hackathon, and you have an opportunity to meet people you may like to work with and who would like to work with you. Talk to people. Ask them about where they work and what they do. You’ll meet people with varied roles who work for many different companies, and you can learn a lot from them.</p><p>Some people have told me it feels fake to go to meetups and talk to people because it feels like they have an agenda to get employed. I have a simple answer. Don’t do it to get a job, do it because you are genuinely interested in learning about what opportunities are out there and where you fit in. Do it because you are authentically curious about the people in your community who share your interests in technology and what they can teach you. I promise if you do that, you will naturally find yourself connecting with people in a way that brings richness and value to everyone, and opportunities will come organically.</p><p>When you find a company that interests you, learn about them. Learn about what they do, their values, how they work, and their technology stack. If you aren’t experienced in their technology stack, learn more about it. Connect with people who work there if you can at meetups and hackathons, or on socials like Twitter and LinkedIn. Find out how the company’s values align with your own values. Distinguish for yourself why you want to work for that company and what makes you feel connected with the company. If you can do that and articulate it in a cover letter and an interview, it will make you stand out from other candidates.</p><h4>Fundamentals</h4><p>Substantial and proven technical experience is not important to someone hiring a junior developer. It is important when hiring a senior. It is, however, important to have a good understanding of programming and problem solving fundamentals, along with solid, demonstrated skills at a basic level.</p><p>You develop fundamentals with practice. You practice by writing well-organised, well-commented, well-structured code, even when that code is very simple. Get comfortable with common data structures (numbers, strings, lists, objects) and basic control flow mechanisms (loops and conditionals), and how and when to use them. Practice <a href="https://medium.com/@janelgbrandon/problem-solving-like-a-programmer-88c4866752fc">solving problems like a programmer</a> by writing flow charts and pseudocode. Practice writing simple algorithms by doing small code challenges like the ones you find on <a href="https://www.codewars.com/">codewars</a>.</p><p>If you still don’t feel strong in fundamentals, keep working at it. Avoid the temptation to learn a new framework or language until you really understand the fundamentals.</p><p>And once you have a solid understanding of fundamentals, work on a project. It doesn’t have to be big or complicated, but work on something that will allow you to demonstrate all of these fundamentals to create something you can show off. Use a source control system (like <a href="https://github.com/">GitHub</a>), so you can share your work with mentors, peers, recruiters, and potential employers. Having code you can show is really important when you are just starting out in your career because you don’t have work experience on your resume to show yet. You have to be able to demonstrate that you do know and understand fundamentals and that you are willing and able to learn.</p><p>When you go to an interview, bring your laptop. Be ready to share something you are proud of and don’t be afraid to share what you learned. Talk about at least one challenge you faced and overcame working on the project. This is a great opportunity to demonstrate your problem solving ability, determination, and enthusiasm.</p><h4>Enthusiasm</h4><p>Attitude is really important, no matter how long your development career has been. If you have a genuine enthusiasm for technology and learning, other developers will want to work with you. If you are passionate, you won’t be easily stopped by challenges, and you will be excited to learn new things every day. Even though I’ve been doing this for more than 20 years, I really, really love what I do. I love solving problems with programming. I love the beauty of well-written code that is easy to understand and elegantly solves a problem. I learn new things every single day, and when I face a challenge, I get excited about it and determined to figure it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_hEDASII5u7vgqJ9NH4mYA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/TamMbr4okv4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ian Schneider</a> on <a href="https://unsplash.com/search/photos/inspiration?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Of course I get frustrated sometimes, we all do. I make lots of mistakes and some of them feel really stupid, but my enthusiasm and love for what I do is what always shines through and gets me past any barriers or failures.</p><p>Enthusiasm is contagious. A good team lead or manager recognises the value of enthusiasm for productivity and morale and welcomes it with open arms. If you can let your love of programming, technology, and problem solving show in your interactions in socials, at meetups, and at job interviews, it will help you to get the job you really want.</p><h3>You can have the career you want</h3><p>I see a lot of people get discouraged when they don’t find work right away as a developer, or when they are let go from a company. Remember that there is a real demand for good developers out there that is growing by the day, and being a good developer is absolutely attainable if you have a genuine love of programming and learning.</p><p>Avoid comparing yourself to others because if you try to be like someone else you are robbing the world of you and your unique perspective and abilities. If we are going to solve problems for everyone, and make the world a better, more accessible place for everyone, we need diversity in thought and backgrounds in our software developers and technologists. Be your personal best by giving your time and energy to what gives you the most joy in your work. Share your strengths with the people you meet and work with, and don’t be afraid to share your weaknesses so we can support each other.</p><p>Have a look at my post on <a href="https://blog.usejournal.com/six-things-that-make-a-great-software-developer-9369ecb6ce3?source=friends_link&amp;sk=ff3724395474865ab89f3221f44bab63">six things that make a great software developer</a>. I think these six qualities, which are available to everyone, are key for our world’s problem solvers and innovators — like you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=639481ff63a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A guide for using WSL for development]]></title>
            <link>https://janelbrandon.medium.com/a-guide-for-using-wsl-for-development-d135670313a6?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/d135670313a6</guid>
            <category><![CDATA[wsl]]></category>
            <category><![CDATA[code-newbie]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Sun, 17 Mar 2019 01:44:03 GMT</pubDate>
            <atom:updated>2020-02-24T23:35:31.527Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve always been a UNIX fan (and if I’m being honest, a bit of a Windows bigot), but I recognise it’s because my roots are in UNIX. I worked for 17 years as an AIX programmer for IBM.</p><p>In the full stack web development bootcamp I teach, a fair number of students come to class with Windows installed on their laptops. Experienced developers know that Windows isn’t the most friendly OS for web development (Ok — it’s downright painful). We thought about requiring that students install Linux or bring in a Mac, but we’ve found that with Windows 10, the support of the Windows Subsystem for Linux (WSL) is sufficient for teaching the course (although I would still encourage anyone who plans to use their laptop for web development to get a Mac or install Linux).</p><p>On this journey, I have found some things that make the experience of using WSL better for our students, and I thought I would share those here for people using it for the same purpose.</p><h3>Getting started</h3><h4><strong>1. Enable the optional feature from an Administrator PowerShell first</strong></h4><p>Open PowerShell as Administrator (search for PowerShell from the start menu, right click instead of clicking to open, and choose to open as Administrator). Type the following:</p><pre>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux</pre><p>This will prompt you to restart your computer. Let it happen — you should be used to this by now as a Windows user (Ok — I promise that’s my last dig at Windows).</p><h4><strong>2. Install VS Code (or the IDE of your choice) before you install the WSL</strong></h4><p>In this article, I’m going to assume you’re using VS Code and will refer to that. When you install the WSL, it will inherit PATH from your Windows environment. Don’t worry too much about what that means, but understand that if you don’t have your IDE installed before you install/initiate the WSL, the executable for your IDE won’t be available to your WSL environment. For this reason, you should make sure that VS Code is installed in Windows before you install the WSL. If it isn’t, you’ll have to add the executable for VS Code to your PATH in WSL in one of your config files (like your .bashrc).</p><h4>3. Use the latest Ubuntu image offered</h4><p>Go to the Windows App store and search for Ubuntu. The latest available right now is 18.04. Install the latest.</p><p>You’ll have to initialise Ubuntu (from now on, I’ll use the term ‘WSL’ and ‘Ubuntu’ interchangeably).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BNaB8tqU7Bav5QqKg_TloQ.png" /><figcaption>Initialise the WSL</figcaption></figure><p>Once it installs it will prompt you to enter a username and password. This is for your Ubuntu environment and has nothing to do with your Windows username and password. Choose a username without spaces or special characters that is easy to type and remember. Choose a password you will remember (you’ll have to use it often to install tools in your Ubuntu environment).</p><h3>Setting up your dev environment to use WSL</h3><h4>4. Configure VS Code (or IDE of your choice) to use bash or wsl for interactive terminal</h4><p>In VS Code, search settings for “integrated.shell”, and replace the line with Powershell with this:</p><pre>“terminal.integrated.shell.windows”: “C:\\WINDOWS\\System32\\wsl.exe”</pre><p>If you are using 32-bit VS Code, you will have to reference bash.exe in sysnative instead of wsl:</p><pre>“terminal.integrated.shell.windows”: “C:\\WINDOWS\\sysnative\\bash.exe”</pre><h4>5. Create a link from your WSL to your C drive</h4><p>As I mention in subsequent steps below, you should store all of your project files and development work on your C drive, in case you need to reinstall the WSL (Windows has done pretty well with the WSL, but sometimes it just stops working and you have to uninstall and reinstall it). Your WSL has access to your C drive in Windows, but your Windows environment does not have access to your WSL files (well — there are claims that it is possible in the latest versions of the WSL but it’s very hard to set up, and not necessary if you just follow this step to keep your work on your C drive). From the WSL, your C:\\ directory in Windows is called ‘/mnt/c’.</p><p>To make it easier to use your C drive from your WSL, use the ‘ln’ command from your home directory on the WSL command line to create a link to your C drive from your Ubuntu home directory. Decide where you want to put your development project files in your C drive. For this example, let’s assume you want to put all of your project files in “C:\\projects\”, and that this directory doesn’t exist yet. Here are the steps you should follow:</p><p>a. Open your WSL. If you aren’t there, cd to your home directory. The ‘cd’ command with no arguments will take you to your home directory:</p><pre>cd</pre><p>b. Create the “C:\\projects” directory from the WSL:</p><pre>mkdir /mnt/c/projects</pre><p>Verify from your Windows File Explorer that this directory was indeed created in Windows.</p><p><em>If you have a problem here — namely that you aren’t allowed to create the directory, you have encountered one of the unusual issues with the WSL. For some users, the windows C mount is owned by root. If this is true for you, you’ll have to create your directory in your windows user’s home directory instead.</em></p><p>You can check for this problem by running</p><pre>ls -l /mnt</pre><p>If ‘c’ is owned by ‘root’, create the ‘projects’ directory in /mnt/c/Users/&lt;yourUser&gt; instead.</p><p>c. Create the link to “C:\\projects”. Make sure you are still in your home directory in the WSL and type (if you created ‘projects’ in your windows user home directory, use that path instead):</p><pre>ln -s /mnt/c/projects</pre><p>d. This will create a projects directory in your WSL home directory. Verify it points to the Windows directory:</p><pre>ls -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*WriSIiJuq3IsL68QHZGjbQ.png" /><figcaption>Creating a link to C:\\projects\</figcaption></figure><p>This should show the projects directory in WSL points to <strong>/mnt/c/projects</strong>. If the text is red, that indicates a problem. Make sure you verified step b above, and that you ran the command exactly as shown in step c. If it shows red, remove it with ‘<strong>rm -rf projects</strong>’, and follow steps b and c again.</p><p>Test that your link works. Create a file in the linked directory with this command:</p><pre>touch ~/projects/newfile.txt</pre><p>Verify from your Windows File Explorer that there is a new text file in the C:\\projects\ directory called ‘newfile’.</p><h4>6. Keep all of your project files and development work in a linked C drive directory</h4><p>From now on, do all of your work from the directory link created in number 5 above, or some other linked Windows directory in your WSL environment. If you do that, even if you have to reinstall the WSL, you won’t lose any work!</p><p>Get into the habit of opening your WSL, change directory to the linked directory — in our example ‘cd ~/projects’, and then to some subdirectory of that linked directory where you are doing your work, and launch VS code from there with: <strong>code .</strong></p><h4>7. If you use SSH, use the same keys from your Windows and WSL environment</h4><p>UNIX users like to use ssh, because we don’t like to type in our username and password all the time when we connect to remote servers regularly. For example, I prefer to use ssh to connect to my GitHub repositories. You don’t have to use ssh. If you want to use ssh or are already using it from Windows, you can follow this step. Otherwise, just go past it to step 8.</p><p><strong>If you have already generated and are using ssh keys from your Windows environment, you can copy them into your WSL home directory like this:</strong></p><p>a. From your WSL, get to your home directory:</p><pre>cd</pre><p>b. Copy the keys from your Windows user home directory to your WSL user home directory. In the command below substitute your Windows user name for &lt;your windows user name here&gt;:</p><pre>cp -r /mnt/c/Users/&lt;your windows user name here&gt;/.ssh ~/.</pre><p>c. Remove read/write permissions from the private key (this assumes your private key is named id_rsa. If it isn’t, replace it in the command below):</p><pre>chmod 700 ~/.ssh/id_rsa</pre><p>This will allow you to use the same keys you are already using to access remote servers from your laptop/computer.</p><p><strong>If you don’t have ssh keys in Windows yet, you can generate ssh keys with ssh-keygen in your WSL home directory and copy it to Windows like this:</strong></p><p>a. From your WSL, get to your home directory:</p><pre>cd</pre><p>b. Generate the keys. After running ssh-keygen just type enter three times to generate the default file names and no passcode:</p><pre>ssh-keygen</pre><pre>&lt;enter&gt;&lt;enter&gt;&lt;enter&gt;</pre><p>c. Copy the keys to your Windows home directory. In the command below substitute your Windows user name for &lt;your windows user name here&gt;:</p><pre>cp -r ~/.ssh /mnt/c/Users/&lt;your windows user name here&gt;/.</pre><p>That’s it! Now if you have to reinstall your WSL, you can just copy the keys from Windows back over and avoid recopying your public key to remote hosts. If that doesn’t make sense — don’t worry too much about it. Like I said at the start, you don’t have to use ssh. Maybe I’ll write another blog post on using ssh :).</p><h4>8. Create a script for all of the things you are installing in WSL to support development</h4><p>As you develop things, you’ll need to install tools and libraries. If you’re developing in JavaScript for example, you’ll likely install NodeJs, NPM, Express, and some front-end framework or environment like AngularJs or React.</p><p>a. Create a script file in your mounted Windows drive called <strong>wsl_setup.sh</strong>:</p><pre>touch /mnt/c/projects/wsl_setup.sh</pre><p>b. Give it execute permission:</p><pre>chmod 755 /mnt/c/projects/wsl_setup.sh</pre><p>Every time you run a command to install something into your WSL, add the command to the wsl_setup.sh script.</p><p>For example, to install NodeJs, you will have to run:</p><pre>sudo apt install nodejs</pre><p>That command should be added to your wsl_setup.sh script:</p><p>a. Open the wsl_setup.sh script in VS Code:</p><pre>code /mnt/c/projects/wsl_setup.sh</pre><p>b. Add the command you ran to install NodeJs to the script in VS Code</p><p>If you do this, when you have to reinstall your WSL, you can just run your wsl_setup.sh script to get all of your tools reinstalled.</p><h3>What’s next?</h3><p>This is a good start. I’ll stop here to avoid writing a whole book. If you can follow these steps, you’ll have a decent setup for development on Windows with WSL, and it may save you some tears.</p><p>Have you had your own experiences using WSL as a developer and best practices? Share them here or on Twitter (I’ll post this under @JanelBrandon12).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d135670313a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Problem solving like a programmer]]></title>
            <link>https://janelbrandon.medium.com/problem-solving-like-a-programmer-88c4866752fc?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/88c4866752fc</guid>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[pseudocode]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Sat, 09 Mar 2019 02:12:23 GMT</pubDate>
            <atom:updated>2019-03-09T02:12:23.692Z</atom:updated>
            <content:encoded><![CDATA[<p>Programming is fun, and also challenging. It’s easy to get caught up in the syntax and semantics of the languages and frameworks themselves, and there are so many languages and frameworks. While it is important to learn syntax and semantics, I would say that is a less challenging part of programming because you can always just look it up. When you know lots (or even just a few) languages, you <em>have</em> to look it up, because you forget which syntax goes with which language. At least, I do!</p><p>A much more challenging aspect of programming is learning to think like a programmer when you are solving a problem. You start with a problem (where problem is a generic term meaning something you want to write code to accomplish), clearly define the problem, then translate it into data structures (the strings, numbers, arrays, hashes, objects, etc. that you will use to represent the problem) and control structures and flow (the loops, conditionals, methods, and algorithms) that will make up a solution.</p><p>Let’s look at an example. We’ll walk together through these steps to create a program to play a game of tic-tac-toe (or naughts and crosses, depending on which part of the world you come from).</p><p>In this example, we won’t write any code. It will be language-agnostic. We will just go through the steps to create some pseudocode with the data and control structures we would need to write a program.</p><h3>Step 1: Define the problem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mSmsjPEHeQwzw6JHwX6p1A.png" /><figcaption>Licence: Creative Commons — CC0. Photos transferred to the public domain from Creative Commons.</figcaption></figure><p>When you define the problem, be as precise as possible. It helps to draw pictures here, and to think of some example scenarios. A lot of times, I think I define the problem clearly, but as I try to get through the next steps of defining the data and control structures, I realise I didn’t! That’s OK. I just go back and redefine any parts of the problem that are unclear when necessary.</p><p>Here is how I would define the problem of a game of tic-tac-toe.</p><p><strong>Problem definition</strong>: A game of tic-tac-toe will be played by two players on a 3x3 playing grid. One player will use ‘X’ to mark a play and the other will use ‘O’. Players take turns, making one mark with each play in an empty space on the playing grid until one of them wins or a tie is reached. A win occurs when a player gets three marks in a row vertically, horizontally, or diagonally. A tie is reached when it is not possible for either player to make a play that would result in a win.</p><p>At this point, I can already start to see the data structures I will need. I won’t see all of them until I write out some kind of flow diagram, but some of them are evident. Can you see them? Some initial data structures I spot are the playing grid, player1 move, and player2 move. Can you spot others?</p><h3>Step 2: Brainstorm possible solutions</h3><p>For a tic-tac-toe game, this step may not be entirely necessary, but in most problems it is an important step. This step benefits greatly from different perspectives, so if you’re working on a team, get everyone’s input. Talk through suggested solutions, making note of the benefits and challenges for each, at least at a high level. Come to agreement on a solution, with an understanding that you will most certainly change parts of it as you work on the solution, and may even change it completely after you talk through the flow in more detail or face unforeseen challenges during implementation.</p><h3>Step 3: Define the flow</h3><p>In this step, it’s particularly helpful to write or draw out some possible outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6CIxy3pXwAgtew8p0HwfAg.jpeg" /><figcaption>Four different game outcomes</figcaption></figure><p>In the image above, there are four different game outcomes. In #1 and #3, there is a winner, but in #3, the entire grid wasn’t filled. In #2 and #4, there is a tie, but in #4, the grid wasn’t filled completely before we could make that determination. Our flow and our program should consider all of these cases.</p><p>Now I’m going to give ONE EXAMPLE of a high level flow. There will be a number of possibilities, and this is the first one that comes to mind for ME. When I’m developing a solution, I start with what comes to me after a little thought. I often refine my flow after I flesh it out more, and often again as I work on implementation for more complex problems. THIS IS OK. If you get bogged down by the idea that you have to come up with the perfect, most elegant, or most performant solution in the first go, YOU WILL GET STUCK. Just let it flow. That’s one of my favourite mantras in programming and in life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*yB3Ev0yJ1fT48YrQsJTZ7w.jpeg" /><figcaption>Basic high level flow for the game</figcaption></figure><p>I start with a basic high level flow. This will reveal the main control structures — the loops and conditionals. Can you see them?</p><p>When I create this high level flow, I phrase any basic, two-answer questions as yes/no questions, and I put them in a diamond. This is just a convention, but one I’m accustomed to, so it makes it easier for me to spot that this is where I need a control structure like an if statement or a loop termination statement.</p><p>A side note — if there is a question with more than two answers that each result in unique outcomes, I might represent it differently. That’s because I know that these kinds of questions can be handled with a case or switch statement.</p><p>If there are steps that would be repeated, I draw an arrow from the last step in the sequence, to the first step in the sequence that should be repeated. This reveals the loop we need in this high-level solution. In our example, the first step in the repeating sequence is ‘player1 takes turn’, and there are two statements in the sequence that lead to loop termination — ‘there is a tie?’ and ‘there is a winner?’. The last step of the loop sequence is always a yes/no question. That is our loop termination condition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUJzI1LQVTBEfNt6X7HDzg.jpeg" /><figcaption>High level flow with flow control noted</figcaption></figure><h3>Step 4: Identify variables and data structures</h3><p>Once we’ve defined a high level flow, we can define some variables and data structures. This is probably the most difficult part of this process. Even in a simple example, there are a lot of ways the data can be represented. Just like with high level flow, just start writing down what comes to mind, knowing you can refine it later if it makes sense.</p><p>When I do this step, I think about what things I need to represent as I look at the flow, and what types of data structure could hold the represented information. I’ll point out that we could define more complex objects to represent our data for this program than what I will describe here. For example, we could define a game grid class that represents the field of play for the game. We could define a player class that represents a player, with attributes like name, age, handicap, mark used, etc. I will not do that in this post so I can focus on basic determination of program flow and data structure that is independent of language semantics. I’ll save a discussion of classes for another post.</p><p>In this example, this is what I determine we need initially:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*zzF_cU-Y0kZzQUcK2Zj6RA.png" /><figcaption>Initial variables and data structure</figcaption></figure><p>Here’s some more explanation.</p><p>I need to represent the 3x3 game grid itself. I will need to keep track of where player 1 and player 2 have placed their marks in the grid, and be able to determine at each iteration through the loop if we have reached the loop termination condition. Specifically, I need to determine if there are three marks from the same player in a horizontal row, vertical column, or a diagonal (player1 wins or player2 wins), or if there is a tie (either all of the grid is filled and there is no winner, or if the empty spots were filled by either player, there would still be no winner).</p><p>Considering this, the <strong>game_grid</strong> could be a two-dimensional array (or a matrix if supported by the language).</p><p>The mark for each player (an ‘X’ or an ‘O’ in the traditional game) could be represented by a string (or character) or a number (such as ‘1’ and ‘2’). Similarly, the game <strong>outcome</strong> (one of four options listed) could be represented as a string or a number. When I’m trying to make these decisions, I think about how I will use the data to control the flow of the program, and how I will use it to interact with the user. For example, if I want to show the current game grid to the user (which would be important), I may want to store the player marks as literal ‘X’ and ‘O’, and therefore storing them as strings would allow me to print the <strong>game_grid</strong> directly, so I may choose to store them as strings rather than numbers. Mostly these choices do not matter — choose what you like and is easiest for you to understand, and make sure that what the variables represent is apparent to anyone else reading your code.</p><p>We will have to record each player’s current move inside of our loop. They will have to choose an empty grid location, and we will have to record their mark in that row and column of the game grid. I would make a note that we need to do some input validation here, to make sure that only an empty and valid game grid cell is chosen.</p><h3>Step 5: Write some pseudocode</h3><p>Start with high level code, like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*2Oi-SnZpSLHfG1X6mc5giA.png" /><figcaption>High level pseudocode</figcaption></figure><p>From this high level description, we can easily identify some functions or methods. For example, I would plan to have functions for print_grid, player_move (to prompt a player to move, validate the move, and update the game grid), and check_outcome. I would also have a function to print_outcome.</p><p>We’ll go one step further here and write some pseudocode for the check_outcome function we would define. In this process we’ll see that when we start implementing the code, we’ll define more functions, variables, and data structures as needed. This is where algorithm knowledge and practice comes into play. It requires some experience with common data structures like arrays and strings, and a fundamental understanding of loops and conditionals. This come with practice, so just keep practicing and don’t get discouraged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*P5qGEJioDTRMfIHtUS9gVw.png" /><figcaption>Pseudocode for check_outcome function</figcaption></figure><p>The items I marked in blue represent other functions I would define. I strive to make each of my functions small, and more importantly, to make sure that they only perform one job with no side effects. The job of the check_outcome function is to just determine if there is a winner, a tie, or if the game is unfinished. Here is pseudocode for the check_rows_cols, check_diags, and grid_full functions. Notice that they are small, and perform very specific jobs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*Ix2NfoSX2RtxwIG9UzeTZw.png" /><figcaption>Pseudocode for check_rows_cols, check_diags, and grid_full functions</figcaption></figure><p>I went further and defined row_vals_equal and col_vals_equal to do the actual comparisons based on index in check_rows_cols:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*iYZtHeQFJwsTH7EjvPQByg.png" /><figcaption>Pseudocode for more helper functions</figcaption></figure><p>Each of these functions compares values in the row (row_vals_equal) or column (col_vals_equal) for the index passed in, and if it finds the values are all equal, it returns the player’s mark for that row or column.</p><p>You can determine to which extent you modularise your functions. Remember it is better to err on the side of more smaller functions than less larger functions. It makes testing and maintenance of your program much easier when you keep your functions small with specific actions.</p><h3>Step 6: Write some actual code</h3><p>From this step, you can write some actual code! Yay! I’ll leave this for you to try, but reach out if you get stuck.</p><p>I hope I’ve given some useful info in this blog post. Remember though that the very most important thing to remember when you are programming is TO HAVE FUN!</p><p>About me: I’m an instructor at a programming bootcamp with 20+ years experience as a software engineer. I love to see people be empowered by coding to create solutions that make the world a nicer place to live in for everyone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88c4866752fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Put an end to impostor syndrome]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://janelbrandon.medium.com/put-an-end-to-impostor-syndrome-ccec9a6744d6?source=rss-d6d3d6615883------2"><img src="https://cdn-images-1.medium.com/max/2600/1*LpWtVqm2RpTle__OaE7gRQ.jpeg" width="6000"></a></p><p class="medium-feed-snippet">Impostor syndrome. It&#x2019;s reported that 70% of people suffer from it. As a woman who has worked in software development for more than 20&#x2026;</p><p class="medium-feed-link"><a href="https://janelbrandon.medium.com/put-an-end-to-impostor-syndrome-ccec9a6744d6?source=rss-d6d3d6615883------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://janelbrandon.medium.com/put-an-end-to-impostor-syndrome-ccec9a6744d6?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccec9a6744d6</guid>
            <category><![CDATA[shine-on]]></category>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[impostor-syndrome]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Fri, 31 Aug 2018 23:41:19 GMT</pubDate>
            <atom:updated>2019-08-18T07:53:44.065Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Transforming the world with meditation]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://janelbrandon.medium.com/why-i-meditate-4c88caccdec2?source=rss-d6d3d6615883------2"><img src="https://cdn-images-1.medium.com/max/2600/1*gCw57A_iyU8bZABGYVQvRg.png" width="3676"></a></p><p class="medium-feed-snippet">I meditate every day. Sometimes I formally sit in meditation, usually on my train commute to and from the city for work. More often, I&#x2026;</p><p class="medium-feed-link"><a href="https://janelbrandon.medium.com/why-i-meditate-4c88caccdec2?source=rss-d6d3d6615883------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://janelbrandon.medium.com/why-i-meditate-4c88caccdec2?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c88caccdec2</guid>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[emotional-intelligence]]></category>
            <category><![CDATA[beauty]]></category>
            <category><![CDATA[meditation]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Sun, 26 Aug 2018 02:26:10 GMT</pubDate>
            <atom:updated>2018-08-29T21:02:21.815Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Six things that make a great software developer]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://janelbrandon.medium.com/six-things-that-make-a-great-software-developer-9369ecb6ce3?source=rss-d6d3d6615883------2"><img src="https://cdn-images-1.medium.com/max/960/1*6XP1451MoMRnZrmaXHHDbQ.png" width="960"></a></p><p class="medium-feed-snippet">I&#x2019;ve been a software developer for about 20 years.</p><p class="medium-feed-link"><a href="https://janelbrandon.medium.com/six-things-that-make-a-great-software-developer-9369ecb6ce3?source=rss-d6d3d6615883------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://janelbrandon.medium.com/six-things-that-make-a-great-software-developer-9369ecb6ce3?source=rss-d6d3d6615883------2</link>
            <guid isPermaLink="false">https://medium.com/p/9369ecb6ce3</guid>
            <category><![CDATA[passion]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[curiosity]]></category>
            <category><![CDATA[humility]]></category>
            <dc:creator><![CDATA[Janel Brandon]]></dc:creator>
            <pubDate>Sun, 19 Aug 2018 04:05:23 GMT</pubDate>
            <atom:updated>2018-08-27T23:25:43.080Z</atom:updated>
        </item>
    </channel>
</rss>