all repos — gemini-redirect @ db8d56bcc8b1e3511666182c6dae114890315642

atom.xml (view raw)

  1<?xml version="1.0" encoding="UTF-8"?>
  2<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  3	<title>Lonami&#x27;s Site</title>
  4	<link href="https://lonami.dev/atom.xml" rel="self" type="application/atom+xml"/>
  5  <link href="https://lonami.dev"/>
  6	<generator uri="https://www.getzola.org/">Zola</generator>
  7	<updated>2020-10-03T00:00:00+00:00</updated>
  8	<id>https://lonami.dev/atom.xml</id>
  9	<entry xml:lang="en">
 10		<title>Making a Difference</title>
 11		<published>2020-08-24T00:00:00+00:00</published>
 12		<updated>2020-08-24T00:00:00+00:00</updated>
 13		<link href="https://lonami.dev/golb/making-a-difference/" type="text/html"/>
 14		<id>https://lonami.dev/golb/making-a-difference/</id>
 15		<content type="html">&lt;p&gt;When I&#x27;ve thought about what &amp;quot;making a difference&amp;quot; means, I&#x27;ve always seen it as having to do something at very large scales. Something that changes everyone&#x27;s lives. But I&#x27;ve realized that it doesn&#x27;t need the case.&lt;&#x2F;p&gt;
 16&lt;p&gt;I&#x27;m thinking about certain people. I&#x27;m thinking about middle-school.&lt;&#x2F;p&gt;
 17&lt;p&gt;I&#x27;m thinking about my math teacher, who I remember saying that if he made a student fail with a grade very close to passing, then he would be a bad teacher because he could just &amp;quot;let them pass&amp;quot;. But if he just passed that one student, he would fail as a teacher, because it&#x27;s his job to get people to actually &lt;em&gt;learn&lt;&#x2F;em&gt; his subject. He didn&#x27;t want to be mean, he was just trying to have everybody properly learn the subject. That made a difference on me, but I never got the chance to thank him.&lt;&#x2F;p&gt;
 18&lt;p&gt;I&#x27;m thinking about my English teacher, who has had to put up with a lot of stupidity from the rest of students, making the class not enjoyable. But I thought she was nice, and she thought I was nice. I remember of a day when she was grading my assignement and debating what grade I should get. I thought to myself, she should just grade whatever she considered fair. But she went something along the lines of &amp;quot;what the heck, you deserve it&amp;quot;, and graded in my favour. I think of her as an honest person who also just wants to make other people learn, despite the other students not liking her much. I never got a chance to thank her.&lt;&#x2F;p&gt;
 19&lt;p&gt;I&#x27;m thinking about my philosophy teacher, who was a nice chap. He tried to make the lectures fun and had some really interesting ways of thinking. He was nice to talk to overall, but I never got to thank him for what he taught us.&lt;&#x2F;p&gt;
 20&lt;p&gt;I&#x27;m thinking about one of my lecturers at university who has let me express my feelings to her and helped me make the last push I needed to finish my university degree (I was really dreading some subjects and considering dropping out, but those days are finally over).&lt;&#x2F;p&gt;
 21&lt;p&gt;I&#x27;m thinking about all the people who has been in a long-distance relationship with me. None of the three I&#x27;ve had have worked out in the long-term so far, and I&#x27;m in a need of a break from those. But they were really invaluable to help me grow and learn a lot about how things actually work. I&#x27;m okay with the first two people now, maybe the third one can be my friend once more in the future as well. I&#x27;m sure I&#x27;ve told them how important they have been to me and my life.&lt;&#x2F;p&gt;
 22&lt;p&gt;I&#x27;m thinking about all the people who I&#x27;ve met online and have had overall a healthy relation, sharing interesting things between each other, playtime, thoughts, and other various lessons.&lt;&#x2F;p&gt;
 23&lt;p&gt;What I&#x27;m trying to get across is that you may be more impactful than you think you really are. And even if people don&#x27;t say it, some are extremely thankful of your interactions with them. You can see this post as a sort of a &amp;quot;call for action&amp;quot; to be more thankful to the people that have affected you in important ways. If people take things for granted because they Just Work, the person who made those things should be proud of this achievement.&lt;&#x2F;p&gt;
 24&lt;p&gt;Thanks to all of them, to everyone who has shared good moments with me, and to all the people who enjoy the things I make.&lt;&#x2F;p&gt;
 25</content>
 26	</entry>
 27	<entry xml:lang="en">
 28		<title>Data Mining, Warehousing and Information Retrieval</title>
 29		<published>2020-07-03T00:00:00+00:00</published>
 30		<updated>2020-07-03T00:00:00+00:00</updated>
 31		<link href="https://lonami.dev/blog/university/" type="text/html"/>
 32		<id>https://lonami.dev/blog/university/</id>
 33		<content type="html">&lt;p&gt;During university, there were a few subjects where I had to write blog posts for (either as evaluable tasks or just for fun). I thought it was really fun and I wanted to preserve that work here, with the hopes it&#x27;s interesting to someone.&lt;&#x2F;p&gt;
 34&lt;p&gt;The posts series were auto-generated from the original HTML files and manually anonymized later.&lt;&#x2F;p&gt;
 35&lt;ul&gt;
 36&lt;li&gt;&lt;a href=&quot;&#x2F;blog&#x2F;mdad&quot;&gt;Data Mining and Data Warehousing&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
 37&lt;li&gt;&lt;a href=&quot;&#x2F;blog&#x2F;ribw&quot;&gt;Information Retrieval and Web Search&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
 38&lt;&#x2F;ul&gt;
 39</content>
 40	</entry>
 41	<entry xml:lang="en">
 42		<title>My new computer</title>
 43		<published>2020-06-19T00:00:00+00:00</published>
 44		<updated>2020-07-03T00:00:00+00:00</updated>
 45		<link href="https://lonami.dev/blog/new-computer/" type="text/html"/>
 46		<id>https://lonami.dev/blog/new-computer/</id>
 47		<content type="html">&lt;p&gt;This post will be mostly me ranting about setting up a new laptop, but I also just want to share my upgrade. If you&#x27;re considering installing Arch Linux with dual-boot for Windows, maybe this post will help. Or perhaps you will learn something new to troubleshoot systems in the future. Let&#x27;s begin!&lt;&#x2F;p&gt;
 48&lt;p&gt;Last Sunday, I ordered a Asus Rog Strix G531GT-BQ165 for 900€ (on a 20% discount) with the following specifications:&lt;&#x2F;p&gt;
 49&lt;ul&gt;
 50&lt;li&gt;Intel® Core i7-9750H (6 cores, 12MB cache, 2.6GHz up to 4.5GHz, 64-bit)&lt;&#x2F;li&gt;
 51&lt;li&gt;16GB RAM (8GB*2) DDR4 2666MHz&lt;&#x2F;li&gt;
 52&lt;li&gt;512GB SSD M.2 PCIe® NVMe&lt;&#x2F;li&gt;
 53&lt;li&gt;Display 15.6&amp;quot; (1920x1080&#x2F;16:9) 60Hz&lt;&#x2F;li&gt;
 54&lt;li&gt;Graphics NVIDIA® GeForce® GTX1650 4GB GDDR5 VRAM&lt;&#x2F;li&gt;
 55&lt;li&gt;LAN 10&#x2F;100&#x2F;1000&lt;&#x2F;li&gt;
 56&lt;li&gt;Wi-Fi 5 (802.11ac) 2x2 RangeBoost&lt;&#x2F;li&gt;
 57&lt;li&gt;Bluetooth 5.0&lt;&#x2F;li&gt;
 58&lt;li&gt;48Wh battery with 3 cells&lt;&#x2F;li&gt;
 59&lt;li&gt;3 x USB 3.1 (GEN1)&lt;&#x2F;li&gt;
 60&lt;&#x2F;ul&gt;
 61&lt;p&gt;I was mostly interested in a general upgrade (better processor, disk, more RAM), although the graphics card is a really nice addition which will allow me to take some time off on more games. After using it for a bit, I really love the feel of the keyboard, and I love the lack of numpad! (No sarcasm, I really don&#x27;t like numpads.)&lt;&#x2F;p&gt;
 62&lt;p&gt;This is an upgrade from my previous laptop (Asus X554LA-XX822T), which I won in a competition before entering university in a programming challenge. It has served me really well for the past five years, and had the following specifications:&lt;&#x2F;p&gt;
 63&lt;ul&gt;
 64&lt;li&gt;Intel® Core™ i5-5200U&lt;&#x2F;li&gt;
 65&lt;li&gt;4GB RAM DDR3L 1600MHz (which I upgraded to have 8GB)&lt;&#x2F;li&gt;
 66&lt;li&gt;1TB HDD&lt;&#x2F;li&gt;
 67&lt;li&gt;Display 15.6&amp;quot; (1366x768&#x2F;16:9)&lt;&#x2F;li&gt;
 68&lt;li&gt;Intel® HD Graphics 4400&lt;&#x2F;li&gt;
 69&lt;li&gt;LAN 10&#x2F;100&#x2F;1000&lt;&#x2F;li&gt;
 70&lt;li&gt;Wifi 802.11 bgn&lt;&#x2F;li&gt;
 71&lt;li&gt;Bluetooth 4.0&lt;&#x2F;li&gt;
 72&lt;li&gt;Battery 2 cells&lt;&#x2F;li&gt;
 73&lt;li&gt;1 x USB 2.0&lt;&#x2F;li&gt;
 74&lt;li&gt;2 x USB 3.0&lt;&#x2F;li&gt;
 75&lt;&#x2F;ul&gt;
 76&lt;p&gt;Prior to this one, I had a Lenovo (also won in the same competition of the previous year), and prior to that (just for the sake of history), it was HP Pavilion, AMD A4-3300M processor, which unfortunately ended with heating problems. But that&#x27;s very old now.&lt;&#x2F;p&gt;
 77&lt;h2 id=&quot;laptop-arrival&quot;&gt;Laptop arrival&lt;&#x2F;h2&gt;
 78&lt;p&gt;The laptop arrived 2 days ago at roughly 19:00, which I put charged for 3 hours as the book said. The day after, nightmares began!&lt;&#x2F;p&gt;
 79&lt;p&gt;Trying to boot it the first two times was fun, as it comes with a somewhat loud sound on boot. I don&#x27;t know why they would do this, and I immediately turned it off in the BIOS.&lt;&#x2F;p&gt;
 80&lt;h2 id=&quot;installation-journey&quot;&gt;Installation journey&lt;&#x2F;h2&gt;
 81&lt;p&gt;I spent all of yesterday trying to setup Windows and Arch Linux (and didn&#x27;t even finish, it took me this morning too and even now it&#x27;s only half functional). I absolutely &lt;em&gt;hate&lt;&#x2F;em&gt; the amount of partitions the Windows installer creates on a clean disk. So instead, I first went with Arch Linux, and followed the &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;Installation_guide&quot;&gt;installation guide on the Arch wiki&lt;&#x2F;a&gt;. Pre-installation, setting up the wireless network, creating the partitions and formatting them went all good. I decided to avoid GRUB at first and go with rEFInd, but alas I missed a big warning on the wiki and after reboot (I would later find out) it was not mounting root properly, so all I had was whatever was in the Initramfs. Reboot didn&#x27;t work, so I had to hold the power button.&lt;&#x2F;p&gt;
 82&lt;p&gt;Anyway, once the partitions were created, I went to install Windows (there was a lot of back and forth burning different &lt;code&gt;.iso&lt;&#x2F;code&gt; images on the USB, which was a bit annoying because it wasn&#x27;t the fastest thing in the world). This was pretty painless, and the process was standard: select advanced to let me choose the right partition, pick the one, say &amp;quot;no&amp;quot; to everything in the services setup, and done. But this was the first Windows &lt;code&gt;.iso&lt;&#x2F;code&gt; I tried. It was an old revision, and the drivers were causing issues when running (something weird about their &lt;code&gt;.dll&lt;&#x2F;code&gt;, manually installing the &lt;code&gt;.ini&lt;&#x2F;code&gt; driver files seemed to work?). The Nvidia drivers didn&#x27;t want to be installed on such an old revision, after updating everything I could via Windows updates. So back I went to burning a newer Windows &lt;code&gt;.iso&lt;&#x2F;code&gt; and going through the same process again…&lt;&#x2F;p&gt;
 83&lt;p&gt;Once Windows was ready and I verified that I could boot to it correctly, it was time to have a second go at Arch Linux. And I went through the setup at least three times, getting it wrong every single time, formatting root every single time, redownloading the packages every single pain. If only had I known earlier what the issue was!&lt;&#x2F;p&gt;
 84&lt;p&gt;Why bother with Arch? I was pretty happy with Linux Mint, and I lowkey wanted to try NixOS, but I had used Arch before and it&#x27;s a really nice distro overall (up-to-date, has AUR, quite minimal, imperative), except for trying to install rEFInd while chrooted…&lt;&#x2F;p&gt;
 85&lt;p&gt;In the end I managed to get something half-working, I still need to properly configure WiFi and pulseaudio in my system but hey it works.&lt;&#x2F;p&gt;
 86&lt;p&gt;I like to be able to dual-boot Windows and Linux because Linux is amazing for productivity, but unfortunately, some games only work fine on Windows. Might as well have both systems and use one for gaming, while the other is my daily driver.&lt;&#x2F;p&gt;
 87&lt;h2 id=&quot;setting-up-arch-linux&quot;&gt;Setting up Arch Linux&lt;&#x2F;h2&gt;
 88&lt;p&gt;This is the process I followed to install Arch Linux in the end, along with a brief explanation on what I think the things are doing and why we are doing them. I think the wiki could do a better job at this, but I also know it&#x27;s hard to get it right for everyone. Something I do dislike is the link colour, after opening a link it becomes gray and it&#x27;s a lot easier to miss the fact that it is a link in the first place, which was tough when re-reading it because some links actually matter a lot. Furthermore, important information may just be a single line, also easy to skim over. Anyway, on to the installation process…&lt;&#x2F;p&gt;
 89&lt;p&gt;The first thing we want to do is configure our keyboard layout or else the keys won&#x27;t correspond to what we expect:&lt;&#x2F;p&gt;
 90&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;loadkeys es
 91&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
 92&lt;p&gt;Because we&#x27;re on a recent system, we want to verify that UEFI works correctly. If we see files listed, then it works fine:&lt;&#x2F;p&gt;
 93&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ls &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;efivars
 94&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
 95&lt;p&gt;The next thing we want to do is configure the WiFi, because I don&#x27;t have any ethernet cable nearby. To do this, we check what network interfaces our laptop has (we&#x27;re looking for the one prefixed with &amp;quot;w&amp;quot;, presumably for wireless, such as &amp;quot;wlan0&amp;quot; or &amp;quot;wlo1&amp;quot;), we set it up, scan for available wireless network, and finally connect. In my case, the network has WPA security so we rely on &lt;code&gt;wpa_supplicant&lt;&#x2F;code&gt; to connect, passing the SSID (network name) and password:&lt;&#x2F;p&gt;
 96&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ip link
 97ip link set &amp;lt;IFACE&amp;gt; up
 98iw dev &amp;lt;IFACE&amp;gt; scan | less
 99wpa_supplicant -B -i &amp;lt;IFACE&amp;gt; -c &amp;lt;(wpa_passphrase &amp;lt;SSID&amp;gt; &amp;lt;PASS&amp;gt;)
100&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
101&lt;p&gt;After that&#x27;s done, pinging an IP address like &amp;quot;1.1.1.1&amp;quot; should Just Work™, but to be able to resolve hostnames, we need to also setup a nameserver. I&#x27;m using Cloudflare&#x27;s, but you could use any other:&lt;&#x2F;p&gt;
102&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;echo nameserver 1.1.1.1 &amp;gt; &#x2F;etc&#x2F;resolv.conf
103ping archlinux.org
104^C
105&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
106&lt;p&gt;If the ping works, then network works! If you still have issues, you may need to &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;Network_configuration#Static_IP_address&quot;&gt;manually configure a static IP address&lt;&#x2F;a&gt; and add a route with the address of your, well, router. This basically shows if we have any address, adds a static address (so people know who we are), shows what route we have, and adds a default one (so our packets know where to go):&lt;&#x2F;p&gt;
107&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ip address show
108ip address add &amp;lt;YOUR ADDR&amp;gt;&#x2F;24 broadcast + dev &amp;lt;IFACE&amp;gt;
109ip route show
110ip route add default via &amp;lt;ROUTER ADDR&amp;gt; dev &amp;lt;IFACE&amp;gt;
111&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
112&lt;p&gt;Now that we have network available, we can enable NTP to synchronize our system time (this may be required for network operations where certificates have a validity period, not sure; in any case nobody wants a wrong system time):&lt;&#x2F;p&gt;
113&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;timedatectl set-ntp true
114&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
115&lt;p&gt;After that, we can manage our disk and partitions using &lt;code&gt;fdisk&lt;&#x2F;code&gt;. We want to define partitions to tell the system where it should live. To determine the disk name, we first list them, and then edit it. &lt;code&gt;fdisk&lt;&#x2F;code&gt; is really nice and reminds you at every step that help can be accessed with &amp;quot;m&amp;quot;, which you should constantly use to guide you through.&lt;&#x2F;p&gt;
116&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;fdisk -l
117fdisk &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;
118&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
119&lt;p&gt;The partitions I made are the following:&lt;&#x2F;p&gt;
120&lt;ul&gt;
121&lt;li&gt;A 100MB one for the EFI system.&lt;&#x2F;li&gt;
122&lt;li&gt;A 32GB one for Linux&#x27; root &lt;code&gt;&#x2F;&lt;&#x2F;code&gt; partition.&lt;&#x2F;li&gt;
123&lt;li&gt;A 200GB one for Linux&#x27; home &lt;code&gt;&#x2F;home&lt;&#x2F;code&gt; partition.&lt;&#x2F;li&gt;
124&lt;li&gt;The rest was unallocated for Windows because I did this first.&lt;&#x2F;li&gt;
125&lt;&#x2F;ul&gt;
126&lt;p&gt;I like to have &lt;code&gt;&#x2F;home&lt;&#x2F;code&gt; and &lt;code&gt;&#x2F;&lt;&#x2F;code&gt; separate because I can reinstall root without losing anything from home (projects, music, photos, screenshots, videos…).&lt;&#x2F;p&gt;
127&lt;p&gt;After the partitions are made, we format them in FAT32 and EXT4 which are good defaults for EFI, root and home. They need to have a format, or else they won&#x27;t be usable:&lt;&#x2F;p&gt;
128&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;mkfs.fat -F32 &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART1&amp;gt;
129mkfs.ext4 &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART2&amp;gt;
130mkfs.ext4 &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART3&amp;gt;
131&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
132&lt;p&gt;Because the laptop was new, there was no risk to lose anything, but if you&#x27;re doing a install on a previous system, be very careful with the partition names. Make sure they match with the ones in &lt;code&gt;fdisk -l&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
133&lt;p&gt;Now that we have usable partitions, we need to mount them or they won&#x27;t be accessible. We can do this with &lt;code&gt;mount&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
134&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;mount &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART2&amp;gt; &#x2F;mnt
135mkdir &#x2F;mnt&#x2F;efi
136mount &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART1&amp;gt; &#x2F;mnt&#x2F;efi
137mkdir &#x2F;mnt&#x2F;home
138mount &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART3&amp;gt; &#x2F;mnt&#x2F;home
139&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
140&lt;p&gt;Remember to use the correct partitions while mounting. We mount everything so that the system knows which partitions we care about, which we will let know about later on.&lt;&#x2F;p&gt;
141&lt;p&gt;Next step is to setup the basic Arch Linux system on root, which can be done with &lt;code&gt;pacstrap&lt;&#x2F;code&gt;. What follows the directory is a list of packages, and you may choose any you wish (at least add &lt;code&gt;base&lt;&#x2F;code&gt;, &lt;code&gt;linux&lt;&#x2F;code&gt; and &lt;code&gt;linux-firmware&lt;&#x2F;code&gt;). These can be installed later, but I&#x27;d recommend having them from the beginning, just in case:&lt;&#x2F;p&gt;
142&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;pacstrap &#x2F;mnt base linux linux-firmware sudo vim-minimal dhcpcd wpa_supplicant man-db man-pages intel-ucode grub efibootmgr os-prober ntfs-3g
143&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
144&lt;p&gt;Because my system has an intel CPU, I also installed &lt;code&gt;intel-ucode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
145&lt;p&gt;Next up is generating the &lt;code&gt;fstab&lt;&#x2F;code&gt; file, which we tell to use UUIDs to be on the safe side through &lt;code&gt;-U&lt;&#x2F;code&gt;. This file is important, because without it the system won&#x27;t know what partitions exist and will happily only boot with the initramfs, without anything of what we just installed at root. Not knowing this made me restart the entire installation process a few times.&lt;&#x2F;p&gt;
146&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;genfstab -U &#x2F;mnt &amp;gt;&amp;gt; &#x2F;mnt&#x2F;etc&#x2F;fstab
147&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
148&lt;p&gt;After that&#x27;s done, we can change our root into our mount point and finish up configuration. We setup our timezone (so DST can be handled correctly if needed), synchronize the hardware clock (to persist the current time to the BIOS), uncomment our locales (exit &lt;code&gt;vim&lt;&#x2F;code&gt; by pressing ESC, then type &lt;code&gt;:wq&lt;&#x2F;code&gt; and press enter), generate locale files (which some applications need), configure language and keymap, update the hostname of our laptop and what indicate what &lt;code&gt;localhost&lt;&#x2F;code&gt; means…&lt;&#x2F;p&gt;
149&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;ln -sf &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;&amp;lt;REGION&amp;gt;&#x2F;&amp;lt;CITY&amp;gt; &#x2F;etc&#x2F;localtime
150hwclock --systohc
151vim &#x2F;etc&#x2F;locale.gen
152locale-gen
153echo LANG=es_ES.UTF-8 &amp;gt; &#x2F;etc&#x2F;locale.conf
154echo KEYMAP=es &amp;gt; &#x2F;etc&#x2F;vconsole.conf
155echo &amp;lt;HOST&amp;gt; &#x2F;etc&#x2F;hostname
156cat &amp;lt;&amp;lt;EOF &amp;gt; &#x2F;etc&#x2F;hosts
157127.0.0.1 localhost
158::1 localhost
159127.0.1.1 &amp;lt;HOST&amp;gt;.localdomain &amp;lt;HOST&amp;gt;
160EOF
161&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
162&lt;p&gt;Really, we could&#x27;ve done all of this later, and the same goes for setting root&#x27;s password with &lt;code&gt;passwd&lt;&#x2F;code&gt; or creating users (some of the groups you probably want are &lt;code&gt;power&lt;&#x2F;code&gt; and &lt;code&gt;wheel&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
163&lt;p&gt;The important part here is installing GRUB (which also needed the &lt;code&gt;efibootmgr&lt;&#x2F;code&gt; package):&lt;&#x2F;p&gt;
164&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;grub-install --target=x86_64-efi --efi-directory=&#x2F;efi --bootloader-id=GRUB
165&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
166&lt;p&gt;If we want GRUB to find our Windows install, we also need the &lt;code&gt;os-prober&lt;&#x2F;code&gt; and &lt;code&gt;ntfs-3g&lt;&#x2F;code&gt; packages that we installed earlier with &lt;code&gt;pacstrap&lt;&#x2F;code&gt;, and with those we need to mount the Windows partition somewhere. It doesn&#x27;t matter where. With that done, we can generate the GRUB configuration file which lists all the boot options:&lt;&#x2F;p&gt;
167&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;mkdir &#x2F;windows
168mount &#x2F;dev&#x2F;&amp;lt;DISK&amp;gt;&amp;lt;PART5&amp;gt; &#x2F;windows
169grub-mkconfig -o &#x2F;boot&#x2F;grub&#x2F;grub.cfg
170&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
171&lt;p&gt;(In my case, I installed Windows before completing the Arch install, which created an additional partition in between).&lt;&#x2F;p&gt;
172&lt;p&gt;With GRUB ready, we can exit the chroot and reboot the system, and if all went well, you should be greeted with a choice of operating system to use:&lt;&#x2F;p&gt;
173&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;exit
174reboot
175&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
176&lt;p&gt;If for some reason you need to find what mountpoints were active prior to rebooting (to &lt;code&gt;unmount&lt;&#x2F;code&gt; them for example), you can use &lt;code&gt;findmnt&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
177&lt;p&gt;Before GRUB I tried rEFInd, which as I explained had issues with for missing a warning. Then I tried systemd-boot, which did not pick up Arch at first. That&#x27;s where the several reinstalls come from, I didn&#x27;t want to work with a half-worked system so I mostly redid the entire process quite a few times.&lt;&#x2F;p&gt;
178&lt;h2 id=&quot;migrating-to-the-new-laptop&quot;&gt;Migrating to the new laptop&lt;&#x2F;h2&gt;
179&lt;p&gt;I had a external disk formatted with NTFS. Of course, after moving every file I cared about from my previous Linux install caused all the permissions to reset. All my &lt;code&gt;.git&lt;&#x2F;code&gt; repositories, dirty with file permission changes! This is going to take a while to fix, or maybe I should just &lt;code&gt;git config core.fileMode false&lt;&#x2F;code&gt;. Here is a &lt;a href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;2083563&quot;&gt;lovely command&lt;&#x2F;a&gt; to sort them out on a per-repository basis:&lt;&#x2F;p&gt;
180&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;git diff --summary | grep --color &#x27;mode change 100644 =&amp;gt; 100755&#x27; | cut -d&#x27; &#x27; -f7- | xargs -d&#x27;\n&#x27; chmod -x
181&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
182&lt;p&gt;I never realized how much I had stored over the years, but it really was a lot. While moving things to the external disk, I tried to do some cleanup, such as removing some build artifacts which needlessly occupy space, or completely skipping all the binary application files. If I need those I will install them anyway. The process was mostly focused on finding all the projects and program data that I did care about, or even some game saves. Nothing too difficult, but definitely time consuming.&lt;&#x2F;p&gt;
183&lt;h2 id=&quot;tuning-arch&quot;&gt;Tuning Arch&lt;&#x2F;h2&gt;
184&lt;p&gt;Now that our system is ready, install &lt;code&gt;pacman-contrib&lt;&#x2F;code&gt; to grab a copy of the &lt;code&gt;rankmirrors&lt;&#x2F;code&gt; speed. It should help speed up the download of whatever packages you want to install, since it will help us &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;Mirrors#List_by_speed&quot;&gt;rank the mirrors by download speed&lt;&#x2F;a&gt;. Making a copy of the file is important, otherwise whenever you try to install something it will fail saying it can&#x27;t find anything.&lt;&#x2F;p&gt;
185&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cp &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist.backup
186sed -i &#x27;s&#x2F;^#Server&#x2F;Server&#x2F;&#x27; &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist.backup
187rankmirrors -n 6 &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist.backup | tee &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist
188&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
189&lt;p&gt;This will take a while, but it should be well worth it. We&#x27;re using &lt;code&gt;tee&lt;&#x2F;code&gt; to see the progress as it goes.&lt;&#x2F;p&gt;
190&lt;p&gt;Some other packages I installed after I had a working system in no particular order:&lt;&#x2F;p&gt;
191&lt;ul&gt;
192&lt;li&gt;&lt;code&gt;xfce4&lt;&#x2F;code&gt; and &lt;code&gt;xorg-server&lt;&#x2F;code&gt;. I just love the simplicity of XFCE.&lt;&#x2F;li&gt;
193&lt;li&gt;&lt;code&gt;xfce4-whiskermenu-plugin&lt;&#x2F;code&gt;, a really nice start menu.&lt;&#x2F;li&gt;
194&lt;li&gt;&lt;code&gt;xfce4-pulseaudio-plugin&lt;&#x2F;code&gt; and &lt;code&gt;pavucontrol&lt;&#x2F;code&gt;, to quickly adjust the audio with my mouse.&lt;&#x2F;li&gt;
195&lt;li&gt;&lt;code&gt;xfce4-taskmanager&lt;&#x2F;code&gt;, a GUI alternative I generally prefer to &lt;code&gt;htop&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
196&lt;li&gt;&lt;code&gt;pulseaudio&lt;&#x2F;code&gt; and &lt;code&gt;pulseaudio-alsa&lt;&#x2F;code&gt; to get nice integration with XFCE4 and audio mixing.&lt;&#x2F;li&gt;
197&lt;li&gt;&lt;code&gt;firefox&lt;&#x2F;code&gt;, which comes with fonts too. A really good web browser.&lt;&#x2F;li&gt;
198&lt;li&gt;&lt;code&gt;git&lt;&#x2F;code&gt;, to commit &lt;del&gt;crimes&lt;&#x2F;del&gt; code.&lt;&#x2F;li&gt;
199&lt;li&gt;&lt;code&gt;code&lt;&#x2F;code&gt;, a wonderful editor which I used to write this blog entry.&lt;&#x2F;li&gt;
200&lt;li&gt;&lt;code&gt;nano&lt;&#x2F;code&gt;, so much nicer to write a simple commit message.&lt;&#x2F;li&gt;
201&lt;li&gt;&lt;code&gt;python&lt;&#x2F;code&gt; and &lt;code&gt;python-pip&lt;&#x2F;code&gt;, my favourite language to toy around ideas or use as a calculator.&lt;&#x2F;li&gt;
202&lt;li&gt;&lt;code&gt;telegram-desktop&lt;&#x2F;code&gt;, for my needs on sharing memes.&lt;&#x2F;li&gt;
203&lt;li&gt;&lt;code&gt;cmus&lt;&#x2F;code&gt; and &lt;code&gt;mpv&lt;&#x2F;code&gt;, a simple terminal music player and media player.&lt;&#x2F;li&gt;
204&lt;li&gt;&lt;code&gt;openssh&lt;&#x2F;code&gt;, to connect into any VPS I have access to.&lt;&#x2F;li&gt;
205&lt;li&gt;&lt;code&gt;base-devel&lt;&#x2F;code&gt;, necessary to build most projects I&#x27;ll find myself working with (or even compiling some projects Rust which I installed via &lt;code&gt;rustup&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
206&lt;li&gt;&lt;code&gt;flac&lt;&#x2F;code&gt;, &lt;code&gt;libmad&lt;&#x2F;code&gt;, &lt;code&gt;opus&lt;&#x2F;code&gt;, and &lt;code&gt;libvorbis&lt;&#x2F;code&gt;, to be able to play more audio files.&lt;&#x2F;li&gt;
207&lt;li&gt;&lt;code&gt;inkscape&lt;&#x2F;code&gt;, to make random drawings.&lt;&#x2F;li&gt;
208&lt;li&gt;&lt;code&gt;ffmpeg&lt;&#x2F;code&gt;, to convert media or record screen.&lt;&#x2F;li&gt;
209&lt;li&gt;&lt;code&gt;xclip&lt;&#x2F;code&gt;, to automatically copy screenshots to my clipboard.&lt;&#x2F;li&gt;
210&lt;li&gt;&lt;code&gt;gvfs&lt;&#x2F;code&gt;, needed by Thunar to handle mounting and having a trash (perma-deletion by default can be nasty sometimes).&lt;&#x2F;li&gt;
211&lt;li&gt;&lt;code&gt;noto-fonts&lt;&#x2F;code&gt;, &lt;code&gt;noto-fonts-cjk&lt;&#x2F;code&gt;, &lt;code&gt;noto-fonts-extra&lt;&#x2F;code&gt; and &lt;code&gt;noto-fonts-emoji&lt;&#x2F;code&gt;, if you don&#x27;t want missing gliphs everywhere.&lt;&#x2F;li&gt;
212&lt;li&gt;&lt;code&gt;xfce4-notifyd&lt;&#x2F;code&gt; and &lt;code&gt;libnotify&lt;&#x2F;code&gt;, for notifications.&lt;&#x2F;li&gt;
213&lt;li&gt;&lt;code&gt;cronie&lt;&#x2F;code&gt;, to be able to &lt;code&gt;crontab -e&lt;&#x2F;code&gt;. Make sure to &lt;code&gt;system enable cronie&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
214&lt;li&gt;&lt;code&gt;xarchiver&lt;&#x2F;code&gt; (with &lt;code&gt;p7zip&lt;&#x2F;code&gt;, &lt;code&gt;zip&lt;&#x2F;code&gt;, &lt;code&gt;unzip&lt;&#x2F;code&gt; and &lt;code&gt;unrar&lt;&#x2F;code&gt;) to uncompress stuff.&lt;&#x2F;li&gt;
215&lt;li&gt;&lt;code&gt;xreader&lt;&#x2F;code&gt; to read &lt;code&gt;.pdf&lt;&#x2F;code&gt; files.&lt;&#x2F;li&gt;
216&lt;li&gt;&lt;code&gt;sqlitebrowser&lt;&#x2F;code&gt; is always nice to tinker around with SQLite databases.&lt;&#x2F;li&gt;
217&lt;li&gt;&lt;code&gt;jre8-openjdk&lt;&#x2F;code&gt; if you want to run Java applications.&lt;&#x2F;li&gt;
218&lt;li&gt;&lt;code&gt;smartmontools&lt;&#x2F;code&gt; is nice with a SSD to view your disk statistics.&lt;&#x2F;li&gt;
219&lt;&#x2F;ul&gt;
220&lt;p&gt;After that, I configured my Super L key to launch &lt;code&gt;xfce4-popup-whiskermenu&lt;&#x2F;code&gt; so that it opens the application menu, pretty much the same as it would on Windows, moved the panels around and configured them to my needs, and it feels like home once more.&lt;&#x2F;p&gt;
221&lt;p&gt;I made some mistakes while &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;Systemd-networkd&quot;&gt;configuring systemd-networkd&lt;&#x2F;a&gt; and accidentally added a service that was incorrect, which caused boot to wait for it to timeout before completing. My boot time was taking 90 seconds longer because of this! &lt;a href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;archlinux&#x2F;comments&#x2F;4nv9yi&#x2F;my_arch_greets_me_now_with_a_start_job&#x2F;&quot;&gt;The solution was to remove said service&lt;&#x2F;a&gt;, so this is something to look out for.&lt;&#x2F;p&gt;
222&lt;p&gt;In order to find what was taking long, I had to edit the &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;kernel_parameters&quot;&gt;kernel parameters&lt;&#x2F;a&gt; to remove the &lt;code&gt;quiet&lt;&#x2F;code&gt; option. I prefer seeing the output on what my computer is doing anyway, because it gives me a sense of progress and most importantly is of great value when things go wrong. Another interesting option is &lt;code&gt;noauto,x-systemd.automount&lt;&#x2F;code&gt;, which makes a disk lazily-mounted. If you have a slow disk, this could help speed things up.&lt;&#x2F;p&gt;
223&lt;p&gt;If you see a service taking long, you can also use &lt;code&gt;systemd-analyze blame&lt;&#x2F;code&gt; to see what takes the longest, and &lt;code&gt;systemctl list-dependencies&lt;&#x2F;code&gt; is also helpful to find what services are active.&lt;&#x2F;p&gt;
224&lt;p&gt;My &lt;code&gt;locale charmap&lt;&#x2F;code&gt; was spitting out a bunch of warnings:&lt;&#x2F;p&gt;
225&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;$ locale charmap
226locale: Cannot set LC_CTYPE to default locale: No such file or directory
227locale: Cannot set LC_MESSAGES to default locale: No such file or directory
228locale: Cannot set LC_ALL to default locale: No such file or directory
229ANSI_X3.4-1968
230&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
231&lt;p&gt;…ANSI encoding? Immediately I added the following to &lt;code&gt;~&#x2F;.bashrc&lt;&#x2F;code&gt; and &lt;code&gt;~&#x2F;.profile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
232&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;export LC_ALL=en_US.UTF-8
233export LANG=en_US.UTF-8
234export LANGUAGE=en_US.UTF-8
235&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
236&lt;p&gt;For some reason, I also had to edit &lt;code&gt;xfce4-terminal&lt;&#x2F;code&gt;&#x27;s preferences in advanced to change the default character encoding to UTF-8. This also solved my issues with pasting things into the terminal, and also proper rendering! I guess pastes were not working because it had some characters that could not be encoded.&lt;&#x2F;p&gt;
237&lt;p&gt;To have working notifications, I added the following to &lt;code&gt;~&#x2F;.bash_profile&lt;&#x2F;code&gt; after &lt;code&gt;exec startx&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
238&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;systemctl --user start xfce4-notifyd.service
239&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
240&lt;p&gt;I&#x27;m pretty sure there&#x27;s a better way to do this, or maybe it&#x27;s not even necessary, but this works for me.&lt;&#x2F;p&gt;
241&lt;p&gt;Some of the other things I had left to do was setting up &lt;code&gt;sccache&lt;&#x2F;code&gt; to speed up Rust builds:&lt;&#x2F;p&gt;
242&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;cargo install sccache
243echo export RUSTC_WRAPPER=sccache &amp;gt;&amp;gt; ~&#x2F;.bashrc
244&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
245&lt;p&gt;Once I had &lt;code&gt;cargo&lt;&#x2F;code&gt; ready, installed &lt;code&gt;hacksaw&lt;&#x2F;code&gt; and &lt;code&gt;shotgun&lt;&#x2F;code&gt; with it to perform screenshots.&lt;&#x2F;p&gt;
246&lt;p&gt;I also disabled the security delay when downloading files in Firefox because it&#x27;s just annoying, in &lt;code&gt;about:config&lt;&#x2F;code&gt; setting &lt;code&gt;security.dialog_enable_delay&lt;&#x2F;code&gt; to &lt;code&gt;0&lt;&#x2F;code&gt;, and added the &lt;a href=&quot;https:&#x2F;&#x2F;alisdair.mcdiarmid.org&#x2F;kill-sticky-headers&#x2F;&quot;&gt;Kill sticky headers&lt;&#x2F;a&gt; to my bookmarks (you may prefer &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;t-mart&#x2F;kill-sticky&quot;&gt;the updated version&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
247&lt;p&gt;The &lt;code&gt;utils-linux&lt;&#x2F;code&gt; comes with a &lt;code&gt;fstrim&lt;&#x2F;code&gt; utility to &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;Solid_state_drive#Periodic_TRIM&quot;&gt;trim the SSD weekly&lt;&#x2F;a&gt;, which I want enabled via &lt;code&gt;systemctl enable fstrim.timer&lt;&#x2F;code&gt; (you may also want to &lt;code&gt;start&lt;&#x2F;code&gt; it if you don&#x27;t reboot often). For more SSD tips, check &lt;a href=&quot;https:&#x2F;&#x2F;easylinuxtipsproject.blogspot.com&#x2F;p&#x2F;ssd.html&quot;&gt;How to optimize your Solid State Drive&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
248&lt;p&gt;If the sound is funky prior to reboot, try &lt;code&gt;pulseaudio --kill&lt;&#x2F;code&gt; and &lt;code&gt;pulseaudio --start&lt;&#x2F;code&gt;, or delete &lt;code&gt;~&#x2F;.config&#x2F;pulse&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
249&lt;p&gt;I haven&#x27;t been able to get the brightness keys to work yet, but it&#x27;s not a big deal, because scrolling on the power manager plugin of Xfce does work (and also &lt;code&gt;xbacklight&lt;&#x2F;code&gt; works, or writing directly to &lt;code&gt;&#x2F;sys&#x2F;class&#x2F;backlight&#x2F;*&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
250&lt;h2 id=&quot;tuning-windows&quot;&gt;Tuning Windows&lt;&#x2F;h2&gt;
251&lt;p&gt;On the Windows side, I disabled the annoying Windows defender by running (&lt;kbd&gt;Ctrl+R&lt;&#x2F;kbd&gt;) &lt;code&gt;gpedit.msc&lt;&#x2F;code&gt; and editing:&lt;&#x2F;p&gt;
252&lt;ul&gt;
253&lt;li&gt;&lt;em&gt;Computer Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Defender » Turn off Windows Defender » Enable&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
254&lt;li&gt;&lt;em&gt;User Configuration &amp;gt; Administrative Templates &amp;gt; Start Menu and Taskbar » Remove Notifications and Action Center » Enable&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
255&lt;&#x2F;ul&gt;
256&lt;p&gt;I also updated the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;WindowsLies&#x2F;BlockWindows&#x2F;raw&#x2F;master&#x2F;hosts&quot;&gt;&lt;code&gt;hosts&lt;&#x2F;code&gt; file&lt;&#x2F;a&gt; (located at &lt;code&gt;%windir%\system32\Drivers\etc\hosts&lt;&#x2F;code&gt;) with the hope that it will stop some of the telemetry.&lt;&#x2F;p&gt;
257&lt;p&gt;Last, to have consistent time on Windows and Linux, I changed the following registry key for a &lt;code&gt;qword&lt;&#x2F;code&gt; with value &lt;code&gt;1&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
258&lt;pre&gt;&lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal
259&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
260&lt;p&gt;(The key might not exist, but you can create it if that&#x27;s the case).&lt;&#x2F;p&gt;
261&lt;p&gt;All this time, my laptop had the keyboard lights on, which have been quite annoying. Apparently, they also can cause &lt;a href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;ValveIndex&#x2F;comments&#x2F;cm6pos&#x2F;psa_uninstalldisable_aura_sync_lighting_if_you&#x2F;&quot;&gt;massive FPS drops&lt;&#x2F;a&gt;. I headed over to &lt;a href=&quot;https:&#x2F;&#x2F;rog.asus.com&#x2F;downloads&#x2F;&quot;&gt;Asus Rog downloads&lt;&#x2F;a&gt;, selected Aura Sync…&lt;&#x2F;p&gt;
262&lt;pre&gt;&lt;code class=&quot;language-md&quot; data-lang=&quot;md&quot;&gt;# Not Found
263
264The requested URL &#x2F;campaign&#x2F;aura&#x2F;us&#x2F;Sync.html was not found on this server.
265
266Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
267&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
268&lt;p&gt;…great! I&#x27;ll just find the &lt;a href=&quot;https:&#x2F;&#x2F;www.asus.com&#x2F;campaign&#x2F;aura&#x2F;global&#x2F;&quot;&gt;Aura site&lt;&#x2F;a&gt; somewhere else…&lt;&#x2F;p&gt;
269&lt;pre&gt;&lt;code class=&quot;language-md&quot; data-lang=&quot;md&quot;&gt;# ASUS
270
271# We&#x27;ll be back.
272
273Hi, our website is temporarily closed for service enhancements.
274
275We&#x27;ll be back shortly.Thank you for your patience!
276&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
277&lt;p&gt;Oh come on. After waiting for the next day, I headed over, downloaded their software, tried to install it and it was an awful experience. It felt like I was purposedly installing malware. It spammed and flashed a lot of &lt;code&gt;cmd&lt;&#x2F;code&gt;&#x27;s on screen as if it was a virus. It was stuck at 100% doing that and then, Windows blue-screened with &lt;code&gt;KERNEL_MODE_HEAP_CORRUPTION&lt;&#x2F;code&gt;. Amazing. How do you screw up this bad?&lt;&#x2F;p&gt;
278&lt;p&gt;Well, at least rebooting worked. I tried to &lt;a href=&quot;https:&#x2F;&#x2F;answers.microsoft.com&#x2F;en-us&#x2F;windows&#x2F;forum&#x2F;all&#x2F;unable-to-uninstall-asus-aura-sync-utility&#x2F;e9bec36c-e62f-4773-80be-88fb68dace16&quot;&gt;uninstall Aura, but of course that failed&lt;&#x2F;a&gt;. Using the &lt;a href=&quot;https:&#x2F;&#x2F;support.microsoft.com&#x2F;en-us&#x2F;help&#x2F;17588&#x2F;windows-fix-problems-that-block-programs-being-installed-or-removed&quot;&gt;troubleshooter to uninstall programs&lt;&#x2F;a&gt; helped me remove most of the crap that was installed.&lt;&#x2F;p&gt;
279&lt;p&gt;After searching around how to disable the lights (because &lt;a href=&quot;https:&#x2F;&#x2F;rog.asus.com&#x2F;forum&#x2F;showthread.php?112786-Option-to-Disable-Aura-Lights-on-Strix-G-series-(G531GT)-irrespective-of-OSes&quot;&gt;my BIOS did not have this setting&lt;&#x2F;a&gt;), I stumbled upon &lt;a href=&quot;https:&#x2F;&#x2F;rog.asus.com&#x2F;us&#x2F;innovation&#x2F;armoury_crate&#x2F;&quot;&gt;&amp;quot;Armoury Crate&amp;quot;&lt;&#x2F;a&gt;. Okay, fine, I will install that.&lt;&#x2F;p&gt;
280&lt;p&gt;The experience wasn&#x27;t much better. It did the same thing with a lot of consoles flashing on screen. And of course, it resulted in another blue-screen, this time &lt;code&gt;KERNEL_SECURITY_CHECK_FAILURE&lt;&#x2F;code&gt;. To finish up, the BSOD kept happening as I rebooted the system. &lt;del&gt;Time to reinstall Windows once more.&lt;&#x2F;del&gt; After booting and crashing a few more times I could get into secure mode and perform the reinstall from there, which saved me from burning the &lt;code&gt;.iso&lt;&#x2F;code&gt; again.&lt;&#x2F;p&gt;
281&lt;p&gt;Asus software might be good, but the software is utter crap.&lt;&#x2F;p&gt;
282&lt;p&gt;After trying out &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wroberts&#x2F;rogauracore&quot;&gt;rogauracore&lt;&#x2F;a&gt; (which didn&#x27;t list my model), it worked! I could disable the stupid lights from Linux, and &lt;a href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;CalcProgrammer1&#x2F;OpenRGB&#x2F;-&#x2F;wikis&#x2F;home&quot;&gt;OpenRGB&lt;&#x2F;a&gt; also works on Windows which may be worth checking out too.&lt;&#x2F;p&gt;
283&lt;p&gt;Because &lt;code&gt;rougauracore&lt;&#x2F;code&gt; helped me and they linked to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;linuxhw&#x2F;hw-probe&#x2F;blob&#x2F;master&#x2F;README.md#appimage&quot;&gt;hw-probe&lt;&#x2F;a&gt;, I decided to &lt;a href=&quot;https:&#x2F;&#x2F;linux-hardware.org&#x2F;?probe=0e3e48c501&quot;&gt;run it on my system&lt;&#x2F;a&gt;, with the hopes it is useful for other people.&lt;&#x2F;p&gt;
284&lt;h2 id=&quot;closing-words&quot;&gt;Closing words&lt;&#x2F;h2&gt;
285&lt;p&gt;I hope the installation journey is at least useful to someone, or that you enjoyed reading about it all. If not, sorry!&lt;&#x2F;p&gt;
286</content>
287	</entry>
288	<entry xml:lang="en">
289		<title>Privado: Final NoSQL evaluation</title>
290		<published>2020-05-13T00:00:00+00:00</published>
291		<updated>2020-05-14T08:31:06+00:00</updated>
292		<link href="https://lonami.dev/blog/mdad/final-nosql-evaluation/" type="text/html"/>
293		<id>https://lonami.dev/blog/mdad/final-nosql-evaluation/</id>
294		<content type="html">&lt;p&gt;This evaluation is a bit different to my &lt;a href=&quot;&#x2F;blog&#x2F;mdad&#x2F;nosql-evaluation&#x2F;&quot;&gt;previous one&lt;&#x2F;a&gt; because this time I have been tasked to evaluate student &lt;code&gt;a(i - 2)&lt;&#x2F;code&gt;, and because I am &lt;code&gt;i = 11&lt;&#x2F;code&gt; that happens to be &lt;code&gt;a(9) =&lt;&#x2F;code&gt; a classmate.&lt;&#x2F;p&gt;
295&lt;h2 id=&quot;classmate-s-evaluation&quot;&gt;Classmate’s Evaluation&lt;&#x2F;h2&gt;
296&lt;p&gt;&lt;strong&gt;Grading: A.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
297&lt;p&gt;The post I have evaluated is Trabajo en grupo – Bases de datos NoSQL, 3ª entrada: Aplicación con una Base de datos NoSQL seleccionada.&lt;&#x2F;p&gt;
298&lt;p&gt;It starts with a very brief introduction with who has written the post, what data they will be using, and what database they have chosen.&lt;&#x2F;p&gt;
299&lt;p&gt;They properly describe their objective, how they will do it and what library will be used.&lt;&#x2F;p&gt;
300&lt;p&gt;They also explain where they obtain the data from, and what other things the site can do, which is a nice bonus.&lt;&#x2F;p&gt;
301&lt;p&gt;The post continues listing and briefly explaining all the tools used and what they are for, including commands to execute.&lt;&#x2F;p&gt;
302&lt;p&gt;At last, they list what files their project uses, what they do, and contains a showcase of images which lets the reader know what the application does.&lt;&#x2F;p&gt;
303&lt;p&gt;All in all, in my opinion, it’s clear they have put work into this entry and I have not noticed any major flaws, so they deserve the highest grade.&lt;&#x2F;p&gt;
304</content>
305	</entry>
306	<entry xml:lang="en">
307		<title>Privado: Final NoSQL evaluation</title>
308		<published>2020-05-13T00:00:00+00:00</published>
309		<updated>2020-05-14T07:30:08+00:00</updated>
310		<link href="https://lonami.dev/blog/ribw/final-nosql-evaluation/" type="text/html"/>
311		<id>https://lonami.dev/blog/ribw/final-nosql-evaluation/</id>
312		<content type="html">&lt;p&gt;This evaluation is a bit different to my &lt;a href=&quot;&#x2F;blog&#x2F;ribw&#x2F;16&#x2F;nosql-evaluation&#x2F;&quot;&gt;previous one&lt;&#x2F;a&gt; because this time I have been tasked to evaluate the student &lt;code&gt;a(i - 2)&lt;&#x2F;code&gt;, and because I am &lt;code&gt;a = 9&lt;&#x2F;code&gt; that happens to be &lt;code&gt;a(7) =&lt;&#x2F;code&gt; Classmate.&lt;&#x2F;p&gt;
313&lt;p&gt;Unfortunately for Classmate, the only entry related to NoSQL I have found in their blog is Prima y segunda Actividad: Base de datos NoSQL which does not develop an application as requested for the third entry (as of 14th of May).&lt;&#x2F;p&gt;
314&lt;p&gt;This means that, instead, I will evaluate &lt;code&gt;a(i - 3)&lt;&#x2F;code&gt; which happens to be &lt;code&gt;a(6) =&lt;&#x2F;code&gt; Classmate and they do have an entry.&lt;&#x2F;p&gt;
315&lt;h2 id=&quot;classmate-s-evaluation&quot;&gt;Classmate’s Evaluation&lt;&#x2F;h2&gt;
316&lt;p&gt;&lt;strong&gt;Grading: B.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
317&lt;p&gt;The post I have evaluated is BB.DD. NoSQL RethinkDB 3ª Fase. Aplicación.&lt;&#x2F;p&gt;
318&lt;p&gt;It starts with an introduction, properly explaining what database they have chosen and why, but not what application they will be making.&lt;&#x2F;p&gt;
319&lt;p&gt;This is detailed just below in the next section, although it’s a bit vague.&lt;&#x2F;p&gt;
320&lt;p&gt;The next section talks about the Python dependencies that are required, but they never said they would be making a Python application or that we need to install Python!&lt;&#x2F;p&gt;
321&lt;p&gt;The next section talks about the file structure of the project, and they detail what everything part does, although I have missed some code snippets.&lt;&#x2F;p&gt;
322&lt;p&gt;The final result is pretty cool and contains many interesting graphs, they provide a download to the source code and list all the relevant references used.&lt;&#x2F;p&gt;
323&lt;p&gt;Except for a weird «necesario falta» in the text, it’s otherwise well-written, although given the issues above I cannot grade it with the highest score.&lt;&#x2F;p&gt;
324</content>
325	</entry>
326	<entry xml:lang="en">
327		<title>Tips for Outpost</title>
328		<published>2020-05-10T00:00:00+00:00</published>
329		<updated>2020-05-22T00:00:00+00:00</updated>
330		<link href="https://lonami.dev/blog/tips-outpost/" type="text/html"/>
331		<id>https://lonami.dev/blog/tips-outpost/</id>
332		<content type="html">&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;store.steampowered.com&#x2F;app&#x2F;1127110&#x2F;Outpost&#x2F;&quot;&gt;Outpost&lt;&#x2F;a&gt; is a fun little game by Open Mid Interactive that has popped in recently in my recommended section of Steam, and I decided to give it a try.&lt;&#x2F;p&gt;
333&lt;p&gt;It&#x27;s a fun tower-defense game with progression, different graphics and random world generation which makes it quite fun for a few hours. In this post I want to talk about some tips I found useful to get past night 50.&lt;&#x2F;p&gt;
334&lt;h2 id=&quot;build-pattern&quot;&gt;Build Pattern&lt;&#x2F;h2&gt;
335&lt;p&gt;At first, you may be inclined to design a checkerboard pattern like the following, where &amp;quot;C&amp;quot; is the Crystal shrine, &amp;quot;S&amp;quot; is a stone launcher and &amp;quot;B&amp;quot; is a booster:&lt;&#x2F;p&gt;
336&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;lonami.dev&#x2F;blog&#x2F;tips-outpost&#x2F;outpost-bad-pattern.svg&quot; alt=&quot;Bad Outpost build pattern&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
337&lt;p&gt;Indeed, this pattern will apply &lt;strong&gt;4&lt;&#x2F;strong&gt; boosts to every turret, but unfortunately, the other 4 slots of the booster are wasted! This is because boosters are able to power 8 different towers, and you really want to maximize that. Here&#x27;s a better design:&lt;&#x2F;p&gt;
338&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;lonami.dev&#x2F;blog&#x2F;tips-outpost&#x2F;outpost-good-pattern.svg&quot; alt=&quot;Good Outpost build pattern&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
339&lt;p&gt;The shrine&#x27;s tower does get boosted, but it&#x27;s still not really worth it to boost it. This pattern works good, and it&#x27;s really easy to tile: just repeat the same 3x3 pattern.&lt;&#x2F;p&gt;
340&lt;p&gt;Nonetheless, we can do better. What if we applied multiple boosters to the same tower while still applying all 8 boosts?&lt;&#x2F;p&gt;
341&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;lonami.dev&#x2F;blog&#x2F;tips-outpost&#x2F;outpost-best-pattern.svg&quot; alt=&quot;Best Outpost build pattern&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
342&lt;p&gt;That&#x27;s what peak performance looks like. You can actually apply multiple boosters to the same tower, and it works great.&lt;&#x2F;p&gt;
343&lt;p&gt;Now, is it really worth it building anywhere except around the shrine? Not really. You never know where a boss will come from, so all sides need a lot of defense if you want to stand a chance.&lt;&#x2F;p&gt;
344&lt;p&gt;The addition of traps in 1.6 is amazing. You want to build these outside your strong &amp;quot;core&amp;quot;, mostly to slow the enemies down so your turrets have more time to finish them off. Don&#x27;t waste boosters on the traps, and build them at a reasonable distance from the center (the sixth tile is a good spot):&lt;&#x2F;p&gt;
345&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;lonami.dev&#x2F;blog&#x2F;tips-outpost&#x2F;outpost-trap-pattern.svg&quot; alt=&quot;Trap Outpost build pattern&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
346&lt;p&gt;If you gather enough materials, you can build more trap and cannon layers outside, roughly at enough distance to slow them for enough duration until they reach the next layer of traps, and so on. Probably a single gap of &amp;quot;cannon, booster, cannon&amp;quot; is enough between trap layers, just not in the center where you need a lot of fire power.&lt;&#x2F;p&gt;
347&lt;h2 id=&quot;talents&quot;&gt;Talents&lt;&#x2F;h2&gt;
348&lt;p&gt;Talents are the way progression works in the game. Generally, after a run, you will have enough experience to upgrade nearly all talents of roughly the same tier. However, some are worth upgrading more than others (which provide basically no value).&lt;&#x2F;p&gt;
349&lt;p&gt;The best ones to upgrade are:&lt;&#x2F;p&gt;
350&lt;ul&gt;
351&lt;li&gt;Starting supplies. Amazing to get good tools early.&lt;&#x2F;li&gt;
352&lt;li&gt;Shrine shield. Very useful to hold against tough bosses.&lt;&#x2F;li&gt;
353&lt;li&gt;Better buildings (cannon, boosters, bed and traps). They&#x27;re a must to deal the most damage.&lt;&#x2F;li&gt;
354&lt;li&gt;Better pickaxe. Stone is limited, so better make good use of it.&lt;&#x2F;li&gt;
355&lt;li&gt;Better chests. They provide an insane amount of resources early.&lt;&#x2F;li&gt;
356&lt;li&gt;Winter slow. Turrets will have more time to deal damage, it&#x27;s perfect.&lt;&#x2F;li&gt;
357&lt;li&gt;More time. Useful if you&#x27;re running out, although generally you enter nights early after having a good core anyway.&lt;&#x2F;li&gt;
358&lt;li&gt;More rocks. Similar to a better pickaxe, more stone is always better.&lt;&#x2F;li&gt;
359&lt;&#x2F;ul&gt;
360&lt;p&gt;Some decent ones:&lt;&#x2F;p&gt;
361&lt;ul&gt;
362&lt;li&gt;In-shrine turret. It&#x27;s okay to get past the first night without building but not much beyond that.&lt;&#x2F;li&gt;
363&lt;li&gt;Better axe and greaves. Great to save some energy and really nice quality of life to move around.&lt;&#x2F;li&gt;
364&lt;li&gt;Tree growth. Normally there&#x27;s enough trees for this not to be an issue but it can save some time gathering wood.&lt;&#x2F;li&gt;
365&lt;li&gt;Wisps. They&#x27;re half-decent since they can provide materials once you max out or max out expensive gear.&lt;&#x2F;li&gt;
366&lt;&#x2F;ul&gt;
367&lt;p&gt;Some okay ones:&lt;&#x2F;p&gt;
368&lt;ul&gt;
369&lt;li&gt;Extra XP while playing. Generally not needed due to the way XP scales per night, but can be a good boost.&lt;&#x2F;li&gt;
370&lt;li&gt;Runestones. Not as reliable as chests but some can grant more energy per day.&lt;&#x2F;li&gt;
371&lt;&#x2F;ul&gt;
372&lt;p&gt;Some crap ones:&lt;&#x2F;p&gt;
373&lt;ul&gt;
374&lt;li&gt;Boosts for other seasons. I mean, winter is already the best, no use there.&lt;&#x2F;li&gt;
375&lt;li&gt;Bow. The bow is very useless at the moment, it&#x27;s not worth your experience.&lt;&#x2F;li&gt;
376&lt;li&gt;More energy per bush. Not really worth hunting for bushes since you will have enough energy to do well.&lt;&#x2F;li&gt;
377&lt;&#x2F;ul&gt;
378&lt;h2 id=&quot;turrets&quot;&gt;Turrets&lt;&#x2F;h2&gt;
379&lt;p&gt;Always build the highest tier, there&#x27;s no point in anything lower than that. You will need to deal a lot of damage in a small area, which means space is a premium.&lt;&#x2F;p&gt;
380&lt;h2 id=&quot;boosters&quot;&gt;Boosters&lt;&#x2F;h2&gt;
381&lt;p&gt;If you&#x27;re very early in the game, I recommend alternating both the flag and torch in a checkerboard pattern where the boosters should go in the pattern above. This way your towers will get extra speed and extra range, which works great.&lt;&#x2F;p&gt;
382&lt;p&gt;When you&#x27;re in mid-game (stone launchers, gears and campfires), I do not recommend using campfires. The issue is their range boost is way too long, and the turrets will miss quite a few shots. It&#x27;s better to put all your power into fire speed for increased DPS, at least near the center. If you manage to build too far out and some of the turrets hardly ever shoot, you may put campfires there.&lt;&#x2F;p&gt;
383&lt;p&gt;In end-game, of course alternate both of the highest tier upgrades. They are really good, and provide the best benefit &#x2F; cost ratio.&lt;&#x2F;p&gt;
384&lt;h2 id=&quot;gathering-materials&quot;&gt;Gathering Materials&lt;&#x2F;h2&gt;
385&lt;p&gt;It is &lt;strong&gt;very&lt;&#x2F;strong&gt; important to use all your energy every day! Otherwise it will go to waste, and you will need a lot of materials.&lt;&#x2F;p&gt;
386&lt;p&gt;As of 1.6, you can mine two things at once if they&#x27;re close enough! I don&#x27;t know if this is intended or a bug, but it sure is great.&lt;&#x2F;p&gt;
387&lt;p&gt;Once you&#x27;re in mid-game, your stone-based fort should stand pretty well against the nights on its own. After playing for a while you will notice, if your base can defend a boss, then it will have no issue carrying you through the nights until the next boss. You can (and should!) spend the nights gathering materials, but only when you&#x27;re confident that the night won&#x27;t run out.&lt;&#x2F;p&gt;
388&lt;p&gt;Before the boss hits (every fifth night), come back to your base and use all of your materials. This is the next fort upgrade that will carry it the five next nights.&lt;&#x2F;p&gt;
389&lt;p&gt;You may also speed up time during night, but make sure you use all your energy before hand. And also take care, in the current version of the game speeding up time only speeds up monster movement, not the fire rate or projectile speed of your turrets! This means they will miss more shots and can be pretty dangerous. If you&#x27;re speeding up time, consider speeding it up for a little bit, then go back to normal until things are more calm, and repeat.&lt;&#x2F;p&gt;
390&lt;p&gt;If you&#x27;re in the end-game, try to rush for chests. They provide a huge amount of materials which is really helpful to upgrade all your tools early so you can make sure to get the most out of every rock left in the map.&lt;&#x2F;p&gt;
391&lt;p&gt;In the end-game, after all stone has been collected, you don&#x27;t really need to use all of your energy anymore. Just enough to have enough wood to build with the remaining stone. This will also be nice with the bow upgrades, which admitedly can get quite powerful, but it&#x27;s best to have a strong fort first.&lt;&#x2F;p&gt;
392&lt;h2 id=&quot;season&quot;&gt;Season&lt;&#x2F;h2&gt;
393&lt;p&gt;In my opinion, winter is just the best of the seasons. You don&#x27;t &lt;em&gt;really&lt;&#x2F;em&gt; need that much energy (it gets tiresome), or extra tree drops, or luck. Slower movement means your turrets will be able to shoot enemies for longer, dealing more damage over time, giving them more chance to take enemies out before they reach the shrine.&lt;&#x2F;p&gt;
394&lt;p&gt;Feel free to re-roll the map a few times (play and exit, or even restart the game) until you get winter if you want to go for The Play.&lt;&#x2F;p&gt;
395&lt;h2 id=&quot;gear&quot;&gt;Gear&lt;&#x2F;h2&gt;
396&lt;p&gt;In my opinion, you really should rush for the best pickaxe you can afford. Stone is a limited resource that doesn&#x27;t regrow like trees, so once you run out, it&#x27;s over. Better to make the best use out of it with a good pickaxe!&lt;&#x2F;p&gt;
397&lt;p&gt;You may also upgrade your greaves, we all known faster movement is a &lt;em&gt;really&lt;&#x2F;em&gt; nice quality of life improvement.&lt;&#x2F;p&gt;
398&lt;p&gt;Of course, you will eventually upgrade your axe to chop wood (otherwise it&#x27;s wasted energy, really), but it&#x27;s not as much of a priority as the pickaxe.&lt;&#x2F;p&gt;
399&lt;p&gt;Now, the bow is completely useless. Don&#x27;t bother with it. Your energy is better spent gathering materials to build permanent turrets that deal constant damage while you&#x27;re away, and the damage adds up with every extra turret you build.&lt;&#x2F;p&gt;
400&lt;p&gt;With regards to items you carry (like sword, or helmet), look for these (from best to worst):&lt;&#x2F;p&gt;
401&lt;ul&gt;
402&lt;li&gt;Less minion life.&lt;&#x2F;li&gt;
403&lt;li&gt;Chance to not consume energy.&lt;&#x2F;li&gt;
404&lt;li&gt;+1 turret damage.&lt;&#x2F;li&gt;
405&lt;li&gt;Extra energy.&lt;&#x2F;li&gt;
406&lt;li&gt;+1 drop from trees or stones.&lt;&#x2F;li&gt;
407&lt;li&gt;+1 free wood or stone per day.&lt;&#x2F;li&gt;
408&lt;&#x2F;ul&gt;
409&lt;p&gt;Less minion life, nothing to say. You will need it near end-game.&lt;&#x2F;p&gt;
410&lt;p&gt;The chance to not consume energy is better the more energy you have. With a 25% chance not to consume energy, you can think of it as 1 extra energy for every 4 energy you have on average.&lt;&#x2F;p&gt;
411&lt;p&gt;Turret damage is a tough one, it&#x27;s &lt;em&gt;amazing&lt;&#x2F;em&gt; mid-game (it basically doubles your damage) but falls short once you unlock the cannon where you may prefer other items. Definitely recommended if you&#x27;re getting started. You may even try to roll it on low tiers by dying on the second night, because it&#x27;s that good.&lt;&#x2F;p&gt;
412&lt;p&gt;Extra energy is really good, because it means you can get more materials before it gets too rough. Make sure you have built at least two beds in the first night! This extra energy will pay of for the many nights to come.&lt;&#x2F;p&gt;
413&lt;p&gt;The problem with free wood or stone per day is that you have, often, five times as much energy per day. By this I mean you can get easily 5 stone every day, which means 5 extra stone, whereas the other would provide just 1 per night. On a good run, you will get around 50 free stone or 250 extra stone. It&#x27;s a clear winner.&lt;&#x2F;p&gt;
414&lt;p&gt;In end-game, more quality of life are revealing chests so that you can rush them early, if you like to hunt for them try to make better use of the slot.&lt;&#x2F;p&gt;
415&lt;h2 id=&quot;closing-words&quot;&gt;Closing words&lt;&#x2F;h2&gt;
416&lt;p&gt;I hope you enjoy the game as much as I do! Movement is sometimes janky and there&#x27;s the occassional lag spikes, but despite this it should provide at least a few good hours of gameplay. Beware however a good run can take up to an hour!&lt;&#x2F;p&gt;
417</content>
418	</entry>
419	<entry xml:lang="en">
420		<title>A practical example with Hadoop</title>
421		<published>2020-04-01T02:00:00+00:00</published>
422		<updated>2020-04-03T08:43:41+00:00</updated>
423		<link href="https://lonami.dev/blog/ribw/a-practical-example-with-hadoop/" type="text/html"/>
424		<id>https://lonami.dev/blog/ribw/a-practical-example-with-hadoop/</id>
425		<content type="html">&lt;p&gt;In our &lt;a href=&quot;&#x2F;blog&#x2F;ribw&#x2F;introduction-to-hadoop-and-its-mapreduce&#x2F;&quot;&gt;previous Hadoop post&lt;&#x2F;a&gt;, we learnt what it is, how it originated, and how it works, from a theoretical standpoint. Here we will instead focus on a more practical example with Hadoop.&lt;&#x2F;p&gt;
426&lt;p&gt;This post will showcase my own implementation to implement a word counter for any plain text document that you want to analyze.&lt;&#x2F;p&gt;
427&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h2&gt;
428&lt;p&gt;Before running any piece of software, its executable code must first be downloaded into our computers so that we can run it. Head over to &lt;a href=&quot;http:&#x2F;&#x2F;hadoop.apache.org&#x2F;releases.html&quot;&gt;Apache Hadoop’s releases&lt;&#x2F;a&gt; and download the &lt;a href=&quot;https:&#x2F;&#x2F;www.apache.org&#x2F;dyn&#x2F;closer.cgi&#x2F;hadoop&#x2F;common&#x2F;hadoop-3.2.1&#x2F;hadoop-3.2.1.tar.gz&quot;&gt;latest binary version&lt;&#x2F;a&gt; at the time of writing (3.2.1).&lt;&#x2F;p&gt;
429&lt;p&gt;We will be using the &lt;a href=&quot;https:&#x2F;&#x2F;linuxmint.com&#x2F;&quot;&gt;Linux Mint&lt;&#x2F;a&gt; distribution because I love its simplicity, although the process shown here should work just fine on any similar Linux distribution such as &lt;a href=&quot;https:&#x2F;&#x2F;ubuntu.com&#x2F;&quot;&gt;Ubuntu&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
430&lt;p&gt;Once the archive download is complete, extract it with any tool of your choice (graphical or using the terminal) and execute it. Make sure you have a version of Java installed, such as &lt;a href=&quot;https:&#x2F;&#x2F;openjdk.java.net&#x2F;&quot;&gt;OpenJDK&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
431&lt;p&gt;Here are all the three steps in the command line:&lt;&#x2F;p&gt;
432&lt;pre&gt;&lt;code&gt;wget https:&#x2F;&#x2F;www.apache.org&#x2F;dyn&#x2F;closer.cgi&#x2F;hadoop&#x2F;common&#x2F;hadoop-3.2.1&#x2F;hadoop-3.2.1.tar.gz
433tar xf hadoop-3.2.1.tar.gz
434hadoop-3.2.1&#x2F;bin&#x2F;hadoop version
435&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
436&lt;h2 id=&quot;processing-data&quot;&gt;Processing data&lt;&#x2F;h2&gt;
437&lt;p&gt;To take advantage of Hadoop, we have to design our code to work in the MapReduce model. Both the map and reduce phase work on key-value pairs as input and output, and both have a programmer-defined function.&lt;&#x2F;p&gt;
438&lt;p&gt;We will use Java, because it’s a dependency that we already have anyway, so might as well.&lt;&#x2F;p&gt;
439&lt;p&gt;Our map function needs to split each of the lines we receive as input into words, and we will also convert them to lowercase, thus preparing the data for later use (counting words). There won’t be bad records, so we don’t have to worry about that.&lt;&#x2F;p&gt;
440&lt;p&gt;Copy or reproduce the following code in a file called &lt;code&gt;WordCountMapper.java&lt;&#x2F;code&gt;, using any text editor of your choice:&lt;&#x2F;p&gt;
441&lt;pre&gt;&lt;code&gt;import java.io.IOException;
442
443import org.apache.hadoop.io.IntWritable;
444import org.apache.hadoop.io.LongWritable;
445import org.apache.hadoop.io.Text;
446import org.apache.hadoop.mapreduce.Mapper;
447
448public class WordCountMapper extends Mapper&amp;lt;LongWritable, Text, Text, IntWritable&amp;gt; {
449    @Override
450    public void map(LongWritable key, Text value, Context context)
451            throws IOException, InterruptedException {
452        for (String word : value.toString().split(&amp;quot;\\W&amp;quot;)) {
453            context.write(new Text(word.toLowerCase()), new IntWritable(1));
454        }
455    }
456}
457&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
458&lt;p&gt;Now, let’s create the &lt;code&gt;WordCountReducer.java&lt;&#x2F;code&gt; file. Its job is to reduce the data from multiple values into just one. We do that by summing all the values (our word count so far):&lt;&#x2F;p&gt;
459&lt;pre&gt;&lt;code&gt;import java.io.IOException;
460import java.util.Iterator;
461
462import org.apache.hadoop.io.IntWritable;
463import org.apache.hadoop.io.Text;
464import org.apache.hadoop.mapreduce.Reducer;
465
466public class WordCountReducer extends Reducer&amp;lt;Text, IntWritable, Text, IntWritable&amp;gt; {
467    @Override
468    public void reduce(Text key, Iterable&amp;lt;IntWritable&amp;gt; values, Context context)
469            throws IOException, InterruptedException {
470        int count = 0;
471        for (IntWritable value : values) {
472            count += value.get();
473        }
474        context.write(key, new IntWritable(count));
475    }
476}
477&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
478&lt;p&gt;Let’s just take a moment to appreciate how absolutely tiny this code is, and it’s Java! Hadoop’s API is really awesome and lets us write such concise code to achieve what we need.&lt;&#x2F;p&gt;
479&lt;p&gt;Last, let’s write the &lt;code&gt;main&lt;&#x2F;code&gt; method, or else we won’t be able to run it. In our new file &lt;code&gt;WordCount.java&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
480&lt;pre&gt;&lt;code&gt;import org.apache.hadoop.fs.Path;
481import org.apache.hadoop.io.IntWritable;
482import org.apache.hadoop.io.Text;
483import org.apache.hadoop.mapreduce.Job;
484import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
485import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
486
487public class WordCount {
488    public static void main(String[] args) throws Exception {
489        if (args.length != 2) {
490            System.err.println(&amp;quot;usage: java WordCount &amp;lt;input path&amp;gt; &amp;lt;output path&amp;gt;&amp;quot;);
491            System.exit(-1);
492        }
493
494        Job job = Job.getInstance();
495
496        job.setJobName(&amp;quot;Word count&amp;quot;);
497        job.setJarByClass(WordCount.class);
498        job.setMapperClass(WordCountMapper.class);
499        job.setReducerClass(WordCountReducer.class);
500        job.setOutputKeyClass(Text.class);
501        job.setOutputValueClass(IntWritable.class);
502
503        FileInputFormat.addInputPath(job, new Path(args[0]));
504        FileOutputFormat.setOutputPath(job, new Path(args[1]));
505
506        boolean result = job.waitForCompletion(true);
507
508        System.exit(result ? 0 : 1);
509    }
510}
511&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
512&lt;p&gt;And compile by including the required &lt;code&gt;.jar&lt;&#x2F;code&gt; dependencies in Java’s classpath with the &lt;code&gt;-cp&lt;&#x2F;code&gt; switch:&lt;&#x2F;p&gt;
513&lt;pre&gt;&lt;code&gt;javac -cp &amp;quot;hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;common&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;mapreduce&#x2F;*&amp;quot; *.java
514&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
515&lt;p&gt;At last, we can run it (also specifying the dependencies in the classpath, this one’s a mouthful). Let’s run it on the same &lt;code&gt;WordCount.java&lt;&#x2F;code&gt; source file we wrote:&lt;&#x2F;p&gt;
516&lt;pre&gt;&lt;code&gt;java -cp &amp;quot;.:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;common&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;common&#x2F;lib&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;mapreduce&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;mapreduce&#x2F;lib&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;yarn&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;yarn&#x2F;lib&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;hdfs&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;hdfs&#x2F;lib&#x2F;*&amp;quot; WordCount WordCount.java results
517&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
518&lt;p&gt;Hooray! We should have a new &lt;code&gt;results&#x2F;&lt;&#x2F;code&gt; folder along with the following files:&lt;&#x2F;p&gt;
519&lt;pre&gt;&lt;code&gt;$ ls results
520part-r-00000  _SUCCESS
521$ cat results&#x2F;part-r-00000
522	154
5230	2
5241	3
5252	1
526addinputpath	1
527apache	6
528args	4
529boolean	1
530class	6
531count	1
532err	1
533exception	1
534-snip- (output cut for clarity)
535&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
536&lt;p&gt;It worked! Now this example was obviously tiny, but hopefully enough to demonstrate how to get the basics running on real world data.&lt;&#x2F;p&gt;
537</content>
538	</entry>
539	<entry xml:lang="en">
540		<title>Introduction to Hadoop and its MapReduce</title>
541		<published>2020-04-01T01:00:00+00:00</published>
542		<updated>2020-04-03T08:43:44+00:00</updated>
543		<link href="https://lonami.dev/blog/ribw/introduction-to-hadoop-and-its-mapreduce/" type="text/html"/>
544		<id>https://lonami.dev/blog/ribw/introduction-to-hadoop-and-its-mapreduce/</id>
545		<content type="html">&lt;p&gt;Hadoop is an open-source, free, Java-based programming framework that helps processing large datasets in a distributed environment and the problems that arise when trying to harness the knowledge from BigData, capable of running on thousands of nodes and dealing with petabytes of data. It is based on Google File System (GFS) and originated from the work on the Nutch open-source project on search engines.&lt;&#x2F;p&gt;
546&lt;p&gt;Hadoop also offers a distributed filesystem (HDFS) enabling for fast transfer among nodes, and a way to program with MapReduce.&lt;&#x2F;p&gt;
547&lt;p&gt;It aims to strive for the 4 V’s: Volume, Variety, Veracity and Velocity. For veracity, it is a secure environment that can be trusted.&lt;&#x2F;p&gt;
548&lt;h2 id=&quot;milestones&quot;&gt;Milestones&lt;&#x2F;h2&gt;
549&lt;p&gt;The creators of Hadoop are Doug Cutting and Mike Cafarella, who just wanted to design a search engine, Nutch, and quickly found the problems of dealing with large amounts of data. They found their solution with the papers Google published.&lt;&#x2F;p&gt;
550&lt;p&gt;The name comes from the plush of Cutting’s child, a yellow elephant.&lt;&#x2F;p&gt;
551&lt;ul&gt;
552&lt;li&gt;In July 2005, Nutch used GFS to perform MapReduce operations.&lt;&#x2F;li&gt;
553&lt;li&gt;In February 2006, Nutch started a Lucene subproject which led to Hadoop.&lt;&#x2F;li&gt;
554&lt;li&gt;In April 2007, Yahoo used Hadoop in a 1 000-node cluster.&lt;&#x2F;li&gt;
555&lt;li&gt;In January 2008, Apache took over and made Hadoop a top-level project.&lt;&#x2F;li&gt;
556&lt;li&gt;In July 2008, Apache tested a 4000-node cluster. The performance was the fastest compared to other technologies that year.&lt;&#x2F;li&gt;
557&lt;li&gt;In May 2009, Hadoop sorted a petabyte of data in 17 hours.&lt;&#x2F;li&gt;
558&lt;li&gt;In December 2011, Hadoop reached 1.0.&lt;&#x2F;li&gt;
559&lt;li&gt;In May 2012, Hadoop 2.0 was released with the addition of YARN (Yet Another Resource Navigator) on top of HDFS, splitting MapReduce and other processes into separate components, greatly improving the fault tolerance.&lt;&#x2F;li&gt;
560&lt;&#x2F;ul&gt;
561&lt;p&gt;From here onwards, many other alternatives have born, like Spark, Hive &amp;amp; Drill, Kafka, HBase, built around the Hadoop ecosystem.&lt;&#x2F;p&gt;
562&lt;p&gt;As of 2017, Amazon has clusters between 1 and 100 nodes, Yahoo has over 100 000 CPUs running Hadoop, AOL has clusters with 50 machines, and Facebook has a 320-machine (2 560 cores) and 1.3PB of raw storage.&lt;&#x2F;p&gt;
563&lt;h2 id=&quot;why-not-use-rdbms&quot;&gt;Why not use RDBMS?&lt;&#x2F;h2&gt;
564&lt;p&gt;Relational database management systems simply cannot scale horizontally, and vertical scaling will require very expensive servers. Similar to RDBMS, Hadoop has a notion of jobs (analogous to transactions), but without ACID or concurrency control. Hadoop supports any form of data (unstructured or semi-structured) in read-only mode, and failures are common but there’s a simple yet efficient fault tolerance.&lt;&#x2F;p&gt;
565&lt;p&gt;So what problems does Hadoop solve? It solves the way we should think about problems, and distributing them, which is key to do anything related with BigData nowadays. We start working with clusters of nodes, and coordinating the jobs between them. Hadoop’s API makes this really easy.&lt;&#x2F;p&gt;
566&lt;p&gt;Hadoop also takes very seriously the loss of data with replication, and if a node falls, they are moved to a different node.&lt;&#x2F;p&gt;
567&lt;h2 id=&quot;major-components&quot;&gt;Major components&lt;&#x2F;h2&gt;
568&lt;p&gt;The previously-mentioned HDFS runs on commodity machine, which are cost-friendly. It is very fault-tolerant and efficient enough to process huge amounts of data, because it splits large files into smaller chunks (or blocks) that can be more easily handled. Multiple nodes can work on multiple chunks at the same time.&lt;&#x2F;p&gt;
569&lt;p&gt;NameNode stores the metadata of the various datablocks (map of blocks) along with their location. It is the brain and the master in Hadoop’s master-slave architecture, also known as the namespace, and makes use of the DataNode.&lt;&#x2F;p&gt;
570&lt;p&gt;A secondary NameNode is a replica that can be used if the first NameNode dies, so that Hadoop doesn’t shutdown and can restart.&lt;&#x2F;p&gt;
571&lt;p&gt;DataNode stores the blocks of data, and are the slaves in the architecture. This data is split into one or more files. Their only job is to manage this access to the data. They are often distributed among racks to avoid data lose.&lt;&#x2F;p&gt;
572&lt;p&gt;JobTracker creates and schedules jobs from the clients for either map or reduce operations.&lt;&#x2F;p&gt;
573&lt;p&gt;TaskTracker runs MapReduce tasks assigned to the current data node.&lt;&#x2F;p&gt;
574&lt;p&gt;When clients need data, they first interact with the NameNode and replies with the location of the data in the correct DataNode. Client proceeds with interaction with the DataNode.&lt;&#x2F;p&gt;
575&lt;h2 id=&quot;mapreduce&quot;&gt;MapReduce&lt;&#x2F;h2&gt;
576&lt;p&gt;MapReduce, as the name implies, is split into two steps: the map and the reduce. The map stage is the «divide and conquer» strategy, while the reduce part is about combining and reducing the results.&lt;&#x2F;p&gt;
577&lt;p&gt;The mapper has to process the input data (normally a file or directory), commonly line-by-line, and produce one or more outputs. The reducer uses all the results from the mapper as its input to produce a new output file itself.&lt;&#x2F;p&gt;
578&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;lonami.dev&#x2F;blog&#x2F;ribw&#x2F;introduction-to-hadoop-and-its-mapreduce&#x2F;bitmap.png&quot; alt=&quot;&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
579&lt;p&gt;When reading the data, some may be junk that we can choose to ignore. If it is valid data, however, we label it with a particular type that can be useful for the upcoming process. Hadoop is responsible for splitting the data accross the many nodes available to execute this process in parallel.&lt;&#x2F;p&gt;
580&lt;p&gt;There is another part to MapReduce, known as the Shuffle-and-Sort. In this part, types or categories from one node get moved to a different node. This happens with all nodes, so that every node can work on a complete category. These categories are known as «keys», and allows Hadoop to scale linearly.&lt;&#x2F;p&gt;
581&lt;h2 id=&quot;references&quot;&gt;References&lt;&#x2F;h2&gt;
582&lt;ul&gt;
583&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;oT7kczq5A-0&quot;&gt;YouTube – Hadoop Tutorial For Beginners | What Is Hadoop? | Hadoop Tutorial | Hadoop Training | Simplilearn&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
584&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;bcjSe0xCHbE&quot;&gt;YouTube – Learn MapReduce with Playing Cards&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
585&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;j8ehT1_G5AY?list=PLi4tp-TF_qjM_ed4lIzn03w7OnEh0D8Xi&quot;&gt;YouTube – Video Post #2: Hadoop para torpes (I)-¿Qué es y para qué sirve?&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
586&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;NQ8mjVPCDvk?list=PLi4tp-TF_qjM_ed4lIzn03w7OnEh0D8Xi&quot;&gt;Video Post #3: Hadoop para torpes (II)-¿Cómo funciona? HDFS y MapReduce&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
587&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;hadoop.apache.org&#x2F;old&#x2F;releases.html&quot;&gt;Apache Hadoop Releases&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
588&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;20qWx2KYqYg?list=PLi4tp-TF_qjM_ed4lIzn03w7OnEh0D8Xi&quot;&gt;Video Post #4: Hadoop para torpes (III y fin)- Ecosistema y distribuciones&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
589&lt;li&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.hadoopbook.com&#x2F;&quot;&gt;Chapter 2 – Hadoop: The Definitive Guide, Fourth Edition&lt;&#x2F;a&gt; (&lt;a href=&quot;http:&#x2F;&#x2F;grut-computing.com&#x2F;HadoopBook.pdf&quot;&gt;pdf,&lt;&#x2F;a&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.hadoopbook.com&#x2F;code.html&quot;&gt;code&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
590&lt;&#x2F;ul&gt;
591</content>
592	</entry>
593	<entry xml:lang="en">
594		<title>Google’s BigTable</title>
595		<published>2020-04-01T00:00:00+00:00</published>
596		<updated>2020-04-03T09:30:05+00:00</updated>
597		<link href="https://lonami.dev/blog/ribw/googles-bigtable/" type="text/html"/>
598		<id>https://lonami.dev/blog/ribw/googles-bigtable/</id>
599		<content type="html">&lt;p&gt;Let’s talk about BigTable, and why it is what it is. But before we get into that, let’s see some important aspects anybody should consider when dealing with a lot of data (something BigTable does!).&lt;&#x2F;p&gt;
600&lt;h2 id=&quot;the-basics&quot;&gt;The basics&lt;&#x2F;h2&gt;
601&lt;p&gt;Converting a text document into a different format is often a great way to greatly speed up scanning of it in the future. It allows for efficient searches.&lt;&#x2F;p&gt;
602&lt;p&gt;In addition, you generally want to store everything in a single, giant file. This will save a lot of time opening and closing files, because everything is in the same file! One proposal to make this happen is &lt;a href=&quot;https:&#x2F;&#x2F;trec.nist.gov&#x2F;file_help.html&quot;&gt;Web TREC&lt;&#x2F;a&gt; (see also the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Text_Retrieval_Conference&quot;&gt;Wikipedia page on TREC&lt;&#x2F;a&gt;), which is basically HTML but every document is properly delimited from one another.&lt;&#x2F;p&gt;
603&lt;p&gt;Because we will have a lot of data, it’s often a good idea to compress it. Most text consists of the same words, over and over again. Classic compression techniques such as &lt;code&gt;DEFLATE&lt;&#x2F;code&gt; or &lt;code&gt;LZW&lt;&#x2F;code&gt; do an excellent job here.&lt;&#x2F;p&gt;
604&lt;h2 id=&quot;so-what-s-bigtable&quot;&gt;So what’s BigTable?&lt;&#x2F;h2&gt;
605&lt;p&gt;Okay, enough of an introduction to the basics on storing data. BigTable is what Google uses to store documents, and it’s a customized approach to save, search and update web pages.&lt;&#x2F;p&gt;
606&lt;p&gt;BigTable is is a distributed storage system for managing structured data, able to scale to petabytes of data across thousands of commodity servers, with wide applicability, scalability, high performance, and high availability.&lt;&#x2F;p&gt;
607&lt;p&gt;In a way, it’s kind of like databases and shares many implementation strategies with them, like parallel databases, or main-memory databases, but of course, with a different schema.&lt;&#x2F;p&gt;
608&lt;p&gt;It consists of a big table known as the «Root tablet», with pointers to many other «tablets» (or metadata in between). These are stored in a replicated filesystem accessible by all BigTable servers. Any change to a tablet gets logged (said log also gets stored in a replicated filesystem).&lt;&#x2F;p&gt;
609&lt;p&gt;If any of the tablets servers gets locked, a different one can take its place, read the log and deal with the problem.&lt;&#x2F;p&gt;
610&lt;p&gt;There’s no query language, transactions occur at row-level only. Every read or write in a row is atomic. Each row stores a single web page, and by combining the row and column keys along with a timestamp, it is possible to retrieve a single cell in the row. More formally, it’s a map that looks like this:&lt;&#x2F;p&gt;
611&lt;pre&gt;&lt;code&gt;fetch(row: string, column: string, time: int64) -&amp;gt; string
612&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
613&lt;p&gt;A row may have as many columns as it needs, and these column groups are the same for everyone (but the columns themselves may vary), which is importan to reduce disk read time.&lt;&#x2F;p&gt;
614&lt;p&gt;Rows are split in different tablets based on the row keys, which simplifies determining an appropriated server for them. The keys can be up to 64KB big, although most commonly they range 10-100 bytes.&lt;&#x2F;p&gt;
615&lt;h2 id=&quot;conclusions&quot;&gt;Conclusions&lt;&#x2F;h2&gt;
616&lt;p&gt;BigTable is Google’s way to deal with large amounts of data on many of their services, and the ideas behind it are not too complex to understand.&lt;&#x2F;p&gt;
617</content>
618	</entry>
619	<entry xml:lang="en">
620		<title>A practical example with Hadoop</title>
621		<published>2020-03-30T01:00:00+00:00</published>
622		<updated>2020-04-18T13:25:43+00:00</updated>
623		<link href="https://lonami.dev/blog/mdad/a-practical-example-with-hadoop/" type="text/html"/>
624		<id>https://lonami.dev/blog/mdad/a-practical-example-with-hadoop/</id>
625		<content type="html">&lt;p&gt;In our &lt;a href=&quot;&#x2F;blog&#x2F;mdad&#x2F;introduction-to-hadoop-and-its-mapreduce&#x2F;&quot;&gt;previous Hadoop post&lt;&#x2F;a&gt;, we learnt what it is, how it originated, and how it works, from a theoretical standpoint. Here we will instead focus on a more practical example with Hadoop.&lt;&#x2F;p&gt;
626&lt;p&gt;This post will reproduce the example on Chapter 2 of the book &lt;a href=&quot;http:&#x2F;&#x2F;www.hadoopbook.com&#x2F;&quot;&gt;Hadoop: The Definitive Guide, Fourth Edition&lt;&#x2F;a&gt; (&lt;a href=&quot;http:&#x2F;&#x2F;grut-computing.com&#x2F;HadoopBook.pdf&quot;&gt;pdf,&lt;&#x2F;a&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.hadoopbook.com&#x2F;code.html&quot;&gt;code&lt;&#x2F;a&gt;), that is, finding the maximum global-wide temperature for a given year.&lt;&#x2F;p&gt;
627&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h2&gt;
628&lt;p&gt;Before running any piece of software, its executable code must first be downloaded into our computers so that we can run it. Head over to &lt;a href=&quot;http:&#x2F;&#x2F;hadoop.apache.org&#x2F;releases.html&quot;&gt;Apache Hadoop’s releases&lt;&#x2F;a&gt; and download the &lt;a href=&quot;https:&#x2F;&#x2F;www.apache.org&#x2F;dyn&#x2F;closer.cgi&#x2F;hadoop&#x2F;common&#x2F;hadoop-3.2.1&#x2F;hadoop-3.2.1.tar.gz&quot;&gt;latest binary version&lt;&#x2F;a&gt; at the time of writing (3.2.1).&lt;&#x2F;p&gt;
629&lt;p&gt;We will be using the &lt;a href=&quot;https:&#x2F;&#x2F;linuxmint.com&#x2F;&quot;&gt;Linux Mint&lt;&#x2F;a&gt; distribution because I love its simplicity, although the process shown here should work just fine on any similar Linux distribution such as &lt;a href=&quot;https:&#x2F;&#x2F;ubuntu.com&#x2F;&quot;&gt;Ubuntu&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
630&lt;p&gt;Once the archive download is complete, extract it with any tool of your choice (graphical or using the terminal) and execute it. Make sure you have a version of Java installed, such as &lt;a href=&quot;https:&#x2F;&#x2F;openjdk.java.net&#x2F;&quot;&gt;OpenJDK&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
631&lt;p&gt;Here are all the three steps in the command line:&lt;&#x2F;p&gt;
632&lt;pre&gt;&lt;code&gt;wget https:&#x2F;&#x2F;apache.brunneis.com&#x2F;hadoop&#x2F;common&#x2F;hadoop-3.2.1&#x2F;hadoop-3.2.1.tar.gz
633tar xf hadoop-3.2.1.tar.gz
634hadoop-3.2.1&#x2F;bin&#x2F;hadoop version
635&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
636&lt;p&gt;We will be using the two example data files that they provide in &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tomwhite&#x2F;hadoop-book&#x2F;tree&#x2F;master&#x2F;input&#x2F;ncdc&#x2F;all&quot;&gt;their GitHub repository&lt;&#x2F;a&gt;, although the full dataset is offered by the &lt;a href=&quot;https:&#x2F;&#x2F;www.ncdc.noaa.gov&#x2F;&quot;&gt;National Climatic Data Center&lt;&#x2F;a&gt; (NCDC).&lt;&#x2F;p&gt;
637&lt;p&gt;We will also unzip and concatenate both files into a single text file, to make it easier to work with. As a single command pipeline:&lt;&#x2F;p&gt;
638&lt;pre&gt;&lt;code&gt;curl https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;tomwhite&#x2F;hadoop-book&#x2F;master&#x2F;input&#x2F;ncdc&#x2F;all&#x2F;190{1,2}.gz | gunzip &amp;gt; 190x
639&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
640&lt;p&gt;This should create a &lt;code&gt;190x&lt;&#x2F;code&gt; text file in the current directory, which will be our input data.&lt;&#x2F;p&gt;
641&lt;h2 id=&quot;processing-data&quot;&gt;Processing data&lt;&#x2F;h2&gt;
642&lt;p&gt;To take advantage of Hadoop, we have to design our code to work in the MapReduce model. Both the map and reduce phase work on key-value pairs as input and output, and both have a programmer-defined function.&lt;&#x2F;p&gt;
643&lt;p&gt;We will use Java, because it’s a dependency that we already have anyway, so might as well.&lt;&#x2F;p&gt;
644&lt;p&gt;Our map function needs to extract the year and air temperature, which will prepare the data for later use (finding the maximum temperature for each year). We will also drop bad records here (if the temperature is missing, suspect or erroneous).&lt;&#x2F;p&gt;
645&lt;p&gt;Copy or reproduce the following code in a file called &lt;code&gt;MaxTempMapper.java&lt;&#x2F;code&gt;, using any text editor of your choice:&lt;&#x2F;p&gt;
646&lt;pre&gt;&lt;code&gt;import java.io.IOException;
647
648import org.apache.hadoop.io.IntWritable;
649import org.apache.hadoop.io.LongWritable;
650import org.apache.hadoop.io.Text;
651import org.apache.hadoop.mapreduce.Mapper;
652
653public class MaxTempMapper extends Mapper&amp;lt;LongWritable, Text, Text, IntWritable&amp;gt; {
654    private static final int TEMP_MISSING = 9999;
655    private static final String GOOD_QUALITY_RE = &amp;quot;[01459]&amp;quot;;
656
657    @Override
658    public void map(LongWritable key, Text value, Context context)
659            throws IOException, InterruptedException {
660        String line = value.toString();
661        String year = line.substring(15, 19);
662        String temp = line.substring(87, 92).replaceAll(&amp;quot;^\\+&amp;quot;, &amp;quot;&amp;quot;);
663        String quality = line.substring(92, 93);
664
665        int airTemperature = Integer.parseInt(temp);
666        if (airTemperature != TEMP_MISSING &amp;amp;&amp;amp; quality.matches(GOOD_QUALITY_RE)) {
667            context.write(new Text(year), new IntWritable(airTemperature));
668        }
669    }
670}
671&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
672&lt;p&gt;Now, let’s create the &lt;code&gt;MaxTempReducer.java&lt;&#x2F;code&gt; file. Its job is to reduce the data from multiple values into just one. We do that by keeping the maximum out of all the values we receive:&lt;&#x2F;p&gt;
673&lt;pre&gt;&lt;code&gt;import java.io.IOException;
674import java.util.Iterator;
675
676import org.apache.hadoop.io.IntWritable;
677import org.apache.hadoop.io.Text;
678import org.apache.hadoop.mapreduce.Reducer;
679
680public class MaxTempReducer extends Reducer&amp;lt;Text, IntWritable, Text, IntWritable&amp;gt; {
681    @Override
682    public void reduce(Text key, Iterable&amp;lt;IntWritable&amp;gt; values, Context context)
683            throws IOException, InterruptedException {
684        Iterator&amp;lt;IntWritable&amp;gt; iter = values.iterator();
685        if (iter.hasNext()) {
686            int maxValue = iter.next().get();
687            while (iter.hasNext()) {
688                maxValue = Math.max(maxValue, iter.next().get());
689            }
690            context.write(key, new IntWritable(maxValue));
691        }
692    }
693}
694&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
695&lt;p&gt;Except for some Java weirdness (…why can’t we just iterate over an &lt;code&gt;Iterator&lt;&#x2F;code&gt;? Or why can’t we just manually call &lt;code&gt;next()&lt;&#x2F;code&gt; on an &lt;code&gt;Iterable&lt;&#x2F;code&gt;?), our code is correct. There can’t be a maximum if there are no elements, and we want to avoid dummy values such as &lt;code&gt;Integer.MIN_VALUE&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
696&lt;p&gt;We can also take a moment to appreciate how absolutely tiny this code is, and it’s Java! Hadoop’s API is really awesome and lets us write such concise code to achieve what we need.&lt;&#x2F;p&gt;
697&lt;p&gt;Last, let’s write the &lt;code&gt;main&lt;&#x2F;code&gt; method, or else we won’t be able to run it. In our new file &lt;code&gt;MaxTemp.java&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
698&lt;pre&gt;&lt;code&gt;import org.apache.hadoop.fs.Path;
699import org.apache.hadoop.io.IntWritable;
700import org.apache.hadoop.io.Text;
701import org.apache.hadoop.mapreduce.Job;
702import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
703import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
704
705public class MaxTemp {
706    public static void main(String[] args) throws Exception {
707        if (args.length != 2) {
708            System.err.println(&amp;quot;usage: java MaxTemp &amp;lt;input path&amp;gt; &amp;lt;output path&amp;gt;&amp;quot;);
709            System.exit(-1);
710        }
711
712        Job job = Job.getInstance();
713
714        job.setJobName(&amp;quot;Max temperature&amp;quot;);
715        job.setJarByClass(MaxTemp.class);
716        job.setMapperClass(MaxTempMapper.class);
717        job.setReducerClass(MaxTempReducer.class);
718        job.setOutputKeyClass(Text.class);
719        job.setOutputValueClass(IntWritable.class);
720
721        FileInputFormat.addInputPath(job, new Path(args[0]));
722        FileOutputFormat.setOutputPath(job, new Path(args[1]));
723
724        boolean result = job.waitForCompletion(true);
725
726        System.exit(result ? 0 : 1);
727    }
728}
729&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
730&lt;p&gt;And compile by including the required &lt;code&gt;.jar&lt;&#x2F;code&gt; dependencies in Java’s classpath with the &lt;code&gt;-cp&lt;&#x2F;code&gt; switch:&lt;&#x2F;p&gt;
731&lt;pre&gt;&lt;code&gt;javac -cp &amp;quot;hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;common&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;mapreduce&#x2F;*&amp;quot; *.java
732&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
733&lt;p&gt;At last, we can run it (also specifying the dependencies in the classpath, this one’s a mouthful):&lt;&#x2F;p&gt;
734&lt;pre&gt;&lt;code&gt;java -cp &amp;quot;.:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;common&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;common&#x2F;lib&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;mapreduce&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;mapreduce&#x2F;lib&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;yarn&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;yarn&#x2F;lib&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;hdfs&#x2F;*:hadoop-3.2.1&#x2F;share&#x2F;hadoop&#x2F;hdfs&#x2F;lib&#x2F;*&amp;quot; MaxTemp 190x results
735&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
736&lt;p&gt;Hooray! We should have a new &lt;code&gt;results&#x2F;&lt;&#x2F;code&gt; folder along with the following files:&lt;&#x2F;p&gt;
737&lt;pre&gt;&lt;code&gt;$ ls results
738part-r-00000  _SUCCESS
739$ cat results&#x2F;part-r-00000
7401901	317
7411902	244
742&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
743&lt;p&gt;It worked! Now this example was obviously tiny, but hopefully enough to demonstrate how to get the basics running on real world data.&lt;&#x2F;p&gt;
744</content>
745	</entry>
746</feed>