<?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: Andrew Colannino</title>
    <description>The latest articles on DEV Community by Andrew Colannino (@acolannino).</description>
    <link>https://dev.to/acolannino</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%2F185026%2Ff8da7a4b-7179-4683-b742-74207b474582.png</url>
      <title>DEV Community: Andrew Colannino</title>
      <link>https://dev.to/acolannino</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/acolannino"/>
    <language>en</language>
    <item>
      <title>How to harass your elected officials using TypeScript</title>
      <dc:creator>Andrew Colannino</dc:creator>
      <pubDate>Mon, 20 Jul 2020 12:28:08 +0000</pubDate>
      <link>https://dev.to/acolannino/how-to-harass-your-elected-officials-using-typescript-3l7n</link>
      <guid>https://dev.to/acolannino/how-to-harass-your-elected-officials-using-typescript-3l7n</guid>
      <description>&lt;p&gt;&lt;em&gt;This post originally appeared on my blog, which you can read &lt;a href="https://acolannino.io/blog/how-to-harass-your-elected-officials-using-typescript/"&gt;here&lt;/a&gt; in glorious dark theme.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Folks&lt;/p&gt;

&lt;p&gt;Friends&lt;/p&gt;

&lt;p&gt;Fellas and fellettes&lt;/p&gt;

&lt;p&gt;As you all know, it's apocalypse season. Now more than ever, in times like these, in uncertain times, and in hard times - We all need to come together and harass our elected officials.&lt;/p&gt;

&lt;p&gt;The US response to COVID-19 has been an abject failure, at each and every level of government. This is not controversial or interesting or technical, so I'm not going to write further about it.&lt;/p&gt;

&lt;p&gt;Instead, lets shift focus to &lt;a href="https://twitter.com/govraimondo"&gt;Gina Raimondo&lt;/a&gt;, and how I've made it my quarantine mission to bother her. You see, &lt;a href="https://www.facebook.com/GinaMRaimondo"&gt;Gina&lt;/a&gt; is the leader of the small state of Rhode Island. Rhode Island fits into my internet narrative because, for at least one point in time, it had &lt;a href="https://www.nbc-2.com/story/42302778/connecticut-rhode-island-only-two-states-reporting-decline-in-new-covid19-cases"&gt;record low COVID numbers&lt;/a&gt;, relative to the rest of the country. It had succeeded in flattening the curve.&lt;/p&gt;

&lt;p&gt;Enter &lt;a href="https://www.youtube.com/user/GinaRaimondo"&gt;Gina Raimondo&lt;/a&gt;. Gina saw these numbers, and thought they looked great. I agree Gina! Great numbers! On July 4th however, Gina decided to get bold, and started initiating &lt;a href="https://www.ri.gov/press/view/38720"&gt;&lt;strong&gt;"Phase 3"&lt;/strong&gt;&lt;/a&gt; or whatever the hell. This phase can basically be translated into &lt;em&gt;"hooray, corona times are over! party time!!!!!&lt;/em&gt; 🥳"&lt;/p&gt;

&lt;p&gt;This is an obviously bad idea, especially with the rest of the country still floundering around in the COVID swamp like fools. I've been pretty frustrated by Gina's actions and statements, so I tried channeling that into something &lt;em&gt;"productive"&lt;/em&gt;(?) with my &lt;a href="https://corona-gina.app/"&gt;dumb web app&lt;/a&gt;. It's an expression of my anger and pure bewilderment of this government, and I had fun making it. Let's talk about how I did it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://corona-gina.app/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HkshLzu9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://acolannino.io/blog/how-to-harass-your-elected-officials-using-typescript/gina-app.gif" alt="gina-app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TypeScript is good and you should use it
&lt;/h3&gt;

&lt;p&gt;When harassing your local government: type-safety is of utmost importance.&lt;/p&gt;

&lt;p&gt;I shouldn't need to espouse the virtues of TypeScript to you by now. You've undoubtedly &lt;a href="https://slack.engineering/typescript-at-slack-a81307fa288d"&gt;seen&lt;/a&gt; &lt;a href="https://www.reddit.com/r/typescript/comments/aofcik/38_of_bugs_at_airbnb_could_have_been_prevented_by/"&gt;a trillion&lt;/a&gt; &lt;a href="https://medium.com/@jtomaszewski/why-typescript-is-the-best-way-to-write-front-end-in-2019-feb855f9b164"&gt;articles&lt;/a&gt; with the exact same premise. I'll just ask... If you're not using TypeScript in 2020: What's wrong with you?&lt;/p&gt;

&lt;p&gt;To give a short explanation of what this even is: TypeScript is a &lt;em&gt;"typed superset"&lt;/em&gt; of JavaScript. That's an overly complex way of saying that &lt;strong&gt;all JavaScript programs &lt;em&gt;are also&lt;/em&gt; TypeScript programs&lt;/strong&gt;. TypeScript is not a magical new language. It is just some really nice features and keywords slathered over JavaScript that, in my opinion, essentially "fix" the language and make me want to use it.&lt;/p&gt;

&lt;p&gt;The biggest and boldest benefit of using TypeScript is the full &lt;a href="https://en.wikipedia.org/wiki/Intelligent_code_completion#IntelliSense"&gt;intellisense&lt;/a&gt; you get inside of the &lt;a href="https://code.visualstudio.com/"&gt;VS Code&lt;/a&gt; editor. Intellisense is like autocomplete on your phone, except that it works. It brings the coding experience much closer to C#, in that methods actually &lt;em&gt;tell you&lt;/em&gt; what the hell they want, and the editor will screech if there's a problem. This is unlike JavaScript, which often feels like coding in a feedback-less empty and silent bottomless hole of despair and doom. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;"The only people who don't like TypeScript are the people who haven't tried it yet!"&lt;/em&gt; - me, 2020&lt;/p&gt;

&lt;h4&gt;
  
  
  A case study in bad corporate decision-making
&lt;/h4&gt;

&lt;p&gt;Not everyone shares my beliefs. Pretend, for the sake of argument, that you are a high-level executive at a leading fintech company. A team of smart people in this company do some research for their next project, and decide to use TypeScript as their language of choice. Neat! I am very in favor of this, and so are the higher-ups who approved this team's choice. They start developing the app in TypeScript, enjoying the freedom and simplicity.&lt;/p&gt;

&lt;p&gt;Enter the TypeScript-hating executive. This executive is not afraid to make his case against TypeScript to each and every engineer of the company. He does just this in a large conference call. His reasoning for why the team &lt;strong&gt;must&lt;/strong&gt; switch back to plain JavaScript &lt;strong&gt;immediately&lt;/strong&gt; are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you can't learn JavaScript you're bad and shouldn't be hired&lt;/li&gt;
&lt;li&gt;Something something extra build-pipeline steps&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Even though they did half the project in TypeScript, they were forced to strip away all their types. This story is, to me, a great tragedy, much sadder than whatever garbage Shakespeare ever put out. It genuinely upsets me that - because &lt;strong&gt;one&lt;/strong&gt; high-up dude had a biased and incorrect understanding of a technology - a team had to stop what they were doing and make their software actively worse halfway through development.&lt;/p&gt;

&lt;p&gt;My point with this big long anecdote is: Fight for the technology that you think is best. In this case, the people in this story &lt;em&gt;did&lt;/em&gt; fight to use TypeScript, and still lost. Management sided with the executive here, and that's a shame. Thankfully for me however, my bad web app is a purely personal project, so I can just go nuts with it and do whatever.&lt;/p&gt;

&lt;h3&gt;
  
  
  Going nuts with it and doing whatever - Why I'm using &lt;strong&gt;Preact&lt;/strong&gt; instead of &lt;strong&gt;React&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For my UI layer, I'm using &lt;strong&gt;Preact&lt;/strong&gt; instead of React. Note the all-important &lt;strong&gt;P&lt;/strong&gt; here. This stands for &lt;strong&gt;petite&lt;/strong&gt;, meaning Preact is a &lt;em&gt;petite&lt;/em&gt; React. Essentially, it enables the same great developer experience of React, with the added benefit of getting to ship a much less bloated runtime to users.&lt;/p&gt;

&lt;p&gt;Preact accomplishes this by doing away with a lot of the React cruft, namely the &lt;a href="https://reactjs.org/docs/events.html"&gt;reimplementation of every standard browser event into "synthetic events"&lt;/a&gt;. Facebook had a good reason to do this for React: They wanted to support legacy Internet Explorer, for all the Facebook grannies and gramps out there.&lt;/p&gt;

&lt;p&gt;This is fine and well and "noble" I guess, but I think it's becoming rapidly unneeded to degrade your app by supporting legacy browsers. For the most part, everyone's switched to their phones, which usually come preinstalled with &lt;em&gt;evergreen&lt;/em&gt; browsers like Chrome or Safari. Second, even if there are some stragglers out there on their old Gateway's running IE 6, we really need to draw the backwards-compatibility line &lt;em&gt;somewhere&lt;/em&gt;, ideally before we go &lt;a href="https://www.wired.com/2017/05/still-use-windows-xp-prepare-worst/"&gt;totally bonkers, like some people&lt;/a&gt;. My deepest condolences go out to all the Gateway fans.&lt;/p&gt;

&lt;h3&gt;
  
  
  Yarn good, npm bad
&lt;/h3&gt;

&lt;p&gt;I'm using the &lt;a href="https://yarnpkg.com/"&gt;Yarn command-line tool&lt;/a&gt;, instead of the more popular &lt;a href="https://docs.npmjs.com/cli/npm"&gt;npm&lt;/a&gt;. I'd really like to ask you all, &lt;a href="https://iamturns.com/yarn-vs-npm-2018/"&gt;why are you still using npm in 2020?&lt;/a&gt; Yarn has a much more pleasant-looking CLI (command-line interface, pronounced like CLEE!), and to me, still feels faster than npm. Have you ever really &lt;em&gt;looked&lt;/em&gt; at the output that npm spews all over the sacred console? It's a disgrace. The colors were chosen seemingly at random, whenever it does &lt;em&gt;anything at all&lt;/em&gt; it &lt;strong&gt;flashes&lt;/strong&gt; and &lt;strong&gt;SCREECHES&lt;/strong&gt;, and it draws all sorts of ASCII art rectangles whenever something needs an update.&lt;/p&gt;

&lt;p&gt;My complaints here seems arbitrary and stupid, and sure, I'll concede both of those points. However, to me, these things matter. I'm a &lt;em&gt;"visual person"&lt;/em&gt;, for whatever that's worth, so if I'm going to pick a CLI to stare at all day for hours-on-end, it better not look like ass. Like npm. Yarn has subtle, soft colors, smoothly-animated progress spinners, and the lock files look a lot cleaner to my eyes. Of course, you should never look directly at the lock files with your unworthy human eyes, but sometimes I like to check up on what &lt;strong&gt;the machine&lt;/strong&gt; is doing.&lt;/p&gt;

&lt;p&gt;Yes, it's maintained by Facebook, a &lt;a href="https://www.theguardian.com/technology/2020/jul/10/facebook-ad-boycott-mark-zuckerberg-activism-change"&gt;very&lt;/a&gt; &lt;em&gt;&lt;a href="https://www.theverge.com/2019/2/25/18229714/cognizant-facebook-content-moderator-interviews-trauma-working-conditions-arizona"&gt;not&lt;/a&gt; &lt;a href="https://www.motherjones.com/politics/2013/10/facebook-personal-data-online-privacy-social-norm/"&gt;good&lt;/a&gt;&lt;/em&gt; company. But guess what? &lt;a href="https://github.blog/2020-04-15-npm-has-joined-github/"&gt;npm&lt;/a&gt; is owned by Microsoft now, and they are also an organization that will burn in the &lt;a href="https://techcrunch.com/2019/11/13/github-faces-more-resignations-in-light-of-ice-contract/"&gt;corporate&lt;/a&gt; &lt;a href="https://www.theverge.com/2018/4/27/17293650/microsoft-recycler-jail-sentence-windows-software-counterfeiting-response"&gt;version&lt;/a&gt; &lt;a href="https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish"&gt;of hell&lt;/a&gt;. It's 2020, and all your fav CLI tools are cancelled. Congrats!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fai7gNSZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://acolannino.io/blog/how-to-harass-your-elected-officials-using-typescript/sonic.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fai7gNSZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://acolannino.io/blog/how-to-harass-your-elected-officials-using-typescript/sonic.jpg" alt="sonic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pair program whenever you can
&lt;/h3&gt;

&lt;p&gt;In the grand-scheme of things, you don't matter. I don't matter either. Do &lt;a href="https://en.wikipedia.org/wiki/Pair_programming"&gt;pair programming&lt;/a&gt;. Or, do the much more extreme, but still great in its own way, &lt;a href="https://mobprogramming.org/"&gt;mob programming&lt;/a&gt;. I have enough pop-off energy on this subject to write an entire blog series on it, but I won't do that now. Instead, I'll keep this section relevant.&lt;/p&gt;

&lt;p&gt;I had an idea for something to implement - I wanted the COVID cases to &lt;em&gt;count up&lt;/em&gt; over time, rather than immediately jump to the number on page load like it was doing before. My buddy was available to pair at the time, so we started working on the feature. I was a bit fried from it being 7pm after a long workday, and so was my co-programmer. However, we each melded our minds together to complete the feature. While we were both exhausted: I used my knowledge of the hooks API to get the timer itself working, and he used &lt;em&gt;deductive reasoning&lt;/em&gt; to figure out that the animation should be &lt;strong&gt;exponential&lt;/strong&gt;, rather than animate via pre-cached speeds like we had at first. The code we wrote that day is &lt;a href="https://github.com/akc8012/gina-rona-app"&gt;right here&lt;/a&gt;, and it really turned out great. I don't think it would have been possible using the traditional "everybody split up!" methodology of software development.&lt;/p&gt;

&lt;p&gt;A younger, less-mature me would have been bummed that I couldn't figure out the exponential animation by myself. Now, &lt;strong&gt;2020 Apocalypse Year Andrew&lt;/strong&gt; knows better. I don't matter, and neither do you. The software matters. To make the best possible software, one must throw away their ego. Destroy your ego. Throw it in a box, and throw that box off a cliff. Into a fire. Acid fire. Where we're going, you won't be needing that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Parcel good, webpack bad
&lt;/h3&gt;

&lt;p&gt;In the end, everything had to be bundled together. TypeScript had to be &lt;em&gt;transpiled&lt;/em&gt; down to JavaScript, source-code minified, and assets included into the mix. My bundler of choice was &lt;a href="https://parceljs.org/"&gt;Parcel&lt;/a&gt;, instead of the more popular &lt;a href="https://webpack.js.org/"&gt;webpack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Parcel is just webpack, but not a mess. I know it's comforting to use these "super simple CLIs" like create-react-app, preact-cli, or gatsby-cli, but I strongly advise you to reconsider. These all use webpack under the hood. Here's some recent &lt;a href="https://www.youtube.com/watch?v=LyUN40weqIk"&gt;footage I found of the average webpack config file&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What does this mean for you? And why should you care? Well, let's say you want to customize something in the bundler configuration, anything at all. Want to use &lt;a href="https://reasonml.github.io/"&gt;ReasonML&lt;/a&gt; instead of TypeScript? Great, go nuts, I don't judge. Now, if you used create-react-app, you need to do something called &lt;a href="https://create-react-app.dev/docs/available-scripts#npm-run-eject"&gt;ejecting&lt;/a&gt;. This is the equivalent of slamming the eject button in a helicopter and tumbling out of the air unto your inevitable splat. Don't do this.&lt;/p&gt;

&lt;p&gt;Instead, just use Parcel. Parcel is more like... taking the train. It's pretty safe, &lt;em&gt;probably&lt;/em&gt; not going to crash, and you don't have to pilot the damn thing. It just goes and goes, and all you've got to do is remember your stop. It's a "zero-config solution", or at least it tries its darndest to be. If you've got a TypeScript file, Parcel deduces that you like type-safety, so without any further developer action, it figures out how to transpile that for you. I think Parcel really &lt;em&gt;tied my whole app together&lt;/em&gt;, and kept me sane while making it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I mostly focused on the technical stuff here, because it's what I'm decent at, and it's fun. However, we should not lose sight of the person who brought us all together here today: &lt;a href="https://www.instagram.com/govraimondo/"&gt;Gina Raimondo&lt;/a&gt;. I hope all my bad internet posts catch her attention and annoy her. I encourage you to annoy her too. Please, actually, go do that. I think she is bad.&lt;/p&gt;

&lt;p&gt;If you live in the US, you most likely also have an incompetent governor who is floundering the response to COVID-19. I highly encourage you to &lt;a href="https://github.com/akc8012/gina-rona-app"&gt;&lt;em&gt;fork me on GitHub!&lt;/em&gt;&lt;/a&gt;, and make your very own web app to heckle local leaders with. They all could use a lot more of that these days.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>react</category>
      <category>npm</category>
      <category>node</category>
    </item>
    <item>
      <title>How I struggled to build a Nextcloud server (and won!)</title>
      <dc:creator>Andrew Colannino</dc:creator>
      <pubDate>Thu, 02 Jul 2020 03:22:08 +0000</pubDate>
      <link>https://dev.to/acolannino/how-i-struggled-to-build-a-nextcloud-server-and-won-4gkf</link>
      <guid>https://dev.to/acolannino/how-i-struggled-to-build-a-nextcloud-server-and-won-4gkf</guid>
      <description>&lt;p&gt;&lt;em&gt;This post originally appeared on my blog, which you can read &lt;a href="https://acolannino.io/blog/how-i-struggled-to-build-a-nextcloud-server-and-won/"&gt;here&lt;/a&gt; in glorious dark theme.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why am I doing this to myself?
&lt;/h3&gt;

&lt;p&gt;I really like taking notes. Notes are an extension of my stupid brain, which can't remember a &lt;em&gt;damn&lt;/em&gt; thing on its own. All these notes were being stored on Google's servers, which &lt;a href="https://en.wikipedia.org/wiki/PRISM_(surveillance_program)"&gt;didn't&lt;/a&gt; &lt;a href="https://www.gnu.org/proprietary/malware-google.en.html"&gt;seem like&lt;/a&gt; &lt;a href="https://www.washingtonpost.com/technology/2019/06/21/google-chrome-has-become-surveillance-software-its-time-switch/"&gt;the best&lt;/a&gt; &lt;a href="https://www.eff.org/deeplinks/2020/03/google-says-it-doesnt-sell-your-data-heres-how-company-shares-monetizes-and"&gt;idea&lt;/a&gt;. And it wasn't just notes. Pictures, videos, miscellaneous files, I was giving it all to Google for free.&lt;/p&gt;

&lt;p&gt;Since my notes contain &lt;em&gt;my bad ideas, and they are&lt;/em&gt; &lt;strong&gt;&lt;em&gt;my&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;bad ideas alone&lt;/em&gt;, I wanted to take back control of my data. After researching ways to do such a thing (through the Google search engine of course), my best option seemed to be a &lt;a href="https://nextcloud.com/"&gt;Nextcloud server&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Nextcloud has all the niceties of a Google Drive or Dropbox, but you host it yourself on your own hardware, and no one's allowed to snoop. This sounded great! This'll be so easy! I'll get this running in just a couple minutes!&lt;/p&gt;

&lt;p&gt;Maybe you guessed it from the length of this article, but... this was not the case. Building and setting up this server was a nightmare hellhole, and I'm here today to share my hell with you, the reader, for free!&lt;/p&gt;

&lt;p&gt;This isn't so much a guide or tutorial - more just me explaining (and venting about) the massive effort it took to set this damn thing up. I hope somebody someday learns something from my suffering, or is maybe just entertained.&lt;/p&gt;

&lt;h3&gt;
  
  
  The hardware
&lt;/h3&gt;

&lt;p&gt;I had been interested in doing &lt;em&gt;something, anything at all&lt;/em&gt;, with a &lt;a href="https://www.raspberrypi.org/"&gt;Raspberry Pi&lt;/a&gt; for a while, so this was my excuse. Beyond that, I just followed &lt;a href="https://magpi.raspberrypi.org/articles/build-a-raspberry-pi-nas"&gt;this great article from a Pi magazine&lt;/a&gt; for my hardware choices. If you're wondering what hardware I used, look there. I copied it exactly. Plus, c'mon, look how cute everything looks stacked up like that! A literal "stack"! Ha!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xyfwaMIG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/akc8012/acolannino.io/master/content/blog/how-I-struggled-to-build-a-nextcloud-server-and-won/nextbox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xyfwaMIG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/akc8012/acolannino.io/master/content/blog/how-I-struggled-to-build-a-nextcloud-server-and-won/nextbox.png" alt="nextbox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One part the guide doesn't explain very well was the "USB powered hub" - both why you need one, and what that actually is. Is it a hub powered by USB? A USB powered by a "hub"? What is a "hub"? Maybe it seems obvious to you, and maybe I was just sleep deprived at the time, but I was having trouble wrapping my smooth brain around this concept.&lt;/p&gt;

&lt;p&gt;Turns out, the USB hub is simply needed to provide power to the two hard drives, rather than the power going to the Pi &lt;em&gt;and&lt;/em&gt; the drives. I have no idea if this was really necessary, but it makes me feel 10% more confident my drives won't crap out at any moment, and that helps me go to sleep at night.&lt;/p&gt;

&lt;h3&gt;
  
  
  RAID 1, or whatever that means
&lt;/h3&gt;

&lt;p&gt;Here I was, all ready to go in fulfilling my long-held dream of running my own little server. Then my stupid coworker comes in, and asks "hey, what if your drive fails? what will you do then?" and ruins all of my fun. &lt;/p&gt;

&lt;p&gt;He tells me I should do "RAID", which is apparently all the rage. RAID stands for "Redundant, Awesome... I dunno", and was invented on a whim by &lt;a href="https://en.wikipedia.org/wiki/RAID#History"&gt;some random nerds in the 80's&lt;/a&gt;. To attempt to give an actual explanation: Using a RAID 1 setup means you get data redundancy, as it will constantly mirror the drives. If one drive craps out, the other drive will still have all the same data, so you just replace the broken one and go about your day as normal. The downside of RAID 1 is you're getting half the storage capacity that you paid for, but I figured 1 terabyte was large enough to store plenty of memes.&lt;/p&gt;

&lt;p&gt;Setting up the RAID array was by far the most pain-free part of the process. Actually, it was the &lt;em&gt;only&lt;/em&gt; pain-free part, the rest was pure suffering. I recommend doing this for fun if you're bored on a Friday evening. It's cathartic, and the only part of this whole thing that &lt;a href="https://www.youtube.com/watch?v=nVqcxarP9J4"&gt;just worked&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;All I had to do was run some cute little commands from the guide, and I was golden. I didn't fully understand the intricacies of everything I was doing, and the command-line interfaces for some of these programs were absolutely wild (press 'n' for a new partition, and 'p' for a "primary partition"? Really &lt;code&gt;fdisk&lt;/code&gt;? Does this make you happy?), but other than that, it was all smooth sailing.&lt;/p&gt;

&lt;p&gt;I should note - no one on the internet really cared to explain how a RAID setup should work with Nextcloud. Eventually I figured this out - the RAID array is seen by the OS as one device, so just politely ask Nextcloud to use that instead of the SD card. I ended up having to &lt;a href="https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-data-directory"&gt;create a symlink from Nextcloud's data directory to a directory on my RAID device&lt;/a&gt;, but this wasn't the worst thing I had to suffer through.&lt;/p&gt;

&lt;h3&gt;
  
  
  Big Pixel Energy destroys my WiFi
&lt;/h3&gt;

&lt;p&gt;So here I am, all proud and happy of my brand new Raspberry Pi running a fresh &lt;del&gt;Raspbian&lt;/del&gt; Raspberry Pi OS. As I was setting up the RAID array, downloading lots of cute &lt;a href="https://en.wikipedia.org/wiki/Unix_philosophy"&gt;UNIX-style utilities&lt;/a&gt;, the WiFi starts to cut in-and-out. This has been a problem on my other main machines ever since I switched them to Linux, so I figured it was the &lt;em&gt;mysterious Intel WiFi+bluetooth death bug&lt;/em&gt; plaguing me on yet another machine.&lt;/p&gt;

&lt;p&gt;I did some more digging, and found what I believe to be the truth (or, as close as &lt;em&gt;I'll&lt;/em&gt; ever get to the truth). There appears to be a &lt;a href="https://www.raspberrypi.org/forums/viewtopic.php?t=247982"&gt;widely reported problem with the Pi 4&lt;/a&gt; where the signals coming out from the HDMI (which are shaped like squares?) are the same frequency(?) as the WiFi. So, if your display resolution is pumped up high enough, and that HDMI is cranking out lots of square signals, &lt;a href="https://www.raspberrypi.org/forums/viewtopic.php?p=1514642&amp;amp;sid=b811be4b798c7ab50d7626c691b5cc26#p1514642"&gt;the WiFi gets totally borked&lt;/a&gt;. Neat.&lt;/p&gt;

&lt;p&gt;This is clearly absurd, and I hate it. Hardware is bad, and everyone saying "programmers gotta learn hardware too!!!" should get off my lawn. At first I started following the internet's advice to simply "lower your screen resolution so the WiFi goes fast", but this became tiring on the eyes (especially with the added problem of &lt;a href="https://www.raspberrypi.org/forums/viewtopic.php?t=250534"&gt;not being able to use redshift on the Pi&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Even though I was reluctant to at first, eventually I started controlling my Pi via an SSH terminal from another machine to avoid this problem entirely. Boy oh boy, was this a joyful discovery. Not only was I freed from whatever stupid resolution the WiFi demanded, but I could also use my beloved blue-light filter to prevent my retinas from burning up. Sure, I had no GUI, but learning to do everything through the terminal came easily enough, and once I got there, I felt like some kind of computer wiz-kid.&lt;/p&gt;

&lt;h3&gt;
  
  
  The installation
&lt;/h3&gt;

&lt;p&gt;After the RAID was set up and I got SSH going, it was time to install Nextcloud. This proved to be shockingly difficult. There can't just be a little &lt;code&gt;sudo apt install nextcloud&lt;/code&gt; action, no no no no no. You need to install each little bit yourself, by hand, and glue every piece together (&lt;code&gt;nextcloud&lt;/code&gt; isn't even in the apt repository, of course you have to download / unpack something called a "tarball" yourself).&lt;/p&gt;

&lt;h4&gt;
  
  
  Attempt 1: Snap!
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://snapcraft.io/"&gt;Snap&lt;/a&gt; is Canonical's (maker of Ubuntu) locked-down little sandbox for Linux apps. The word "container" is thrown around when describing it, and I have no idea if that's correct, but I sure as heck wouldn't recommend the &lt;a href="https://snapcraft.io/nextcloud"&gt;official Nextcloud snap&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The major selling point of snap is that it bundles together an application's dependencies, so it will &lt;em&gt;just work&lt;/em&gt; on any Linux distribution. This sounds great! Sign me up! I'm lazy and hate installing my own dependencies! Who the heck wants to do that? Shell scripts, that's who.&lt;/p&gt;

&lt;p&gt;Problem is, this doesn't &lt;em&gt;really&lt;/em&gt; work on every distro, and in fact, it doesn't work on the latest Raspberry Pi OS. Do I know why? No. The Nextcloud snap &lt;a href="https://en.wikipedia.org/wiki/Fail-silent_system"&gt;failed silently&lt;/a&gt; before starting up, and it was too shy to tell me why. Cool.&lt;/p&gt;

&lt;h4&gt;
  
  
  Attempt 2: Some shell scripts I found
&lt;/h4&gt;

&lt;p&gt;At this stage, I was still committed to being a lazy jerk. There's no way in heck I would manually install &lt;a href="https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation"&gt;30-something php modules&lt;/a&gt; by hand. So, I found a &lt;a href="https://ownyourbits.com/nextcloudpi/"&gt;flashy looking site that claimed to have the scripts for me&lt;/a&gt;. It didn't work. The script took multiple runs to actually complete itself, and after the 5th or so attempt, it seemed happy. I went to the web GUI, told it to "initialize", and it kinda hung out there for a while. I went to take a walk, and when I came back and it was still pretending to initialize. &lt;/p&gt;

&lt;p&gt;I found another &lt;a href="https://github.com/nextcloud/vm"&gt;official-sounding shell script&lt;/a&gt;, in a last-ditch attempt at being lazy. At least this script had the courage to fail immediately, as it's &lt;a href="https://github.com/nextcloud/vm/blob/master/nextcloud_install_production.sh/#L83"&gt;hardcoded to only work specifically on Ubuntu 20.04&lt;/a&gt;. Would have been real nice if it had told me that up-front, but hey, I'm not the one going through the trouble of writing all these (failing) shell scripts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Attempt 3: The hard way
&lt;/h4&gt;

&lt;p&gt;Being lazy clearly wasn't going so well. By now several days had passed, and all I had to show for myself was a whole terabyte of nothing. Worse yet, the shell scripts I ran had spread their little tentacles all over my pure OS install, so I knew I'd have trouble in the future if I left all that cruft in-place. I decided to re-image my OS, and that I would repeat the RAID setup once I got Nextcloud going.&lt;/p&gt;

&lt;p&gt;As previously mentioned, the &lt;a href="https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html"&gt;recommended installation&lt;/a&gt; wants you to install and hook each bit up together yourself. This approach made some sense as I learned (sort of, vaguely) more about how Nextcloud works - It's running on a webserver directly on your machine, handling all the networking and whatnot, with a full-on SQL database and lots of PHP magic happening too. So, it's understandable that Nextcloud has to spread it's mischievous claws in each and every crevice of your OS.&lt;/p&gt;

&lt;p&gt;I followed the &lt;a href="https://docs.nextcloud.com/server/latest/admin_manual/index.html"&gt;Nextcloud documentation&lt;/a&gt;, which sure does exist. In their defense, all of their software is &lt;a href="https://en.wikipedia.org/wiki/Free_and_open-source_software"&gt;free and open&lt;/a&gt;, including the docs, so I could have submitted any number of changes, and yet here I am selfishly writing this blog. The worst part of this process was the aforementioned php modules, which had to be installed one-by-one, and had mismatched names compared to the Debian repository. I had these all installed after about an hour, and I remember listening to a podcast in the background while suffering through it.&lt;/p&gt;

&lt;p&gt;After &lt;code&gt;apt install&lt;/code&gt;ing every module (seriously, why doesn't php have it's own package manager?!), then gliding through the initialization of Nextcloud with &lt;code&gt;occ&lt;/code&gt;, my server was working. The &lt;em&gt;Nextcloud Hub&lt;/em&gt; web interface greeted me with the most pleasant design and animations I had seen in quite some time. &lt;strong&gt;It was over. I had won.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;All in all, I sure did have a time. The admin page still won't stop whining about a "PHP memory limit". I don't even know what that means. If PHP is running out of memory, I wish it would just ask the OS for more. Really I don't mind, I've got plenty. I thought maybe they had some good reason for annoying me, but as I read more about the &lt;a href="https://en.wikipedia.org/wiki/PHP#Early_history"&gt;haphazardous history of PHP&lt;/a&gt;, I decided to change my mind. &lt;em&gt;"I have absolutely no idea how to write a programming language"&lt;/em&gt;, said the writer of the PHP programming language.&lt;/p&gt;

&lt;p&gt;Maybe my takeaway from all this is that nobody knows how to do anything. I certainly still don't, but at least I now have a functioning home server with several gigabytes of memes loaded on it.&lt;/p&gt;

&lt;p&gt;If you're new to Linux (or bash I guess), I'm not sure I'd recommend doing any of this. I had been using Linux on my main machines for the better part of a year, and have gotten sorta okay at using the terminal. Linux makes me smile, and plopping into an SSH terminal and clacking away at the keyboard brings me joy, but it might not do the same for you. I dunno. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you&lt;/em&gt; &lt;strong&gt;&lt;em&gt;like&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;this post, you'll&lt;/em&gt; &lt;strong&gt;&lt;em&gt;love&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;my next one: &lt;a href="https://dev.to/acolannino/how-to-harass-your-elected-officials-using-typescript-3l7n"&gt;How to harass your elected officials using TypeScript &lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cloud</category>
      <category>raspberrypi</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
