<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Matei-Alexandru Gardus</title>
        <link>undefined</link>
        <description>A procrastinator's refuge.</description>
        <lastBuildDate>Tue, 28 Oct 2025 05:03:58 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>Matei-Alexandru Gardus</title>
            <url>undefined/favicon.ico</url>
            <link>undefined</link>
        </image>
        <copyright>All rights reserved 2025</copyright>
        <item>
            <title><![CDATA[Talking is So Important]]></title>
            <link>undefined/articles/talking-is-so-important</link>
            <guid>undefined/articles/talking-is-so-important</guid>
            <pubDate>Thu, 17 Nov 2022 00:00:00 GMT</pubDate>
            <description><![CDATA[I continue to be amazed at how much communication and social skills improve your life. Here’s some anecdotes about that.]]></description>
            <content:encoded><![CDATA[<p>Every once in a while, I reminisce about my days in middle and high school. Whenever I do, I remember the completely transformative period between the two and how most of my personality today was formed at the transition period between them. It’s fascinating to think about because of two reasons. Firstly, I can’t quite pin down the specific changes to my personality that made me who I am today, and that’s probably due to our bias towards revisioning our history. (rose-tinted glasses, you know?) Secondly, it’s ridiculous that it would be the time I remember being <em>the most</em> transformative.</p>
<p>I mean, let’s be honest. I’m in my fourth year of college now, and I can safely say I am an <strong>entirely</strong> different person to who I was <em>at the end of middle school.</em> So, how come I don’t easily identify any other period of time when my personality has changed significantly? Inspiration struck me as to why this past week.</p>
<h2>I learned to talk</h2>
<p>I’ve always had trouble talking properly. There was a time, when I was young, that I would primarily communicate in grunts, cries, and other animal-like noises. My mother somehow understood my needs at the time, much to my father’s amazement, so I kept doing it; I really didn’t need to talk to anyone else. In kindergarten, though, grunting to ask for my turn with a toy really didn’t quite work so well, so I had to adapt and actually learn to speak. Turns out that took me a while, and I finally managed to talk a little better in the last year of kindergarten.</p>
<p>That being said, it was just enough to get by, so you can imagine I had a tough time making friends. I did get better over time, but I remember realizing what classic social skill paradigms are important specifically at just about the end of middle school. I learned how to be humorous, how to read body language and a few other things, and all of a sudden, my social circles grew, and I was so much happier for it. Not only that, but since then, I’ve been on a constant journey of finding ways to improve myself.</p>
<p>I finally learned how to talk at the end of middle school, perhaps began talking too much, and as my friends can attest, <em>I haven’t stopped since.</em> You might ask why I haven’t stopped. Well…</p>
<h2>Talking is awesome!</h2>
<p>Humans can’t use telepathy, so just about the only thing we have to replace it is talking. And excepting the cool fact that <a href="https://www.youtube.com/watch?v=qFuu6uqy9lc" title="Language is indeed cool.">language is amazing</a>, we have to realize that <em>it’s insane how awesome it is to know to socialize.</em> Every day we pass by so many people, each with their unique fractal of personality and experiences, all with lessons to learn, and without talking, we wouldn’t get to see any of it.</p>
<p>Talking opens doors for you. Without it, after all, no one would know what you’re capable of, and without it, you wouldn’t get that dream internship you always wanted. Talking can make people laugh, it can brighten their day, or perhaps even your own. Heck, I’m 90% sure everyone talks to <em>themselves</em>, and it helps you do stuff. I am not the only one saying that, <a href="https://www.nature.com/articles/s41598-021-94328-9" title="A Nature article about how talking to yourself can improve cognitive performance.">there&#x27;s even studies for it</a>. Not to mention the <em>classic</em> solution to debugging in tech; <a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging" title="Here&#x27;s a link to Rubber Duck Debugging.">talking to an inanimate object</a>.</p>
<p>And yeah, everyone knows how to <em>literally</em> talk; it’s literally a requirement to live, since we are social creatures after all. Arguably, my grunting as a child was talking. But it wasn’t talking within the constructs of our society; I didn’t have the proper social skills. Once I improved them, things got better. At some point, I can now mold the talking of those around me by conforming first<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup>. It’s great!</p>
<h2>Talking is a fun puzzle</h2>
<p>Everyone talks differently, and let’s face it, I’m not just talking about the language you speak. After all, we’re told plenty of times that non-verbal communication is vital, and that a lot of our communication is based on it<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="true" aria-describedby="footnote-label">2</a></sup>. And since it’s definitely different from spoken language, it’s fun to read!</p>
<p>Learning each person’s unique communication style is interesting. Everyone has intricacies in their nervous tics, meaning behind their arm gestures. Even the slightest change in glare can speak to their emotions. This is not only useful to learn, it’s fun to use for humorous effects! My roommate and I frequently throw “death stares” at each other as part of our every-day banter, and we love it. It’s entertaining!</p>
<p>And talking is not just a fun puzzle to solve. Solving social puzzles doesn’t have to be a hobby; learning to do it well is <em>directly</em> applicable in just about every field you will ever work in.</p>
<h2>Talking solves just about everything</h2>
<p>Careers are made or broken by your ability to communicate clearly. Lawyers communicate constantly under the form of debate (at least in the US adversarial court system). In mathematics, proof writing well is essential to transfer knowledge in the field. In tech, the ability to communicate technical implementation is a core interview metric for hiring, and the ability to write proper documentation is praised immensely. And yeah, the above examples also include writing, which is not the same as talking<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="true" aria-describedby="footnote-label">3</a></sup>, but knowing how to articulate yourself efficiently to others will just about directly translate to writing precisely. And as Albert Einstein said (or some other unknown smart person):</p>
<blockquote>
<p>“If you can&#x27;t explain it to a six-year-old, you don&#x27;t understand it yourself.”</p>
</blockquote>
<p>Communicating knowledge simultaneously helps you learn, just like rubber duck debugging. And talking is not just impactful at your job, it’s impactful everywhere!</p>
<p>Talking about your thoughts propagates them. Knowing how to do it properly changes minds, it shapes the world. Just look at the Civil Rights Movement or any famous speech, where the mere words of an individual inspired people to change their habits and to rise up for a higher cause. The pen is mightier than the sword indeed.</p>
<p>And talking doesn’t just have to solve issues of massive scope; talking helps solve issues in your personal life too. From personal experience, 80% of the relationship issues I notice on r/Relationships, or from my friends’ circles, could be solved by communicating your concerns and reaching a reasonable conclusion. It’s even more fun when talking makes new friendships. Introducing friends to others makes this an interesting trading card game of some sort, where we exchange friends with each other and in turn create a more profound bond in the process. Plus, everyone wins by gaining more connections and having even more opportunities to learn new things in the future. It’s a win-win!</p>
<h2>Talking shapes you</h2>
<p>If there’s one thing for you to take away from this post, it’s that by far the most high-impact skill you can improve to make your life better is your social skills. Learning how to make friends, communicate clearly, interpret body language and be fun to be around will almost always improve your life in just about every situation you could be in. Additionally, it’s hard to overstate just how much talking changes you as a person.</p>
<p>We are the average of the people we surround ourselves with, and this is precisely why I find it so hard to define when my personality has changed. Sure, I have changed as a person in recent times, but not because of a conscious decision to change something huge about myself. I’ve changed because I’ve met new people, made new friends, and learned a lesson from all of them. As such, the small changes compounded in an entirely different person over time.</p>
<p>We can change ourselves for the better, and we must not forget that others change us too, in both good ways and bad. But we can only do that if we socialize.</p>
<p>So, please, try talking more every once in a while! Share more about yourself and ask the same of others. Be interested in your peers, take their stories and learn from their success or mistakes. Brighten others’ lives and change the world. Who knows the places you’ll go and the people you meet if you just talked to a random person at a bus stop sometime.</p>
<section data-footnotes="true" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>The amount of times I’ve made my college friends randomly say “What the dog doin” due to my incessant repetition is rather high. I love peer pressure. <a href="#user-content-fnref-1" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-2">
<p>Yeah, it’s not exactly decided what specific percentage of our communication NVC is (about 60-70%, according to general knowledge), but it has to be high; otherwise, why was the pandemic so jarring socially speaking? <a href="#user-content-fnref-2" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-3">
<p>Arguably, it’s much harder, but more on that in another post. <a href="#user-content-fnref-3" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Why shouldn’t I use social media?]]></title>
            <link>undefined/articles/why-not-social-media</link>
            <guid>undefined/articles/why-not-social-media</guid>
            <pubDate>Fri, 08 Jul 2022 00:00:00 GMT</pubDate>
            <description><![CDATA[Instagram’s tempting me, I guess. But hey, let’s be open-minded and find out what I really think about social media.]]></description>
            <content:encoded><![CDATA[<img alt="Uh oh." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsocial-media-meme.c1cfb451.png&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsocial-media-meme.c1cfb451.png&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsocial-media-meme.c1cfb451.png&amp;w=1920&amp;q=75" width="911" height="885" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>I know what you’re thinking; ‘this is a huge trap’. I completely agree, but let me give some context here.</p>
<p>During my vacation throughout Europe (specifically my tenure in London), I met with a few friends, new and old, and caught up as best we could with the time I had. It was definitely a blast, and I definitely want to do it again. However, something I noticed is that when it came to my older friends, I certainly did not as good of a job staying in touch as I could have.</p>
<p>Don’t get me wrong, I’ve done my due diligence, keeping in touch with my friends via email or instant messaging. I try my best to maintain a frequency of contact with many of them (usually a month) thanks to my usage of a CRM. However, one of my friends while on my trip made a good point; I’m paraphrasing here so, my friend, if you happen to see this, sorry:</p>
<blockquote>
<p>It sucks you don’t have Instagram, cause that way I could just see what you’re up to without having to text you. Sometimes, messages fall through the cracks, or we forget and that way threads of conversation take a while. It’s best if you could just pop in to my feed, and we could just chat naturally when it occurs.</p>
</blockquote>
<p>My knee-jerk reaction was “damn, I guess that’s what it takes to get people to talk to me?” But after putting away my monkey brain for a second, I got to thinking, to be honest. If you read my blog with any frequency, you’ll know that I avoid social media like the plague, but for the first time, my friend made a good point. It’d definitely make it easier to share what I do if I used it. So, for argument’s sake, let’s play devil’s advocate, I opted to ask myself a question:</p>
<p><strong>Why shouldn’t I use social media?</strong></p>
<h2>What are the pros?</h2>
<p>The pros are immediately obvious, thanks to my friend. If I were to share what I do with my friends using a social media platform, the platform would do the work of actually spreading the news to my friends for me. This eliminates my need to deal with it personally, individually, for all my friends. So, for example, if I were to share my adventures during this vacation in Europe, I could just share a picture or two and Instagram would do the work for me of sharing it with whomever.</p>
<p>Another pro would be the converse; I’d also see what my friends are doing, which is a massive plus. I’ve noticed that IM conversations where small talk consists entirely of what we’ve been doing is very dry. Little other talk seems to spark from such conversations, so perhaps keeping a sense of proximity using Instagram or Facebook would help.</p>
<p>Lastly, it’d make me take more pictures, which I something I definitely struggle with. I tend to not really document my life outside journaling, and I have to admit making real albums of memories would be quite nice.</p>
<p>Certainly, some solid pros, not gonna lie, and pros that I absolutely agree with; keeping contact with my friends across the globe and photography are not bad things to take up, but…</p>
<h2>What are the cons?</h2>
<p>Thanks to my current stance of social media, I can think of three big ones. Here’s a quick and succinct list:</p>
<ol>
<li><a href="https://en.wikipedia.org/wiki/Facebook%E2%80%93Cambridge_Analytica_data_scandal" title="One example.">The</a> <a href="https://www.npr.org/blogs/thetwo-way/2014/06/28/326453204/facebook-scientists-alter-newsfeeds-find-emotions-are-affected-by-it" title="Another example.">ethical</a> <a href="https://www.securitymagazine.com/articles/94327-200-million-facebook-instagram-and-linkedin-users-scraped-data-exposed" title="Yet another example.">and</a> <a href="https://www.cnet.com/news/privacy/facebook-reportedly-thinks-theres-no-expectation-of-privacy-on-social-media" title="Even yet another example.">privacy</a> <a href="https://techcrunch.com/2022/05/16/google-deepmind-nhs-misuse-of-private-data-lawsuit/" title="The examples will keep on coming.">concerns</a> <a href="https://en.wikipedia.org/wiki/2018_Google_data_breach" title="I won&#x27;t stop.">of</a> <a href="https://threatpost.com/snapchat-privacy-blunder-piques-concerns-about-insider-threats/145074/" title="This one in particular is gross.">using</a> <a href="https://techcrunch.com/2020/12/15/twitter-fined-550k-over-a-data-breach-in-irelands-first-major-gdpr-decision/" title="More data breaches!">social</a> <a href="https://slate.com/technology/2018/04/twitter-sold-data-access-academic-cambridge-analytica-scandal.html" title="Ha, more Cambridge Analytica issues!">media</a>, <a href="https://www.reddit.com/r/announcements/comments/93qnm5/we_had_a_security_incident_heres_what_you_need_to/" title="Admittedly this one was handled well.">of</a> <a href="https://www.nbcnews.com/tech/security/tiktok-privacy-threat-sure-so-are-most-your-smartphone-apps-n1233625" title="Oop, here goes TikTok as well.">which</a> <a href="https://www.npr.org/2021/04/09/986005820/after-data-breach-exposes-530-million-facebook-says-it-will-not-notify-users" title="Welp, they&#x27;re just doubling down now.">I</a> <a href="https://www.bbc.com/news/technology-56815478" title="Now that is just silly.">have</a> <a href="https://www.bloomberg.com/news/articles/2021-09-02/whatsapp-fined-266-million-over-data-transparency-violations" title="WhatsApp, too? Oh no!">no</a> <a href="https://www.reuters.com/article/us-facebook-cyber-whatsapp/whatsapp-urges-users-to-upgrade-app-after-security-breach-idUSKCN1SK0SM" title="Now that&#x27;s even worse.">shortage</a> <a href="https://matrix.org/blog/2019/04/11/we-have-discovered-and-addressed-a-security-breach-updated-2019-04-12" title="Sadly, not even Matrix is immune.">of</a> <a href="https://www.theverge.com/2018/2/16/17017078/snapchat-phishing-attack-klkviral-dominican-republic" title="As you can see, no one is safe.">examples</a>.<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup></li>
<li>The potential time wasted using social media, which anecdotally I’ve seen to be a problem, both in myself and others.<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="true" aria-describedby="footnote-label">2</a></sup></li>
<li>The dark patterns latent in every social media app that I find quite annoying, along with being the primary driving factors of bullet points (1) and (2).</li>
</ol>
<p>Now, these have always been deal-breakers for me, but since I’m playing devil’s advocate here, I figured that I try to deconstruct the above arguments.</p>
<h2>Life is not very private anymore</h2>
<p>My ethical and privacy concerns with social media have always been very applicable, and frankly have no direct arguments against them that can save social media. There is one exception, I suppose, which I will admit is sadly quite real these days; “you can’t avoid Facebook/Google/etc.”</p>
<p>This, unfortunately, is very true; Facebook as a company already has swaths of photos of me that come in the form of pictures taken by my friends, whether it be in stories or posts, so my face (and name) is already out there. Google also does the same in the form of Workspace accounts and plenty of other services I use, so I can’t avoid that either. In other words, in my crusade of avoiding all the bad tech companies, I failed pretty badly.</p>
<p>I could go all Snowden and hide my face from every social media picture, or ask my friends to delete them, but that seems like an ineffective approach nowadays. I think I’d rather fight this battle along with more obvious routes, such as political or legal ones (EFF or other organizations). So, since it’s kinda too late now, I suppose point (1) could be addressed by either:</p>
<ul>
<li>Dismissing it</li>
<li>Deleting ALL my data from ALL social media platforms</li>
</ul>
<p>Point (b) here is quite doable, thanks to the GDPR and other data regulation policies, but I sincerely doubt Big Tech actually listens. Additionally, the vigilance required to keep my friends from posting my pictures might be too tiring, so I suppose I can dismiss this point for now.</p>
<h2>I would rather not waste time</h2>
<p>Social media is <strong>excellent</strong> at taking up your time, and I don’t think this point needs to be clarified. Anecdotally, I’m sure you’ve personally wasted time on social media in one form or another at some point, and found it hard to stop; this can include Instagram, Facebook, TikTok, etc.<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="true" aria-describedby="footnote-label">3</a></sup></p>
<p>Screen Time on iOS helps, but I definitely still have lapses every once in a while, and I’d like to avoid them. And, more importantly, I’d rather not willingly stir up those flames by adding another social media app I might accidentally check. So, if I were to use social media, I’d <em>absolutely</em> not use the official apps; instead I’d build interfaces to access them on <em>my</em> terms, while also using Screen Time to limit them in case it gets out of hand.</p>
<h2>What’s the verdict?</h2>
<p>Well, as an experiment, and since it is a <a href="https://blog.stormhub.io/2022/06/24/i-miss-procrastinating/" title="Place where I explain what summer of procrastination is.">summer of procrastination</a>, I figured maybe we’ll give something a shot. I figure I can try to use Instagram to upload pictures but <strong>avoid</strong> using the app. That way, my friends can see what I’m doing, and I don’t get baited by dark patterns.</p>
<p>Sadly, though, Facebook has made <em>very</em> sure that it is <strong>extremely</strong> difficult to avoid their apps. Their API’s do not work for individuals, only for businesses, so it’d require converting my account to a Business account, effectively nuking all my followers and friends that <em>are</em> there (which kind of ruins the point of this whole thing).</p>
<p>As such, I’ve opted with a much simpler, roundabout, but viable solution. Instagram will be installed, its notifications disabled, and additionally, its Screen Time will be set to zero minutes (with a random third-party selected Screen Time passcode) such that it is <em>impossible</em> for me to open the app<sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="true" aria-describedby="footnote-label">4</a></sup>. Really weird, but it achieves the intended objective.</p>
<p>I am acutely aware I’m playing with fire here, but here’s to hoping this experiment works; if I notice friends being more aware of my general life story, along with me not using Instagram, great! If any of those two stops being true, then the experiment will be over.</p>
<p>I’m dipping my toe in social media to the absolute minimum I find valuable. If things start getting out of control, then I’ll pull the plug.</p>
<p>I sure do hope it won’t be like the ring from Lord of the Rings.</p>
<section data-footnotes="true" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>Note that every word links to a different page with a separate example. <a href="#user-content-fnref-1" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-2">
<p>To be fair, in this case, Screen Time on iOS has my back too, where a tech company clearly highlighted the huge amount of time we spend on our mobile devices because of social media and other mobile apps. <a href="#user-content-fnref-2" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-3">
<p>I’m going to dismiss platforms like YouTube and Reddit because they are “technically” content aggregators and can be regulated quite well by RSS, which I already do. For the purposes of this blog, I’ll only address apps that are notoriously annoying about <em>only</em> letting you use the official app. <a href="#user-content-fnref-3" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-4">
<p>I know what you’re thinking; “what about DM’s, you can’t access those with 0 Screen Time?” That may be, but I never checked my Instagram DM’s to begin with. In those cases, I’ll redirect my friends to other platforms like Discord, iMessage or email, etc. <a href="#user-content-fnref-4" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[I Miss Procrastinating]]></title>
            <link>undefined/articles/i-miss-procrastinating</link>
            <guid>undefined/articles/i-miss-procrastinating</guid>
            <pubDate>Fri, 24 Jun 2022 00:00:00 GMT</pubDate>
            <description><![CDATA[It’s been a while since I’ve touched this blog. Let’s have a chat about why.]]></description>
            <content:encoded><![CDATA[<p>So, uh, it’s been a while.</p>
<p>I’m honestly somewhat surprised how long it’s been. One long year since my last post and, to be honest with you, it’s felt much longer than it’s been. Granted, the pandemic didn’t help, but either way, haven’t written much in a while here.</p>
<p>That isn’t to say I haven’t done anything, mind you. I’ve been rather occupied working on my computer science degree, being an Automation Developer for ACM at UCSD and the odd but quite occasional side-project I’ve picked up here or there. Saying &quot;I’m busy&quot; is not a great excuse, I know, but there’s a lot to talk about, so let’s unpack it.</p>
<h2>I’ve done a lot</h2>
<p>This past college year has been a <strong>pretty busy</strong> one for me, and one where I’ve definitely learned a lot, and frankly changed a lot. I started off by finishing up my internship, moving into an off-campus apartment, and capped it off with the wrapping up of many of my positions and projects that I’ve picked up over the past few years of college life. I’ve also taken plenty of undergraduate courses that were of various levels of difficulty<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup>, and in the end, it’s been a wild ride. Not gonna lie, I had a small bout of senioritis for a while there, but I think it’s gone now.</p>
<p>I feel pretty good about what I’ve done, to be honest. Continuing my tenure as Automation Developer for ACM at UCSD, I picked up multiple leadership positions as a project manager for some software engineering projects, which were excellent for my development; I’ve learned to be a better communicator, a more understanding person, and just a better person in general. I’ve made many friends (and lost a few) and during all this time, no one would’ve necessarily labeled me as an “unproductive” person. I have been taking up opportunities left right and center, I’ve been doing reasonably well in my coursework, and also spending plenty of time socializing with my peers.<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="true" aria-describedby="footnote-label">2</a></sup></p>
<p>Even so, I can’t say that I feel entirely fulfilled, and I can pinpoint the <em>exact</em> reason why with basically no deep thinking required beforehand, and it’s the reason I’m even writing this post.</p>
<h2>I haven’t procrastinated!</h2>
<p>My definition of procrastination is slightly different from most people. Conventionally, procrastination means unintentional time spent doing things considered unproductive, such as doing random chores instead of your homework, or gaming. Personally, I just label that time as what it is—unintentional—and plan to reduce it as much as possible, which I do decently well at.</p>
<p>For me, procrastination involves doing activities that are not part of the main objectives in my life path, and this can involve typically “productive” things, such as side-projects and reading. Think of it as “side-quests”. I <strong>love</strong> doing side-quests. (much to the dismay of Zelda in Breath of the Wild)</p>
<p>But in the past 2 years, my number of successfully finished side-quests could probably be boiled down to 1 or 2. I recall how, in high school, where I admittedly had <strong>much</strong> more spare time, I’d pick up a ton of side-projects, and that time was what allowed me to really flesh out my interests in computer science and beyond; I’d edit skits using NLE software like Premiere Pro, I’d play with electronic circuits, help my dad set up VPN meshes, and plenty other things. Without them, all of my unique and interesting knowledge acquired before college would never be.</p>
<p>Granted, college life gave me the avenue to officially pursue my interests during my work time. I’ve done that ability quite well, exploring a few fields I otherwise wouldn’t have, such as philosophy. Even so, I’m not perfectly satisfied; I don’t have the time or the courses necessary to pursue everything I want to do for academic credit. And, in the end, nothing makes me feel less happy than seeing the ever-growing pile of project in my to-do app as I never schedule those tasks in my time. And no, cutting down on my schoolwork is not an option.</p>
<p>So, what to do?</p>
<h2>I’m gonna do random stuff</h2>
<p>Surprise, surprise, exactly what I did in high school, but there’s an important distinction here.</p>
<p>I’ve said “yes” to many things in the past 2 years, and have followed through as best I could with almost all of them; however, most of the opportunities that I took up were presented to me by others. I absolutely do not regret any of them, and I’ve gotten a lot out of them, but there’s a distinction between doing things that were given to you and things that <em>you</em> wanted to do.</p>
<p>In a sense, I think this is why a lot of critical thinking jobs can seem unfulfilling for some; we’re not necessarily spending a lot of time working on projects we’d be interested in, but rather spending our time doing something we’re told to do. <sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="true" aria-describedby="footnote-label">3</a></sup>
I think when you’re the only one accountable for your creative work, there’s less pressure and more room for failure, and thus learning. I haven’t done much in the way of “my own side-projects” in the past 2 years, and I’d like to do more of that.</p>
<p>Furthermore, I’ve already thought of a couple of things to do over the summer to keep myself stimulated (outside some much-needed rest). Examples include learning Blender for no particular reason to refining my photography skills and perhaps <strong>finally</strong> coding a little toy website I’ve wanted to make for almost a year now.</p>
<p>Either way, as you can see, these projects are literal side-quests. There’s almost no reason for me to learn Blender to be good at software engineering or computer science. Even more directly, neither won’t making another website make me better at backend development (though it might help in the UI/UX design scape). I <em>just feel like doing these projects.</em> No failure, no goal, just exploration. They’re not necessarily useless, such as Blender strengthening my knowledge of computer graphics, but they’re still not direct objectives to my work or personal life.</p>
<p>And, at least from experience, I find that this kind of exploration is perfect for many of us.</p>
<h2>Brains are random</h2>
<p>It’s true. Humans learn by doing something random (or somewhat educated based on previous intuition), seeing if what we did worked, and if not, changing our tactics slightly and intelligently to finally achieve the action we intended. This is even how machine learning works! It’s crazy that this iterative process works <em>so</em> generally, and frankly, doing random things almost always seems to yield at least something of use.</p>
<p>We are all in some ways unique because our actions shape the environment differently, and vice-versa. This diversity of views, knowledge, and experiences allows for a larger pool of entropy from which to draw better information. Therefore, the more random things we do or see, the better! Each of our unique toolsets has a place in the world that we can use to then create something that no one else could. This is why success is usually correlated with trying; “you miss 100% of the shots you don’t take” or something like that. And that applies to creativity, too.</p>
<p>Whether we want to admit it or not, our experiences in one aspect of life affect all others, and in the case of work, our side-projects influence our skillset in ways that nothing else does!</p>
<p>Doing random things is what makes us creative, and heck, even if you’re not creative, there’s always the infinite typewriter monkey to soothe us; eventually <em>something</em> unique and useful will come out.<sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="true" aria-describedby="footnote-label">4</a></sup></p>
<h2>Let’s give this idea a term</h2>
<p>Getting to name things is awesome, but unfortunately, the idea of doing random things to improve our creativity is not unique to me.<sup><a href="#user-content-fn-5" id="user-content-fnref-5" data-footnote-ref="true" aria-describedby="footnote-label">5</a></sup> Chris Bailey in his book “Hyperfocus” labeled this notion of random exploration with no constraints as “scatterthought”, and I quite resonate with that term; I think it’s quite helpful to intentionally have unintentional thinking in our lives. Sounds weird, but allowing our brains time to think on its own is how we rest, build new neural pathways and come up with new ideas.</p>
<p>This is why I find friends saying that walks are awesome because they take much-needed time to do a mundane activity, potentially in solitude. This solitude gives our brain time to engage in scatterthought that we otherwise wouldn’t if we were on TikTok or YouTube.</p>
<p>Either way, decompressing from work and giving our brains time to process the onslaught of information typical in today’s world is an outstanding way to guarantee a bit of peace and quiet, no matter how hard it can be to disconnect.</p>
<h2>Back to the topic</h2>
<p>Gigantic tangent aside, let’s get back to the original point; what to do to start procrastinating again. <strong>Two-pronged approach: more time and more random stuff!</strong></p>
<p>I think an essential aspect to my desire to procrastinate again is to get more time. And sure, disconnecting from social media helps, but it’s not the silver bullet we need. Sadly, there is a time and place for doing side-quests, and it’s not when we are stressed with work. For instance, I don’t think anyone would start reading a new fiction book during finals week, and similarly so, I wouldn’t expect myself to start doing side-quests during peak school time. That’s why I decided to take this summer as a perfect opportunity to pick this theme up.</p>
<p>Vacations are awesome for R&amp;R and side-quest grinding, so try to time one of them for such an adventure. But mind you, you don’t <em>need</em> a vacation to procrastinate! I sometimes find that people overcommit in their career, giving no time for much else; sometimes stepping down a little can be good for you in the long-run.</p>
<p>Nevertheless, outside disconnecting from work, though, there is a big baddy that still needs to be addressed.</p>
<h2>Social media moment</h2>
<p>Disconnecting includes social media, and I’m taking steps to reduce that too. By now you probably are aware of my general aversion to conventional social media platforms (TikTok, Instagram, Facebook, etc.). The only two that have ever had any grip on me, to be honest, were YouTube and Reddit, primarily due to the veneer of them providing some useful information occasionally. But for now, I do need to let my brain think on its own.</p>
<p>It’s definitely not been easy; I still find myself gliding occasionally to these platforms, but thankfully <a href="/articles/rss-feeds">my venture with using RSS</a> has helped reduce the number of times I mindlessly check my social media. It’s gone down to 5 a week for the past 2 weeks from about 90<sup><a href="#user-content-fn-6" id="user-content-fnref-6" data-footnote-ref="true" aria-describedby="footnote-label">6</a></sup>, which is very much an improvement.</p>
<p>So far, however, I’m doing fine in terms of balance, and I certainly have more time in general thanks to the cut in social media, which is always a plus!</p>
<h2>How do I scatterthought, though?</h2>
<p>The scatterthought part has been more difficult for me to implement, especially since it’s kinda hard to structure unintentional time without being, well, unintentional.</p>
<p>I found scatterthought to be ideal when my brain wanders enough to the point where, eventually, I do pick up something to do that’s fascinating, or think of something new and interesting. The disconnection from sources of information is critical, I think, and it’s definitely a part of these sessions. I think the key technique, however, is to start them off by <strong>literally doing nothing.</strong> The boredom will get to you and will make you do something else, but since you’re disconnected, you’ll probably do something that isn’t additional work or social media. Thus, side-projects can flourish.</p>
<p>As an anecdotal (and perhaps obvious) example, plane rides for me are one of my most ideal environments to engage in scatterthought. The lack of internet doesn’t help, and when I sit down and am forced to do quite literally nothing for 4 hours, my brain will think of something to do or think. This entire post came out of my plane trip back to Europe!<sup><a href="#user-content-fn-7" id="user-content-fnref-7" data-footnote-ref="true" aria-describedby="footnote-label">7</a></sup></p>
<p>Alright, it’s been a long one, and I’m glad you stayed 😁. I’ve definitely written a lot and had a couple of tangents, but I do think I have a good idea of how to procrastinate again. The circumstances are ideal, my mindset is ready, and I’m all equipped with the proper techniques to get those side-projects on again.</p>
<h2>Join me, if you like!</h2>
<p>I’m sure many of us have to-do lists that are miles long with side-projects that are unfinished, or little hobbies we’d like to pick up that remain untouched. I know I do. This summer, I’m dedicating my time to clearing out as many side-quests as I can, whilst seeing the sights of Europe in the process.</p>
<p>If you’d like and can make the time to, join me in this grand tour of clearing out those side-quests<sup><a href="#user-content-fn-8" id="user-content-fnref-8" data-footnote-ref="true" aria-describedby="footnote-label">8</a></sup>, and let’s procrastinate together! If you ever want to just have a voice of encouragement or a buddy to procrastinate along with, feel free to reach me, and I’ll be sure to respond!</p>
<p>Every so often, we need a little wandering in our lives. At least for me, summer is a good time to do that (thank God for vacations). I hope you’ll try as well.</p>
<p>Zelda can wait for us to do side-quests a little while longer. So can the world, probably.</p>
<section data-footnotes="true" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>I’m looking at you, CSE 123. <a href="#user-content-fnref-1" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-2">
<p>In fact, most of the time I’ve spent WAS socializing; out of all the things I’ve done this quarter, social activities took the most amount of time, 200 hours more than even my cumulative commutes this quarter. That’s crazy! <a href="#user-content-fnref-2" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-3">
<p>I will concede that I don’t think <em>anyone</em> likes being told what to do, but I mean more to the extent of work. There are some who find more value in life outside of work, such as in their hobbies and family, and thus do not find much reason to be creative at work. Therefore, they might get annoyed by the prospect of tasks being thrown at them without feedback. <a href="#user-content-fnref-3" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-4">
<p>Important to clarify that random things refer to truly unique and new experiences you haven’t done before; otherwise, we fall prey to copying what we’ve done before slightly differently.</p>
<p>Granted, osmosis works wonders for solved problems, but in a world where our jobs involve solving (usually) new problems, it’s unlikely copying helps. <a href="#user-content-fnref-4" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-5">
<p>The sad reality of scale; nothing is truly unique, <strong>but</strong> in a microcosm, some things could be. <a href="#user-content-fnref-5" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-6">
<p>If you ever want a crushing reminder of how insanely connected we usually are, check Screen Time on iOS. It even spooked me. <a href="#user-content-fnref-6" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-7">
<p>Granted, it was a 22-hour long trip with 2 lay-overs and 3 connections, which is certainly a <em>lot</em> of time. And yes, airports have internet, but it’s not good enough to be distracted by content streaming, etc. <a href="#user-content-fnref-7" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-8">
<p>Sans the “traveling around Europe” part, unless you’re down 😳 <a href="#user-content-fnref-8" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[I Want My Digital Newspaper Back]]></title>
            <link>undefined/articles/rss-feeds</link>
            <guid>undefined/articles/rss-feeds</guid>
            <pubDate>Thu, 16 Sep 2021 00:00:00 GMT</pubDate>
            <description><![CDATA[A long conversation about how push notifications have ruined the ability for you to not be doomscrolling and how RSS feeds can help fix that.]]></description>
            <content:encoded><![CDATA[<p>Every once in a while, I review my bookmarks for HN articles I read, and one that I remembered seeing a while ago and really liking was essentially <a href="https://alexanderklopping.medium.com/an-updated-daily-front-page-of-the-new-york-times-as-artwork-on-your-wall-3b28c3261478">a blog post about someone using a eInk display as a New York Times newspaper frame</a>. It wasn&#x27;t anything particularly useful, mind you (reading a newspaper off of a &quot;painting&quot; is not an optimal way to consume content), but just the concept of it was fascinating; a newspaper that you had that you could read any day, controlled by you.</p>
<p>You might very well know I enjoy being a <a href="/articles/adventures-in-privacy-part-1">control</a> <a href="/articles/old-box-to-hub">freak</a>, so this definitely resonated with me, but it did also make me realize I&#x27;m not very good at controlling this aspect of my life; news.</p>
<p>I, admittedly, have always had a tough time getting into what you would consider conventional news sources since I am a young Generation Z guy who doesn&#x27;t believe in television. However, recently, what with me getting a bit older, I&#x27;ve realized it&#x27;s more and more important to be up to date with the happenings of the world. Frankly, I found news to be hard to get into, precisely because pretty much everything out there is easily acquired. <em>Too easily acquired.</em> So much so, that I don&#x27;t even have to think about it. It just happens to make its way onto my phone.</p>
<img alt="Come on, man." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fiphone-news-screenshot.052d0361.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fiphone-news-screenshot.052d0361.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fiphone-news-screenshot.052d0361.png&amp;w=3840&amp;q=75" width="1284" height="2778" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<h2>I hate push notifications</h2>
<p>I don&#x27;t think there&#x27;s something I hate more on phones quite like push notifications; an incessant, never-ending source of information that everyone has had their fair share of. Most devices nowadays definitely have better ways of controlling them (Do Not Disturb, Focus modes and notification settings help), but even so, some applications are less likely to implement per-push notification settings, so even letting <em>some</em> in could allow for random useless push notifications filling my already crowded area (I&#x27;m looking at you, Uber Marketing).</p>
<p>Either way, I can just disable notifications for Apple News, but then I will only intentionally check news on sources that I&#x27;m biased towards, locking myself into my own echo chamber, and that&#x27;s not that great, evidently. Ideally, one would read from news sources with varying forms of bias to avoid locking yourself into an echo chamber of your own construction. Cutting notifications removes discoverability, but <em>too much</em> discoverability and I become susceptible to the bias of recommendation algorithms.</p>
<p>Obviously neither one is good, so I have to find a solution for both. And every time I think of it, only one thing comes to mind.</p>
<h2>Kiosks are cool</h2>
<p>When I was in high school, somewhat close to one of my common outdoor work areas was a little newspaper kiosk. While during my childhood years I basically spent all of my time buying comic books from there (&quot;Rahan&quot; comics are probably 10-year-old me&#x27;s most treasured possession), I slowly transitioned to buying newspapers when I got older. I would look at some of the options, pull whichever interested me, and then pick them up for later.</p>
<p>When you really think about it, absolutely no equivalent of this is commonly found on the Internet. You might argue that apps like Apple News are &quot;kiosks&quot;; after all, they garner a collection of news sources you can tune into at your leisure. The reality, however, is that it&#x27;s not the same dynamic; most of the digital &quot;kiosks&quot; are obviously more oriented towards recommendation than curating. Apple News&#x27; Front Page is more or less handpicked articles by the app, laid out with (likely) agendas rather than popularity or variety in bias.</p>
<p>And besides of that, newspaper articles aren&#x27;t the only form of media consumption people typically approach that recommendation algorithms plague; YouTube is notorious with pushing recommendation in almost every aspect of the application, and TikTok literally bases their entire application on
recommendation algorithms, which admittedly is part of the package, but certainly not a &quot;kiosk&quot; that I can pick information for myself<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup>. On top of all that, I haven&#x27;t even gotten to what is probably the worst part of recommendation algorithms.</p>
<h2>I don&#x27;t recall kiosks being never-ending</h2>
<p>Contrary to any physical form of media, most digital applications have adopted my most hated UX anti-pattern: <strong>infinite scrolling.</strong> Pretty much every application nowadays boasts infinite scrolling in order to boost app engagement, because there never is a sense of finality into whatever it is you&#x27;re reading. YouTube Recommendations go on forever, Apple News articles never stop, Reddit posts are never-ending and ever-decreasing in quality, and so on.</p>
<p>One of the more recent common side-effects of this horribly annoying design choice is the newly coined term of &quot;doom-scrolling&quot;. I am probably biased here, but I have not found many individuals who&#x27;ve found themselves wanting even more news articles to read about how bad things are going; if anything, I&#x27;ve only found multiple examples all over Reddit and Twitter of people wishing they didn&#x27;t spend so much time getting absorbed by infinite scrolls.</p>
<p>Infinite scrolls are simply not feasible in real life; after all, there isn&#x27;t an infinite supply of paper, and no one would legitimately be willing to buy a newspaper that was more than 1000 pages long, which is practically what infinite scrolling does.</p>
<p>Fundamentally, though, all these general &quot;get off my lawn&quot; complaints I have are effectively revolving around one main problem.</p>
<h2>Stop throwing magazines in my face</h2>
<p>At the end of the day, most of the above anti-patterns are based on the simple fact that most media nowadays is no longer approached whenever we wanted to; rather, media makes its way to us whenever the media provider feels like it. Fundamentally, we&#x27;re no longer spending any time &quot;pulling&quot;, but rather everything is &quot;pushed&quot; to our lives, kind of like how spam is thrown straight into your inbox. Effectively, almost all of media consumption has fundamentally approached spam in its &quot;push&quot; model, which removes control on your part almost entirely.</p>
<p>Sadly, there is not much we can do to not add incentives to this model; after all, pushing allows for increasing engagement for that sweet ad revenue. Fundamentally, there is only one thing that I can think of that at least shifts this dynamic.</p>
<h2>RSS Feeds!</h2>
<p>RSS (Really Simple Syndication) is probably a protocol you&#x27;ve at least heard
about a bit. Basically, it&#x27;s a fancy way of saving XML documents to more easily read content later. RSS feeds (or variations like Atom feeds) typically contain previously delivered sets of articles that you can pull at your leisure and are typically used as summaries of the actual content they link to in order to provide you with the ability to extract links from them later.</p>
<p>Effectively, RSS feeds fit the &quot;pull&quot; model; rather than having push
notifications be sent to you without control, you get to decide when to refresh
your RSS feeds.</p>
<p>While this protocol has existed for a <a href="https://www.rssboard.org/rss-0-9-0">very long</a> time, it’s definitely received its share of <a href="https://en.wikipedia.org/wiki/Atom_(Web_standard)">alternatives</a> and updates. It may not be as pervasive as it could be, but it’s found in some useful places. For instance, all YouTube channels continue to have an RSS feed attached to each channel, which you can just paste right into your reader; the New York Times still maintains RSS feeds for various categories, including News of all kinds, which is awesome. Even this blog has an <a href="/rss/feed.xml">Atom feed</a> that you can subscribe to, and you’ll get updates whenever you want to read from the blog. (provided I write more often for this thing)</p>
<p>Obviously, I can rave about RSS more, but I figure you’d want to see this thing in action, so let’s get ourselves a bit into this.</p>
<h2>There’s Probably an App Even for This</h2>
<p>There are a significant amount of apps for RSS, most of which are actually surprisingly aesthetic. The most common one I’ve seen is <a href="http://feedly.com">Feedly</a>, which not only offers sync between devices, but also has its own “Explore” section for you to find more intriguing RSS feeds. <a href="https://www.inoreader.com/">Inoreader</a> is a nice cross-platform alternative, too, but if you find yourself using Apple devices, <a href="https://reederapp.com">Reeder</a> is a very polished iOS application for RSS reading. Coming up is <a href="https://readwise.io/read">Readwise’s Reader</a>, which seems intriguing, integrating read-later and RSS feeds in one, and it might come with its own recommendation system, so I’ll keep an eye on it.</p>
<img alt="Screencap of Reeder. I use this on the iPad." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Freeder-screenshot.4091d538.png&amp;w=3840&amp;q=75 1x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Freeder-screenshot.4091d538.png&amp;w=3840&amp;q=75" width="2732" height="2000" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>I probably know what you’re thinking, though; <em>”But hey, I thought we’re avoiding recommendation algorithms?”</em>, which is a fair question. However, I want to point out something here — recommendation algorithms have their usage and they are a useful technology, but only if they are used <em>intentionally</em>, which is the case here. Leaving ourselves subject to them consuming our time and attention is the issue. In this case, we’re using recommendation algorithms to our advantage to subscribe to proper feeds that we know might be more interesting.</p>
<img alt="Feedly’s explore section. Works great!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ffeedly-explore.e3c530aa.png&amp;w=3840&amp;q=75 1x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ffeedly-explore.e3c530aa.png&amp;w=3840&amp;q=75" width="2732" height="1694" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<h2>What To Follow</h2>
<p>If you’re wondering what RSS feeds to follow, I can’t honestly give you good advice, mostly because you should look for what interests you to follow. Look over what content you typically consume that enriches you and find whenever it has an RSS feed. While news is an obvious RSS feed candidate, you can also subscribe to:</p>
<ul>
<li>blogs (like mine 😉)</li>
<li>link aggregators, like Reddit or Hacker News</li>
<li>educational YouTube channels</li>
<li>podcasts! (Fun fact: all podcasts are backed by RSS, even those on Spotify)</li>
<li>email newsletters! This takes some effort, but it’s very doable thanks to <a href="https://kill-the-newsletter.com">Kill the Newsletter</a><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="true" aria-describedby="footnote-label">2</a></sup></li>
</ul>
<p>There are some things on the Internet that don’t have RSS feeds, but I’ve found that many of these websites do not even require my presence on them at all due to this. Social networks do not have any form of integrated RSS feeds, for instance, and that obviously makes you wonder as to why.<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="true" aria-describedby="footnote-label">3</a></sup> However, recall that we’re looking to remove the “push” aspect of media consumption, and social networks are the worst culprits of this, so honestly, good riddance in my eyes. At the end of the day, they’re still always available when you need (though a few too close clicks away).</p>
<h2>Does this even help?</h2>
<p>A good question. I opted to move all of my media checking to RSS feeds, and I’ve found my times spent mindlessly consuming reduced significantly. According to my personal time tracker, I’ve found that my time spent on watching YouTube videos has reduced by 10 hours a week! (yeah, I procrastinate a lot) Asides from that, I’ve found that I spend significantly more time reading news articles than I used to. I’ve also significantly increased the amount of highlights made from Hacker News articles, so rather than passively consuming content, I’ve become more apt to actively consume it.</p>
<p>This pretty works exactly as I intended, since it shifts the intentionality of me checking content in the proper direction.</p>
<h2>Still No Newspaper</h2>
<p>Even with RSS feeds, I kinda do still miss the days I’d read physical newspapers. Sure, it’s still possible to buy some, but sadly, the world is turning more and more digital, along with recommendation algorithms becoming more and more popular. Even with RSS feeds, I’m still reliant on the content provider to implement one, which might not happen.</p>
<p>Either way, I still miss my newspaper, and I want my digital one back.</p>
<p><a href="https://static01.nyt.com/images/2021/09/15/nytfrontpage/scan.pdf">At least I have this NYTimes scan, courtesy of the blog post I found.</a></p>
<section data-footnotes="true" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>Mind you, TikTok is <em>not</em> the place to get news from, but I am making a point about the pervasiveness of recommendation algorithms. <a href="#user-content-fnref-1" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-2">
<p>It’s even self-hostable, though to be frank, the privacy issues relating to email newsletters are likely not as bad, provided your email newsletter feed is not personalized. That being said, Kill the Newsletter is a bit harder to maintain because of having to handle email deployment, which is annoying. <a href="#user-content-fnref-2" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-3">
<p>Instagram, Facebook and the like do have <em>some</em> ways to create RSS feeds out of them, a-la “Kill the Newsletter”, but they’re <em>really</em> hard to get implemented. And, honestly, is it worth it? <a href="#user-content-fnref-3" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Keeping Everything Together]]></title>
            <link>undefined/articles/emacs-intro</link>
            <guid>undefined/articles/emacs-intro</guid>
            <pubDate>Tue, 04 Aug 2020 00:00:00 GMT</pubDate>
            <description><![CDATA[How I spent a couple of weeks refining my tooling to the point everything's in one place. I used Emacs, of course.]]></description>
            <content:encoded><![CDATA[<p>Recently, I had a bit of a pickle with my task management.</p>
<p>Yeah, I know, if you&#x27;ve read about my <a href="/articles/the-life-stack">L.I.F.E Stack</a>, you&#x27;d think I&#x27;m pretty fine
at sorting out this sort of stuff. While the actual stack&#x27;s components have
changed a lot, much of the actual ideas behind it have not, so I&#x27;m fine there.
But the tools used to maintain the Stack have always fallen short by a bit,
particularly in the cohesion department.</p>
<p><strong>Everything is always too different! Why?</strong></p>
<p>Recently, for example, I&#x27;ve taken to <a href="https://todoist.com">Todoist</a> as a task manager and <a href="https://notion.so">Notion</a> as a
knowledge base/note-taker, but their absolute disparity killed me. Even though
Todoist has an amazing API, Notion doesn&#x27;t, and integrating them was hard. While
I could&#x27;ve tried using Notion as a task manager instead of Todoist, its handling
of tasks is bad-you only have the option to use checkboxes and Kanban boards,
both of which I&#x27;ve tried and haven&#x27;t been satisfactory for me. The biggest pet
peeve is also simple; <strong>why can&#x27;t I search for tasks <em>specifically</em>?</strong></p>
<p>Regardless, I began searching for alternatives that could work better for me, as
I&#x27;ve been doing for a while. I needed something that could keep as much of my
Stack together as possible; tasks, time tracking, health, notes, all of it.</p>
<blockquote>
<p>Is that even possible?</p>
</blockquote>
<p>During my search for a more universal way of keeping everything together,
though, I reminded myself of the one thing I always heard that could supposedly
do everything cohesively: Emacs.</p>
<p>Wait, <em>Emacs?</em> Oh no.</p>
<h2>This is how I become an Emacs user</h2>
<p>Admittedly, I expected this. I use Vim and Vim keybindings for pretty much
everything, and who&#x27;s to say I won&#x27;t go deeper? (Some might say <a href="https://xkcd.com/378">Emacs is less elitist than Vim</a>)</p>
<p>For the unexposed (good for you, honestly), GNU Emacs is a text editor with one
single premise: everything is customizable. The idea is that you extend it using
its own language, Emacs Lisp. Regardless, I was not interested in diving full
head on deep into what is by far the most complex text editor out there
nowadays, and neither would that make for an original post (there are millions
of them at this point, honestly) so I began with an &quot;Emacs distribution&quot;.</p>
<p>An &quot;Emacs distribution&quot; just takes care of the majority of the configuration
you&#x27;d likely already be using (package management, themes, etc.) and puts it in
a nice package. Really, I like the distributions because they give you a good
starter on packages to try out and explore; perfect for someone diving into
Emacs out of nowhere.</p>
<img alt="Screenshot of Doom Emacs." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdoom-emacs-screenshot.03462e04.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdoom-emacs-screenshot.03462e04.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdoom-emacs-screenshot.03462e04.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Anyway, in short, I first tried out <a href="https://www.spacemacs.org/">Spacemacs</a>. Honestly, it looks amazing and
has fantastic support for a lot of applications and packages in the community.
It&#x27;s a great starter kit and it even has Vim keybindings out of the box! <a href="https://github.com/hlissner/doom-emacs">Doom Emacs</a>
was my later stop because of its sheer speed. Spacemacs had too much
abstraction upon it, while Doom Emacs is closer to the bare-bones a bit, so it
made for a better experience for a slightly more involved tinkerer.</p>
<p>I will concede that I think the biggest obstacles to Emacs are the configuration
and the keybindings. The keybindings of the original Emacs are easily avoided
using <code>evil-mode</code>, which is essentially Vim keybindings in Emacs. However, the
configuration is definitely the biggest obstacle to this program. It ends up
being a more involved version of installing extensions to VS Code (to which
Emacs is comparable, but in my opinion far more customizable).</p>
<p>Regardless, once I stopped getting distracted by my new shiny toy, I opted to
return to my original objective. Now, to move my L.I.F.E Stack to a cohesive
system, I needed to find good alternatives to everything. I began digging to see
what options I had.</p>
<p>Well, I quickly discovered that Emacs <em>really</em> is an OS, not a text editor.</p>
<h2>Emacs has <em>everything</em></h2>
<p>When I started digging for what options I had available in terms of apps and
whatnot, I realized there was almost <em>everything</em> in this text editor. And I
really mean it!</p>
<p>The first packages were obvious; I needed modules for programming languages like
C, Go, Java, JavaScript or Typescript, take your pick. I also started installing
other packages related to these like auto-completion frameworks (Helm is the
best). But then is where all the wild options began appearing.</p>
<p>First one was mu4e, one of the more popular email clients for Emacs. While I
<a href="/articles/adventures-in-terminal">have used terminal mail clients before</a>, it was a surprise to find a client
<em>inside</em> the text editor. Configuring it was not as hard as the tutorials
online, as I already had email configured for the command line, but once it was
all well and done, it was amazing.</p>
<p>The real advantage of having email in Emacs was just the sheer speed of reading
it. Much like my previous mail client, it&#x27;s all text, which removes a lot of
distracting content. It&#x27;s also super quick at searching and handling mail.</p>
<p>Nothing beats the feeling of nuking 500 emails using only three keys: <code>d</code> and <code>x y</code>.</p>
<ul>
<li><code>d</code> marks email for trashing (sends to Trash folder)</li>
<li><code>x</code> enables mark execution (executes action marked before, like delete)</li>
<li><code>y</code> confirms your execution</li>
</ul>
<p>Done. Observe.</p>
<img alt="Video of nuking 65 mails." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FMailNuke.91a0122e.gif&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2FMailNuke.91a0122e.gif&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FMailNuke.91a0122e.gif&amp;w=3840&amp;q=75" width="1080" height="608" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Absolutely beautiful.</p>
<p>There were also even more packages that I couldn&#x27;t believe I found, like a
<a href="https://github.com/danielfm/spotify.el"><strong>Spotify client</strong></a>. Honestly, it&#x27;s kind of hilarious this even exists, but also
believable at this point; Emacs really has everything. It ends up being pretty useful
as well, and subtle. I can just change tracks in my playlist from within my editor,
even if I&#x27;m playing music on another device (Spotify Connect for the win).</p>
<img alt="Screenshot of spotify.el" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fspotify-el-screenshot.f9cfc191.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fspotify-el-screenshot.f9cfc191.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fspotify-el-screenshot.f9cfc191.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>There&#x27;s also an amazing package in Emacs, <em>Magit</em>, that is essentially Git in Emacs.
It&#x27;s an <em>amazing</em> interface for the Git CLI, and probably the most comprehensive one.
Frankly, it is one of the closest things you can get to idiomatic Git usage in a non-CLI
interface. It also has support for GitHub issues and PR&#x27;s, if you configure it right.
You can even do GitHub PR reviews straight within Magit as well, with the help of another
package:</p>
<img alt="Screenshot of Magit." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmagit-screenshot.f55ccb66.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmagit-screenshot.f55ccb66.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmagit-screenshot.f55ccb66.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>There are some other packages I&#x27;ve installed, like an <a href="https://github.com/skeeto/elfeed">RSS reader</a>, all of which
have nice Vim keybindings and are all configured all in the same place. The cohesion
began showing as well; my tendency to switch workspaces while working decreased a lot
as I was using Emacs, because I didn&#x27;t have much of a need to switch anymore. Unless
I procrastinated, but that&#x27;s a different problem entirely. This all culminated with
the bread and butter of Emacs, and pretty much the main reason I even considered it
in the first place.</p>
<h2>Org Mode: The Digital Paper</h2>
<blockquote>
<p>Organize your Life in Plain Text</p>
</blockquote>
<p><em>Why is this the main tag?</em></p>
<p>Org Mode is a set of packages for Emacs that allows for some tightly-knit
features surrounding a plain-text format, Org files. In particular, these
features focus on task and project management, time tracking, outlining,
writing, literate programming and more.</p>
<p>The main marketing tag of Org Mode is, in my opinion, a bit disingenuous to the
actual reason why Org Mode is really good. I don&#x27;t think it really has to do
with Org Mode being powerful in tooling. After all, pretty much all applications
nowadays run on SQL databases with fancy user interfaces and amazing sorting and
filtering capabilities. Turns out that the reason Org mode is good is because it
shares an advantage with the best tool for organizing your life you can possibly
use: <em>paper</em>.</p>
<p>Paper is free-form, paper is blank, paper is a canvas. It gives you absolute
freedom to do whatever you want with it. I&#x27;ve recently gone around to
recommending prospective individuals to use paper as a starter point with
organization, since it gives you the freedom to forge proper habits with your
brain. Instead of molding your amazingly efficient brain to a primitive tooling,
why not mold your tools to fit you specifically? Paper is the ultimate canvas
for that.</p>
<p>The only thing that gets close to paper on a PC is plain text. Admittedly, you
can&#x27;t draw on it, but there are replacements to drawing; images, LaTeX, take
your pick. One could argue that other software does the job of <a href="https://www.microsoft.com/en/microsoft-365/onenote/digital-note-taking-app">mimicking paper
better</a>, but it&#x27;s not as good as plain text. With plain text, there&#x27;s nothing.
Just you and the file. Kind of like you and the paper, pen in hand. Sure, you
can create common structures on the piece of paper, like checklists and headers,
or charts, but you don&#x27;t have to. It&#x27;s as free as you can get.</p>
<p>Org Mode is, in my opinion, probably the best set of tooling built upon plain
text. It expands the physical aspect of paper (or plain text, in this case), and
leverages a computer&#x27;s inherent capabilities to <em>make paper better.</em> <strong>This</strong> is
why Org Mode is amazing. It&#x27;s the absolute best set of capabilities built upon
paper!</p>
<p>Ok, you probably need proof. Examples, stuff like that. We&#x27;ll start with that.</p>
<h2>Playing with the Digital Paper</h2>
<p>First, let&#x27;s get a new piece of &quot;paper&quot;.</p>
<pre class="language-bash"><code class="language-bash">emacs brand-new-side-project.org
</code></pre>
<p>Empty canvas, free for us to lay down our thoughts. So, what do we do? Suppose
we are whipping up a plan for our brand new side-project, we come up with some ideas
we write down.</p>
<pre><code>Ok, so I had this idea to do a specific thing.
I also had this other idea.
Oh, wait, I could also do this easy thing in a couple of hours to get started.

Oh, I also found this weird link online that would help me: https://example.com
</code></pre>
<p>Alright, so we have the ideas. It&#x27;s nice, quick to use and good enough, perhaps?
Maybe that&#x27;s all you need, writing ideas down and keeping them in one file. No
more complexity, just a file you check later; for most, that&#x27;s really enough.
But suppose you want some more structure; we can begin using the Org Mode
conventions.</p>
<p>First off, we&#x27;ll split these ideas in different sections. Good to
compartmentalize; we&#x27;ll use headers, essentially. In Org Mode, they&#x27;re items,
but they achieve the same thing.</p>
<p>Just add an <code>*</code> next to the section title and that&#x27;s it, you get a header:</p>
<pre><code> * First idea
   Ok, so I had this idea to do a specific thing.

 * Second idea
   I also had this other idea.

 * I could also do this easy thing in a couple of hours to get started.

 * Oh, I also found this weird link online that would help me: https://example.com
</code></pre>
<p>In Org Mode, you can also just press <code>TAB</code> inside a header and hide the
contents temporarily, which makes for easy focus on specific sections. Tab the
second idea, which we think isn&#x27;t as important, and it looks like this:</p>
<pre><code> * First idea
   Ok, so I had this idea to do a specific thing.

 * Second idea...

 * I could also do this easy thing in a couple of hours to get started.

 * Oh, I also found this weird link online that would help me: https://example.com
</code></pre>
<p>Now we notice there&#x27;s an item that is actionable, a task. We can mark it as one by adding
<code>TODO</code> before its title. So let&#x27;s do that:</p>
<pre><code> * First idea
   Ok, so I had this idea to do a specific thing.

 * Second idea...

 * TODO I could also do this easy thing in a couple of hours to get started.

 * Oh, I also found this weird link online that would help me: https://example.com
</code></pre>
<p><code>TODO</code> ends up highlighted so it grabs your attention, and you can just change
it to <code>DONE</code>. To-do list is now made.</p>
<p>What about keeping track of all of your tasks across multiple files, which is something
Notion is horrible at?<sup><a href="#user-content-fn-fn:1" id="user-content-fnref-fn:1" data-footnote-ref="true" aria-describedby="footnote-label">1</a></sup> You can use <code>org-agenda</code> after configuring
it slightly and you get a full week view of all your tasks.</p>
<img alt="Screenshot of Org Agenda." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Forg-agenda-screenshot.4e103dc1.png&amp;w=750&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Forg-agenda-screenshot.4e103dc1.png&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Forg-agenda-screenshot.4e103dc1.png&amp;w=1920&amp;q=75" width="699" height="287" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>Only 5 minutes and we&#x27;ve overtaken Notion in terms of functionality<sup><a href="#user-content-fn-fn:2" id="user-content-fnref-fn:2" data-footnote-ref="true" aria-describedby="footnote-label">2</a></sup>.</p>
</blockquote>
<p>This is the absolute tip of the iceberg of Org mode&#x27;s functionality, and there are a lot
of other features, tools, and packages that Org mode has that put it above and beyond
most organizational tools out there; exports in any format, time-tracking, calendar syncing,
mobile syncing, contacts management, the list goes on as much as MELPA does.</p>
<p>In my opinion, you shouldn&#x27;t care about all that at first; Org Mode is already
good enough in this short 5 minute tutorial, and the reality is you will
probably not use 100% of Org mode&#x27;s features. But the point is simple; the
features expand upon the plain text format and create as close to a experience
on paper as possible, while leveraging the capabilities of a computer in an efficient
manner; searching, file system sorting, and the sheer performance of editor software.</p>
<p>But back from the massive sidetrack that was Org Mode, I really want to point
out Emacs&#x27; and Org Mode&#x27;s best capability, which is the peak of putting everything together.</p>
<h2>The Open Source Ecosystem</h2>
<p>I don&#x27;t think I&#x27;ve experienced an ecosystem lock-in outside of proprietary
companies that feels like Emacs. Sure, you might think that&#x27;s debilitating, but,
for example Apple has a fantastic ecosystem that cannot be beaten. Similarly,
Emacs has a tight-knit ecosystem which can do a lot of things at once; music,
email, tasks, coding, writing, a multitude of text-based creative activities in
one place, with the same set of keys and zero context switching. There are
packages such as <code>org-capture</code> that let you save tasks or items in Org files
from pretty much anywhere, and link to the origin point. For instance, you can
link to files or emails directly from your Org files.</p>
<p>Yes, these probably only work properly in Emacs and your specific configuration,
but as opposed to most ecosystems, this is one you own and one <em>you can change!</em>
Emacs Lisp is not hard to learn and you can quickly whip up your own changes
to fit the way you work, which can be beaten by nothing else. Additionally, Emacs
is open source, so it&#x27;s never going away.</p>
<p>Is it fancy-looking like other apps out there? Not really (although there are
themes), but looks really do not concern me; functionality is imperative. And,
in all honesty, Emacs does this really well.</p>
<p>Everything is together, I can finally rest.</p>
<p>Hopefully I don&#x27;t spend too much time configuring Emacs.</p>
<hr/>
<p><em>Fun fact: This entire blog post was written solely in Emacs.</em> Not only was the Git
commit process in Emacs using Magit, so was the written blog file (exported to Markdown for my
blog using <code>ox-hugo</code>) and the refreshing of the blog page, using a terminal emulator
inside of Emacs. I never left my Emacs frame while writing this.</p>
<p>Proves to show you can do a lot within it.</p>
<section data-footnotes="true" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-fn:1">
<p>I am talking about checkboxes here, pages are searchable, but my particular point still stands; tasks are not first-class citizens in Notion like items are in Org mode. <a href="#user-content-fnref-fn:1" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
<li id="user-content-fn-fn:2">
<p>I am not going to pretend Org mode is better than Notion in every way here, but in terms of strict functionality, I&#x27;m of the opinion Org mode beats Notion in most things. Notion does have a better UI, and it also has collaborative tools, but asides from that, Org mode has feature parity, if not overtaking Notion (see <code>org-babel</code>, which is Jupyter notebooks in Org Mode.) <a href="#user-content-fnref-fn:2" data-footnote-backref="true" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[I tracked a Discord server's bot usage]]></title>
            <link>undefined/articles/breadbot-data</link>
            <guid>undefined/articles/breadbot-data</guid>
            <pubDate>Wed, 17 Jun 2020 00:00:00 GMT</pubDate>
            <description><![CDATA[Have you ever been captivated by the alluring vastness of data and analytics? I know I have. Here's an example of a dive of mine down this rabbit hole.]]></description>
            <content:encoded><![CDATA[<p><em>This was a blog post written for ACM @ UCSD&#x27;s Medium, which can be found
<a href="https://medium.com/acmucsd/i-tracked-a-discord-bots-server-usage-9f3b05d68878">here</a>.
This is a verbatim copy of the article found there. Anything that might seem out
of context is due to the target audience of the original article.</em></p>
<hr/>
<p>It was the middle of an otherwise very exotic academic quarter, if not an
interesting time for everyone, that I realized I was bored. When I get bored,
it’s good, because I look for interesting things to do. (and maybe
procrastinate? Nah.) The first thing that came to my mind to pass the time in a
more educational manner was data science. I hadn’t had fun with data (or its
graphs) in a long time. While I do frequently consult system monitoring graphs
using Prometheus and Grafana, it’s certainly not as exciting as looking for
something new; we all need to explore sometimes, and looking at essentially a
straight line for memory usage is <em>boring</em>.</p>
<p>Anyway, I started thinking what kind of unique data I could conjure up to make
for some interesting graphs. I needed something random, something topical,
something I had easy access to...<em>hmm</em>...</p>
<h2>Discord is good!</h2>
<p>Out of all the chat services that have popped out in the world, nothing rivals
IRC’s randomness quite like Discord. Clearly inspired from it, Discord is just
the perfect platform to feed everyone’s need to socialize, as well as provide a
very aesthetically pleasing medium to communicate in (way better quality than
Skype, too). Additionally, while there are specific topic channels, it’s just
something about Discord that encourages this vibe of random thoughts and chats
that I thought would be a perfect candidate for investigation.</p>
<p>Soon enough, I was looking for the most active Discord server I’m in. ACM’s
online medium is essentially established in Discord, and it is very much an
active server. And just like that, through the power of amazing timing, an
opportunity appeared for some interesting data to be acquired.</p>
<p>Recently, I’ve given (re?)birth to BreadBot, a Discord bot previously used by
the members here to relay embed messages on more official channels. I gave it
some more useful commands, such as URL shortening and a few more. However,
during that time, I also added two commands that became quickly very popular:
<code>/cat</code> and <code>/dog</code>.</p>
<p>These two commands would cause BreadBot to simply reply with a cat or dog
picture. Simple, cute, but very popular. A decent amount of you would sometimes
use these commands to summon cute cat and dog pictures to brighten other’s
days. At this point, I saw a good opportunity to acquire some cool data.
There’s personal preferences involved, and I already saw a spirit of
competition form between the two commands.</p>
<p>I coded functionality in BreadBot to allow it to log commands as they were
being requested. It would track time, command, requester of command as well as
the channel it was sent on. After I coded it, I announced its tracking on the
announcements channel, and told everyone I would be announcing the results in
the form of a blog post.</p>
<p>Well, here we are, a couple of months later, and I’ve gathered a decent amount
of commands, and since the first year of undergraduate study was over for me,
what better time to get started on having fun with the data!</p>
<hr/>
<h2>Getting the data out</h2>
<p>This was the easiest part, mostly. The command log was essentially a CSV file,
with <code>:</code> as its separator. In hindsight, this was a bad idea at the time I
coded it, since there might have been members in the list with that character
in their username. I should have done something like <code>$$</code> or some other more
rare separator, which could’ve been better. It’s a good example of why data
sanitization is so important; the easier it is to process data, the more
valuable insights you will obtain faster.</p>
<p>However, I got lucky, as no one had <code>:</code> in their username, so I’m good for this
time.</p>
<p>Now, I spun up a classic Jupyter notebook with an Anaconda environment, and
started pulling the data in, refining it for future use.</p>
<p><em>If you wanna follow along to all of my observations here, I highly recommend
you check out the <a href="https://github.com/StormFireFox1/BreadBotData">Jupyter notebook</a>
I used while writing this post. That way, you can see my thought process behind
the metrics I start talking about, as well as how I got them. Think of the
notebook as a very educational “behind-the-scenes”.</em></p>
<hr/>
<h2>Who won?</h2>
<p><strong>TL;DR: /dog won. But there are other interesting things!</strong></p>
<p>Naturally, everyone who participated is more or less interested in which
command won and which command lost. I just thought to get it out of the way
faster, since there’s a lot more interesting things to notice with the
commands.</p>
<p>It was relatively quick to spin up a bar chart to see who won in the end by
just counting the amount of times each command name appeared in the “command”
column of the dataset. <code>/dog</code> is number one, by a landslide difference of 300
command runs as opposed to the second place command, <code>/cat</code>. Apparently, dogs
are pretty popular!</p>
<img alt="Competition Results " srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-competitionresults.e7813823.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-competitionresults.e7813823.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-competitionresults.e7813823.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Unsurprisingly, the rest of the command seem to fit my expectations; <code>/bruh</code>, a
command which simply plays a sound you probably already know of, is relatively
common whenever members on the Discord server appear in voice channels, and the
rest of the commands are more or less either new or merely utilities, hence
their lower position on the rankings.</p>
<p><strong>Fun fact and quick tangent:</strong> we don’t really need Python or Jupyter
notebooks to quickly pull out metrics out of a CSV file. We can just use some
simple Unix commands and pipes to get some valuable information out of them,
too!</p>
<p>For instance, we can get the sorted number of command runs that the chart above
provides by just running a one-liner:
<code>$ grep &lt;COMMAND&gt; commandCount.log | awk -F: &#x27;{print $3}&#x27; | sort | uniq -c | sort -nr</code></p>
<p>I’ll split this up to explain what each command does:</p>
<pre class="language-bash"><code class="language-bash">$ <span class="token function">grep</span> <span class="token operator">&lt;</span>COMMAND<span class="token operator">&gt;</span> commandCount.log <span class="token punctuation">\</span>
    <span class="token comment"># - get all &lt;COMMAND&gt; entries</span>
    <span class="token operator">|</span> <span class="token function">awk</span> -F: <span class="token string">&#x27;{print $3}&#x27;</span> <span class="token punctuation">\</span>
    <span class="token comment"># - extract 3rd field from stream</span>
    <span class="token comment">#   with delimiter &quot;:&quot;</span>
    <span class="token operator">|</span> <span class="token function">sort</span> <span class="token punctuation">\</span>
    <span class="token comment"># - sort all found users to</span>
    <span class="token comment">#   group up for &quot;uniq&quot;</span>
    <span class="token operator">|</span> <span class="token function">uniq</span> -c <span class="token punctuation">\</span>
    <span class="token comment"># - count number of unique fields</span>
    <span class="token comment">#   (usernames, in this case)</span>
    <span class="token operator">|</span> <span class="token function">sort</span> -nr
    <span class="token comment"># - sort in descending order</span>
</code></pre>
<p>While obviously not as good-looking as a chart, it’s still useful information
you can grab quick. (Yes, I may use terminals too much)</p>
<p>Returning to the problem that I noticed, however, was that I didn’t consider
each member’s activity when making these charts; not everyone called <code>/dog</code> and
<code>/cat</code> in equal amount each, and some members of the Discord server were more
active than others. I thought I should look into who used each command the
most.</p>
<hr/>
<h2>Who used the commands the most?</h2>
<p>To see the amount of times each person ran a command, I would simply filter the
dataset to only contain one command. Afterwards, I’d count the number of
occurrences of “username” columns. After that, I could quickly spin up bar
charts for each command BreadBot used.</p>
<p>We’ll start by looking at the top command, <code>/dog</code>.</p>
<img alt="Command Distribution for /dog" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-dog.9a6e6882.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-dog.9a6e6882.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-dog.9a6e6882.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Hmmm, we notice a bit of an anomaly here.</p>
<p>At least for me, this didn’t come as much of a surprise, since I’ve been
watching the competition closely since its inception, but it was still amazing
the difference in runs between <em>ishaanharry</em> and <em>wingdings</em>. The two were by
far the most active users of the two commands (to be fair, <em>wingdings</em> was
previously named “David | dog gang”), but regardless, a difference of <strong>275</strong>
was still amazing.</p>
<p>However, I did look at some other commands as well. <code>/cat</code> was slightly more
even in the amount of calls per user, but it still clearly had one clear power
user.</p>
<img alt="Command Distribution for /cat" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-cat.abd85ba2.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-cat.abd85ba2.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-cat.abd85ba2.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>What was the most even distribution was probably the ACM Board-only command,
<code>/acmurl</code>.</p>
<img alt="Command Distribution for /acmurl" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-acmurl.0f1b4885.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-acmurl.0f1b4885.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-commanddistribution-acmurl.0f1b4885.png&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>This makes sense, since in most cases, only board members use these commands,
and generally the same users generate links for ACM’s url shortener.</p>
<p>Anyway, soon after fiddling with each command, I started realizing that the
time stamp of each command would lead to an interesting metric of the times
when members of the Discord server were most active.</p>
<hr/>
<h2>Who stayed up late at night?</h2>
<p>Visualizing time-based data, in this case, was a bit more complex, as it wasn’t
just a simple bar chart. This time, a heatmap would do the job the best, so I
split around the data, did some simple cross-tabulation and then rendered the
heatmap (details in the Jupyter notebook). After that I had a nice heatmap of
when commands were run over the course of a week.</p>
<img alt="Heatmap for Commands" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-commands.a485e87d.png&amp;w=2048&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-commands.a485e87d.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-commands.a485e87d.png&amp;w=3840&amp;q=75" width="2000" height="2000" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>The thing that is immediately noticeable (which is also a piece of expected
information) is that the commands are run more towards the end of the day. This
is understandable, as members are more likely to socialize towards the end of
the day; after all, we do have lectures.</p>
<p>I did realize soon enough, however, that this isn’t exactly data representative
to the entire Discord server. This is because not everyone in the server used
BreadBot’s commands, so evidently we don’t really have the full picture.
Perhaps the most active members are the night owls, hence the bias towards
later times in the heatmap I made. Therefore, I opted to get more data to be as
accurate as possible, so I chose to just export all the messages of the Discord
server.</p>
<p>Wait, is this what Google feels like? This is not good.</p>
<hr/>
<h2>Stop me, I’m going too far</h2>
<p>Funnily enough, a previous workshop hosted by ACM, (the <a href="#" title="Hack.py Part 6: Data Visualization">data visualization
workshop</a>) which covered analysis of
Discord data exposed me to a tool that can <a href="https://github.com/Tyrrrz/DiscordChatExporter" title="Discord Chat Exporter">export entire Discord chats in CSV
format</a>.
Cool!</p>
<p><em>(Yeah I know, very original of me to use the same data source for my post.  I
will concede that I started this before I saw the workshop in the works, so
it’s more or less a miscalculation on my part.)</em></p>
<p>Anyway, to get the best view of the Discord’s server’s content, I decided to
export <em>all of the messages off all of the server’s channels.</em> After eating
milk and cereal waiting for all of them to get exported, I quickly ran the same
data processing as I did before for the heatmap, but now improved. Here we
go...</p>
<img alt="Message Heatmap" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-messages.2322ca03.png&amp;w=2048&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-messages.2322ca03.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-messages.2322ca03.png&amp;w=3840&amp;q=75" width="2000" height="2000" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>This heatmap was vastly more accurate, and also came with some pretty
interesting revelations. First off, the server’s members had a wider variety of
sleep schedules than I previously expected; no one sleeps only 3 hours a night,
and the times the server didn’t have messages is very small. Additionally, the
white areas (the times when the least amount of messages are sent) are mostly
during times when people are sleeping, which further reinforces the fact that
ACM’s Discord server is active <em>almost 24 hours of the day!</em></p>
<p>If you&#x27;re a member of ACM&#x27;s Discord, you might already notice that members
are incredibly active at around 2 AM, but this isn&#x27;t really reflected in the
heatmap. This is mostly because members are active in voice channels at
around that time, and voice channel times are not easily exportable, nor
present in my dataset.</p>
<p>One could also do this to look at one person’s messaging habits by filtering
all the chat messages to only include the specific user’s messages, and you can
get a similar heatmap. Here’s mine:</p>
<img alt="Storm&#x27;s Heatmap" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-storm.6a51c545.png&amp;w=2048&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-storm.6a51c545.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-heatmap-storm.6a51c545.png&amp;w=3840&amp;q=75" width="2000" height="2000" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>But, most importantly, looking at the all-time heatmap above
was the first time I was surprised by my graphics.</p>
<hr/>
<h2>“What’s with the spike at 11 PM?”</h2>
<p>You might’ve also noticed the spike of messages on Wednesdays at around 11 PM.
Now, at first I was confused, but I quickly realized what that spike could be
related to - <em>most CSE course PA’s are due Wednesdays at 11:59 PM.</em> I decided
to test that and see from where most of the messages of the spike originated
from.</p>
<p>I started by looking at what Wednesdays had the biggest amount of messages sent
at 11 PM and after. Surprisingly, one day stood out, which was the 27th of May.
Looking at the data on that day directly, I noticed that a specific board
conversation really dragged on, so turns out the spike is isolated. This was
surprising, as I really thought it may have been a consistent behavior. In some
way, this makes sense, as merely looking at the amount of messages sent per
month, we can tell that there has been exponential growth in conversations ever
since March of 2020.</p>
<img alt="Amount of Messages by Month" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-message-line.de540ab3.png&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-message-line.de540ab3.png&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbreadbot-message-line.de540ab3.png&amp;w=3840&amp;q=75" width="1554" height="640" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>But what about other more interesting conversations? More accurately, what are
the most common topics to cause “spikes” in messages?</p>
<p>...wait. This is getting off the rails.</p>
<p>At this point, I think it’s good to take a break. I’m falling in a hole,
tempted by the lure of big data, and I think the conversation starter question
can be answered some other time. It’s also better if I gather some more data.</p>
<hr/>
<h2>This was cool!</h2>
<p>I forgot how fun data can get once you’re actually getting into it. Not only do
you get interesting tidbits of insights that would be lost to the smaller
picture occasionally, you can also find some more interesting information that
you could potentially apply in the future to your activities. For instance, in
this case, I noticed that, while <code>/bread</code> was the third most popular command,
it would’ve probably been more popular if its response time was shorter;
<code>/bread</code> takes the longest time to reply with a picture of bread compared to
similar commands like <code>/dog</code> , and sometimes it isn’t even bread! Therefore,
it’s likely people didn’t like it as much as the others. (Conjecture: no one
likes lootbox mechanics) Maybe I should fix it sometime...</p>
<p>Anyway, I encourage you to also try to have fun with data in other more
interesting areas. Maybe there’s something you want to get more knowledgeable
in, and perhaps looking at observations from the problem may help you come up
with something kind of cool for the future. Whether it’s at your job, or maybe
even in your personal life, I’m sure you’ll find something you’re missing. And
if you don’t, well, at least you’ve gotten better at whipping up cool charts.
Maybe that’ll get useful in a meeting sometime! :)</p>
<hr/>
<p><em>Make sure to check out the Jupyter notebook so you can be get familiar with
the more technical aspects of data visualization. I don’t really get into the
minutiae in this post, but you’ll find out how to make the same charts in
there. All the code is commented and everything, so it’s good for future
perusal.</em></p>
<p><em>Also, I uploaded the public dataset of Discord messages as of publishing day
on the GitHub repo the Jupyter notebook is on. That way, maybe you can fiddle
with it as well and whip up some even cooler-looking graphs.</em></p>
<p><em>Lastly, make sure to check out ACM’s <a href="https://acmurl.com/discord" title="Discord Server">Discord</a>! It is active almost 24/7, and pretty much anything is talked
about in it. You’ll have a good time for sure!</em></p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Making Windows and Linux hold hands is interesting]]></title>
            <link>undefined/articles/arch-linux-dual-boot</link>
            <guid>undefined/articles/arch-linux-dual-boot</guid>
            <pubDate>Sun, 18 Aug 2019 00:00:00 GMT</pubDate>
            <description><![CDATA[Dual-booting a PC is by far the most rigorous test of anyone's ability to Google and be fine with arcane error messages. This is one of my first documented adventures through that kind of world.]]></description>
            <content:encoded><![CDATA[<p>Around two years ago, I installed Ubuntu onto my laptop, along with the
already existing installation of Windows 10. While the experience of using Linux
certainly gave me way to learn a lot of things that will be <em>very</em> useful in my
career as a software developer, there were a few glaring issues with the whole
system, most of which were admittedly my fault, caused by my faulty
installation.</p>
<p>Particularly, the biggest problem was the graphics. My laptop has dual graphics,
an integrated Intel HD Graphics 630 and an NVIDIA Quadro M2200, both which are
fantastic graphics cards for rendering video and for the occasional video
gaming. However, Ubuntu really doesn&#x27;t handle hybrid graphics well (or, at
least, that&#x27;s what I thought when I installed it), so I decided, back then, to
disable Hybrid Graphics in the BIOS and just go with the &quot;Discrete Graphics&quot;
option. That was a bad idea. Why?</p>
<p>Well, Windows doesn&#x27;t like change.</p>
<hr/>
<h2>Windows is a little baby sometimes</h2>
<p>I&#x27;m not kidding, every once in a while, Windows likes to really pull tantrums
whenever it sees certain hardware or BIOS changes (I mean, anyone would be angry
if you messed with their &quot;organs&quot;). Since Windows is an operating system
designed on the idea of backwards compatibility and stability at a hardware
level (hence its rise during the driver problem in the late 20th century), every
single change on a hardware level can screw with not only Windows, but
applications that relied on certain hardware optimizations to run.  And of
course, you can imagine the amount of issues that arose when Windows saw that
one graphics card <em>mysteriously disappeared</em> (it didn&#x27;t, but only we knew
that).</p>
<p>Even Ubuntu wasn&#x27;t liking the disappearance of the integrated graphics card.
While some video games were working, and most applications ran just fine, the
battery life was horrendous, due to the discrete graphics card constantly
running and draining battery at maximum performance. In addition, screen tearing
occurred pretty much all the time, possible due to some misconfiguration in the X
server of the computer. Regardless, the peak of my disapproval with my setup was
the appearance of not only constant glitches on the Windows side (not even the
browser worked well, it would constantly freeze and lock up), but also of my
first ever blue screen:</p>
<img alt="My first ever blue screen." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-first-blue-screen.9db4f32a.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-first-blue-screen.9db4f32a.jpg&amp;w=2048&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-first-blue-screen.9db4f32a.jpg&amp;w=2048&amp;q=75" width="1024" height="768" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>At this point, I finally decided it was the last straw. After finally finishing
with high school (yes, I&#x27;m done!), completing all of the immediate obligations I
had for my transition to college, and thus finally getting some free time in my
summer vacation, I finally committed to reinstalling my Linux OS.</p>
<p>And then I thought:</p>
<blockquote>
<p>I use the terminal all the time anyway, what if I go with something other than
Ubuntu?</p>
</blockquote>
<p>I know what you&#x27;re thinking, and yes, that&#x27;s when I became an Arch Linux user.</p>
<p>I use Arch, btw.</p>
<hr/>
<h2>Arch Linux is cool</h2>
<p>Let me start off by saying that, in my opinion, Arch Linux really isn&#x27;t for
everyone. However, I would also like to mention that a lot of people think that
Arch Linux is a difficult Linux distribution to use. Today, I would like to
dispel that notion.</p>
<p>For those here that might not know, Arch Linux is a rolling-release distribution
that claims to aim for a &quot;Keep It Simple, Stupid&quot; philosophy. Arch users can be,
well, elitist, but I simply chose Arch Linux not to be elitist, but another
reason:</p>
<p><strong>Terminals!</strong></p>
<p>As you know, from my
<a href="/2019/05/10/back-to-the-basics-a-simple-terminal/">previous article</a>,
I thoroughly enjoyed switching to terminals, and Arch Linux is a distribution
designed to be simple and lightweight. Therefore, it allows me to build my
workflow from the ground up, trimming out any fat. It also forces you to learn
the intricacies of most Linux-level abstractions (not on the kernel level,
though). If you want to go even deeper, try Gentoo or Slackware. Even better,
try Linux From Scratch. But for now, I&#x27;ll settle with Arch.</p>
<p>Also, if you&#x27;re a DIY kind of guy, Arch will be right up your alley.</p>
<hr/>
<h2>Time to clean house (I mean PC)</h2>
<p>Well, things started safely here. Firstly, I pulled out the hard drive which
contained my Ubuntu installation and backed it up as a disk image:</p>
<pre><code>$ dd if=/dev/sda of=Ubuntu-Drive-Backup.img status=progress
</code></pre>
<p>That part took longer than I expected, to be frank (my external SATA reader was
very bad). I also decided to create a separate disk image for my /home
partition, in order to have all the old documents quickly available whenever I&#x27;d
need them:</p>
<pre><code>$ dd if=/dev/sda2 of=Ubuntu-Home-Backup.img status=progress
</code></pre>
<p>After that, I pulled the Ubuntu drive out of my computer, re-enabled &quot;Hybrid
Graphics&quot; in the BIOS and booted Windows. As of that moment, my computer was
exactly the same as in the packaging (with the exception of one 2TB NTFS drive,
but that guy never screwed anything up, now did he?) and, lo and behold, soon
enough, things started to look up.</p>
<hr/>
<h2>Sometimes, Windows fixes itself</h2>
<p>I have had multiple times when I screwed things over in Windows (hey, I was a
kid once, too) and every once in a while, I&#x27;ll admit that Windows impresses me.
Soon enough, after I returned the computer back to normal, it began fixing a lot
of stuff.</p>
<p>For starters, my browser stopped freezing. My games returned to normal, with no
screen tearing, and my video editor, Adobe Premiere Pro, had its rendering speed
boosted significantly. Before, it&#x27;d take 5 minute to render 1 minute of 1080p
video. Now, it was a real time render, 1:1 ratio! Pretty cool! How&#x27;s that
happening?</p>
<p>Well, drivers and optimizations. Since most of the desktop world uses Windows,
most of software development manpower is devoted to improving performance on
Windows. Some drivers essentially pass over certain restrictions set in place by
operating systems to interact directly with the BIOS (and subsequently, the
hardware), permitting for increased performance. However, this operates under
the assumption that Windows has full control of the computer&#x27;s hardware (as well
as the computer and drivers being custom built and tuned up) which means no
sharing with potential intruders. And, well, I sort of messed that assumption
up. And here lie my problems.</p>
<p>But this time, I know what I&#x27;m doing. Essentially, we leave everything we can
unchanged: no changing of the BIOS settings except for those that are strictly
necessary, no screwing with other settings, and most importantly, making sure
Linux will play nicely with Windows (or rather, the other way around). Now how
do we do that?</p>
<hr/>
<h2>Let&#x27;s do it ourselves</h2>
<p>Most let installation scripts install their operating system. Not this time.
Arch Linux&#x27;s installation process is a relatively hands-on operation (at least,
mostly). 80% of the installation process is manual, requiring a person to pay
close attention to the edge cases, covering up any potential issues that might
arise. Luckily, there is this wonderful thing called the
<a href="https://wiki.archlinux.org/">Arch Wiki</a>, a beautiful place where magical things
happen. In the Arch Wiki, there are a myriad of pages filled with help,
documentation, and useful pages to not only fix problems with your Arch Linux
installation, but with recommendations for any kind of software or help you
might need. Cool stuff. After finding the Arch Wiki, I don&#x27;t think I used Google
to search for Linux help even once (especially because, for some reason, all
Linux articles lead to AskUbuntu).</p>
<p>Installation wasn&#x27;t very difficult on my computer, since the laptop
configuration I have is relatively standard. I just followed the
<a href="https://wiki.archlinux.org/index.php/Installation_guide">installation guide</a>.
There were only a few issues that needed to be done that weren&#x27;t so obvious from
the installation guide:</p>
<ul>
<li>Secure Boot had to be disabled in the BIOS. To be frank, it&#x27;s not like it&#x27;s
doing much anyway. Theoretically, it&#x27;s used to ensure no unsigned operating
systems and drivers are run, but the hassle of signing Arch Linux is huge.</li>
<li>I made sure to boot the installation image in UEFI mode, and when reaching the
partitioning step in the installation guide, I mounted the EFI partition
Windows comes with instead of making a new one. This is essential so as to not
confuse either Windows or the BIOS. I would highly recommend that you make a
backup of the EFI partition every time you have a &quot;feature update&quot; on Windows,
as it <strong>will</strong> screw up your EFI partition (I found out the hard way). To do a
backup of the EFI partition on Windows, run this command in an Administrator
PowerShell:</li>
</ul>
<pre><code>&gt; bcdedit /export C:\backup.bcd
</code></pre>
<p>After that, I finally had an Arch Linux shell! Hooray! And my Windows worked
fine, too!</p>
<p>Of course, having a shell isn&#x27;t enough. You will need a desktop environment, a
bunch of programs, a terminal emulator...</p>
<blockquote>
<p>Wait, what? Don&#x27;t those come with the OS?</p>
<p>-You, probably</p>
</blockquote>
<p>No, they don&#x27;t. And I think we all learn that the hard way.</p>
<hr/>
<h2>OSes have loads of bloat</h2>
<p>A base installation of Arch Linux clocks in at around 800 megabytes of disk
space. Now, you probably think that&#x27;s very small, and rightfully so! I mean,
Windows takes 10 gigabytes of space <em>at best</em>, but it&#x27;ll most likely take more.
The reason why Arch Linux is initially so small is that <em>it comes installed with
the minimum required for the machine to run</em>, which is a lot less than you would
expect.</p>
<p>There&#x27;s no desktop environment, no window manager, none of the stock programs
you&#x27;d expect a computer to come with (like a browser). There&#x27;s just, well...</p>
<p>A shell.</p>
<pre><code>[root@ARCHLINUX]:~$
</code></pre>
<p>Of course, just as I did, you&#x27;ll probably want more, but the beauty of Arch
Linux is that <em>you get to pick how much more.</em> While some may find that
time-consuming and useless, I find it liberating.</p>
<hr/>
<h2>Remember: read the whole wiki</h2>
<p>This is a reminder for you as much as it is for myself, because I also always
forget to read the wiki to find solutions to my problems. It&#x27;s a huge place, and
I would highly recommend you read all the sections from the <a href="https://wiki.archlinux.org/index.php/General_recommendations">&quot;General
recommendations&quot;</a>
page, which can help with what to do after finishing the installation process,
and where to go from there. I personally decided to opt for a more
keyboard-centric desktop environment, using the <a href="https://github.com/Airblader/i3">i3 window
manager</a>, the <a href="https://st.suckless.org/">&quot;st&quot; terminal
emulator</a>, and a whole bunch of terminal programs that
are essentially alternatives for desktop applications, but you can find most of
them in my previous article.</p>
<p>For those incredibly curious, here is a screenshot of how it looks now:</p>
<img alt="The screenshot of my desktop." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fscreenshot-arch-linux.6963d7e0.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fscreenshot-arch-linux.6963d7e0.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fscreenshot-arch-linux.6963d7e0.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>If you would like a similar setup, you can check out <a href="https://larbs.xyz">LARBS</a>,
a script for automatically installing a functional desktop environment with a
keyboard-centric workflow. That is the setup I started with, and tweaked as time
went on to my liking. I would recommend you test it out first with a new user
before actually diving into the whole setup. If you simply install it with no
idea what&#x27;s awaiting you, it won&#x27;t be fun.</p>
<hr/>
<h2>So, does this whole thing work?</h2>
<p>Kind of. There are still a few issues with my computer that I will never be able
to fix. For instance, there is no open-source driver that works with my graphics
card, since my graphics card is &quot;experimental&quot; compared to mainstream cards,
which means there&#x27;s not much support for it. I could install proprietary
drivers, but that&#x27;s a whole other behemoth that is only fitting for another
time. This essentially means that there are still two tasks that can only be
done on Windows: video editing and video gaming. Fortunately enough, the
times in which I do either almost always never overlap with times I use Linux
(coding, doing anything else).</p>
<p><em>Update (2019-09-08): After a bit of browsing around, I ended up fixing the
video gaming problem by installing</em> <a href="https://wiki.archlinux.org/index.php/NVIDIA">proprietary NVIDIA
drivers</a> <em>and then using</em>
<a href="https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Using_optimus-manager">optimus-manager</a>
<em>to allow for switching between graphics cards. There were a few ACPI issues
that were specific to my laptop that I had to fix as well, but hopefully you
won&#x27;t have them if you try the same thing. When in doubt, read the wiki!</em></p>
<p>I&#x27;m happy with the way it turned out, though. Compared to the incomprehensible
chaos that was my computer before, now it&#x27;s clean, lean, and works splendidly.
But even more important is the fact that I love using it now more than ever,
hence why I feel like doing so much more work! That&#x27;s how everyone should feel
when using a computer. You should feel at home, with the computer being an
extension of you, bending to your will and helping you shape the world.</p>
<p>Maybe you can try changing your computer too, I&#x27;m certain you&#x27;ll feel the same
way.</p>
<hr/>
<p>If you want help with Arch Linux, check the wiki (gotcha). <em>But</em> if you have
questions regarding my setup, and how I&#x27;m faring with my new PC, don&#x27;t hesitate
to email me.</p>
<p>I&#x27;m also thinking of making a comment section, but I&#x27;ll think about it. I don&#x27;t
have to do it <em>today</em>...</p>
<p><em>Update (2019-11-24): Comments are live all over the blog!</em>
<em>Update (2022-09-21): Comments will come back after I manage to find a mroe aesthetic way to put them back in this redesign.</em></p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Back to the basics: a simple terminal]]></title>
            <link>undefined/articles/adventures-in-terminal</link>
            <guid>undefined/articles/adventures-in-terminal</guid>
            <pubDate>Fri, 10 May 2019 00:00:00 GMT</pubDate>
            <description><![CDATA[Ah, the terminal. A canvas of never-ending text streams. Somehow I always end up trying to spend all my time in your loving arms.]]></description>
            <content:encoded><![CDATA[<p>Ever since the release of Windows&#x27; Virtual Desktops, I&#x27;ve found them very
useful. I thought that compartmentalizing every single part of my PC workflow
would be excellent using Virtual Desktops: I could have one desktop for
development, one for my <a href="/articles/the-life-stack">L.I.F.E Stack</a>,
one for my times when I simply relax (music, chat, et cetera) and that was
pretty much it. Even adveafter my switch from Windows to Linux, it was actually
pretty good in order to stop my constant gliding  between windows and
procrastination, but it soon turned to this:</p>
<img alt="A GIF of me just switching between desktops extremely quickly." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitching-desktops.0bad6164.gif&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitching-desktops.0bad6164.gif&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fswitching-desktops.0bad6164.gif&amp;w=3840&amp;q=75" width="1366" height="768" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>I think this was a bad idea.</p>
</blockquote>
<p>To be frank, this soon turned in a constant wasting of time of switching
desktops that was not only visually jarring, but also time-wasting and useless,
and it never really stopped me from opening one of the &quot;non-productive&quot; virtual
desktops anyway. So, obviously, I had to do something about it.</p>
<p>I quickly decided that the best thing by far to improving my productivity and
need to multitask by simply constraining myself significantly: no browser, no
more than one virtual desktop, and trying to limit the apps I could open on my
computer at one time without it causing inconveniences to me.</p>
<p>The answer? A terminal!</p>
<hr/>
<h2>I love terminals!</h2>
<p>Honestly, they&#x27;re super cool. Not only do they make you look like one of those
l33t haxXxors, but they also make it incredibly easy to program with an actual
understanding of the deeper, more intricate aspects of coding that very many
IDEs tend to abstract. I&#x27;ve always been of the opinion that knowing how things
work beneath the cover to be very important, which is why I&#x27;ve always been fond
of terminals.</p>
<p>As such, when the idea struck to convert my entire computer life to one window,
I quickly fell in love with the idea, and I set out and got to work at being
able to make such a thing. I obviously needed 4 basic things to have in a
terminal that would seriously need migration, the rest was merely a distraction:</p>
<ul>
<li>my development environment</li>
<li>my e-mail and chat rooms</li>
<li>my music</li>
<li>my journal and L.I.F.E Stack</li>
</ul>
<p>The first thing I did for my migration, though, is move to a different terminal:
Zsh. While Bash (the default shell for basically everyone) is good, I prefer
Zsh simply due to the <a href="https://github.com/robbyrussell/oh-my-zsh/">Oh-My-Zsh</a>
project, which is the only plugin &quot;distribution&quot; I actually like.</p>
<p>I have the default theme, along with <em>very few</em> plugins: <em>sudo</em>, <em>git</em> and
<em>git-flow</em>, <em>npm</em>, <em>golang</em>, and <em>you-should-use</em> (reminds me to use the aliases
set in the Zsh configuration). A simple shell for a simple man, and I love it
just the way it is.</p>
<img alt="Screenshot of the very simple shell." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fa-simple-shell.207712a9.jpg&amp;w=640&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fa-simple-shell.207712a9.jpg&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fa-simple-shell.207712a9.jpg&amp;w=1920&amp;q=75" width="610" height="241" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>After that, however, I soon realized that I will probably need a bit of help in
order to keep a bunch of terminal programs in one TTY, and the help came in the
form of an old friend of mine: Tmux! Tmux stands for <strong>T</strong>erminal
<strong>Mu</strong>ltiple<strong>x</strong>er and it is the best way to have multiple terminals in one
TTY (better than <em>screen</em>, don&#x27;t @ me). After a bit of configuration, which took
heavy inspirations from <a href="https://github.com/gpakosz/.tmux">this .tmux.conf</a>, I
finally had the ability to have a terminal work as my main desktop. It also
looks cool, and as we all know, style is always a plus.</p>
<img alt="A screenshot of my tmux session." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftmux-screenshot.2f973b71.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftmux-screenshot.2f973b71.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftmux-screenshot.2f973b71.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Now, on to the development part. I need a text editor. I don&#x27;t like Nano,
but Emacs is too hard, so what am I left with?</p>
<p>...Oh, no...</p>
<hr/>
<h2>We meet again, Vim.</h2>
<p>Vim! Of course, the biggest enemy of every non-terminal-savvy programmer of
computer user in the <strong>world</strong>. It doesn&#x27;t matter who you are, you have been
stuck in Vim without being able to quit from it at least once in your computer
science career. At least that&#x27;s how the joke goes, right?</p>
<img alt="Yeah, yeah, we all get stuff in Vim sometimes." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvim-welcome.65b8f799.jpg&amp;w=640&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvim-welcome.65b8f799.jpg&amp;w=1080&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvim-welcome.65b8f799.jpg&amp;w=1080&amp;q=75" width="507" height="260" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>I don&#x27;t get it though, it says how to exit it on the welcome screen!</p>
</blockquote>
<p>In case you haven&#x27;t been exposed to it, Vim is a special kind of text editor in
your terminal, notorious for its incredibly weird keybindings that, while
incredibly stupid at first, allow you to write things incredibly quickly after
a while. My first tip would be the <code>.</code> command, which allows you to repeat the
last action you&#x27;ve done in Vim, which can be useful if you have to repeat
something throughout your file, like searching for a word. (You do that by
typing <code>/</code> and then the word to search in Normal mode, which is the default
one). Believe it or not, Vim actually makes you quite productive if you start
learning it right, even though it takes a long time.</p>
<p>Personally, I&#x27;ve seen a lot of people be scared of it, and for good reason, but
I have two pieces of advice that I found were crucial to not only get me used to
Vim, but also to be productive to it.</p>
<p>Most importantly, no matter what, you must <strong>never</strong> use anyone else&#x27;s config blindly,
ever. The best and quickest way to be overwhelmed by Vim is to download some
random Vim distribution and use it with no clue as to what it actually does,
what bindings it has and what plugins it installs. I recommend simply starting
off by installing some <a href="https://github.com/tpope/vim-sensible">sensible Vim defaults</a>
and then adding plugins as you go to your Vim configuration, depending on what
you need. Always follow the &quot;Keep It Simple, Stupid&quot; rule, and grow along with
your Vim configuration. Only add a line in your .vimrc file if you are ever
actually certain you like that settings.</p>
<p>Personally, the only things I found worth adding to default Vim is a Powerline,
the Monokai theme and
<a href="https://github.com/Valloric/YouCompleteMe">YouCompleteMe</a>, an auto-completion
engine that is actually pretty damn good. That being said, vim is now my main
text editor, and I absolutely love it. I write faster than I&#x27;ve ever written
code before.</p>
<img alt="A screenshot of my Vim setup on a C++ exercise." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvim-screenshot.9ecc4adf.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvim-screenshot.9ecc4adf.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvim-screenshot.9ecc4adf.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>Mail sucks less now, honestly.</h2>
<p>By far my most disorganized part of my life was my e-mail. My old Gmail address
looks horrible, and that is excluding the absolute monstrosity that is my Yahoo!
e-mail (whose password I forgot since its creation nearly 9 years ago). I&#x27;ve
always had a problem with sorting my e-mail: I found interfaces cumbersome,
complicated with their automatic labeling. I would miss e-mails, I would screw
up with my categories, and every time I would connect an e-mail client to them,
some part of it would mess up.</p>
<p>This is why, for one thing, I constructed my own mail server (that&#x27;ll be a story
for another time), and secondly, it&#x27;s why I started looking for more clean
alternatives to e-mail clients, and where else to go but the terminal.</p>
<p>Meet Neomutt: a fork of Mutt that turns e-mail into a very simple terminal
application. Nothing fancy, just folders, inboxes, and a dead simple interface
for reading and managing e-mail. No more, no less.</p>
<img alt="Neomutt in action." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fneomutt-screenshot.f2c303f3.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fneomutt-screenshot.f2c303f3.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fneomutt-screenshot.f2c303f3.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Surprisingly, this has helped not only with my e-mail organization, but also
made me realize that I had some bad e-mail habits. For instance, I used to
always archive everything, no matter what. Now, I read my e-mails, I sort
through them, I trim away whatever newsletters I&#x27;m not interested in, etc.
It&#x27;s actually really nice now, and I enjoy the process.</p>
<p>Configuring Mutt, no matter what, can be a pain, though, which is why I started
with a bit of help. I first inspected to see what
<a href="https://github.com/LukeSmithxyz/mutt-wizard">this Mutt configuration wizard</a>
would do, and worked from there. I basically have all my e-mails configured
there for now, but I will slowly deprecate my other e-mail addresses to make sure
I don&#x27;t end up missing e-mails by not checking. In addition, using this
configuration, Neomutt integrates really well with GPG, so I end up having a
super simple process for singing and encrypting e-mails. Overall, I&#x27;d recommend
you try it out, too. It might start off badly, but the pace will probably pick
up soon.</p>
<hr/>
<h2>Spotify in the terminal? No way.</h2>
<p>Yeah, I use Spotify for music. I know, it&#x27;s basic, but it gets the job done.
Unfortunately, there&#x27;s no officially supported terminal client for Spotify.
Luckily, there&#x27;s a workaround.</p>
<p>I used <a href="http://mopidy.com/">Mopidy</a> which is a really cool daemon for the MPD
protocol, the standard way of listening to music from your terminal. Mopidy
comes with a lot of configuration, but I personally simply added to it the
Spotify backend, along with some local music that I didn&#x27;t have on Spotify. I
did later add a Podcast backend for the very few podcasts I occasionally listen
to, and a scrobbler for Last.fm. However, you&#x27;re probably asking:</p>
<blockquote>
<p>&quot;But where&#x27;s the terminal client for the music?</p>
</blockquote>
<p>That, my friend, would be
<a href="https://wiki.archlinux.org/index.php/ncmpcpp">ncmpcpp</a>, which is a terminal
client for the MPD protocol. I followed
<a href="https://medium.com/@theos.space/using-mopidy-with-spotify-and-ncmpcpp-44352f4a2ce8">this guide</a>
to enable the visualizer as well (I wouldn&#x27;t recommend following the Spotify
part, it&#x27;s outdated), and that was it! Music in my terminal. Honestly, it looks
pretty cool, too!</p>
<img alt="Me listening to music." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftmux-music-screenshot.f8a74f7a.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftmux-music-screenshot.f8a74f7a.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftmux-music-screenshot.f8a74f7a.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>Typing my thoughts in the terminal made me revision my previous workflow.</h2>
<p>You see, previously, I used Zim for my note-taking. I realized that,
surprisingly enough, even <em>that</em> was too complicated. In addition, it lacked a
compatibility layer with my mobile phone, which would&#x27;ve made it easier to write
in my journal. As such, I switched from Zim to <a href="https://joplinapp.org/">Joplin</a>
for my note-taking. Honestly, it not only works better with cross-platform
stuff (mobile app and all), it&#x27;s encrypted and can be synced easily. At its
core, it&#x27;s also essentially a bunch of Markdown notes, so easily exportable.
Migration was easy, since all I had to do was export notes from Zim using
Markdown and import them to Joplin just as easily. Joplin also comes with a
terminal client, so imagine my delight that at this point, 100% of my activities
on my PC could be switched to a terminal fully! Amazing!</p>
<img alt="A Joplin screenshot." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjoplin-screenshot.5953bc2a.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjoplin-screenshot.5953bc2a.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjoplin-screenshot.5953bc2a.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>But what about the browser?</h2>
<p>Alas, I cannot transfer my browser to a terminal (I mean, I could, but not
fully), and I am ok with that. The problem with web browsers nowadays is that
they let you do anything in the same environment. This means that they&#x27;re a
jack-of-all-trades, master of none kind of deal. In addition, browsers are the
bane of my existence, since I can oh so easily open a new tab and go on Reddit
or YouTube and waste time doing stuff there. I think that it&#x27;s best this way.</p>
<p>I&#x27;ve been using this terminal setup on my PC for a while now and I can honestly
say I am incredibly satisfied with it. I know that it&#x27;s not fancy-looking, and
obviously not particularly advanced (yet, that .vimrc keeps growing), but I&#x27;m
certain that, with time, my terminal will keep growing with me, allowing me to
slowly learn to be more effective in it, more effective than ever before.</p>
<p>I don&#x27;t need all the tools in the world <em>right now</em>, I need just enough to get
myself going, and that&#x27;s all you really need. If you ever need more, you can get
it when you need it, but for now, all I need is a shell.</p>
<p>And honestly, it might be all I ever need.</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[From a sitting box to a busy hub]]></title>
            <link>undefined/articles/old-box-to-hub</link>
            <guid>undefined/articles/old-box-to-hub</guid>
            <pubDate>Wed, 20 Feb 2019 00:00:00 GMT</pubDate>
            <description><![CDATA[A walkthrough on how I took my VPS and turned it into Stormhub, my self-hosted paradise. This was before it all ran on self-hosted Kubernetes.]]></description>
            <content:encoded><![CDATA[<img alt="This is my server doing nothing." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-node1-htop-idling.12bac8c7.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-node1-htop-idling.12bac8c7.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-node1-htop-idling.12bac8c7.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>0.02 load? 200 MB RAM? Well, that&#x27;s just inefficient.</p>
</blockquote>
<p>For almost 3 years, I&#x27;ve owned a VPS online that&#x27;s been randomly used for a great many things. I&#x27;ve
used it for my endeavors in ethical hacking, as a NAS, as a temporary server for my various side-projects,
but I&#x27;ve never used it for a clear and defined purpose. This ended up being rather disconcerting,
since the box itself was nothing to scoff at: it was a box of 4 GB RAM, 2 GHz box with 80 gigs of
SSD space, which is overkill considering what I was using it for. I mean, if I exposed a Raspberry Pi
to the net and did the same things on it as I did on the VPS, it would&#x27;ve been <em>significantly</em> more
cost-effective.</p>
<p>Ergo, after literally 7 seconds of thought and consideration, I decided to take it upon myself to
put that old box to good use! After all, I have 4 gigs of RAM to use up, I&#x27;ll fill them all, even if
I have to use Chrome tabs to do so. But what did I need first?</p>
<hr/>
<h2>I need a domain!</h2>
<p>Turns out going to a browser and typing the IP of a server is unappealing. Who knew? I needed a domain to
make sure that you can simply access my blog from anywhere. I had one for the blog (still exists, it&#x27;s
<a href="http://stormfirefox1.github.io">stormfirefox1.github.io</a>, but I won&#x27;t use that anymore since it&#x27;s not
really memorable), but I couldn&#x27;t point to my own server with it, since I couldn&#x27;t control GitHub&#x27;s DNS,
right? I could, but I didn&#x27;t research.</p>
<p>I&#x27;ve always wanted to own a domain, and there was no time like the present. I decided to pick up a domain
that would fit my username, <a href="https://stormhub.io">stormhub.io</a>, which as you can see, is currently being
used by this blog! I picked Stormhub because this domain will probably eventually host many side-projects.
Buying a domain is not that hard, what matters is you pick a good provider. Luckily for
me, I didn&#x27;t have to deal with GoDaddy, which sucks a lot, and I bought my domain from a very old provider,
<a href="http://007names.com">007names.com</a>, and I&#x27;m sure you can try them, too. After I bought the domain, I pointed
the domain to my old box (from the Manage DNS settings), as well as a bunch of subdomains for what I was
planning to use over time (the domain costs, but the subdomains were free).</p>
<img alt="My &quot;Manage DNS&quot; menu." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2F007names-dns-menu.7ce62a0e.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2F007names-dns-menu.7ce62a0e.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2F007names-dns-menu.7ce62a0e.jpg&amp;w=3840&amp;q=75" width="1919" height="758" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Now that that&#x27;s done, what was I planning to use Stormhub for?
Well, I wanted to have:</p>
<ul>
<li>the blog</li>
<li>an analytics platform for said blog</li>
<li>my landing page, since everyone needs one, right?</li>
<li>my password vault, because I was too lazy to carry my KeePass database everywhere</li>
<li>a monitoring platform for the server, to make sure it doesn&#x27;t use too much RAM and explode</li>
</ul>
<p>Well, I have my objective, let the games begin.</p>
<pre class="language-bash"><code class="language-bash">root@STORMHUB_NODE_1:~<span class="token comment"># crack_knuckles</span>
Cracking<span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span>
</code></pre>
<hr/>
<h2>Blog and Landing Page</h2>
<p>The easiest thing to host on a server is a static site, since all you do is serve webpages, but the problem is
serving multiple separate sites from the same server. Now that&#x27;s different, and how do you do that? The easiest
way would be to store all the sites under different subdirectories, but that&#x27;s just bad and lazy, particularly
since you&#x27;d end up with ugly links like <code>stormhub.io/blog/post/...</code>, which isn&#x27;t very nice. In addition, if I
ever switched to multiple servers, I&#x27;d end up having a problem with migrating the content and you, fellow
readers, to the new domain later, which might happen, who knows? Ergo, I decided to opt for a subdomain
approach of hosting all my content, which would be problematic if we were to use the same server. Why is that?</p>
<p>Well, as you can imagine, all domains point to an IP address, and if that IP address is the same (i.e. the same
server), then you can only server one web server on port 80 (the default HTTP port)
since you have, well, one server. So, how do you host multiple webservers on the same server on the <em>same</em> port,
all while pointing all subdomains to those webservers and having them serve websites differently depending from
what subdomain you queried the server from?</p>
<p>Through black magic, of course.</p>
<p>I suppose I had to pull the ultimate networking trump card out.</p>
<hr/>
<h2>Reverse proxies!</h2>
<p>Reverse proxies are essentially the, well, reverse of the proxies you are probably aware of. HTTP proxies, normally,
take the packets from a specific client and send them all from the server to whatever other site the client is
looking for, thus allowing for multiple clients to appear as if calling HTTP requests from one server. Commonly,
this is used for anonymity for all the clients connected, as well as a way to prevent attacks to a client directly.</p>
<img alt="A graph of a HTTP proxy and reverse proxy in action." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fproxy-representation.950dccb3.jpg&amp;w=640&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fproxy-representation.950dccb3.jpg&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fproxy-representation.950dccb3.jpg&amp;w=1920&amp;q=75" width="614" height="437" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Now, reverse proxies essentially do the opposite. Instead of having multiple clients sending HTTP requests to the proxy,
you have multiple servers on different ports communicating with the reverse proxy, and the reverse proxy takes all the
requests it receives and routes them to the server that needs them, according to a set of. This effectively allows you
to front a number of HTTP servers behind a single reverse proxy, and that means you can have multiple programs run
effectively on the same port. This not only solves my single-server problem, but also allows for me to host multiple
servers on the same domain using virtual hosts, which most reverse proxies have, that will allow for the reverse proxy
to differentiate requests using the subdomain the request points to.</p>
<p>Now, firstly, I downloaded NGINX and made a new configuration file in the configuration directory for every site I would
need:</p>
<pre class="language-bash"><code class="language-bash">root@STORMHUB_NODE_1:~<span class="token comment"># apt install nginx</span>

<span class="token comment"># [OUTPUT SNIPPED]</span>

root@STORMHUB_NODE_1:~<span class="token comment"># touch /etc/nginx/sites-available/stormhub.io</span>
root@STORMHUB_NODE_1:~<span class="token comment"># touch /etc/nginx/sites-available/blog.stormhub.io</span>
</code></pre>
<p>This essentially ensures that I have the sites <em>available</em> for use by NGINX, named by domain. Now, they&#x27;re both static sites,
so the configuration file is pretty simple, in fact a snippet of the original configuration file that nginx gives you.</p>
<pre class="language-nginx"><code class="language-nginx">
<span class="token comment"># Default NGINX static site configuration</span>

<span class="token comment"># This works with HTTP only, however.</span>

<span class="token directive"><span class="token keyword">server</span></span> <span class="token punctuation">{</span> <span class="token comment"># listening section, we&#x27;ll work with SSL as well later on</span>
<span class="token directive"><span class="token keyword">listen</span> <span class="token number">80</span> default_server</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">listen</span> [::]:80 default_server</span><span class="token punctuation">;</span>

        <span class="token directive"><span class="token keyword">root</span> /var/www/stormhub.io/html</span><span class="token punctuation">;</span>

        <span class="token comment"># Add index.php to the list if you are using PHP</span>
        <span class="token directive"><span class="token keyword">index</span> index.html index.htm index.nginx-debian.html</span><span class="token punctuation">;</span>

        <span class="token comment"># Change to the domain name you want</span>
        <span class="token directive"><span class="token keyword">server_name</span> stormhub.io www.stormhub.io</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">error_page</span> <span class="token number">404</span> /404.html</span><span class="token punctuation">;</span> <span class="token comment"># custom 404 error page</span>
        <span class="token directive"><span class="token keyword">location</span> = /404.html</span> <span class="token punctuation">{</span>    <span class="token comment"># this points to the page</span>
                <span class="token directive"><span class="token keyword">root</span> /var/www/stormhub.io/html</span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">internal</span></span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token directive"><span class="token keyword">location</span> /</span> <span class="token punctuation">{</span>
                <span class="token comment"># First attempt to serve request as file, then</span>
                <span class="token comment"># as directory, then fall back to displaying a 404.</span>
                <span class="token directive"><span class="token keyword">try_files</span> <span class="token variable">$uri</span> <span class="token variable">$uri</span>/ =404</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
</code></pre>
<p>You need to make sure you don&#x27;t have two &quot;default&quot; servers, so you might have to delete the &quot;default&quot; file already present in the
<code>sites-available</code> folder. But after that, NGINX needs a quick little refresh and it should display exactly what we want, a static
site.</p>
<p>You should also make sure to have only one &quot;default_server&quot; per each port (only one port &quot;listen&quot; directive that is default,
basically), something I didn&#x27;t do my first time and caused the server to not start. The best way to be sure it can run is to do
a check with NGINX before you restart the service that runs NGINX:</p>
<pre class="language-bash"><code class="language-bash">root@STORMHUB_NODE_1:~<span class="token comment"># nginx -t</span>
nginx: the configuration <span class="token function">file</span> /etc/nginx/nginx.conf syntax is ok
nginx: configuration <span class="token function">file</span> /etc/nginx/nginx.conf <span class="token builtin class-name">test</span> is successful
root@STORMHUB_NODE_1:~<span class="token comment"># systemctl restart nginx</span>
</code></pre>
<img alt="The StormHub site being online and running." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-site-example.8fc62878.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-site-example.8fc62878.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-site-example.8fc62878.jpg&amp;w=3840&amp;q=75" width="1920" height="382" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>But, as you can probably tell, I&#x27;m not satisfied with HTTP. I mean, after all, it&#x27;s very important to add HTTPS to your server, even
if it&#x27;s a static site, simply because it&#x27;ll be easier to have HTTPS on your other servers as well. But usually, SSL certificates
cost, right? Nope.</p>
<hr/>
<h2>Thank you, Let&#x27;s Encrypt!</h2>
<p><a href="https://letsencrypt.org/">Let&#x27;s Encrypt</a> allows people to get free SSL certificates that need to be renewed, provided you can
prove the ownership of a domain (i.e. the A record of your DNS record points to the server you&#x27;re issuing the certificate from).
In my case, stormhub.io was owned by that box, so I began issuing certificated for all the domains that I would need on this
server:</p>
<pre class="language-bash"><code class="language-bash">
root@STORMHUB_NODE_1:~<span class="token comment"># certbot certonly</span>
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?

---

<span class="token number">1</span>: Spin up a temporary webserver <span class="token punctuation">(</span>standalone<span class="token punctuation">)</span>
<span class="token number">2</span>: Place files <span class="token keyword">in</span> webroot directory <span class="token punctuation">(</span>webroot<span class="token punctuation">)</span>

---

Select the appropriate number <span class="token punctuation">[</span><span class="token number">1</span>-2<span class="token punctuation">]</span> <span class="token keyword">then</span> <span class="token punctuation">[</span>enter<span class="token punctuation">]</span> <span class="token punctuation">(</span>press <span class="token string">&#x27;c&#x27;</span> to cancel<span class="token punctuation">)</span>: <span class="token number">1</span>
Plugins selected: Authenticator standalone, Installer None
Please enter <span class="token keyword">in</span> your domain name<span class="token punctuation">(</span>s<span class="token punctuation">)</span> <span class="token punctuation">(</span>comma and/or space separated<span class="token punctuation">)</span>
<span class="token punctuation">(</span>Enter <span class="token string">&#x27;c&#x27;</span> to cancel<span class="token punctuation">)</span>: stormhub.io, blog.stormhub.io

Performing the following challenges:
http-01 challenge <span class="token keyword">for</span> stormhub.io
Cleaning up challenges

<span class="token comment"># [OUTPUT SNIPPED]</span>

</code></pre>
<p>After it can issue the challenge (which needs your HTTP server closed, so do that first), you&#x27;ll get certificates for your domain
available at <code>/etc/letsencrypt/live/[DOMAIN]/</code> and you can use them with anything! Awesome!</p>
<p>Now NGINX needed to listen for SSL and be pointed to my certificates, so I did that:</p>
<pre class="language-nginx"><code class="language-nginx">
<span class="token comment"># Default NGINX static site configuration</span>

<span class="token comment"># This only serves HTTPS, we need to redirect to this from HTTP.</span>

<span class="token directive"><span class="token keyword">server</span></span> <span class="token punctuation">{</span> <span class="token comment"># SSL configuration, we&#x27;ll use the &quot;default&quot; # configuration file to redirect to this</span>
<span class="token directive"><span class="token keyword">listen</span> <span class="token number">443</span> ssl default_server</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">listen</span> [::]:443 ssl default_server</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">ssl</span> <span class="token boolean">on</span></span><span class="token punctuation">;</span>

        <span class="token comment"># SSL certificate section, change accordingly</span>
        <span class="token comment"># to the domain name you want</span>
        <span class="token directive"><span class="token keyword">ssl_certificate</span>         /etc/letsencrypt/live/stormhub.io/fullchain.pem</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">ssl_trusted_certificate</span> /etc/letsencrypt/live/stormhub.io/chain.pem</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">ssl_certificate_key</span>     /etc/letsencrypt/live/stormhub.io/privkey.pem</span><span class="token punctuation">;</span>

        <span class="token directive"><span class="token keyword">root</span> /var/www/stormhub.io/html</span><span class="token punctuation">;</span>

        <span class="token comment"># Add index.php to the list if you are using PHP</span>
        <span class="token directive"><span class="token keyword">index</span> index.html index.htm index.nginx-debian.html</span><span class="token punctuation">;</span>

        <span class="token directive"><span class="token keyword">server_name</span> stormhub.io www.stormhub.io</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">error_page</span> <span class="token number">404</span> /404.html</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">location</span> = /404.html</span> <span class="token punctuation">{</span>
                <span class="token directive"><span class="token keyword">root</span> /var/www/stormhub.io/html</span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">internal</span></span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token directive"><span class="token keyword">location</span> /</span> <span class="token punctuation">{</span>
                <span class="token comment"># First attempt to serve request as file, then</span>
                <span class="token comment"># as directory, then fall back to displaying a 404.</span>
                <span class="token directive"><span class="token keyword">try_files</span> <span class="token variable">$uri</span> <span class="token variable">$uri</span>/ =404</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
</code></pre>
<p>However, now that I&#x27;ve changed the configuration files to only listen for SSL on 443, I need for someone to redirect
visitors to SSL permanently, and that requires a different configuration file, &quot;default&quot;, to listen on HTTP by default
and redirect people to HTTPS directly.</p>
<pre class="language-nginx"><code class="language-nginx"><span class="token directive"><span class="token keyword">server</span></span> <span class="token punctuation">{</span>
<span class="token directive"><span class="token keyword">listen</span> <span class="token number">80</span> default*server</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">listen</span> [::]:80 default_server</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">server_name</span> *</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">return</span> <span class="token number">301</span> https://<span class="token variable">$host</span><span class="token variable">$request_uri</span></span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
<p>And...does it work? Yes, it does. Great. Now for the passwords!</p>
<hr/>
<h2>An online password database?</h2>
<blockquote>
<p>But that can&#x27;t be smart...or safe...eh, whatever.</p>
</blockquote>
<p>As you know, from <a href="/2018/09/28/adventures-in-privacy-part-1-keys-everywhere/">one of my previous posts</a>, I use a password
database called KeePass, which I used to keep all my passwords locally, locked with my YubiKey. However, there was one big
problem with it: <strong>portability</strong>. I didn&#x27;t have my password database anywhere but my phone and laptop, and even so, it was
cumbersome to keep opening the database, since I had to sync the database using this box, always downloading 2-factor .xml
files, dealing with buggy programs, etc. This had to stop, no matter how much I liked KeePass. In the end, I started looking
up another open-source password manager that I could personally audit and self-host, ensuring my data was mine.</p>
<p>I found one called <a href="https://bitwarden.com">Bitwarden</a>, and it intrigued me the moment I saw it. It is self-hosted, open-source
comes with 2-factor YubiKey authentication, and could even autocomplete in your browser. It is as complete as KeePass, and
even has an official mobile app. So, I said &quot;let&#x27;s try it!&quot;</p>
<p>Hosting it is actually relatively easy, and it even comes with Let&#x27;s Encrypt integration, but that would screw with NGINX and
my certificates there, so I said &quot;no&quot; to all options for HTTPS in the installation process, since I was intending to put
Bitwarden behind the reverse proxy.</p>
<pre class="language-bash"><code class="language-bash">
root@STORMHUB_NODE_1:~<span class="token comment"># ./bitwarden.sh install</span>

<span class="token comment"># \_ \_ \_ \_</span>
<span class="token comment"># | |** (_) |_** \_**\_ \_ \_ ** **| | \_** \_ \_\_</span>
<span class="token comment"># | &#x27;_ \| | \_\_\ \ /\ / / _`| &#x27;__/ _` |/ _ \ &#x27;_ \</span>
<span class="token comment"># | |_) | | |_ \ V V / (_| | | | (_| | \_\_/ | | |</span>
<span class="token comment"># |_.\_\_/|_|\_\_| \_/\_/ \__,_|\_| \__,_|\_\__|_| |\_|</span>

Open <span class="token builtin class-name">source</span> password management solutions
Copyright <span class="token number">2015</span>-2019, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

<span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">=</span>

Docker version <span class="token number">17.12</span>.1-ce, build 7390fc6
<span class="token function">docker-compose</span> version <span class="token number">1.17</span>.1, build unknown

<span class="token punctuation">(</span><span class="token operator">!</span><span class="token punctuation">)</span> Enter the domain name <span class="token keyword">for</span> your Bitwarden instance <span class="token punctuation">(</span>ex. bitwarden.company.com<span class="token punctuation">)</span>: <span class="token punctuation">[</span>DOMAIN<span class="token punctuation">]</span>

<span class="token punctuation">(</span><span class="token operator">!</span><span class="token punctuation">)</span> Do you want to use Let&#x27;s Encrypt to generate a <span class="token function">free</span> SSL certificate? <span class="token punctuation">(</span>y/n<span class="token punctuation">)</span>: n

<span class="token comment"># [OUTPUT SNIPPED]</span>

<span class="token comment"># Select &quot;no&quot; for all options if looking to back with reverse proxy</span>

</code></pre>
<p>Once it is done installing, you start it using <code>./bitwarden.sh start</code> and it&#x27;s online and ready to go! I put most
of my passwords from KeePass into Bitwarden (some didn&#x27;t get imported because their encrypted value would be too
long in memory, so imagine the sheer length of the random passwords I put in there) and installed the extensions
everywhere.</p>
<p>Now, the problem was putting the installation behind NGINX, which is a bit more difficult than a static
site. Why is that? Well, it&#x27;s because a static site only needs to receive GET requests, while a web application
receives POST requests, which has a body that won&#x27;t be transferred by the reverse proxy in a static site configuration.
That is, of course, unless you actually use the reverse proxy for what it was made for...reverse proxying.</p>
<p>The configuration file for the password vault was much simpler than I thought it would be:</p>
<pre class="language-nginx"><code class="language-nginx">
<span class="token comment"># Default NGINX web app configuration</span>

<span class="token comment"># Serves HTTPS only and proxies to HTTP app</span>

<span class="token directive"><span class="token keyword">server</span></span> <span class="token punctuation">{</span> <span class="token comment"># SSL configuration, we&#x27;ll use the &quot;default&quot; # configuration file to redirect to this</span>
<span class="token directive"><span class="token keyword">listen</span> <span class="token number">443</span> ssl http2</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">listen</span> [::]:443 ssl http2</span><span class="token punctuation">;</span>
<span class="token directive"><span class="token keyword">ssl</span> <span class="token boolean">on</span></span><span class="token punctuation">;</span>

        <span class="token comment"># SSL certificate section, change domain</span>
        <span class="token comment"># accordingly</span>
        <span class="token directive"><span class="token keyword">ssl_certificate</span>         /etc/letsencrypt/live/[DOMAIN]/fullchain.pem</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">ssl_trusted_certificate</span> /etc/letsencrypt/live/[DOMAIN]/chain.pem</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">ssl_certificate_key</span>     /etc/letsencrypt/live/[DOMAIN]/privkey.pem</span><span class="token punctuation">;</span>

        <span class="token comment"># Add index.php to the list if you are using PHP</span>
        <span class="token directive"><span class="token keyword">index</span> index.html index.htm index.nginx-debian.html</span><span class="token punctuation">;</span>

        <span class="token comment"># change domain here to what you want</span>
        <span class="token directive"><span class="token keyword">server_name</span> [DOMAIN]</span><span class="token punctuation">;</span>
        <span class="token directive"><span class="token keyword">location</span> /</span> <span class="token punctuation">{</span>
                <span class="token comment"># Proxies to the web app&#x27;s port on localhost</span>
                <span class="token comment"># Make sure web app provides HTTP only, we&#x27;ll</span>
                <span class="token comment"># handle the HTTPS part from NGINX. Also make</span>
                <span class="token comment"># sure the port is inaccessible through the</span>
                <span class="token comment"># firewall, so the app won&#x27;t be able to be accessed</span>
                <span class="token comment"># directly through HTTP</span>
                <span class="token directive"><span class="token keyword">proxy_pass</span> http://127.0.0.1:[WEB APP PORT]/</span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_redirect</span> http://127.0.0.1:[WEB APP PORT]/ /</span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_set_header</span> Host <span class="token variable">$http_host</span></span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_set_header</span> X-Real-IP <span class="token variable">$remote_addr</span></span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_set_header</span> X-Forwarded-For <span class="token variable">$proxy_add_x_forwarded_for</span></span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_set_header</span> X-Forwarded-Proto <span class="token variable">$scheme</span></span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_set_header</span> X-Forwarded-Protocol <span class="token variable">$scheme</span></span><span class="token punctuation">;</span>
                <span class="token directive"><span class="token keyword">proxy_set_header</span> X-Url-Scheme <span class="token variable">$scheme</span></span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

<span class="token punctuation">}</span>

</code></pre>
<p>Turns out that it worked splendidly, and now I had both static sites and web apps easily configured
on my reverse proxy. Still not done, though.</p>
<hr/>
<h2>Firewall Time</h2>
<p>The rest of the setup was more or less a chore, since setting up the rest of the services was the same
repetitive action: download the server, configure said server on different port than default HTTP, turn
off SSL and point to the reverse proxy, copy config, reload everything, done. For 3 more times.</p>
<p>I used different open-source self-hosted options for my analytics and monitoring: <a href="https://matomo.org">Matomo</a>
for analytics, which actually has some pretty cool features, like real-time visits, and
<a href="https://grafana.com">Grafana</a> + <a href="https://prometheus.io">Prometheus</a> for monitoring, which is pretty difficult
to setup, but I managed with <a href="https://www.scaleway.com/docs/configure-prometheus-monitoring-with-grafana/">this</a>
particular guide. All of them essentially used the same configuration files as above, along with the generation
of certificates from Let&#x27;s Encrypt.</p>
<p>Now, I had to close the ports that the HTTP apps used from listening on eth0, the interface that people touched,
and instead listen only on local loopback (127.0.0.1). I simply downloaded <em>ufw</em> and did some standard configs:</p>
<pre class="language-bash"><code class="language-bash">root@STORMHUB_NODE_1:~<span class="token comment"># apt-get install ufw</span>

<span class="token comment"># [OUTPUT SNIPPED]</span>

root@STORMHUB_NODE_1:~<span class="token comment"># ufw default allow outgoing &amp; ufw default deny incoming</span>
root@STORMHUB_NODE_1:~<span class="token comment"># ufw allow ssh &amp;&amp; ufw allow http &amp;&amp; ufw allow https</span>
root@STORMHUB_NODE_1:~<span class="token comment"># ufw deny [PORT WEB APP USED] # one for each app</span>
root@STORMHUB_NODE_1:~<span class="token comment"># ufw enable</span>
</code></pre>
<p>Simple, right? Let&#x27;s test it.</p>
<img alt="Picture of Bitwarden loading even with the firewall on." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbitwarden-firewall-problem.7922ddf7.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbitwarden-firewall-problem.7922ddf7.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fbitwarden-firewall-problem.7922ddf7.jpg&amp;w=3840&amp;q=75" width="1919" height="262" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>Wait, what the...</p>
</blockquote>
<p><strong><em>sigh</em></strong> Alright, alright, fine. I never really trust anything over the machine level. I started diving in to see
why that didn&#x27;t work. Simplest way to check is to check what file <em>ufw</em> actually edits, the iptables list, let&#x27;s
see what that said.</p>
<pre class="language-bash"><code class="language-bash">root@STORMHUB_NODE_1:~<span class="token comment"># iptables --list</span>
Chain INPUT <span class="token punctuation">(</span>policy DROP<span class="token punctuation">)</span>
target prot opt <span class="token builtin class-name">source</span> destination
ufw-before-logging-input all -- anywhere anywhere
ufw-before-input all -- anywhere anywhere
ufw-after-input all -- anywhere anywhere
ufw-after-logging-input all -- anywhere anywhere
ufw-reject-input all -- anywhere anywhere
ufw-track-input all -- anywhere anywhere

<span class="token comment"># [OUTPUT SNIPPED]</span>

Chain DOCKER <span class="token punctuation">(</span><span class="token number">4</span> references<span class="token punctuation">)</span>
target prot opt <span class="token builtin class-name">source</span> destination
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere
</code></pre>
<p>Ah, well, see, this is where things went wrong. Bitwarden uses Docker to host itself, which allows for easy deployment,
but many complications on the lower level. Docker likes to be invasive, so turns out that it doesn&#x27;t like the
firewall rules it gets from the predefined chains (groups of rules) and makes its own chain, which is managed
by the Docker environment, not <em>ufw</em>. All we had to do, essentially, was find whether Docker asked to bind a port
and simply add <code>127.0.0.1:</code> in front of every mention of a port, and that solves the problem.</p>
<p>Perfect! Stormhub is fully operational!</p>
<hr/>
<h2>Conclusion</h2>
<p>Now I have a pretty decent set of tools online that allow me to work in my own environment, and they&#x27;re all safe,
audited and open-source! I&#x27;m loving it. Surprisingly enough, they&#x27;re not as resource-intensive as I estimated,
using only ~2 GB out of all the available RAM. Nice. Maybe I&#x27;ll slap on some extra stuff.</p>
<img alt="Stormhub &quot;htop&quot; output when fully operational." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-node1-htop-running.c411e4f8.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-node1-htop-running.c411e4f8.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstormhub-node1-htop-running.c411e4f8.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>Thanks, Microsoft SQL, for ruining my <strong>htop</strong> output.</p>
</blockquote>
<p>Alright, now I&#x27;m in the mood for some JavaScript, and that&#x27;s rare. Let&#x27;s see what comes out of it.</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Around The World in 80 (VPN) hops]]></title>
            <link>undefined/articles/around-the-world-in-80-hops</link>
            <guid>undefined/articles/around-the-world-in-80-hops</guid>
            <pubDate>Thu, 07 Feb 2019 00:00:00 GMT</pubDate>
            <description><![CDATA[A little rant about how weird it was for my dad and I to built a common subnet tunneled through a VPN that crosses the Atlantic.]]></description>
            <content:encoded><![CDATA[<p><em>This is a verbatim copy of the article written for Stempathy, a STEM-oriented teen magazine, with the exact</em>
<em>same title. Anything that might seem out of context is most likely explained by reading this article directly</em>
<em>from the magazine itself.</em></p>
<hr/>
<p>Hello everyone! I&#x27;m Matei Gardus, a programmer with a knack for side-projects and insane complications
and min-maxing over every aspect of my life. I hope you enjoy this first issue of Stempathy.
Today I&#x27;m going to be telling you about one of my ongoing adventures in the world of networking, and it
starts around three years ago.</p>
<p>There was once a time when Netflix wasn&#x27;t available in Romania, along with all the other streaming services
we&#x27;ve all come to know and love, such as Spotify. However as you can imagine, for a guy like me who knew of
their benefits, I couldn&#x27;t idly stay being complacent; I wanted to find a way to get all those services in
Romania legally and in an efficient way.
Luckily for me, I had a lead on how to do just that.</p>
<hr/>
<h2>A friend</h2>
<p>Whenever we get the chance, my family and I go to the United States to not only see new landmarks and get
new experiences, but also to visit my Mon&#x27;s childhood friend who moved there. Her husband and her are very
nice people and we all enjoy the time when we&#x27;re there. They welcome us into their home every time we visit,
almost like a home away from the home across the world. Whenever we go there, my father and I also fix whatever
problems they may have with computers, phones and the like, so it makes for a interesting time in that domain
as well (my most interesting tech support stories come from there, you can e-mail me anytime about them).
However, last year, they were also in need of a new Internet configuration, so we helped with that as well.
When we asked what limitations do we have, they said:</p>
<blockquote>
<p>&quot;Go wild! We just want it to work well and fast!&quot;</p>
</blockquote>
<p>It was at that moment that my father and I exchanged some knowing glances and asked our friends if they
would be so kind as to allow us to use their Internet connection ourselves from anywhere in the world.
They allowed us, and so the lead was ready to be followed.</p>
<p>We have an US-based IP available to us, so we could theoretically access all the available streaming
services using it. But how could we do that from Romania? Well, that took a <em>lot</em> of work and quite
a bit of tinkering.</p>
<hr/>
<h2>VPNs everywhere</h2>
<p>Obviously, firstly, we would need a <strong>VPN</strong> to access the local network from our friend&#x27;s house from Romania.
You&#x27;ve probably heard of VPNs as a way to access geo-locked websites from anywhere in the world (what you&#x27;ve
probably used some VPNs for already, although I do not recommend using free ones) but that&#x27;s not what they
were originally intended for, really.</p>
<p>VPN stands for &quot;<strong>V</strong>irtual <strong>P</strong>rivate <strong>N</strong>etwork and they were initially designed to be used in order
to access a local network through an encrypted tunnel and act like a member of said local network. That
way, you could establish a tunnel to a VPN server that might be installed at, let&#x27;s say, your workplace,
and once you connected to it, your computer would act as a legitimate device connected to that network,
without any third party being able to extract confidential information from this very public connection.
There is also the option to connect two separate local networks together, and have them act as one
cohesive network (this is called a <strong>site-to-site</strong> VPN, as opposed to the <strong>remote-access</strong> VPN previously
discussed). I used this type to link two separate networks together, one in my house and one at my
friends&#x27; house.</p>
<img alt="A graphical representation of a VPN." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvpn-representation.71b05ffe.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvpn-representation.71b05ffe.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvpn-representation.71b05ffe.jpg&amp;w=3840&amp;q=75" width="1600" height="900" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>To set up a VPN server anywhere is not inherently complicated, most routers actually do come with the option
to connect to a VPN server. Unfortunately for me, however, my friend&#x27;s router could not host a VPN server
normally, so we decided to ship our own solution there, an EdgeRouter 4 from Ubiquiti, which looks something
like this:</p>
<img alt="Picture of the EdgeRouter 4." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fedgerouter-4.3da88ef2.jpg&amp;w=3840&amp;q=75 1x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fedgerouter-4.3da88ef2.jpg&amp;w=3840&amp;q=75" width="4032" height="3024" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>After getting it in there, I configured the VPN server, along with a few clients configured for my iPad, my PC,
my dad&#x27;s PC, etc. We had two Wi-Fi networks in our home, &quot;Rares&quot; and &quot;Rares_us&quot;, one that was a simple access point
to our normal Internet, the other being an access point attached to a switch which kept the VPN tunnel running.
We finally solved our problem elegantly, and now we could watch Netflix using a VPN tunnel to the US that always
worked...</p>
<p>Except when it didn&#x27;t.</p>
<hr/>
<h2>Meet The Problems</h2>
<p>As is always the case in the world of computer science, nothing <em>ever</em> works on the first try, but that is because
we delude ourselves with the idea that what we are working on is as simple or complicated as we think it is,
when in reality, it never is. And the problems started showing up very soon.</p>
<p>For starters, our VPN tunnel would frequently drop due to unnatural circumstances (i.e. power outages, random person
tripping over a plug, as is often the case in my house), so I had to find a way to automatically restart the VPN
tunnel whenever I needed to. I did so by essentially adding <strong>cron jobs</strong> (scheduled tasks in Linux) that would run
periodically to check whether our VPN tunnel was still up and running, and if not, to re-enable it and send my father
an e-mail telling him of the outage so we know if something went wrong.</p>
<pre class="language-bash"><code class="language-bash"><span class="token shebang important">#!/bin/bash</span>
<span class="token comment"># Ping tunnel, make sure it&#x27;s open</span>
/bin/ping -c <span class="token number">5</span> -i <span class="token number">3</span> -W <span class="token number">3</span> <span class="token number">172.16</span>.100.1 <span class="token operator"><span class="token file-descriptor important">1</span>&gt;</span>/dev/null <span class="token operator"><span class="token file-descriptor important">2</span>&gt;</span><span class="token file-descriptor important">&amp;1</span>
<span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token variable">$?</span> -ne <span class="token number">0</span> <span class="token punctuation">]</span><span class="token punctuation">;</span>
   <span class="token keyword">then</span>
      <span class="token builtin class-name">echo</span> <span class="token string">&quot;Failed ping tunnel! First try&quot;</span>
      <span class="token comment"># We&#x27;ll give the tunnel the benefit of the doubt, let&#x27;s try again</span>
      <span class="token function">sleep</span> <span class="token number">2</span>
      /bin/ping -c <span class="token number">5</span> -i <span class="token number">3</span> -W <span class="token number">3</span> <span class="token number">172.16</span>.100.1 <span class="token operator"><span class="token file-descriptor important">1</span>&gt;</span>/dev/null <span class="token operator"><span class="token file-descriptor important">2</span>&gt;</span><span class="token file-descriptor important">&amp;1</span>
      <span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token variable">$?</span> -ne <span class="token number">0</span> <span class="token punctuation">]</span><span class="token punctuation">;</span>
         <span class="token keyword">then</span>
             <span class="token builtin class-name">echo</span> <span class="token string">&quot;Failed ping tunnel ! Second try&quot;</span>
             <span class="token comment"># Restart the VPN</span>
             /bin/vbash -ic <span class="token string">&#x27;restart vpn&#x27;</span>
             <span class="token comment"># Send e-mail to make sure everyone knows</span>
             /bin/vbash -ic <span class="token string">&#x27;echo -e &quot;Tunnel down\nRestarted IPSEC VPN\nTimestamp: $(date)&quot; | /config/scripts/notifyemail&#x27;</span>
         <span class="token keyword">else</span>
             <span class="token comment"># The VPN works after the second try</span>
             <span class="token builtin class-name">echo</span> <span class="token string">&quot;Ping tunnel success!&quot;</span>
      <span class="token keyword">fi</span>
   <span class="token keyword">else</span>
      <span class="token builtin class-name">echo</span> <span class="token string">&quot;Ping tunnel success!&quot;</span>
<span class="token keyword">fi</span>
</code></pre>
<p>In addition, my home is a bit more special than your average household. We have two internet lines linked to my
house, provided by two different ISPs, both of which were in Romania. This meant we had to use one of the networks
in order to establish a VPN tunnel to the US, but it wouldn&#x27;t be incredibly stable, since we could have our Internet
connection randomly cut as well. In addition, it would also mean that not all the devices had access to the US network.
In the end, I decided to have <em>two</em> VPN tunnels open on two different networks, with both on separate Wi-Fi networks. But now the
question is <em>&quot;Which network do I use to connect to the US or to Romania?&quot;</em> I mean, don&#x27;t get me wrong, I love the
freedom of choice, but having 7 Wi-Fi networks is not fun for me or for any potential guest to our home. So, in the end,
I decided to reduce the number of networks by implementing a <strong>load balancer</strong> between the two separate VPN networks.
Now we only have two Wi-Fi networks: &quot;Rares RO&quot; and &quot;Rares US&quot;, and both handle all requests quite nicely.</p>
<p>A load balancer is, essentially, a piece of software that takes requests of a specific internet protocol and redirects
them to whichever server is less overloaded with requests, or even using a specific set of rules that you apply to its
configuration. It is commonly used at all the major websites, like Google, to distribute requests in a region to
multiple servers, not just one, since one server will never be capable of handling everything. Imagine having one PC
handling billions of searches a second. That&#x27;s not gonna happen.</p>
<p>This becomes even more complicated as we find out a relatively crucial issue with our VPN: as much as it is currently
working on two separate networks, load balanced and all, nothing in our house is stable, and not even at our friend&#x27;s
house either. Network packets were randomly dropped for no reason and some packets just straight up disappeared, as if
lost through the tunnel. Something was wrong with my tunnel and I didn&#x27;t know what. After a bit of debugging, though,
I finally figured out the problem: NAT.</p>
<hr/>
<h2>NAT: The Final Boss</h2>
<p>To explain what NAT really is, one must understand a bit about IP addresses as well, those nifty four numbers with
dots between them you may have found on the Internet (They look like this: xxx.xxx.xxx.xxx). IP addresses are a way
to know where to address a specific packet so that whoever is supposed to receive it can get it correctly. There are
different types of IP addresses:</p>
<ul>
<li>Class A, generally assigned to all the external servers of the world (1.1.1.1, for instance, is a DNS server for everyone to use.
If you don&#x27;t know what a DNS is, that&#x27;s a story for another time)</li>
<li>Class B, reserved for medium-sized networks (i.e. huge corporation departments)</li>
<li>Class C, most commonly found in homes (192.168.1.1, 172.16.0.61)</li>
</ul>
<p><em>(Tech rant: Technically, the reason why there are multiple classes is due to the way that computers handle transforming</em>
<em>an IPv4 address to a physical address, since they require specific limitations to the IPs in order to be converted</em>
<em>correctly, but this is beyond the scope of this article.)</em></p>
<p>There is, however, one problem. Due to the world having way too many computers, and IP addresses being restricted to
very limited amounts (or rather, IPv4 addresses, the ones I&#x27;m talking about here, IPv6 addresses could account for
more computers than there are atoms in the observable universe), people have decided to reuse some IP addresses
by having closed networks with the same IP addresses in them (non-routable addresses, of type C) and switching between
network using a method called NAT.</p>
<p>NAT, short for <strong>N</strong>etwork <strong>A</strong>dress <strong>T</strong>ranslation, is a method used to switch the IP addresses I&#x27;ve been talking about
by &quot;modifying network address information in the IP header of packets while they are in transit across a traffic routing device.&quot;
(Thanks, Wikipedia!) This way, you can have your phone communicate with any other website as if it were on the same network.
<em>However</em>, in a VPN, NAT can be a pain, since it can&#x27;t really change those encrypted packets that the VPN sends over.
Essentially, you have to find a way to manually change the IP header before it his encryption so that you can redirect
the packet at the right address on the other side of the tunnel (oh, this has to be done on both sides of the tunnel as well,
so you can&#x27;t shortcut your way out of this). In the end, I managed to fix the problem by configuring the switches on both
sides of the VPN tunnel to modify the IP header on both sides using predefined rules which, while very hard coded, work well
for our case.</p>
<p>Finally, everything seems fine...right?</p>
<hr/>
<h2>Room for improvement</h2>
<p>Of course, work is never over, and my father&#x27;s dream is to reduce those two Wi-Fi networks to one, &quot;Rares&quot;, and have the network
automatically figure out through which network you&#x27;d actually want to go through when visiting a website by using a DNS whitelist
to route requests through the different networks (netflix.com goes through the US tunnel, for instance), but that is a project for
the future. In the end, if there is one thing that you should really learn from this article is that you should never be daunted
by obstacles that might appear in whatever project you may be working on, since you can definitely get past them and achieve
exactly what you envisioned, provided you put in the effort. And yes, even if your computer might be against you, you will definitely
be able to solve the problem. After all, we made them, we can fix them.
I have plenty of stories I have left to share, and I&#x27;m sure you&#x27;ll all enjoy hearing all about them. I&#x27;ll give you a hint for next
issue&#x27;s article here: &quot;tiny PC&quot;.</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[The L.I.F.E Stack]]></title>
            <link>undefined/articles/the-life-stack</link>
            <guid>undefined/articles/the-life-stack</guid>
            <pubDate>Sun, 20 Jan 2019 00:00:00 GMT</pubDate>
            <description><![CDATA[I came up with a general method of thinking about how to create productivity stacks to improve a person's life. This is it.]]></description>
            <content:encoded><![CDATA[<p>Happy New Year to you all! I certainly hope you all have a great new year filled with productivity and good memories!</p>
<p>Now of course, with the New Year, I always set up some new resolutions that I have always filled ever since I&#x27;ve started assigning
them to myself 5 years ago. This year, I decided to make sure I&#x27;d ensure myself a way to always be able to reduce my procrastination.</p>
<p><em>Gasp</em>, I know! What&#x27;s the point of this place, then?</p>
<p>Believe it or not, I may be a huge procrastinator, but I still enjoy when I actually do a lot of work every couple of days.
It is an amazing feeling to sit down, grind all of my work away off of my to-do list, then sit down on my bed, exhausted,
but satisfied of all the hard work I did that day. Even if this feeling creeps up every once in a while, I still had a hard
time getting into the rhythm of work, and so I needed assistance. Much like Linus Torvalds, I consider tooling to be the solution
to all problems someone may have. I just needed to find the right one...</p>
<hr/>
<h2>An idea</h2>
<p>There was an idea to improve my life using tools. I was not optimal at taking care of my time and myself sometimes, so
I needed a system. I realized that, to have a good life, one must:</p>
<ul>
<li>manage their work and social life equally, and do work in both</li>
<li>manage their health (particularly fitness, nutrition and sleep)</li>
<li>manage their time, to make sure you work on what you need to work</li>
<li>manage the money that they have going into their life and out</li>
<li>write everything down to remember the current day for years to come (a journal)</li>
</ul>
<p>This way, I can pretty much guarantee my life to be as managed as possible. Now that I figured this out, I needed a way to get it done
in an efficient way, preferably using some open-source tools. Let&#x27;s take them down one by one.</p>
<hr/>
<h2>Work and social life</h2>
<p>The best way to fulfill aspects of both social life and work is to simply compartmentalize each of these into tasks and complete them in
a balanced and efficient manner. For instance, you could take all of those tasks and simply try to alternate between categories. You could
do so with a list of &quot;tasks&quot; and simply take one from each list every time. i.e. Do some work first, chat with someone else second, work on
something else again, and so on and so forth. How did I manage this with tools? Well, you guessed it... a to-do list.</p>
<p>Nothing impressive, but it did wonders for me to be able to differentiate between what I needed to do. At first, I used
<a href="https://trello.com/">Trello</a>, and I used a Kanban-style board to organize my tasks in 5 lists: &quot;Inbox&quot;, &quot;To Do&quot;, &quot;In Progress&quot;, &quot;Done&quot; and &quot;Later&quot;.
I found quickly, however, that the little cards weren&#x27;t good for differentiating the tasks in a way I wanted to. Ergo, I started looking for another
solution.</p>
<p>I tried to use the <a href="http://todotxt.org/">todo.txt</a> approach for a while, but I quickly found that it was a bit too simplistic for my use, and not
integrated enough with my tools to work really well. I never checked it because I couldn&#x27;t remember to.
I found quickly that I needed something that could be a bit more complex than a simple todo.txt.
And then I went around on Reddit, finding some posts about a nice little site called <a href="https://amazingmarvin.com">Amazing Marvin</a>. While it&#x27;s not
open-source, it&#x27;s absolutely <strong>amazing</strong> because it has many ways to manage my procrastination, particularly its difference between due dates and
&quot;do&quot; dates, which allows you to just schedule whenever you want to complete a task, which is incredibly useful for me, since that is what I always
needed in order to get over my procrastination: just getting started. Now, I know, I know, why would I want to do that? I would end up with no
material for my blog, but I&#x27;ll find a way to procrastinate in a good way.</p>
<img alt="Amazing Marvin, woo!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Famazing-marvin.f9aea0d0.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Famazing-marvin.f9aea0d0.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Famazing-marvin.f9aea0d0.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>&quot;!&quot; means a day procrastinated, so you can see where I&#x27;m going with this.</p>
</blockquote>
<hr/>
<h2>Health</h2>
<p>I find it tough to eat right and sleep at the same times during a really busy week, so I think it&#x27;d be good to get some alarms, but it&#x27;d be a lot
better if I could handle it in a much more min-maxing kind of way. In the end, I settled with two good apps: <a href="https://sleep.urbandroid.org/">Sleep as Android</a> and
<a href="http://cronometer.com/">Cronometer</a>. Sleep as Android is useful for getting some statistics on sleep and some techniques to wake up quick, such as a two-factor alarm,
which is <em>awesome</em>. Cronometer allows you to track your food intake, and it can even suggest what you should eat next. Pretty good stuff.
I just spend around 15 minutes a day to make sure I input all the food into Cronometer and check my sleep, and we&#x27;re done.</p>
<img alt="Cronometer daily entry and stuff." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcronometer-daily-entry.437f5b99.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcronometer-daily-entry.437f5b99.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcronometer-daily-entry.437f5b99.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>Time</h2>
<p>To be frank, I&#x27;ve found that, even if I&#x27;m at my laptop working, I waste time by
drifting off on Reddit or YouTube or even working on other things.  So, the
best way to handle that is to take the 15 minutes a day I spend inserting food
entries in Cronometer and also check on my activity for the day.  This way, I
can make sure I&#x27;m staying on track with completing all the tasks I have on hand
during the day. The best way to do that is with timetables, and the best
automated time-tracking application is <a href="http://rescuetime.com/">RescueTime</a>,
but to be frank, it&#x27;s not open-source and there&#x27;s been some data privacy
scandals with them, so I went the open-source approach and picked
<a href="https://github.com/ActivityWatch/activitywatch">ActivityWatch</a>, which is
essentially local RescueTime on PC, which works quite well. It pulls time
entries by reading the active window&#x27;s title and saving the time spent on it.
At some point I will definitely contribute to the project, since it&#x27;s quite
well-done and the developers need the help.</p>
<img alt="ActivityWatch report" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Factivitywatch-report.db2a59b2.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Factivitywatch-report.db2a59b2.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Factivitywatch-report.db2a59b2.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>Money</h2>
<p>Managing my money will be incredibly important, especially when I get to college and I won&#x27;t have any safety nets, so I need to find a way to track what
goes in and out. The best open-source tool for this is <a href="http://gnucash.org/">GNUCash</a>, which is actually pretty good when it comes to tracking money. While
it is certainly difficult to use at first, the amount of new windows quickly gets processed once you read the User Manual a tiny bit, which helps <em>a lot</em> with
understanding how double-entry accounting works, which is essentially how GNUCash works. I really like the way I can also use it to generate customized reports
that can quickly tell me how I&#x27;m doing with the allowance I have.</p>
<hr/>
<h2>The Journal</h2>
<p>I have long since forgot the details of many of my vacations, friends and other people from my childhood simply because my brain couldn&#x27;t keep all that information
readily available. As such, I&#x27;ve decided that I will make sure that I will never forget another day of my life. How so? By writing it down. I&#x27;ve simply created a
little journal that contains an entry discussing the intricacies of literally every day of my life. I&#x27;ve been writing in it every day since the New Year, and I&#x27;ve
already been remembering a lot more than before!</p>
<hr/>
<h2>How&#x27;s it working?</h2>
<p>It&#x27;s working out amazingly. Now, I have taken control of my life by making sure I&#x27;m accountable for every part of it, no matter how small. Every single action I
do is written down, analyzed and improved in order to make me a better and better person. The only thing I need to do is write everything down.</p>
<p>...</p>
<p>But that can wait until tomorrow, you know? ;)</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Solving a Rubik's Cube is fun!]]></title>
            <link>undefined/articles/solving-a-rubiks-cube-is-fun</link>
            <guid>undefined/articles/solving-a-rubiks-cube-is-fun</guid>
            <pubDate>Thu, 08 Nov 2018 00:00:00 GMT</pubDate>
            <description><![CDATA[I am always in need of new ways to procrastinate, and everyone seems to be into these fidget toys nowadays. How about I get a big brain version?]]></description>
            <content:encoded><![CDATA[<p>School has started to pick up fairly reasonably, what with all the exams and homework and whatnot, and since work hasn&#x27;t been
slowing down either, I&#x27;ve found myself with a very sudden need to relax with something other than Reddit and whatever other
time-wasting activity I could find on the web. So guess what? I replaced those with yet <em>another</em> time-wasting activity. Except
this one is at least slightly more useful (but still pretty useless in the long run).</p>
<hr/>
<h2>Solving the Rubik&#x27;s Cube</h2>
<p>Ever since I saw one of my colleagues in 9th grade solve a Rubik&#x27;s Cube I&#x27;ve felt pretty bad having to use online solver websites
to solve a Rubik&#x27;s cube but I&#x27;ve never gotten around to finding the time to learning all the algorithms. Besides, as far as I
was concerned, in the beginning, I thought it would take too long to figure out how to do it.</p>
<p>That is, until I got bored.</p>
<p>Ah, of course, my ultimate motivator! As I was laying in my bed studying for the SATs, I figured <em>&quot;what better way to solve this lack of motivation than by procrastinating?&quot;</em>
It didn&#x27;t take too long until I found something to mess with: my <em>very old</em> Rubik&#x27;s Cube 2.0 straight from the original brand.</p>
<img alt="Here it is, although kind of battered." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Frubiks-cube-2.0.82c8513c.jpg&amp;w=3840&amp;q=75 1x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Frubiks-cube-2.0.82c8513c.jpg&amp;w=3840&amp;q=75" width="4032" height="2268" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>As I took it off the stand it resided in for almost 3 years completely untouched, I began turning it around, trying to figure out how
to solve it until I figured it was absolutely useless. I mean, to be honest, I had no idea what I was doing. I figured the best way to
solve it is to actually learn how to solve it from another more reliable source than my haphazard attempt at trial and error.</p>
<p>Meet <a href="https://cubeskills.com">CubeSkills</a>! Turns out this a training website made by the Rubik&#x27;s Cube World Champion Felix Zemdegs! I
thought that meant it was good, right? Definitely is. Honestly, I just used the website for free, along with the Training PDFs placed
at your disposal there. I used the Beginner&#x27;s Method first, because I was a beginner after all.</p>
<p>Guess what? After viewing the videos, I was able to solve the Rubik&#x27;s Cube in a record time of 6 minutes! Wahoo, I did it! But I wanted
to be faster. <em>A lot faster.</em></p>
<hr/>
<h2>Picking up the pace</h2>
<p>It didn&#x27;t take too long for me to decide to keep practicing the Beginner&#x27;s Method in my spare time. Turns out in just about day, I ended up
consistently hitting around 1 minutes and 10 seconds worth of solve time. At this point, I realized a stopwatch was ruining my chances at
measuring my times, so I decided to get a timer app on my phone and PC. I found one for each respective platform.</p>
<p>For my PC, I found the pretty good <a href="https://cstimer.net">CSTimer</a>, which hosts a ton of features, like solve exporting, stats and some cool themes.
It also works with official speedsolving timers, apparently, so that&#x27;s pretty cool.</p>
<img alt="This is what CSTimer looks like." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcstimer-website-screencap.fb2aee4b.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcstimer-website-screencap.fb2aee4b.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcstimer-website-screencap.fb2aee4b.jpg&amp;w=3840&amp;q=75" width="1920" height="985" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>Pretty high-end for a simple timer.</p>
</blockquote>
<p>I also use <a href="https://play.google.com/store/apps/details?id=com.aricneto.twistytimer">Twisty Timer</a> on my Android phone if I don&#x27;t have my laptop handy,
which happens a lot during rides on the subway. It also comes with a neat graph system to make me feel good about my improving times.</p>
<img alt="Nice graph!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftwisty-timer-graph.aa86dd5e.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftwisty-timer-graph.aa86dd5e.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftwisty-timer-graph.aa86dd5e.jpg&amp;w=3840&amp;q=75" width="1080" height="2220" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>However, even so, I ended up hitting a dead-end on my times. It was almost as if I was limited by something. Even after learning legitimate CFOP (the general
method of solving a 3x3 Rubik&#x27;s Cube) with intuitive F2L (<strong>F</strong>irst <strong>2</strong> <strong>L</strong>ayers) and 4LL (<strong>4</strong>-<strong>L</strong>ook <strong>L</strong>ast Layer), my times were still over 1
minute, which should not happen physically, because I was technically faster than before. I then figured out the problem.</p>
<hr/>
<h2>My cube sucks!</h2>
<p>My 3-year-old, <em>unlubricated</em> and <em>chipped</em> Rubik&#x27;s Cube 2.0 moved <strong>really</strong> badly. It would lock up on any turn faster than 1 a second, it would have its corners
twist all the time, it was a complete and total mess. Its screws would get loose once every 20 solves as well. It made me incredibly annoyed that I would get bad
times not because of my lack of skill, but because of the cube&#x27;s incapability to perform. As such, I decided to upgrade.</p>
<p>Honestly, I didn&#x27;t know what to go to. I wanted the best speedcube I could find on the market, but there were too many choices. Eventually I thought I should buy
the one that most people seem to use, which is the GAN 356 Air SM.</p>
<p>After ordering it from Amazon, waiting for it to arrive, getting my money back, ordering it again from a Romanian shop and waiting an entire month for it, I finally
got it!</p>
<img alt="It&#x27;s beautiful." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgan-air-sm.49575fe1.jpg&amp;w=3840&amp;q=75 1x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgan-air-sm.49575fe1.jpg&amp;w=3840&amp;q=75" width="4032" height="2268" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>It&#x27;s beautiful.</p>
</blockquote>
<p>Of course, as you can imagine, precisely 3 days after ordering it, the next generation of the cube I got, the GAN 356 X, is released, much like with my YubiKeys.
Every time.</p>
<p>Regardless, the new cube moves beautifully, with no defects. It&#x27;s smooth, doesn&#x27;t twist, and now I move even faster than before. In fact, I even beat my old
colleague&#x27;s personal best, 27 seconds, with my time of 26.69 seconds!</p>
<img alt="I&#x27;m the best (cuber)...around!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-best-cubing-time.8efe5fe1.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-best-cubing-time.8efe5fe1.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-best-cubing-time.8efe5fe1.jpg&amp;w=3840&amp;q=75" width="1920" height="981" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>What next?</h2>
<p>After getting the personal best of 26 seconds, I took a short break from practicing to get back to legitimate work, but I am still cubing to this day. Ever since
my little rushed escapade with cubing, my entire class has been taken by storm by the cubing movement. My friends keep bringing extra cubes at school to have fun
and improve, I&#x27;ve been teaching my friends some new techniques that they might not know, and in addition, we got cubing competitions in my classroom (I keep losing
to one of my colleagues, he&#x27;s been doing it a lot more than me). Even McDonald&#x27;s started their Rubik&#x27;s Happy Meal campaign after me!</p>
<p>In all honesty, this has been incredibly satisfying, but I won&#x27;t stop now. I&#x27;ll keep going until I can get times under 10 seconds on solves, and who knows? Maybe I&#x27;ll
even try more complicated cubes then. I am happy with my new hobby, let&#x27;s hope it lasts.</p>
<hr/>
<p><em>UPDATE (2019-01-07):</em> Since then, yours truly has managed to be a smart-ass and buy two other cubes, the MoYu Weilong GTS3LM and the GAN 356 X,
so I did get the elusive cube eventually. The MoYu is incredibly nimble, while the GAN X is insanely smooth, much smoother than even the Gan Air
SM. I also improved my time to have an average of 25 seconds and a personal best of 18.64 seconds, so that&#x27;s great!</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Coding With Others Is Hard]]></title>
            <link>undefined/articles/coding-with-others-is-hard</link>
            <guid>undefined/articles/coding-with-others-is-hard</guid>
            <pubDate>Thu, 25 Oct 2018 00:00:00 GMT</pubDate>
            <description><![CDATA[I had a project to do with a fellow high school colleague called Chad. It did not go great.]]></description>
            <content:encoded><![CDATA[<blockquote>
<p>&quot;If it ain&#x27;t broke, don&#x27;t fix it. And trust me, you&#x27;d code it worse without me!&quot;</p>
<p>-Chad, a fellow coder</p>
</blockquote>
<p>I&#x27;ve coded a decent amount of things in my life, and to be honest, it&#x27;s been fun. The freedom and the feeling you get when
you code a program to do your bidding is addicting. It feels as if you&#x27;re a blacksmith, smelting the raw ore of standard
libraries and algorithms and casting it into a mold of your design, to create a tool or weapon for the task at hand. And
when you&#x27;re alone, you have complete freedom of the mold. But alas, <em>we are all only human</em>. We can&#x27;t do everything alone,
we need company. So imagine my surprise when, as soon as I had this realization, an opportunity arose.</p>
<hr/>
<h2>A commission</h2>
<p>For the purposes of privacy, I&#x27;ll keep everyone&#x27;s name as secret as I can in this post. Last year, one of the teachers at
my school approached me with a little project: an educational software for the school, in order for said teacher to use to
quickly and efficiently administer tests to her students on computers at any time, anywhere. I agreed, under the pretense that
I&#x27;d learn how to code something of this scale. That was more of a secondary reason, I wanted to procrastinate! <strong>Wahoo!</strong></p>
<p>I dubbed the project <a href="http://vianuedu.lbi.ro">VianuEdu</a> in the idea that it would perhaps end up used by the whole school, not
just the teacher mentioned before. You can find the source code for it <a href="https://github.com/CNITV/VianuEdu">here</a> to follow along
with my story. It&#x27;s written in Java, along with a <a href="https://github.com/CNITV/VianuEdu-Server">server</a> written in Go, which is
entirely written by me. I picked Java because it was the quickest way to get a cross-platform GUI native program running without
much of a hassle or making a website instead. I picked Go for the server because I wanted to try the language out with a nice
server and make something new and exciting.</p>
<hr/>
<h2>This is where the <em>fun</em> begins (ha)</h2>
<p>Obviously, I realized a true educational software for the purposes that my teacher asked for was not something I could do alone, so
I decided to take someone else along for the ride. Now the recruit very specifically asked I don&#x27;t mention his name in this post, so I&#x27;ll
just call him Chad, even though he isn&#x27;t one.</p>
<p>Chad was a relatively passionate graphic designer, so I thought he would be fun to tag along to help with the client side of VianuEdu,
which I was certain I&#x27;d screw up since I suck at designing UIs. He also had some experience coding Java GUIs (at least according to him)
so I thought he&#x27;d be a good addition. It started off pretty well, he was eager to work, and I was excited to work together with others.</p>
<p>I started explaining to him the goals of the project, what he should do, started splitting our tasks, etc. and he agreed with most of
what I gave him. I coded the backend (the server and the database handler) and he coded the frontend (UI and some small amounts of data
handling). That was the plan. Soon, the plan instantly fell to pieces when I asked him:</p>
<blockquote>
<p>&quot;Hey, do you know Git?&quot;</p>
</blockquote>
<p>You know what he said?</p>
<blockquote>
<p>&quot;What&#x27;s Git?&quot;</p>
</blockquote>
<hr/>
<h2>...</h2>
<p>It is absolutely insane how many developers have worked on projects and have never used at least one type of version control. There is so
many: <a href="https://git-scm.com/">Git</a>, <a href="https://subversion.apache.org/">Subversion</a>, <a href="https://www.mercurial-scm.org/">Mercurial</a> and all of
them are immensely useful (the most used one is Git, though) and are <em>critical</em> for an easier developer workflow. Git&#x27;s branching features
and the ability to maintain commit history is crucial for whenever a developer messes up and they <em>will</em> mess up. And then Chad asks what
Git is.</p>
<p>I was wrong before, <em>this</em> is where the fun begins.</p>
<p>I soon came to the realization that Chad didn&#x27;t have an idea of what it meant to work with other people. In hindsight, I didn&#x27;t either, but
I was at least willing to research the matter beforehand. I made a few notes, set up some foundations for ease of use, like Git and a style
guide, and so on. But he just assumed we&#x27;d be fine.</p>
<p>In the end, I had to teach Chad everything he would have to know to properly code with others, now and in the future.</p>
<p>We started off nice and simple.</p>
<hr/>
<h2>Git</h2>
<blockquote>
<p>Git is a free and open source distributed version control system designed to handle everything from small to very large projects
with speed and efficiency.</p>
<p>Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion,
CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.</p>
<p>-<a href="https://git-scm.com">https://git-scm.com</a></p>
</blockquote>
<img alt="An example of a Git repository workflow." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgit-workflow-example.26744f8d.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgit-workflow-example.26744f8d.jpg&amp;w=2048&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgit-workflow-example.26744f8d.jpg&amp;w=2048&amp;q=75" width="984" height="409" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>That description might be very difficult to grasp. But the concept of Git is pretty simple.</p>
<p>Picture a text file you&#x27;re working on that contains a playlist you have on your phone. You can use Git to not only save
the current version of the text file, you can use it to:</p>
<ul>
<li>experiment with different versions of the same playlist and never lose the original one</li>
<li>review previous versions of the playlist</li>
<li>work on two versions of the same playlist separately</li>
<li>revert to a previous version of the playlist if the current one is bad or you accidentally deleted some songs</li>
<li>do the same thing while more people work on the playlist</li>
</ul>
<p>Git essentially holds in its special folder &quot;.git&quot; all the changes you make to files and keeps them in <em>commits</em> (a change to the project)
and <em>branches</em> (different workspaces for the same project). Git is pretty damn important to work with in a multi-developer environment since
it is the easiest way to manage lots of code without breaking any of the code you already have.</p>
<p>A very sweet tutorial for Git would be <a href="https://www.atlassian.com/git">the one I used</a> from Atlassian, and there is another pretty good one
from GitHub, which you can find <a href="https://try.github.io/">here</a>.</p>
<p>Once I gave the same resources to Chad, he reluctantly ended up agreeing to use them, but even though Chad read most of the tutorials,
he still didn&#x27;t use Git to its full advantage.</p>
<img alt="Notice how the network has literally no branches now, since I quit making them" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvianuedu-git-network.7291fb5e.jpg&amp;w=640&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvianuedu-git-network.7291fb5e.jpg&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvianuedu-git-network.7291fb5e.jpg&amp;w=1920&amp;q=75" width="609" height="133" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>As you can tell, we eventually reached the point where branches were non-existent (notice the black &quot;master&quot; branch being the only one that
appears towards the end) simply because Chad found it difficult to collaborate with me if we worked on different branches.</p>
<p>Alas, that was the least of my problems.</p>
<hr/>
<h2>Documentation</h2>
<p>By far the most important thing to do when working with others is to write documentation for your code. Documentation allows for you to not
only clear your mind by explaining what your code does, but also help other coders, now or in the future, to understand your code. This is
crucial when working with other fellow coders since you&#x27;ll be working on a <em>lot</em> of code, and it will be inevitable that you eventually
forget what you did. Documentation refreshes your memory and makes it easier for you to see what a function does.</p>
<p>Many languages have different ways of dealing with documentation. Java, for instance, reads specific types of comments called JavaDoc comments
and can automatically generate HTML pages of documentation for your project! VianuEdu&#x27;s JavaDoc can be found <a href="http://vianuedu.lbi.ro/docs/">here</a>.</p>
<p>JavaDoc comments look something like this:</p>
<img alt="This is what the Student constructor&#x27;s JavaDoc looks like" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjavadoc-vianuedu-example.b9ddf501.jpg&amp;w=1200&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjavadoc-vianuedu-example.b9ddf501.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjavadoc-vianuedu-example.b9ddf501.jpg&amp;w=3840&amp;q=75" width="1191" height="664" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>They contain information about the method (that&#x27;s a constructor), the parameters, and perhaps even more, such as exceptions, or some other stuff.
A good JavaDoc comment allows for everyone to understand what a function does, and JavaDoc comments should accompany every method, every variable
to help anyone else understand what is happening in the code they have in front of them.</p>
<p>I like to think my code for the project was relatively well documented, what with every method having documentation, including internal ones, such
as this one:</p>
<img alt="This is what a Godoc comment looks like." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgodoc-vianuedu-example.aea1eff1.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgodoc-vianuedu-example.aea1eff1.jpg&amp;w=2048&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgodoc-vianuedu-example.aea1eff1.jpg&amp;w=2048&amp;q=75" width="964" height="680" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>The Godoc comment at the top of the method allows for the Go toolchain to automatically generate documentation as well, much like JavaDoc does.
You can find the generated documentation for the server of VianuEdu <a href="https://godoc.org/github.com/CNITV/VianuEdu-Server">here</a>.
And as you can see, I thoroughly documented my code. In fact, I can assure you that all of it is documented, at least on the server side.</p>
<p>Compare that with fellow Chad&#x27;s code:</p>
<img alt="I&#x27;m screwed." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fno-documentation-example.5a68f6b4.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fno-documentation-example.5a68f6b4.jpg&amp;w=2048&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fno-documentation-example.5a68f6b4.jpg&amp;w=2048&amp;q=75" width="983" height="869" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>His code has almost <em>no</em> documentation at all. And if there is any documentation, it doesn&#x27;t really explain anything. It&#x27;s mostly just added there
so that I can stop annoying him:</p>
<img alt="Here&#x27;s some documentation." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsome-documentation-example.f0129603.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsome-documentation-example.f0129603.jpg&amp;w=2048&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsome-documentation-example.f0129603.jpg&amp;w=2048&amp;q=75" width="983" height="765" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Yeah, no duh, I figured that out by myself, it&#x27;s literally in the method&#x27;s name!</p>
<p>Anyway, this has rendered Chad&#x27;s code unmaintainable, not only by me, but even by himself, since not even <em>he</em> remembers what he wrote in some
sleepless night with 3 pots of coffee desperately chugged.</p>
<p>Of course, this wasn&#x27;t even the bad news&#x27; final form!</p>
<hr/>
<h2>Linter warnings</h2>
<p>When I started the project, I urged Chad to use the IntelliJ IDEA IDE to work on our project. It&#x27;s a pretty damn good IDE that I wholly
recommend you use when working on big Java projects. The reason why I urged him to use it is because it comes with an automatic linter
built in with some relatively sane defaults. It makes sure your code is idiomatic and also comes with its own improvements to perhaps
other perfectly fine code. It&#x27;s a good thing to have, especially when it brings up some awesome little improvements, like lambda replacements
or even stream API linting:</p>
<img alt="An example of the linter in IntelliJ Java IDE." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJavaStreamRedundantSorted.1d4fc021.gif&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJavaStreamRedundantSorted.1d4fc021.gif&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FJavaStreamRedundantSorted.1d4fc021.gif&amp;w=3840&amp;q=75" width="1500" height="600" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>This one in particular is straight from the IntelliJ website&#x27;s <a href="https://www.jetbrains.com/idea/whatsnew/#v2018-2-java">&quot;What&#x27;s New&quot;</a> section.</p>
<p>Now I told Chad all about IntelliJ&#x27;s features and that he should use them. He said he would.</p>
<p>I was wrong to believe him.</p>
<p>After about a month of work, I decided to check up on his side of the code and see what it looked like, see if he followed my advice:</p>
<p>He didn&#x27;t.</p>
<p>I checked his IntelliJ&#x27;s scroll bar. It shows you the warnings in yellow from the current file, for you to conveniently find and fix them.
Chad&#x27;s scroll bar was <em><strong>completely yellow.</strong></em></p>
<p>The grey parts of the scroll bar also shows you duplicate code, for you to refactor and put in a little function to call later.
Literally 25% of one of his source files was duplicate code. Now <em>that</em> is an achievement.
In total, Chad had 51 instances of duplicate code and 875 typos. Now the typos kind of don&#x27;t count, primarily because Romanian isn&#x27;t a default
language for IntelliJ and also because Chad didn&#x27;t use camelCase variable naming, which is needed if you want IntelliJ to read typos right.
However, none of that saves him.</p>
<p>He had <em><strong>918 warnings</strong></em>, 55 of which were probable bugs, and 532 of which were declaration redundancies!</p>
<img alt="This is chaos." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvianuedu-total-warnings.3842678c.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvianuedu-total-warnings.3842678c.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fvianuedu-total-warnings.3842678c.jpg&amp;w=3840&amp;q=75" width="1220" height="314" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>This is chaos.</p>
<p>But wait! There&#x27;s more!</p>
<p>When I asked him to fix all the warnings as the final brush-up on our project, you know what he said?</p>
<blockquote>
<p>&quot;If it ain&#x27;t broke, don&#x27;t fix it. And trust me, you&#x27;d code it worse without me!&quot;</p>
</blockquote>
<hr/>
<h2>The End of the Journey</h2>
<p>In the end, I finished my parts of the project and we released version 1.0 of VianuEdu. It was fine, it worked, albeit with a few GUI bugs we ironed
out pretty quick (I wonder why there were any, Chad. Maybe the warnings were trying to tell you something). However, the experience taught me many things.</p>
<p>A lot of people are unaware of how to write clean code and also help others in the process of coding together with them. And you know why?</p>
<p><strong>Because coding with others is hard.</strong></p>
<p>When you&#x27;re alone, you can do whatever you want, no one judges you, you are free to write code in any way you like. But we are rarely truly alone when coding.
You never know when you want someone new to join your project or when you have to join someone else&#x27;s project. You&#x27;d want to have the easiest time learning
the new codebase, right? Well, that doesn&#x27;t happen just like that. You need to work in order to make your code accessible, easy to read, easy to refactor
and modify.</p>
<p>I&#x27;ll admit that I did some wrongs in my project as well. We didn&#x27;t spend time training on using the IDE, I didn&#x27;t stay with Chad for a while to make sure
he uses IntelliJ to the fullest extent, and I also didn&#x27;t take too much time to teach him Git, I just handed him some websites to read (much like I did with
you), but the truth in the end is the same.</p>
<p>Learning to code with others is not easy, but it can be done. You have to:</p>
<ul>
<li>write <strong>clean code</strong></li>
<li>use <strong>proper version control</strong></li>
<li>have <strong>good documentation</strong></li>
<li>adhere to the project&#x27;s <strong>style guide</strong></li>
<li>have a common <strong>linter configuration</strong> to reduce warnings, errors and bugs</li>
<li><strong>communicate</strong> with your fellow coders</li>
</ul>
<p>You need to make sure the code is uniform, cohesive, and easy for others to integrate as well. All of these things can be practiced
but all it requires is the will to do so. Make everyone&#x27;s life easier when coding with others, lest you end up with an unmaintainable codebase. And who knows?
Maybe the person you&#x27;ll be helping is you in the future, who will be a completely different person and end up hating your own code because you didn&#x27;t
do it right.</p>
<p>I hope that you will at least learn from my experience and perhaps integrate some of these good practices in your code and development teams as well.</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
        <item>
            <title><![CDATA[Adventures in Privacy - Part 1: Keys everywhere!]]></title>
            <link>undefined/articles/adventures-in-privacy-part-1</link>
            <guid>undefined/articles/adventures-in-privacy-part-1</guid>
            <pubDate>Fri, 28 Sep 2018 00:00:00 GMT</pubDate>
            <description><![CDATA[My rather short adventure into getting security and GPG keys to privatize everything.]]></description>
            <content:encoded><![CDATA[<p>Ever since the huge <a href="https://www.theguardian.com/us-news/2017/sep/07/equifax-credit-breach-hack-social-security">Equifax breach</a>
that pretty much spooked the living hell out of over 100 million people in the United States, I have been acutely aware of anything
regarding privacy. It has long been a known fact that corporations not only
<a href="https://news.ycombinator.com/item?id=15395946">poorly protect our data</a>, but also sell all of our information to third parties,
for usages such as <a href="https://mashable.com/2018/02/14/facebook-spam-2fa/">ad targeting</a>. However, if this happens, there is no limit
to what other data corporations may have on us and sell to others, even personally identifiable information, like private conversations
or the places we visit. Even though I am most likely unaffected by most of the aforementioned breaches, I am still rather annoyed that
a company this large and important could be this careless with people&#x27;s information. As such, since companies can&#x27;t be bothered to
protect my data, I&#x27;ll do it myself.</p>
<p>Now, naturally, as you can probably imagine, when I finally had another side-project to do, I instantly took it upon myself to
procrastinate <em>as much as humanly possible</em>. And since school had nothing stimulating at the time (except do everyone else&#x27;s
homework), it was the perfect opportunity to start securing my life.</p>
<p>So, what do we deal with first?</p>
<hr/>
<h2>Passwords</h2>
<p>By far the easiest thing to take control of are your own passwords. Commonly, people use Firefox&#x27;s <a href="https://support.mozilla.org/en-US/kb/password-manager-remember-delete-change-and-import">Password Manager</a>
or Google Chrome&#x27;s not so safe <a href="https://support.google.com/chrome/answer/95606">alternative</a>, which are easily integrated
in the browsers to keep your life &quot;secure&quot;. While I don&#x27;t personally blame you for using these, I can assure you that
Google gets all of your password information for all your accounts. If you don&#x27;t believe me, allow me to present to you
Google Takeout.</p>
<img alt="A screenshot of the Google Takeout web page." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgoogle-takeout-page.8753d62f.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgoogle-takeout-page.8753d62f.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgoogle-takeout-page.8753d62f.jpg&amp;w=3840&amp;q=75" width="1920" height="1041" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Google Takeout is a rather useful (and ethical) service that Google offers in order for you to request a backup for all of the
data that you Google account possesses, from YouTube subscriptions to Google Drive files.</p>
<img alt="The archive is massive, 38GB for my measly little Google account!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgoogle-archive-screencap.23d89df9.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgoogle-archive-screencap.23d89df9.jpg&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgoogle-archive-screencap.23d89df9.jpg&amp;w=1920&amp;q=75" width="881" height="801" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>Holy cow, 38GB! That&#x27;s massive!</p>
</blockquote>
<p>This way you can get all the information that Google has on you, while also getting some nice organized files to boot! For instance,
I used this service to create vCard files of all my Google contacts to import in my personal e-mail client, Thunderbird
(if you don&#x27;t like Outlook and your browser&#x27;s slow, <a href="https://www.thunderbird.net">check it out</a>). Lo and behold, right there you can
find all your sweet password information that Google has on you. (More specifically, in the &quot;Chrome&quot; folder, under AutoFill)</p>
<p>There are many ways to store your passwords locally and securely, and by far the two most popular ones are <a href="https://keepass.info/">KeePass</a> for Windows and
<a href="https://www.passwordstore.org/">pass</a> for Linux. Both are really powerful, but different in functionality. KeePass uses a .kdbx file that contains all the
passwords, while &quot;pass&quot; just has a Git repository containing GPG-encrypted files. I personally use KeePass since it also has some cross-platform
functionality, such as <a href="https://play.google.com/store/apps/details?id=keepass2android.keepass2android&amp;hl=en">Keepass2Android</a> for Android and
<a href="https://itunes.apple.com/us/app/minikeepass/id451661808?mt=8">MyKeePass</a> for iPhone.</p>
<img alt="A screencap of the KeePass interface. Not mine, but I won&#x27;t show that one!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fkeepass-2-screencap.51d50ab0.png&amp;w=828&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fkeepass-2-screencap.51d50ab0.png&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fkeepass-2-screencap.51d50ab0.png&amp;w=1920&amp;q=75" width="800" height="600" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Both work surprisingly well and allow for some pretty neat features. &quot;pass&quot; just has a text-file, so you can write whatever you want with it, which is
very flexible, and KeePass has many features such as auto-expiring keys, URL entries, auto-typing etc.</p>
<p>So now, I have all my passwords locally saved, safely locked. However, my master password was 256 characters long, something I couldn&#x27;t remember. Now I couldn&#x27;t
just have a plain text file going around with my password. So I had to improvise...</p>
<h2>A little detour from passwords to DigiSparks</h2>
<blockquote>
<p><em>&quot;The easiest way to remember a password is to have some other device remember it for you.&quot;</em></p>
<p>-Me, when too lazy to remember a password</p>
</blockquote>
<p>I mean, I had a point. But not too much of one. In hindsight, it would&#x27;ve been better if I just never did this, but I am young, I can make mistakes.
I very quickly had my eyes set on a particular device that could solved my problem, called <a href="http://digistump.com/products/1">DigiSpark</a>.
A DigiSpark is a little ATTiny85 circuit with a USB on it that you can program just like an Arduino. It&#x27;s <em>super cheap</em> (just $8) and you can use
for some pretty fun stuff. For instance, you can program it to act like a Human Interface Device, which can <em>send keystrokes to the computer</em>. You can
<em>script a specific string of characters for the DigiSpark to send to a computer</em> on demand. Sound familiar?</p>
<p>And they&#x27;re just 8 bucks...uuhhh...</p>
<img alt="Buy!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdigispark-purchase.1bab5a01.jpg&amp;w=640&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdigispark-purchase.1bab5a01.jpg&amp;w=828&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdigispark-purchase.1bab5a01.jpg&amp;w=828&amp;q=75" width="400" height="400" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<blockquote>
<p>Instant buy!</p>
</blockquote>
<p>Yeah, I got two. Anyway, I quickly programmed them to quickly output the 256-character master password on any computer after
plugged in for 3 seconds. Put in, pull out, logged in. Easy enough for cheap, right?</p>
<img alt="This is me coding both, I kept one for backup." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdigispark-hid-source.97b26fe0.jpg&amp;w=750&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdigispark-hid-source.97b26fe0.jpg&amp;w=1920&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fdigispark-hid-source.97b26fe0.jpg&amp;w=1920&amp;q=75" width="663" height="323" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>And up top you have the source code, which you would find anyway under &quot;File&quot; &gt; &quot;Examples&quot; &gt; &quot;DigiSpark&quot; &gt; &quot;Keyboard&quot;.</p>
<p>So now that&#x27;s done. What next can I secure?</p>
<hr/>
<h2>Encrypting files</h2>
<p>Well, this ain&#x27;t fun.</p>
<p>Let me tell you how fun it is to try and keep all your files encrypted safely (it&#x27;s not).
In fact, it&#x27;s <em>so</em> fun that I literally quit procrastinating on that.
Nah, just kidding, why would I do that?</p>
<p>Anyway, I wanted to encrypt some files because I had a few surprises I didn&#x27;t want anyone to see beforehand, particularly some birthday cards.
After that, I started realizing the full value of keeping your files safe. It&#x27;s much like keeping your files on the cloud, but far less likelihood
of someone stealing your information, which is always good.</p>
<p>The best way to encrypt files, by far, is to keep them encrypted where they always stay in anyway, and the solution to that problem is GPG.</p>
<h2>GPG</h2>
<p>GNU Privacy Guard is known to be the top free open-source program for encrypting and decrypting files for either storage or e-mail communication.</p>
<p>If you don&#x27;t know how GPG works, it&#x27;s pretty simple. Essentially, there are two files that you have GPG:</p>
<ul>
<li>a private key, that you keep to yourself and use to decrypt or sign files, e-mails, etc.</li>
<li>a public key, that you share with others and use to encrypt or verify files, e-mails, etc.</li>
</ul>
<p>You need both to have a <em>GPG keypair</em>, but you <strong>don&#x27;t share the private key with anyone!</strong> Once you have both, you can use them to encrypt and decrypt files,
e-mails or just short messages, maybe even streams of data! The concept essentially works using asymmetric encryption, which is generated when creating the keypair. Using GPG is simple, but configuring it is the hard part. So, let&#x27;s get started on that!</p>
<h2>Configuration hell</h2>
<p>First off, I had to make some keys. Now there are <em>too many</em> tutorials online on how to do that, but by far the best one (and the one I used) is
<a href="https://www.digitalocean.com/community/tutorials/how-to-use-gpg-to-encrypt-and-sign-messages">this one</a>. However, the tutorial does not have an
alternative for Windows. To get GPG for Windows, you&#x27;ll need <a href="https://www.gpg4win.org/">GPG4Win</a> (very original name). After the installation
process, both versions of GPG are pretty much the same, except for maybe file paths.</p>
<p>When you finish generating your keypair, you&#x27;ll get a nice little key with a key ID. Note that down, you&#x27;ll need it. It&#x27;s a 8-character string, like mine:</p>
<p><code>AB9B94AA</code></p>
<p>After that, I also added a passphrase of 64 characters, with these commands:</p>
<pre class="language-bash"><code class="language-bash">~$ gpg --edit-key <span class="token punctuation">[</span>KEY ID HERE<span class="token punctuation">]</span>
gpg<span class="token operator">&gt;</span> <span class="token function">passwd</span>

<span class="token comment"># Add password here</span>

gpg<span class="token operator">&gt;</span> save
</code></pre>
<p>I (obviously, because why not) kept the passphrase in the password database (I realized later that
might be a bad idea, but I&#x27;ll fix that later, don&#x27;t worry).</p>
<p>Now this worked for quite a while, and I would either use GPG4Win&#x27;s UI, Kleopatra, to encrypt keys, or use the command-line (the superior choice):</p>
<pre class="language-bash"><code class="language-bash">~$ gpg --output someDocument.gpg --encrypt <span class="token punctuation">\</span>
   --recipient <span class="token punctuation">[</span>YOUR E-MAIL HERE<span class="token punctuation">]</span> <span class="token punctuation">\</span>
   someDocument.docx
</code></pre>
<p>I also put my public key on the MIT PGP keyserver, so that anyone can download and use it if they want to send me something.</p>
<pre class="language-bash"><code class="language-bash">~$ gpg --keyserver pgp.mit.edu --send-key <span class="token punctuation">[</span>YOUR E-MAIL HERE<span class="token punctuation">]</span>
</code></pre>
<p>If I wanted to send encrypted documents to others, I&#x27;d use their recipient e-mail address, provided my GPG installation has their public key in the
keyring. You need to ask your friend for it, and you can either get it from a keyserver like this:</p>
<pre class="language-bash"><code class="language-bash">~$ gpg --keyserver pgp.mit.edu --recv <span class="token punctuation">[</span>THE KEY ID YOU WANT HERE<span class="token punctuation">]</span>
</code></pre>
<p>Or just get it from a public keyfile they might have sent you, like this:</p>
<pre class="language-bash"><code class="language-bash">~$ gpg --import publicKey.asc
</code></pre>
<p>Make sure to backup all of your important keys somewhere safe:</p>
<pre class="language-bash"><code class="language-bash">gpg -a --export <span class="token punctuation">[</span>YOUR KEY ID HERE<span class="token punctuation">]</span> <span class="token operator">&gt;</span> my-public-gpg.key
gpg -a --export-secret-keys <span class="token punctuation">[</span>YOUR KEY ID HERE<span class="token punctuation">]</span> <span class="token operator">&gt;</span> my-secret-gpg.key
gpg --export-ownertrust <span class="token operator">&gt;</span> my-ownertrust-gpg.txt
</code></pre>
<p>Once you got the basics down, you&#x27;re pretty much set!</p>
<p>So, now I&#x27;m done with that. I need something else to waste my time with. Uh, let&#x27;s see...</p>
<p>Hold up, I need a Google search.</p>
<img alt="True story." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fme-finding-yubikeys.5545f20f.jpg&amp;w=1920&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fme-finding-yubikeys.5545f20f.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fme-finding-yubikeys.5545f20f.jpg&amp;w=3840&amp;q=75" width="1920" height="1080" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Oh, nice! Let&#x27;s get them!</p>
<hr/>
<h2>Security keys</h2>
<p>The pinnacle of online security: a physical security key!</p>
<p>A security key can be used to lock many different services behind a physical device that you keep on you. There are many DIY versions of this
(technically my DigiSparks are a kind of security key), but by far the most reliable and popular are the <a href="https://www.yubico.com/product/yubikey-5-nfc/">Yubikeys</a>.
I personally bought the Yubikey 4 and Yubikey NEO, since I wanted one to use for my phone and one for the computer as backup. I know, they&#x27;re not
Series 5, but I bought them before those were released by 3 days. Just my luck.</p>
<img alt="Here they are. They&#x27;re kinda high-tech" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-yubikeys.04fc4434.jpg&amp;w=3840&amp;q=75 1x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmy-yubikeys.04fc4434.jpg&amp;w=3840&amp;q=75" width="4032" height="2268" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p>Now, the Yubikey can be used for a ton of stuff. They support FIDO U2F, so you can use them to have 2-factor authentication for Google, Twitter,
Facebook, GitHub, Dropbox, etc. This is already pretty useful instead of typing the same codes all the time, right? Additionally, they can store
different security standards for other programs, including GPG and KeePass ;)</p>
<p>So you can guess what comes next...</p>
<h2>Integrating Yubikey 4 with GPG</h2>
<p>This is obviously pretty annoying and hard, so I won&#x27;t pad this article much more. A good tutorial I found is by <a href="https://github.com/ageis">@ageis</a> and
you can find it <a href="https://gist.github.com/ageis/14adc308087859e199912b4c79c4aaa4">here</a>. It&#x27;s pretty damn comprehensive, but you need to remember
a few things. Yubikey NEO only supports 2048-bit GPG keys, so if you did those, then you&#x27;re fine, but if you generated 4096-bit GPG keys (like I did),
then you need to use the Yubikey 4 for that.</p>
<p>After using the GitHub gist above, I can just plug the Yubikey in my computer whenever I use GPG and I get
a sweet prompt for the PIN to use the Yubikey. I just input the PIN, and done!</p>
<img alt="It&#x27;s a cool PIN." srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fyubikey-gpg-pin-entry.88d68df5.jpg&amp;w=640&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fyubikey-gpg-pin-entry.88d68df5.jpg&amp;w=1080&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fyubikey-gpg-pin-entry.88d68df5.jpg&amp;w=1080&amp;q=75" width="423" height="267" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<p><em>And</em> I get a shiny green &quot;verified&quot; badge on every GitHub commit. Sweet!
But that&#x27;s a bit more work, which I&#x27;ll explain in a future blog post, probably.</p>
<img alt="Check out that sweet verified badge!" srcSet="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsweet-github-badge.04b23c48.jpg&amp;w=1080&amp;q=75 1x, /_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsweet-github-badge.04b23c48.jpg&amp;w=3840&amp;q=75 2x" src="/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsweet-github-badge.04b23c48.jpg&amp;w=3840&amp;q=75" width="1056" height="235" decoding="async" data-nimg="future" loading="lazy" style="color:transparent"/>
<hr/>
<h2>What next?</h2>
<p>There are many things that I still want to do in order to have more privacy and security on the Internet. A few of the next projects will be to:</p>
<ul>
<li>get a personal cloud drive</li>
<li>integrate my devices with push notifications between each other</li>
<li>...who knows what else?</li>
</ul>
<p>I hope you enjoyed my little trip through needless additional encryption of my life.</p>]]></content:encoded>
            <author>rss@gard.us (Matei-Alexandru Gardus)</author>
        </item>
    </channel>
</rss>