A Minecraft Server Sent Me Source Diving

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am building a private Minecraft server for plugin testing. Let’s get started!

Minecraft Paper Server

Any sufficiently popular computer game will eventually attract someone with the ability and drive to modify it. Others will come along and make tools to lower the barrier of entry so even more people can customize their experiences. Barring legal action from parent companies or a drop in popularity, the cycle continues to the point someone with basic computer literacy can find the resources he needs to join the modding community as I did almost ten years ago after my friend introduced me to Minecraft Bukkit servers. Shortly afterwards, I had myself a Last Airbender inspired Minecraft server.

In the year I was gone from Minecraft, my mother and sister have been helping on the moderation team for DS9Fireblade on PhoenixCraft. DS9 has selected a number of plugins to manage the chaos that often accompanies publicly available servers, but it’s hard to master all the commands when you have to worry about not breaking stuff.

Server Building

Little has changed about the fundimentals of Minecraft server construction. A modded server provides a stable platform imitating the vanilla game while providing plugin or mod makers a space to hook into without interfering with other plugins.

DS9’s server is running Paper, a version of Spiggot from the Bukkit modded server family. Ideally, I would take the time to track down the exact version for 100% compatibility, but I was having trouble finding the download. I made the executive decision to just use the newest version of each piece of software and adjust things if needed.

I loaded the server onto ButtonMash even though it’s still technically on Photo Trunk duty until that project is done, idle as it is. I remembered a series of topics I covered a while ago on how Minecraft doesn’t do well with the default settings and that G1GC (Generation 1 Garbage Collection) makes things go more smoothly in terms of long-term problems. I wasn’t fond of doing all that research again, so I reviewed this sight [1] which I do not look forward to citing, but offers a a list of Java flags to use and what each one does.

Months of idling were not kind to Button’s RAM, as it was about maxed out with Xorg (graphical server), even when I closed everything. I rebooted. It defaulted to its internal Minecraft server drive I have slated for a future Linux install some day. Around ten minutes of digital technical taps to the BIOS and removing a bent thumb drive later, I got it back into Debian.

The server still refused to start. Java was up to date with the repositories at Java 11 but it wanted Java 16. I just so happen to have solved the exact same issue with a Minecraft client earlier week. I downloaded an appropriate version of GraalVM [2]. Since I don’t plan on this server going anywhere, I saved it within the server’s main directory and edited my serverstart command accordingly.

The server was a bit more cooperative after that. I signed the EULA and modified a comment about tacos supposedly being the best food (why is that even in there?). Once I confirmed the server was running I started adding plugins, starting with the modern bending plugin and following it up with tools from PhoenixCraft.

mv Goof

My workflow settled into a pattern of looking up a plugin from the list, going to the download page, copying the actual download link, then using wget to download it onto ButtonMash as I’m working over SSH. I wasn’t impressed when I had to rename each file as it came in, but I figured it wasn’t worth my time to immediately puzzle it out, but I made a Downloads directory to isolate incoming files so they didn’t get lost.

Things were going well until I found one that didn’t want to be downloaded via command line. I waited a few minutes, but it still said it was temporaily unavalible. I was able to download in Firefox though, so I saved it to GoldenOakLibry, my family’s network storage. Soon I was copying its containing directory over into plugins.

Oops.

The containing directory was gigabytes of information at the least. I at least knew my Unsteam games project was in there, but I also found an old backup from my laptop. The connections are all hard wire, but I didn’t feel like waiting an unknown amount of time for the half way point, so I canceled the command with CTRL+C to assess damages.

It had only really started: two visible files at the very least. They appeared to still be in their original spot, but I wanted to be sure. I looked up the mv command’s inner workings, but my search results were filled with helpful information for someone learning normal terminal operations, not an unusual situation like my own.

With few places left to turn, I went source code diving. The hardest part was finding the code, but dpkg -S is the tool for that job. I zeroed in on the mv source and found the exact file [3] on the Debian website, a file written in C. My mission at this point was to answer this basic question: does mv do anything to directory trees its moving between physical disks as it goes or does it copy everything and clean up at the end?

I found what appeared to be a loop structure at line 364 in main(), but it didn’t appear to be trying to traverse any sort of file system structure. Further study led me to line 173, in do_move() where it copies the file in question before flagging the whole thing for deletion on line 224. And with that, I had answered my own question: cleanup is done after everything is safely moved.

Takeaway

This post was entertaining to make. It was supposed to be a boring, but quick and easy job I didn’t need to research much for after a week of stalling for topics. It was also the first time I went looking into the Linux source code, and while it makes poor skimming material, it was insightful. Find In Page was my best friend.

Cleaning up in post makes sense though. Everything in Linux is a file, even directories that contain other files.

Final Question

Have you ever studied the laid out inner workings of anything?

Works Cited

[1] lechowski (I think… Author is unclear), <March 5 OR May 3> 2021. [Online]. Available: https://lechowski.info/gry/minecraft/modded-mc-and-memory-usage-history-crappy-graph [Accessed Sept. 12, 2021]

[2] GraalVM, 2018-2021. [Online]. Available: https://www.graalvm.org/ [Accessed Sept. 12, 2021]

[3] M. Parker, D. MacKenzie, and J. Meyering, “mv.c” 1986-2018. [Source code]. Available: https://sources.debian.org/src/coreutils/8.30-3/src/mv.c/ [Accessed Sept. 12, 2021]

Family Photo Chest Part 4: PyCharm Migration

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am moving PyCharm from Windows to Debian. Let’s get started!

The past month didn’t feel all that fast in terms of this project. I reread a few of my paragraphs from last month, and I get the feeling I didn’t have a clue about what I was looking at.

There are at least a couple reasons why I believe IDE’s are only for when you have an expert handy. They are full of stuff beginning programmers don’t need to be using yet and that stuff can be incredibly fragile. The moment something breaks, progress stops and you need someone familiar with the program to sort things out. If you’re engaging in self-study, working from the command line has fewer things to break and most language tutorials provide command by command instructions anyway. If possible, you should seek out one or more groups to join who can answer programming questions when they come up.

PyCharm was a little fussy to migrate to the new operating system. I made the mistake of just importing everything straight from the configuration on the old install. First of all, all the file paths were written in Windows. I tried routing the interpreter to the one that came with Linux, I had to move the link to my project file around, and I went hunting through the venv settings for references to Windows paths.

The easiest thing to do is to just say no to importing anything on first launch and recustomizing everything. I ended up moving looking into individual files in my settings and plucking out the ones with intrinsic ties to the old install. I had a lot of custom colorization going on, so I sifted through my settings files and plucked out anything with file paths starting with C:\.

Project files were a separate but parallel undertaking. With all the errors I kept getting, I ended up grafting my old project files into a new set of project files. Almost everything copied over, but a hidden .idea folder holds a lot of ties that rely on things not moving. I also had to remove a workspace.xml file or something similar over a reference to the old hard drive. Pycharm brought up a dialogue box to fill in the appropriate information and that angle was solved.

Now, about virtual environments. Implementing them is an important gesture toward seasoned programmers collaborating on projects on different computers, but they complicate things a bit much for the average novice on his or her own. On my windows install, I managed to hack it out of my project, but I never told PyCharm that I didn’t want to use them in a way it could understand. This time, however, I had help addressing the issue.

The IDE is a powerful tool. Powerful tools are okay to pick up and use, but the learning curve can be sharp, and reckless newbies can easily damage something while careful newbies just get slowed down by all the things to research. Supervision like what I used to get in my programming classes or what I’m getting now at Third Workshop is a practical must-have. I don’t always get the answer I’m looking for right away, but stray comments tend to provide seeds to plant in a search engine.

Final Question: Have you ever made a major change and had little cracks you didn’t anticipate?

Family Photo Chest Part 3: Tools of the Trade

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am taking all my progress so far and discarding it. A lot has happened, yet not much at all. Let’s get started!

The past several weeks have been covered by me getting so far ahead on my Minecraft server, now called Button Mash. I managed to maintain a backlog of completed posts, but for reasons I will get into, I’ve run out, so here I am, “live” again.

This project has undergone a major overhaul in concept. Instead of a ready built solution, I will be facing material in a class I was unable to complete due to incompatibilities with the physical classroom environment; I will be building my site from scratch.

So far, it doesn’t look like it will be as bad as I thought it would be at first. I am going through the Flask Megatutorial by Miguel Grinburg [Link to first lesson]. As of this writing, I am on part 4 of 23. Yeah, I’m going to be at this for a while as I build up my skill set. Unfortunately, I doubt anyone would have fun reading half a dozen blog posts about following tutorials week after week, and I would get bored trying to keep them interesting. So, without much else I can do to keep things interesting, I think this project will be more of a monthly feature until I finish the tutorial. Don’t worry, there will be plenty of other aspects of the project to cover.

My main focus this week is covering the tutorial. I really do need to take it slowly, one lesson at a time until I finish the little “Microblog” project being built and I probably won’t ever deploy anywhere. The process of copying everything reminds me of when I learned Lua. One of the best ways to learn a language is to transcribe a complex, known working program.

The tutorial assumes you are using the command line, but I am using the Pro version of Pycharm. Incidentally, whenever the tutorial gives me step by step instructions for working with the command line, I need to stop and evaluate it for the IDE (Integrated Development Environment).

One of my earliest problems involved trying to get Microblog to work with Flask. That task was trivial, as there’s an option for it in the new project window.

Another, more difficult task was getting Microblog to run when I went to test it for one of the first times. It had two hard-coded URL’s to use, but only one was in seemingly in use. I ended up deleting a default “Hello World” file that was giving the false success. With the decoy out of the way, everything stopped working. The proper files under development were moved to where they actually belonged.

One of the things I did to make it work was a mistake. I don’t know why it worked or why it broke, but whatever I did, I addressed it properly later on, and only just recently cleaned up the mess I made when trying to revert a very early change.

All of my stubborn problems so far have been with the terminal/API differences. At one point, I misunderstood how things were supposed to be arranged. At another, I was unable to read the filesystem correctly, so I actually moved a few files where they should have been. Naturally, Microblog lost track of where they were.

Final Question: What is your favorite or most effective way to learn a programming language?

Family Photo Chest Part 2: First Milestone

Good Morning from my Robotics Lab! This is Shadow_8472, and I am coming right off writing last week’s post because I have more to report, and it made a nice stopping point where I left off. Let’s get started!

I started work on my first prototype during my Third Workshop visit mentioned last time. It’s pretty chill there, so I have time to absorb what I’ve read as I read it slowly.

Philomena is on a Git repository, so I did some reading up on it the week before by going over some basic tutorials. I don’t actually remember much, but I will recognize stuff faster when reexposed to it.

As a side note, something seems to be failing on my laptop. I don’t know what, but it isn’t always booting on the first try. It took up several minutes of my visit to the workshop as it went through its battery of tests. Interestingly enough, the charger passed, even though I know for a fact that it won’t charge the battery due to a failure with the power port.

Git repositories have a special file that displays when you visit their web page. The first several times I looked through the one for Philomena, I had no clue what to do. This time, I recognized a number of commands to run, but require something called docker and docker-compose, neither of which come preinstalled on Raspian, apparently.

In the meantime, Git offers two ways to “clone” or download software contained in repositories. Recommended is over https, which almost all websites use by default now, and the other was over SSH.

Fun diversion, I had a really hard time with PuTTY when it kept complaining about Blinkie’s RSA host key whenever the IP changed. In the end, I hear most SSH clients don’t care about the IP as long as its host key is on a list of known hosts. PuTTY, however, saves host keys to each hostname unless unavailable, as in my case, then it uses the IP.

In light of the sideshow PuTTY put on for me to play through, I wanted to try downloading Philomena over SSH. When I first connected from Blinkie, I got a warning about an unknown host. The key was actually pretty easy to look up and verify. I put Blinkie’s SSH public key up there, but ran into a permission wall. I used wget instead. I later confirmed my heavy suspicion that wget operated on HTTPS and found it also supports a number of similar applications.

With the file downloaded from Git, I started building the tools I need to use it. I found a nice, command-by-command article on how to install both docker and docker-compose aimed at people who are not familiar with the command line. I followed the instructions, but not to the letter: I used Nano instead of vi when I needed a .txt editor, and I chose to use sudo instead of messing round with permissions and possibly introducing a security risk I don’t fully understand.

Docker went on fairly smoothly. They even have a program to verify that everything is working. Docker-compose gave me a little trouble though when I forgot to keep adding sudo.

Situation update: I got something to work. I’m operating blind right now. All I know is that I issued a command and was able to use a browser to navigate to Blinkie’s local IP with a port mentioned a few times during setup. I found what looked like a representation of Blinkie’s file system, but I’d need to double check. One thing I do know: whatever I was looking at went offline when I stopped it from the SSH terminal.

Update 2: I’m not sure where this style of updates came into happening, but I’ll go with it. I’ve done a little more research into Docker, and it looks like a sort of virtual machine –but not quite– and I think I logged into that VM earlier. I still have much to learn.

I’ve found several video series on YouTube documenting Docker and Docker-compose. With enough luck, going through some of those will let me understand what I’m at least looking at.

Update 3: Things have developed in the month or so since I went back to my other projects. I just need to call this a section and get back next week.

Final Question: How do you usually feel when returning to a project after a lengthy hiatus?

Family Photo Chest Part 1: Project Outline

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am beginning a new project I hopefully won’t burn out on. Let’s get started!

Twenty years ago, my father was tasked with scanning and distributing the contents of an old sea chest that used to belong to his father. Fast forward to the present day, and the project hasn’t even started. I’ve been building my skills the last couple years, and I think I can do one or two better than was originally planned.

Timeline: I’m burned out after three intense weeks on my last project. I’m two weeks ahead, and I plan on keeping that lead for now. After two weeks of this project, I want to go back and try getting the official Java on Micro Core. With any luck, this post will come out when that’s already happened.

I’ve been planning this project for a while now. Nothing to make a whole post about, but important nonetheless.

My intended finished product is as follows: Family members will be able to go to an IP address in a browser, search by a system of tags, and navigate to a specific scan’s page. Groups of pages will make scans of books easier to find, and comments on each picture will only make identifying people in each picture easier.

During my initial investigations, an acquaintance recommended Philomena, a Booru-style image board that fits the description almost perfectly. Their code is free and open source, and the license is compatible with what I want to do.

On the hardware side of things, I have a few prototypes milestones planned out.

The first milestone will be declared when I can manually upload an image and view it on the site from a separate connection. I am planning on prototyping on Blinkie, though almost any computer should do.

The second hardware milestone will be when I have the pictures stored on a RAID array for redundancy. During a visit to Third Workshop, I heard that these can be tricky to do myself, and there are cheap, reliable, preassembled units I can use.

The third hardware milestone will move the software off Blinkie and onto a new machine I want to build myself. I want to remove the innards of whatever RAID setup I end up getting and arrange them into a custom case with a different Raspberry Pi serving as the motherboard.

The main event of the project is actually scanning pictures for safe storage. I know for a fact that disorganized files are discouraging to sift through, so I want to write a script to handle scanning and uploading files. It will have functionality to define groups of pictures as they are scanned, as well as handle bulk tagging.

Skills I expect to learn in the near future: composite 3D printing with ABS, a new programming language, and a better understanding of Git and any other software I need to get Philomena running effectively. As of writing, I have already started work on next week’s post, so I may be cheating a little on that last detail.

Final Question: Do you have any decades old projects that just never seem to get any attention?

The Steam Controller: My First Impressions

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am reviewing the Steam Controller. For anyone who cares, this post is not sponsored. Let’s get started!

I first heard about the Steam Controller in detail from a YouTube video where the reviewer said it was an amazing controller after you persevere through the configuration process, something most reviewers at the time were not taking the time to do before unloading their frustrations into a review. With that said, this post will only be a report on first impressions, and not a final review.

The moment I saw this supposedly brilliant controller on 90% markdown at $5, two thoughts popped through my head: ‘I might as well see what the fuss was about a few years ago,’ and ‘They must be moving inventory with a discount that steep. (The controller itself is discontinued). After buying, I did a little more research and found that it really doesn’t seem to like running outside Steam, but there is an open-source stand-alone driver for it that sounds like it could be a project.

I don’t have a dedicated gaming budget, so when I’m considering a new game, it needs a lot of replay value or to be culturally important to me in some way.

I’ve only ever owned a GameCube and a Wii, so I’m not well acquainted with any console controllers. I have done zero research into relative prices, so if you were after how it compares to similar products directly, look elsewhere.

Shipping took way longer than I am used to with Amazon. While I waited, I researched a little and found the thing needs Steam open to run correctly. I also found an open-source, stand-alone driver. It’s primarily aimed at Linux, but fiddling with that sounds like an educational experience. I might even like to program it to respond to Morse Code when the on-screen keyboard is up.

The unboxing was a little exciting, but reinforced my expectations to not fall in love with it right away. While the box itself felt like a paper treasure chest, the loot inside did not feel like it was worth any $50. It came with a pair of batteries, a dongle, and a dongle stand. Digging in deeper, I found a cord hidden in a blue sleeve at the bottom of the box, under the “paper foam” support. I had a little chuckle when I read that. Basically, this is a classy box that politely asks you not to throw it away.

Plugging it in, the Steam Controller feels just like a rearranged mouse. Courser control is handled with a circular touchpad on the right, but it drifts. Triggers handle the mouse buttons while the scroll wheel is on the D-touchpad on the left. Don’t expect the D-touchpad to work correctly right away. I found it scrolling the direction I wanted about 64% of the time on the first try, but circling your thumb around the outside seems to work more reliably. I don’t know it it’s learning curve or driver issues. Back and forward are on the underside of the controller on buttons I have no idea what they are called. The bumpers, analog stick, and letter themed buttons each seem to have mappings to keyboard keys.

The on-screen keyboard or “soft keyboard” is accessed by pushing the analogue stick. Each of the two touchpads are then mapped to their hand’s half of the keyboard. there are all sorts of shortcut keys on the different buttons on the controller. I won’t say I’m a huge fan. It is definitely something you can get used to –I am using it for this paragraph, then I am going back– but it isn’t like any keyboard I have ever used before.

My assessment is that the soft keyboard is mainly for when you want to enter short strings of text. Again, it’s something you can get used to, but the multiple ways of doing a few actions mean it’s simultaneously harder to figure everything out, and easier to adjust to a scheme that works for you. It’s faster than an on-screen keyboard with a mouse, but slower –at least without practice– than a smartphone or tablet on-screen keyboard.

In summary, it’s a novel controller with potential, but I am in no position to pass judgement on it. I look forward to learning about hardware drivers with this unit.

Final Question: Have you ever written custom hardware drivers before?

Minecraft Server, Week 4: Progress Backup

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m aiming a digital nuke at my progress on this project thus far. Let’s get started!

By the time this post goes up, I hope to have finished the whole project. As I write this post, it’s a little less than a day before part 2 goes live. I feel like I’ve made the least progress in terms of building a product, but I feel like I’ve made the most in terms of learning.

To recap: Part 1 was about assembling the hardware, Part 2 was about picking and installing Micro Core, and Part 3 was about trying to install Java and some of the things I learned that segment.

My goals for this statement only involved backup and later recovery, possibly in time for a quick transition to a working server. On one trip to Third Workshop, I spent a lot of time pacing and writing things down for what I want to save. I copied those over to a directory in a hard drive and even started on a script to automate their unpacking.

Back home, I found my files were missing. Lesson learned: Don’t trust Micro Core with things you want to keep unless you’ve finished setting it up. They will vanish unless protected.

I’d often have two or three topics I’d bounce around between. While looking for files to save, I went searching through the manual and found a more complete set of boot codes so a few things can live on my hard drive proper. While I’d love to do some possibly destructive testing around with the included file backup tool, I cannot risk it until I’ve finished my backup tools and mitigated the risk for when something breaks hideously.

The exact directory and file you can find your boot codes will vary depending on your bootloader. The Tiny Core Linux wiki has pages on a few of them, and if you ever need to know yours, try using the command “sudo ls -ra / | grep <loaderName>”. Sudo keeps you from getting a bunch of error messages from trying to look in a directory your default user account doesn’t have access to. The ls command forms the core upon which the rest of the command is built on. It means to list the stuff in your present working directory. Options come next with r meaning recursive, or all sub-directories, and a searches everything that’s hidden as well. The pipe symbol, |, acts like a funnel, taking the output of the ls command and feeding it into the next element, grep. Grep sorts long batches of data so it only displays lines containing <loaderName>.

I added a few more boot codes, tying several directories to the SSD. During this time, I learned a lot about what is supposed to go where. If I couldn’t find the answer to a question, I’d reach out to whatever help I could reach without making additional accounts. I almost made one for the Tiny Core forums, but I shied away when it would have involved logging in over an unsecured connection. My guess would have been that the site is so old they never bothered, but I think it’s just the admins not caring.

Progress overall was slow. It took me a day or two to figure out how to properly mount a drive and similarly “umount” it. (The n was left out in favor of a slightly shorter command to type.) It took a live chat session with a knowledgeable person to convince me I was looking at something in /mnt I now believe to be a mountpoint and not the automatically mounted drive.

With an ironically stabilizing system, I once again started development on my script. Each time I went to access it at /mnt/sdc1/restore.sh, I had to use sudo to get through an ownership blockade. Plus, with the geometry of the room, I wasn’t all too sure if one of our dogs was going to march right through the thumb drive. I also kept getting errors involving permission –and later ownership after I discovered the -p option– when trying to copy files there.

My next lesson was about how some disk formats don’t support Linux/Unix style ownership. FAT32 is apparently one of those formats that can, at best, only be faked. Since I was dealing with files owned by both Shadow_8472 and root, I’d need to empty off another thumb drive and research a format for them, or find another way to preserve permissions.

I must have reached out to three, four, maybe even five places for help. Somebody suggested I make a tar archive. I figured, “why not.” After all, I would be dealing with a tarball containing Java anyway.

Tar is an older piece of software with a bit of history. Its name stands for tape archive. Webcomic strip XKCD even ran a strip where they teased it for being so convoluted that sysadmins who have been using it for fifteen years still don’t know it by heart — and those commands were already fifteen years old when said admins started using them!

There are more than a few misconceptions surrounding tar. Just because something is archived, doesn’t mean it’s compressed. Zip files popularized that notion. Compression is basically squishing out repeated bit patterns for convenient transport. Archiving collects several files like papers ready to be bound into a single book. The two processes complement each other nicely, usually giving you a single file that takes up less space than the original files in their entirety.

I have no idea of the full power of tar. I just know that it has loads of features, but most of its users will never use them. I can’t help but wonder how many are totally obsolete, but included for lack of an update, or to maintain backwards compatibility.

Armed with these pieces of knowledge added to my collection, I wrote a pair of scripts to grab an arrangement of files I think I will need when I rebuild. I do have it setup to reinstall Nano and Opencss from the repository, but future versions, if needed, can be migrated to be part of the backup along with files that include things like encrypted passwords, boot codes, the whole Minecraft server directory, and more. It all gets copied into a temporary directory, turned into a tarball, and the temp directory removed.

During development of the backup and restore scripts, I stashed a copy or two on Blinky for safekeeping. I would have used one of my Windows machines, but it was just easier and had the same result to use scp to move the files over ssh between two Linux machines. I also noticed PuTTY having some interesting results when using the cat command to concatenate the contents of a file to the terminal. Normally, it keeps track of who you are logged in as to where and what directory you’re looking at right now. It would seem Raspian keeps track of that for you while Micro Core does not. I also found that using cat to show a binary that isn’t in text form could end up sending a command to PuTTY to change the window title, and even corrupt the header on the command line.

And that about brings things up to date. I changed permissions on the scripts so I have to run them as sudo, but while doing so, I accidentally removed one of them. I just so happened to have a backup courtesy of Nano… somehow. I ended up restoring from the Blinky backup, as it was more recent.

My next step is an irreversible one. I need to drop the nuke and start over with what I’ve saved. With any luck, the next post will be the full rebuild, ending with Minecraft running on Micro Core.

This (half)week’s idea sounded simple enough. Just copy the most important files away from the mess I created when I tried to install Java. One required skill snowballed into another, and before it, I had learned a whole slew of skills needed to slither along in the command line.

Final Question: I’ve been dealing with a lot of old computers lately. How old is the computer or other device you’re using right now?

Programming a Discord Bot Part 3 (of 4 for sure)

Good Morning from my Robotics Lab! This is Shadow 8472, and today, I am excited because I recently got a working prototype on my “preemptive” ban bot. Let’s get started!

First of all, I won’t claim to understand most of the stuff I’m working with, just that it isn’t as closely related to security as my last side project. If someone working all day every day could have done this project as easily as walking through a room, I would be crawling through a hole just barely my size. I’ve had a lot of help drilling that tunnel, and now widening it looks like it will be a whole lot faster.

A lot of what I did was trying to understand how Discord thinks, not quite fully getting it, getting help, and only understanding it until I needed another reminder. The long story is that I couldn’t repeat most of the details from memory. Guess what I’m basically doing right now.

I’ve been using PyCharm on my laptop as my IDE. On one of my previous trips to the workshop, Headcrash showed me how to use the debugger, but the neuances didn’t really stick. Before I went in this week, Damaged, the person who’s been helping me over Discord, helped me get through multiple hurdles, some of which should be obvious, others not so much. I was working up until right before sundown Friday, when I stopped for Sabbath.

The next night, I spent not two minutes before bed so I’d actually work on it in the morning, and got the early prototype working: I had someone on my a ban list who had never even been invited. Of course, I made a backup.

The next phase involved disarming the ban function’s “warhead” with a long comment and having it pull the target’s ID from the audit log. The function to loop over the audit log is even pretty user friendly at first glance. It was at this time I reached for a tool I wasn’t familiar with: the debugger.

A debugger is no doubt a valuable tool to know once you know how to use it. I came to a point where I had been introduced to it, but when I tried to use it, I tripped up on a small detail and took it in to the workshop. No sooner had I recreated my error and started explaining my problem than I poked around a little and figured out the answer on my own; the debugger has its own tab. I still learned a lot about how exactly this debugger works and how its interface is different than the ones I played with in the past.

At present, I have an untested/unproven candidate for my final bot before setting it loose on the real server. Right now, it can be told a bad mod’s ID and target logged unban events made by that account. When I’m done, I plan on having it tell me the names and numbers of all the people who were maliciously kicked.

Final Question: The filter for the audit log was not as user friendly as I had hopped., but not as bad as I feared (with the power of the debugger to view all active variable names and values at key points in the program). Have you ever come across a problem where the solution was on the path to that problem?

Programming a Discord Bot Part 2 (of 3? hopefully)

Good Morning from my Robotics Lab! This is Shadow_8472, and today I can taste victory on this mini-project, but as you can tell from the title, it shall be denied for this week. Let’s get started!

Last week, I talked about getting the PiCharm IDE running, and how it’s only as useful as the person maintaining it; as long as someone in the room knows what’s going on, things can get repaired when they break.

This week was another one where I went around building up my knowledge without feeling like I made any tangible headway. I keep telling people, “If I knew exactly what I was doing, I’d be done in two minutes,” and I still stand by that statement. Most of programming is figuring out how you want things to work overall, how your component parts were designed to work, and how the incomplete product actually works, then reconciling all three.

I spent most of my time studying how the async/await model of computing works. Before this week’s project chapter, I knew about multithreading and hyperthreading. All three are models for working on more than one thing at once in a CPU, and each has advantages and challenges. Imagine a computer thread as a guy at a workstation. Multithreading would be adding another guy at another workstation. Hyperthreading would be convincing two guys to share parts of the workstation they both aren’t using at the same time. “Coroutines” would be the first guy stepping aside from the workstation while he waits for more work to do and lets the next guy have a turn.

Other than that, I explored Redbot, some sort of bot to program for Discord. I ended up giving up on it for this project because it was a little expensive on the learning curve for me right now, and I’m not entirely sure it will suit my needs for now.

In the meantime, I’ve made the slightest of “outreach progress,” (yes, I just made that up to talk about when you aren’t ready for something, but try it anyway). I don’t know what’s going on, but hopefully I will know soon.

On the whole, a lot of my projects remind me of a few stories from doing trail work in Pathfinders, a youth club run by my church. One of our annual events involves working on trails at a local State park. While flattening the trail, everyone runs into rocks. Usually, they can just be relocated to somewhere nearby for drainage purposes, but every year, it seems, someone finds a rock in the way that just keeps going until it takes four or five teens to properly move it around once loose. Most of my projects feel like one of these boulders.

On the sad end of the spectrum, I was irresponsible with Blinky’s case. I ended up crushing it. Hopefully, I will get around to seeing to its repair.

Final Question: Windows recently updated. Among a bunch of stuff I didn’t bother reading, I spotted a Dark Mode feature I’m taking advantage of. Do you prefer to keep using the standard, bright theme, or will you be switching over to the dark theme?

Infrastructure Update

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am going over a few changes to my immediate setup. Let’s get Started!

I’m afraid I have some sad news to start with. I’ve been shuttling BlinkiePie around in my backpack, and it’s finally caught up with me. Some time, some how, I wasn’t careful enough, and the case broke. Some time in the near future, it will likely be getting a dose of super glue, but I’m afraid the base will need to be reprinted. If it does, I will be modifying the case so the screw holes actually line up. If I’m feeling especially adventurous, I may even make it accept multiple models of Pi’s.

I otherwise had a few adventures this week. Neighbors were having work done on their house, and I needed to go out and about. I took Blinkie with me, and tethered it to my phone, as well as my laptop. PuTTY wasn’t fully happy. I spent a long time chasing down the supposedly different server key fingerprint, but I didn’t actually find for 100% sure. Since this is a security issue, I’m not going to share my best guess I’m about 90% sure on.

On Friday, I was expecting to spend a couple hours working on my project while my mother was working at the church, but my laptop politely asked to update like I told it to. I didn’t pay close enough attention, and I found myself stuck there for four hours so I could press F1 about three times during the massive update. I’m thankful I stayed, otherwise I was within a minute of having to leave it over Sabbath, and there are always a lot of people in the church office on Saturday morning.

I won’t say I like the update, but I won’t say it isn’t all bad. On the plus side, Windows now has a system-wide dark mode, a feature I personally find appealing. On the minus side, my laptop’s fairly old, and each new line of code it must run to keep up is that many operations not servicing the programs I want to run.

Speaking of programs to run, I went into the workshop and set up for working on Blinkie over SSH and the command line, but I was advised to install an IDE (Integrated Development Environment). I was even there an hour, and Headcrash, the guy running the place, replicated my present progress while we were talking. He talked me into installing PyCharm.

I came up with the comparison that the difference between IDE’s and command line work is the difference between a graphing calculator and a pencil. The pencil is simple, easy to pick up, and important to understand how to operate before using an IDE. IDE’s on the other hand, take care of a lot of things for you. It blasts you with so much information you don’t know what to look at at first. And the scariest part is setting the thing up. There’s a lot of help out there for my “pencil,” but there’s a lot more to break with an IDE. It felt like I was slipping into a commercial airliner cockpit with only a driver’s license. I’m just glad I had someone there to figure out what was happening when something misaligned.

This week felt like a lot of learning curve walls.

Final Questions: Have you ever used a graphing calculator (outside school)? Do you have any other suggestions for comparison?