<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ryan Bevin</title>
    <description>The latest articles on DEV Community by Ryan Bevin (@rbevin777).</description>
    <link>https://dev.to/rbevin777</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1122202%2F5f44a6cf-eee7-4bff-8563-caeb235e820c.jpeg</url>
      <title>DEV Community: Ryan Bevin</title>
      <link>https://dev.to/rbevin777</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rbevin777"/>
    <language>en</language>
    <item>
      <title>Compare PDF Files Using The Terminal</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Fri, 09 Feb 2024 12:15:59 +0000</pubDate>
      <link>https://dev.to/rbevin777/compare-pdf-files-using-the-terminal-4b5m</link>
      <guid>https://dev.to/rbevin777/compare-pdf-files-using-the-terminal-4b5m</guid>
      <description>&lt;p&gt;Pre-reqisites:&lt;br&gt;
You may need to install poppler-utils. Try this first:&lt;br&gt;
&lt;code&gt;apt-get install poppler-utils&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you are still having trouble, try installing the dependancies as well:&lt;br&gt;
&lt;code&gt;sudo apt-get install libnss3-dev libgpgmepp-dev qtbase5-dev libcairo2-dev libboost-dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This one is short and sweet. Here are the steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Convert the first PDF to a text file&lt;br&gt;
&lt;code&gt;pdftotext example_pdf_one.pdf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Convert the second PDF to a text file&lt;br&gt;
&lt;code&gt;pdftotext example_pdf_two.pdf&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check the differences between the text files.&lt;br&gt;
&lt;code&gt;diff example_pdf_one.txt example_pdf_two.txt&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's all there is to it!&lt;/p&gt;

&lt;p&gt;I also have a video demo on how this works: &lt;a href="https://youtu.be/VL-wFPESiCc"&gt;https://youtu.be/VL-wFPESiCc&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>terminal</category>
      <category>bash</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Create a Gantt Chart With Markdown</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Wed, 31 Jan 2024 08:07:58 +0000</pubDate>
      <link>https://dev.to/rbevin777/create-a-gantt-chart-with-markdown-31hd</link>
      <guid>https://dev.to/rbevin777/create-a-gantt-chart-with-markdown-31hd</guid>
      <description>&lt;p&gt;So I recently started a project and one of the first things I had to do was create a Gantt chart to plan things out. I knew of a framework called &lt;a href="https://mermaid.js.org/"&gt;Mermaid&lt;/a&gt; which is a nice addition to &lt;a href="https://www.markdownguide.org/"&gt;Markdown&lt;/a&gt; which lets you create fancy diagrams using code. &lt;/p&gt;

&lt;p&gt;I spent quite a bit of time working out how to customize this to look how I wanted it to look and so I though it would be a good idea to document it for someone else.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps
&lt;/h3&gt;

&lt;p&gt;There are a few steps needed for this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You need VS Code&lt;/li&gt;
&lt;li&gt;You need the VS Code extension for rendering mermaid documents in markdown: &lt;a href="https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid"&gt;https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You need some markdown mermaid code! See below:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%%{
  init: {
    "gantt": {
      'topPadding' :100,
      'rightPadding' :100,
      'leftPadding' :100,
      'barHeight' :50,
      'fontSize' :17,
      'titleTopMargin': 75,
      'gridLineStartPadding' : 48,
      'barGap' :10,
      'sectionFontSize': 16
    },
    'theme': 'base',
    'themeVariables': {
      "fontFamily": 'Sans-Serif',
      'primaryColor': '#bcc8ff',
      'primaryTextColor': '#000',
      'primaryBorderColor': '#2d2ac9',
      'tertiaryColor': '#000',
      'textColor':'#000',
      'tertiaryTextColor': '#000'
    }
  }
}%%

%% https://mermaid.js.org/config/directives.html#declaring-directives
%% https://mermaid.js.org/config/schema-docs/config-defs-gantt-diagram-config.html#toppadding

%% color theme need opened with the high contrast light theme.

gantt
    title changed title
    dateFormat MM
    axisFormat %B
    section Task 1
        Do Task 1 :task1, 01, 91d
    section Task 2
        Do Task 2 :task2, 02, 60d
    section Task 3
        create chart :task3, 05, 30d

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Guided Video
&lt;/h3&gt;

&lt;p&gt;You can follow along in this video I made as well: &lt;a href="https://youtu.be/K70D5ebtEiw"&gt;https://youtu.be/K70D5ebtEiw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NOTE: To change the theme variables, the &lt;code&gt;base&lt;/code&gt; theme needs selected and this is because it's the only theme with parameters that can be changed using these mermaid directives.&lt;/p&gt;

&lt;p&gt;This can also be integrated with the obisian add to make your note taking even fancier!&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>markdown</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Compile LaTeX With Git For Free!</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Sun, 21 Jan 2024 10:39:19 +0000</pubDate>
      <link>https://dev.to/rbevin777/latex-with-git-for-free-ij5</link>
      <guid>https://dev.to/rbevin777/latex-with-git-for-free-ij5</guid>
      <description>&lt;h4&gt;
  
  
  Intro
&lt;/h4&gt;

&lt;p&gt;So I recently started a new job. This job requires that I use LaTeX to write scientific papers. There is a great site called overleaf that has everything setup and ready to go when it comes to writing papers. The problem is that to use it with Git it costs me £159 per year. So I decided I don't want to pay that and found an alternative. It involves VS Code, and Linux. As always.&lt;/p&gt;

&lt;p&gt;So here are the steps outlined below. I also include a link to a step by step video using I created.&lt;/p&gt;

&lt;h5&gt;
  
  
  The Bare Minimum Steps Required
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;Install VS Code, if you haven't done so already. Install it from the website as this will have the most up to date version: &lt;a href="https://code.visualstudio.com/"&gt;https://code.visualstudio.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install texlive-full. I did this on a debian based distro so for me it was the following command: &lt;code&gt;sudo apt-get install texlive-full&lt;/code&gt; this will obviously be different depending on your distro.&lt;/li&gt;
&lt;li&gt;Open VS Code and install this extension: &lt;a href="https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop"&gt;https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With these 3 steps you should now be able to compile LaTeX papers on your computer and however you decide to manage your projects with Git. To see how to configure VS Code to make editing the LaTeX nicer then checkout my video: &lt;a href="https://youtu.be/UbmGx6noLMw"&gt;https://youtu.be/UbmGx6noLMw&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  TLDR
&lt;/h4&gt;

&lt;p&gt;This video is a step by step guide: &lt;a href="https://youtu.be/UbmGx6noLMw"&gt;https://youtu.be/UbmGx6noLMw&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>coding</category>
      <category>automation</category>
      <category>beginners</category>
    </item>
    <item>
      <title>4 Games for Software Engineers</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Sun, 26 Nov 2023 11:53:58 +0000</pubDate>
      <link>https://dev.to/rbevin777/using-games-to-learn-44a2</link>
      <guid>https://dev.to/rbevin777/using-games-to-learn-44a2</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;So like many people I always seen gaming as the oasis to avoid learning. Completely unaware that I was learning anyway. I'll give you an example. Most games teach management skills (Cities: Skylines)/sorting skills(Divinity 2). Some go into more granular detail and deal with logistics (Factorio).&lt;/p&gt;

&lt;p&gt;If you haven't played any of the games I have mentioned, it doesn't matter. Whether you were aware or not, games have been helping us learn over the years. But most of these skills can be difficult to transfer to real world jobs (for the most part). None of these games helped me with my embedded software engineering career. However, I have found a few which are useful especially for software dev and electronics.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Games
&lt;/h2&gt;

&lt;p&gt;This isn't a review of each game, this is just to bring your attention to some games which I have played (all of which I got on steam) and enjoyed.&lt;/p&gt;

&lt;p&gt;So here are 4 games with transferable skills for all the big nerds within each of us.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hacknet
&lt;/h3&gt;

&lt;p&gt;In this game you play as a hacker (shock, I know) and people contact you looking for help with jobs. The essence of this game is getting familiar with the terminal, it's great for beginners who aren't familiar with the terminal and you use unix commands to progress through the game. It's well worth checking out if you haven't done so. Great beginner game.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pmTbXMn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3xfwo1ia45bocv8w3kr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pmTbXMn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3xfwo1ia45bocv8w3kr.jpg" alt="Hacknet logo" width="474" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  SHENZHEN I/O
&lt;/h3&gt;

&lt;p&gt;So moving onto something a little more challenging (and by a little I mean A LOT!). In this game you work for a company and your job is to design modules and pass the verification process. This game is actually brilliant in its simplicity. You will need to read the documentation to play this (yea). You program the modules using a version of assembly (it's very basic) but the major skill this game helps develop is logical thinking (essential for software engineering).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AlMuD3JA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5e72winbzgvl4zpkf07.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AlMuD3JA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5e72winbzgvl4zpkf07.jpg" alt="SHENZHEN I/O logo" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Bitburner
&lt;/h3&gt;

&lt;p&gt;This game describes itself as a "programming-based incremental game". In bit burner you are a hacker. This one is different from hacknet in the sense that instead of the terminal you try automate the hacking process using actual JavaScript syntax. Also, this one is free so it's worth trying! Also it has RPG elements to it allowing you to improve your character with skill points.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FUoIGhr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbkoz413vzgqam32467a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FUoIGhr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbkoz413vzgqam32467a.jpg" alt="Bitburner logo" width="460" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Virtual Circuit Board
&lt;/h3&gt;

&lt;p&gt;Okay this one is my favourite (for now). I am an electronic engineer at heart and this game allows me to return to my first love, logic gates. Virtual Circuit Board is just that, a circuit simulator. It calls itself a "sandbox drawing-based logic simulator". You can build a 32 bit computer and program it (using assembly) from the ground up. Nuff said!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--11ufUDiS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r1d1skhh1txtkug3h5h5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--11ufUDiS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r1d1skhh1txtkug3h5h5.jpg" alt="VCB logo" width="660" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These are just 4 games I have played, there are others such as Turing complete and TIS-100, these games are highly rated on steam but I haven't played them. If you have let me know how they are in the comments! Also if there are games you have played that you think fall into this category then let me know below!&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>learning</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why You Should Consider Test Driven Development</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Wed, 27 Sep 2023 19:01:06 +0000</pubDate>
      <link>https://dev.to/rbevin777/the-case-for-test-drvien-development-tdd-kli</link>
      <guid>https://dev.to/rbevin777/the-case-for-test-drvien-development-tdd-kli</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;So I first would like to caveat this. I am making a case for TDD which if you are unfamiliar is Test Driven Development. However I'm keen to get others thoughts on this topic as well because it can cause division within the software development community and it's good to get different perspectives and thoughts on issues even if I/you don't agree.&lt;/p&gt;

&lt;h3&gt;
  
  
  TLDR
&lt;/h3&gt;

&lt;p&gt;Test Driven Development allows the developer to hit these 4 markers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Well tested code.&lt;/li&gt;
&lt;li&gt;Alternate perspective.&lt;/li&gt;
&lt;li&gt;Bitesize functions.&lt;/li&gt;
&lt;li&gt;Catch bugs sooner.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is TDD/Test Driven Development
&lt;/h2&gt;

&lt;p&gt;This is a methodology for developing code. The process is as follows.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You are given a feature&lt;/li&gt;
&lt;li&gt;You write test cases for the feature and the parts that make up that feature. These tests fail initially becuase the feature code isn't in place.&lt;/li&gt;
&lt;li&gt;And you then write the code to get the tests to pass.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So just in case this isn't clear.&lt;/p&gt;

&lt;p&gt;I want an adder function so I first write the test for that(I will write this in pseudo code).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void test_basic_adder_functionality(void)
{
    //! Given we have 2 numbers
    uint8_t a = 5;
    uint8_t b = 6;

    //! When we add these numbers together
    uint8_t actual_result = adder(a, b);

    //! Then we should get the added result correctly
    assert(11, actual_result);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We don't have &lt;code&gt;adder&lt;/code&gt; defined yet so this test will fail. This is expected. No problem.&lt;/p&gt;

&lt;p&gt;Now the next step is to create the function to do what we expect it to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uint8_t adder(uint8_t a, uint8_t b)
{
    return a + b;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now with the function implemented we can run the test and expect it to pass. Obviously there would be more tests to test edge cases but this hopefully gives you an idea of what exactly the mothodology is about.&lt;/p&gt;

&lt;p&gt;Now you have a better understanding of TDD (that's if you didn't already) I can now outline key considerations on why TDD is a constructive method for developing software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Code Will Be Tested
&lt;/h2&gt;

&lt;p&gt;Pretty obvious this is. But the point is still valid. You can't follow the TDD method without writing tests. I've been guilty of this and still am at times. When not following the TDD format, especially in personal projects, open source projects and obviously work projects. The tests are like documentation, the boring part which gets pushed to the end or dare I say forgotten about completely! &lt;/p&gt;

&lt;p&gt;The feature and implementation is the cool part of the job/hobby that we all get into software for. Not to test. Unless you work in a verification role and you like breaking software 😅 &lt;/p&gt;

&lt;h2&gt;
  
  
  Alternate Perspective
&lt;/h2&gt;

&lt;p&gt;So when writing code from a test perspective it allows you to think of things which you didn't think about. This is helpful as well if you implement test code coverage. But that's outside the scope of this post.&lt;/p&gt;

&lt;p&gt;Writing tests first forces you to think about the outcome of the function you are aiming to test. This can help you visualise and break down the functionality you wish to test. Which leads me to my next point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bitesize Functions
&lt;/h2&gt;

&lt;p&gt;It is very difficult to test large functions effectively. This is really clear when you try to add tests to an existing code base which can contain large functions. &lt;/p&gt;

&lt;p&gt;When approaching a problem from a TDD perspective you start to write tests in a clear way and concise manner. Or at least I do and this is how I see it being useful. This then forces you to only write the functionality you need in the function to get the test to pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Catching Bugs
&lt;/h2&gt;

&lt;p&gt;This is a big one and probably the biggest sell for test driven development. It allows developers to catch bugs before deployment. It's not a silver bullet to have 0 bugs. But minimising the number of bigs which occur is great. I don't enjoy debugging and I don't know many who do. &lt;/p&gt;

&lt;p&gt;Even having basic tests catch silly code mistakes which could be avoided. Edge case tests avoid the more pernicious bugs that cause debugging headaches. I think this is something every developer strives for, perfect code with 0 bugs and in my experience TDD gets me close to that goal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus... Sort of: Dopamine Hit
&lt;/h2&gt;

&lt;p&gt;Okay this isn't backed by any research, this is purely from a personal stand point. I love seeing all the tests I've written, pass. It gives me an ego boost too when the tests I've written pass and result in some green ticks on the CI/CD pipelines too. Again, I appreciate this won't vibe with everyone but if it vibes with 1 other person then I think it's worth sharing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So I've explained TDD, given an example of how to go about using it and a few points which I feel are important to the TDD case. Do you agree? Do you disagree? Please give me some feedback. I'd love to hear the different perspectives on this.&lt;/p&gt;

&lt;p&gt;And as always thank you for taking the time to read!&lt;/p&gt;

</description>
      <category>testing</category>
      <category>development</category>
      <category>programming</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Windows Vs Linux - The Numbers</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Tue, 12 Sep 2023 18:23:17 +0000</pubDate>
      <link>https://dev.to/rbevin777/windows-vs-linux-the-numbers-2okd</link>
      <guid>https://dev.to/rbevin777/windows-vs-linux-the-numbers-2okd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;A while ago I conducted some tests between Windows and Linux (Pop_OS! in this instance). The tests conducted were the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wake up from sleep.&lt;/li&gt;
&lt;li&gt;Geek bench scores.&lt;/li&gt;
&lt;li&gt;A range of gaming benchmarks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AND a simple software/programming test.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tests were conducted on the exact same hardware, the system I used had a dual boot setup to remove as many external factors as possible.&lt;/p&gt;

&lt;p&gt;Obviously I want to talk about the software test (hence the bold). &lt;/p&gt;

&lt;h2&gt;
  
  
  The "problem"
&lt;/h2&gt;

&lt;p&gt;Generally the reason to switch to Linux that is mentioned consistently is because&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It's free&lt;/li&gt;
&lt;li&gt;It's easier to get software tools setup&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;li&gt;Customization&lt;/li&gt;
&lt;li&gt;Community support&lt;/li&gt;
&lt;li&gt;Reliability&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This list is not exhaustive but these are the common reasons I see listed why someone should switch from Linux to windows. And I'm not here to say why you should or shouldn't switch. &lt;/p&gt;

&lt;p&gt;I'm here to show you numbers and let you make up your own mind. I intend to do this with an overlooked reason why programmers/developers/engineers switch to using Linux. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SPEED!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lbrPOgGZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wykm47nmv50ffot64rw6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lbrPOgGZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wykm47nmv50ffot64rw6.gif" alt="SPEED!" width="480" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;Again, this is a simple example but it correlates to my experience in general. Using the following 10 languages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rust&lt;/li&gt;
&lt;li&gt;Typescript&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;Bash&lt;/li&gt;
&lt;li&gt;C++&lt;/li&gt;
&lt;li&gt;C&lt;/li&gt;
&lt;li&gt;R&lt;/li&gt;
&lt;li&gt;JavaScript (Firefox)&lt;/li&gt;
&lt;li&gt;Go&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The test was to get each of these results to print the string "Bye\n" 1,000,000 times. As I say simple, but the results were interesting. I'm not going to add anymore, I will let the results speak for themselves and you may draw from them what you wish.&lt;/p&gt;

&lt;p&gt;I also encourage discourse below to share experiences and or concerns with this method to test.&lt;/p&gt;

&lt;p&gt;Thanks for reading! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qqjna7h4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pojd2wuldgrrv2q94car.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qqjna7h4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pojd2wuldgrrv2q94car.png" alt="Results" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>Installing Apt Packages Without Sudo</title>
      <dc:creator>Ryan Bevin</dc:creator>
      <pubDate>Wed, 06 Sep 2023 17:31:52 +0000</pubDate>
      <link>https://dev.to/rbevin777/installing-apt-packages-without-sudo-4dkm</link>
      <guid>https://dev.to/rbevin777/installing-apt-packages-without-sudo-4dkm</guid>
      <description>&lt;p&gt;To whom it may concern,&lt;/p&gt;

&lt;p&gt;This is my first post so apologies for the fan fair!&lt;/p&gt;

&lt;p&gt;Recently our company revoked our &lt;code&gt;sudo&lt;/code&gt; access (for reasons I will not go into as it may give me an ulcer). Yep. No mo' &lt;code&gt;sudo&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;This means any apt package (we use a system based on Ubuntu/Debian) we want to install, whether it be for testing purposes or to add it as part of our list of tools, we will need to get the password manually typed in by another person. This can slow down our day to day work and it turns out it has even added a road block into our automation. As you can imagine this can be frustrating for everyone involved.&lt;/p&gt;

&lt;p&gt;I am writing to inform you that if you have a similar problem there is a way around this issue. It requires a few commands in sequence and you will require &lt;code&gt;sudo&lt;/code&gt; one, last, time. So here goes!&lt;/p&gt;

&lt;p&gt;Let's get the &lt;code&gt;sudo&lt;/code&gt; install out of the way one last time. &lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Install apt-rdepends
&lt;/h4&gt;

&lt;p&gt;We need this package to get the other apt package dependancies.&lt;br&gt;
&lt;code&gt;sudo apt-get install apt-rdepends -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2: Download the .deb pacakge
&lt;/h4&gt;

&lt;p&gt;So now you should navigate to the folder you wish to install these packages under. Once you do this you can now download the pakcage and dependencies. In this example I use cflow as the package I wish to install. Replace this with whatever you wish.&lt;br&gt;
&lt;code&gt;apt-get download $(apt-rdepends cflow|grep -v "^ ")&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 3: Extract the .deb packages.
&lt;/h4&gt;

&lt;p&gt;You will need to extract each deb package individually which is annoying but this can be automated. You can extract the debian packages in the current directory using the following&lt;br&gt;
&lt;code&gt;dpkg -x deb_package.deb .&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 4: Adding the Packages to the PATH
&lt;/h4&gt;

&lt;p&gt;This can be done by adding the by updating the .profile file&lt;br&gt;
&lt;code&gt;export PATH="$PATH:$HOME/path/to/executable"&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 5: Refresh the .profile File
&lt;/h4&gt;

&lt;p&gt;When we update the .profile file with the PATH changes, this needs to be then refreshed. This can be done by running the following&lt;br&gt;
&lt;code&gt;source .profile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As a bonus for making it to the end here is the automated python version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;""" This is used to download and install apt packages and install them under the current user.
    This script is particularly useful for those who don't have sudo access."""

#!/usr/bin/python3.10.6

# we are disabling pylint checking some imports to save action minutes on github.
import subprocess
import os
import glob
import logging
import click  # pylint: disable=import-error


class LocalAptInstaller:
    """ This class is has all the functionality to download
        and install debian packages and add them to the PATH."""

    def __init__(self, apt_pkg, install_dir):
        self.apt_pkg_name = apt_pkg
        self.home_path = ""
        self.local_apps_folder_name = install_dir
        self.packages_list = [""]
        self.executables_list = [""]

    def download_package(self):
        """ This function uses apt-get to download our debian package locally."""
        logging.info("Downloading %s", self.apt_pkg_name)

        # We want to parse the package name here to get it's dependencies.
        # This allows us to pass in this string easier to subprocess.
        # Apparently this can download a package and all it's
        # dependancies = apt-get download $(apt-rdepends &amp;lt;package&amp;gt;|grep -v "^ ")
        package_parsed = f'$(apt-rdepends {self.apt_pkg_name}|grep -v "^ ")'

        # Need to navigate to the folder we want to install these packages too.
        # In our case its the user directory
        self.home_path = os.path.expanduser('~')
        os.chdir(self.home_path)

        # Then we want to make an local apps directory
        subprocess.call(
            ["mkdir", "-p", os.path.expanduser(f'~/{self.local_apps_folder_name}')])

        # Then we can go into that directory.
        os.chdir(f"{self.home_path}/{self.local_apps_folder_name}/")

        # And finally we can download our package and it's dependencies.
        cmd = subprocess.Popen(
            f'apt-get download {package_parsed}', shell=True)
        cmd.communicate()

    def install_deb_package(self):
        """ This function uses dpkg to install the package locally."""
        logging.info("Installing %s", self.apt_pkg_name)

        # first we need to get a list of all the packages and dependencies downloaded.
        self.packages_list = glob.glob(
            f"{self.home_path}/{self.local_apps_folder_name}/*.deb")

        # next we need to unpackage them.
        for package in self.packages_list:
            cmd = subprocess.Popen(
                f'dpkg -x {package} .', shell=True)
            cmd.communicate()

    def add_package_to_path(self):
        """ This function adds the package we've installed to PATH so it can be used."""
        logging.info("Adding %s to PATH", self.apt_pkg_name)

        # We need to get a list of executables from the packages
        # we've downloaded and the dependencies.
        executables = subprocess.check_output(
            "find . -type f -executable -print", stderr=subprocess.STDOUT,
            shell=True).decode("utf-8")

        # we need to get the executables into a list so they are manageable.
        self.executables_list = executables.splitlines()

        for idx, _ in enumerate(self.executables_list):
            # need to remove the file name and just point the path to the folder.
            executable_str = str(self.executables_list[idx]).rsplit('/', 1)[0]

            # we need to then concatenate the file executables together to the PATH variable
            self.executables_list[idx] = f"{self.local_apps_folder_name}/{executable_str[2:]}"

        # Now we need to open our .profile file
        with open(f"{self.home_path}/.profile", "a", encoding="utf8") as myfile:
            for idx, _ in enumerate(self.executables_list):
                # Then finally we can insert these into the
                # .profile file for these to be added to the PATH
                myfile.write(
                    f'\nexport PATH="$PATH:$HOME/{self.executables_list[idx]}"')


@click.command()
@click.option("--apt_pkg", default="cflow",
              help="The apt package you wish to download and install under the current user.")
@click.option("--install_dir", default="apps",
              help="You can give the name of the directroy you'd like to install the apps too.")
# pre-requisite run this once: sudo apt-get install apt-rdepends
def install_apt_pkg(apt_pkg, install_dir):
    """ This script is used download and dpkg apt packages
        locally if the user doesn't have sudo permissions """

    installer = LocalAptInstaller(apt_pkg, install_dir)
    try:
        installer.download_package()
        installer.install_deb_package()
        installer.add_package_to_path()
    except RuntimeError:
        logging.error("Install Failed!")


if __name__ == '__main__':
     # use this to log to a file.
     # logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.INFO)
     # logging.basicConfig(level=logging.INFO) # use this to log to the terminal.
     install_apt_pkg()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hopefully you get as much use from this as I am getting!&lt;/p&gt;

&lt;p&gt;Thanks for reading 😁&lt;/p&gt;

</description>
      <category>linux</category>
      <category>coding</category>
      <category>automation</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
