Tips for Programming with a low end PC.
Tags: javascript, vscode, tutorial, motivation
Published: 2020-07-17 15:55:10

DISCLAIMER: The term low-end is subjective, this is intended to help anyone with a less than powerful pc.

<!-- wp:paragraph -->
<p>For the past few months I've been using a laptop with 4 GB RAM for working, learning and just about everything. My experience plus this  twitter thread by <a href="https://twitter.com/traversymedia/status/1277348235980484619">Brad Traversy</a> (Who is a great teacher btw) sort of inspired me to write this. Turns out that there are LOTS of developers with high end PC's but also lots of developers with arguably low end one's as well.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you were just starting out or even a professional programmer, you'd imagine you'd need a lot of stuff. If you ever have to, it's 100% possible to code with a low end PC.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://media.giphy.com/media/CTX0ivSQbI78A/giphy.gif" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>NOTE</strong>: Most of this applies to web application development. If you are developing games or training machine learning models locally then idk man, hopefully someone in the comments can help. (although i know google colab works for machine learning)</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>The Editor</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Programming largely involves typing text and hoping the text makes sense to the computer, preferably with tools that make this easier. Most full on IDE's take up lots of RAM, which is a resource we can't really spare especially when you have other things open like several browser tabs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>The solution: </strong>A code editor, not an IDE (anti-climactic, I know.)</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Local Editors's</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><strong>Visual Studio Code</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is a very popular code editor that is "IDE like", it's lovely. Although a computer with around 2-4GB of RAM can run it. It isn't exactly known for being conservative with RAM. Here are some things you can  do:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Tip 1: Disable unnecessary extensions!</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I used to have some extensions on that weren't exactly relevant to what I was doing. Disabling them will should reduce the memory footprint of VSCode. You can find out how to do this <a href="https://code.visualstudio.com/docs/editor/extension-gallery#_manage-extensions">here</a>. After my research, this really is one of the best approaches when using VSCode.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Excluding files from  filewatcher</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can stop VSCode from "watching"/tracking certain files for changes. You can do this in your VSCode <a href="https://code.visualstudio.com/docs/getstarted/settings">settings</a> . By default it has stuff like  node_modules and git objects excludes but you can use a glob pattern (<a href="https://www.malikbrowne.com/blog/a-beginners-guide-glob-patterns">A useful guide on them</a>) of file paths to add any thing else there.</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>"files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/node_modules/**": true,
//Add in your other glob patterns
}
</code></pre>
<!-- /wp:code -->

A few people have suggested sublime text so you can give that a try.

<!-- wp:paragraph -->
<p>This is all great. However, If you have even lower specs or are working on a somewhat larger project, your PC may start to struggle if you have other things open. So switching to an even lighter editor would help. There are many great ones: some suggestions are Notepad ++ OR VIM.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Regarding something like VIM, while it is really lightweight, it takes sometime to get really good/efficient. Once you do learn, it is really nice not having to touch your mouse as much. Also when you code it makes you look like every non-programmer's idea of a programmer.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://media.giphy.com/media/RyXVu4ZW454IM/giphy.gif" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Upside is you don't have to touch your mouse as much, The downside is that you have to learn vim :*</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Another Solution: Online IDE's</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Here is another avenue that is great for several purposes. Online IDE's are pretty nice now. This especially true if you develop with many programming languages (Like PHP) and can't be bothered to setup a local dev environment. You also get the freedom to write code on anything with an internet  connection. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>They also happen to be pretty great for sharing code and working with other people quickly. Most computers have some browser and that's all you need.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":365,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://tobenxe.com/wp-content/uploads/2020/07/onlineIDES.png" alt="" class="wp-image-365"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>There are a few options: <a href="https://repl.it/">Repl.it</a> from my personal experience is pretty amazing, they support so many  languages and allow you to run code and use a custom domain for your work. Plus <a href="https://repl.it/site/multiplayer">multiplayer</a>!</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://codepen.io/">Codepen</a> is another option which is pretty popular for sharing HTML./CSS/JS code, I used it a lot when I first started out with web dev about 3-ish years ago. There is also  <a href="https://codesandbox.io/">Codesandbox</a>, which looks good, it appears to be a VSCode editor in the browser. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>(I may be missing a few other good online editors but these one's are top of mind)</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Extra Tools/Tips</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Storage</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Many low end PCs are at times plagued with low storage space. The best advice I have here is to only store projects you work on 24/7 on your machine, instead just commit the files to git and push to a hosted or self-hosted repository.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Chrome Extensions</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><strong>The Great Suspender</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While I did mention keeping extension/plugins to the absolute minimum. Because programming often involves a lot of open browser tabs (Which you will most likely hoard or forget to close). I recommend this extension.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p> Like the name suggests, it suspends idle tabs (you can configure how it works and exclude certain tabs based on some features).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>An adblocker (ublock Origin)</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I think most people who work anywhere near tech already have this. If you don't many sites loading trackers can have an impact on browsing speed. So this comes in handy.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Browsers &amp; Browser Windows</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Although I can't really give you the textbook explanation. One thing I do is work in a window where I am not  logged in to anything. Not only does this help productivity but generally it makes my browser run faster, even searching stuff gets faster as well (my guess is that over-personalization can make things sluggish). </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Final Thoughts</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>When you think about it most people who actually use what you make may not be on the best computers in the world so I guess you get to live their experience and avoid unnecessary fluff. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Whenever you are able to, upgrade your computer! it'll probably be a decent investment. From my experience the most important specs are RAM and SSD.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are probably a million more little things you can do to make your computer more efficient. If you have any other tips, please leave a comment . I can edit the post and cite you :)</p>
<!-- /wp:paragraph -->

Original Blog: https://tobenxe.com/tips-for-programming-with-a-low-end-pc/

If you enjoyed the post you can follow me on twitter:  https://twitter.com/tobenxe/

<!-- wp:paragraph -->
<p>Thanks for reading.</p>
<!-- /wp:paragraph -->