Kartones Blog

Be the change you want to see in this world

Book Review: Core Bazel: Fast Builds For Busy People

Review

Core Bazel: Fast Builds For Busy People book cover

Title: Core Bazel: Fast Builds For Busy People

Author(s): Bogdan Mustiata

I wanted to learn more about Bazel, and I saw there are two books about it. Core Bazel looked like the most generic one, and while small (around 100 pages of content) I picked it up and read it.

Sadly, the results are a bit disappointing. I can cope with the book being two major versions behind (and as of May 2022 Bazel v6 is also nearing release), I can understand leaving certain important concepts (like package visibilities) out, but what I feel is done poorly on this title is the structure of its contents.

Usually, when you want to explain A->B->C you go through a process, explaining A, then B, then C, and you might mention the whole "flow" or parts, like A->B or B->C, and finally you explain what A->B->C does once you know the individual pieces and concepts. What you don't usually do is go explain the final results in extreme detail saying "we'll explain later what each piece does", because then you as a reader won't understand half of it, and once those details are explained will need to go back and re-read what was this all about. Another example: when you show the contents of a file, you usually put the file name before the contents block; Now imagine you're talking about a build system which fundamentally relies on input and output files and folders, and that can easily become complex to understand when learning (after all, we're talking about graphs and file trees). Instead of providing nice diagrams and file names before its contents, you get huge paragraphs of text mentioning inside "the data package", other times code dumps which are not clear from which BUILD file or WORKSPACE they come from... To summarize, I had to took notes and draw myself the examples folder and file structures to be able to follow up.

I wanted to read this book to learn the basics this tool, and apart from some core concepts, I felt like I went into a "medium difficulty level" simply because of the writing. The official website has simpler and better explanations, and even browsing some hello world repository is easier as you won't get lost in the file structure.

I recommend instead going to bazel.build/docs.


Courses Review: egghead.io

While reading books, code and quality articles is, in my opinion, the best way to learn, sometimes I'd rather have some audiovisual content to not spend the whole day reading, to provide more variety. I now have a subscription to egghead.io to hone up my web skills, so after two days of doing a few courses I wanted to write a small review with my initial thoughts.

The courses are short, ranging from ~20 minutes to 1.5 hours, and you can also directly do individual lessons, so the platform feels perfect for blocks of focused training. I won't do individual reviews of each course as else I'd flood the blog with posts, instead doing only this post and then keeping a full list at my reviews page.

Most items almost always go direct to the topic, without any setup instructions, which I like as otherwise you tend to see a dozen times the same "instal X, then Y, then Z" steps. But there are a few (and individual lessons) which do include setup guides, so fear not if you want them.

As for the things that could be better, there are mainly two areas:

In many cases the video is edited to go through the code so quickly that often is hard or impossible to fully follow what the speaker is saying at the same time. It is not always the case, but a general weird decision, I'd expect a slower pacing (and for those impatient the speed modifier is there).

Some courses are a bit outdated: One about testing uses Jest v15.0 (at the time of this writing there's 27.5 and 28.0 is on its way), another about Typescript is based on TS 2.7 and mentions to "the new 3.0 release" (currently at v4.6)... Not a huge deal as much of the content is still valid, though.

To wrap up, this is the list of courses I've done:

Notes:

[1] 90% of the content is non-Typescript specific

[2] 2/3 of the contents consists of an interview with the course author about his test framework, which uses Jest but it is not Jest


My Favourite command line tools

I am far from a power user regarding the terminal. In fact, until very recently I even was a bit reluctant to spend too much time fine-tuning it, to avoid additional steps when I upgrade the operating system (often via format & clean install) or setup a new machine (like at work). But I also appreciate the value of doing certain actions quicker and easier, so now I'm leaning towards a "try and integrate if adds value" approach.

The list might be incomplete, as I am also gathering a list of everything I've got either installed or used not long ago, but the plan is to keep it updated from now on.

My Command-Line Tools list

As always, additional suggestions are welcome!


My Favourite Firefox, Chrome and VSCode Extensions

I sometimes forget that, in most blog engines or at least on the one powering this site (pelican), exists the concept of page and post, where a post appears on the homepage (sorted by newer publish date) and in the RSS feed, but a page doesn't (simply exists at a given URL). It is a nice distinction that allows me to maintain atemporal content that I often maintain from time to time, but discoverability is not perfect (again, at least via this blog engine). What I maintain as pages are either special lists, gathered at the Archives section, or certain special sections like the Contact link at the footer of the site.

What I really meant to say with the previous paragraph is that I forgot to write a post mentioning that I actively maintain pages with lists of my favourite extensions for web browsers and tools:

  • Firefox add-ons/extensions: I use FFox for personal browsing, so extensions are mostly focused on privacy.
  • Chromium/Edge extensions: I use Chromium-based browsers for work and hobby development, but also like to try disabling javascript, blocking content and the like.
  • Visual Studio Code extensions: My all-the-things-IDE for the last years. I use it both for work and personal stuff, and decided to not remove old extensions I no longer use (like the Java Pack, or VS Live Share), so it is rich and varied in content 😄. I also have an almost "copy+paste ready" dump of my settings.json to not have to be doing online syncs. Oh, and tiny hints, and my preferred themes for day and night development... Varied things, as anyone can see 😉

So here it is, a post mentioning some the existing pages that I probably hadn't explicitly mentioned before. I plan to add a few more pages soon (at least one or two related with operating systems), so from now on I will make sure to always write a companion post "announcing" them.


Vampire Survivors Cheats

I am enjoying so much the now very popular indie game Vampire Survivors that on each new patch released I hurry to check all the new content. Today, after finishing unlocking all characters and items, and obtaining all current achievements, I decided to try to kill the grim reaper.

Why? Because in one of my early runs in the library level, reaching the 30 min mark Death appeared, but got stuck in a scenery library block. Around 90 seconds later another Death came (also got stuck), and another 90 more seconds past a third one came from a different direction and finally killed me. In the process, I noticed that I was damaging them, so I thought that somehow, should be possible to kill him/they.

After many failed attempts and different strategies tested, I decided to go the game hacking way, and along the way found two other small easter eggs.

UPDATE: Savegame editor (changes coins)

I created a small proof of concept of a savegame editor for the game. You need to deactivate Cloud saving before copying the contents of the .sav file and then reactivate, but it worked for me using Linux. It sets your coints to 300000 and adds that amount to the total coins "ever had", so if you don't see updated the available coins value, try reseting your power-ups and you should see the total amount increased by +300000 coins.

Using the Konami Code

In the main menu, type using the keyboard (directions meaning the corresponding cursor keys): up, up, down, down, left, right, left, right, ESC, ENTER.

You will receive a small amount of gold, and unlock the skeleton character if you didn't already had unlocked him.

Unlocking Exdash

In the main menu, type: x-x1viiq

And you will unlock a secret extra character.

Unlocking Red Death

I had read that the game is a Javascript application bundled with Electron (and using the great Phaser game framework), but the Webpack bundles are not inside the binaries, so checking and modifying the contents is quite easy.

First, navigate to your Steam folder, and inside to steamapps/common/Vampire Survivors/resources/app/.webpack/renderer. Once there, open the file main.bundle.js. I use Visual Studio Code and then right click -> "Format Document" because the file is minimized and otherwise quite hard to manipulate.

Now, search for XLReaper_0 (make sure that has nearby the line textureName: "enemies"). You should find 4 occurrences, so for each one change the following values to 0x1: level, maxHp, speed, power. This will make Death (and its "siblings") die instantly whenever appears and comes near you.

Finally, save the file (you can save it "formatted" to ease future editions, anyway any new patch will override it).

Now you're ready to open the game, do a normal playthrough and reach any level "end". Once Death appears and you kill it nothing will happen, you'll be left alone in the level, so just bring the menu and "Quit". You will now have it available to purchase for a small amount in the character selection screen.

Vampire Survivors Red Death character

PS: After my game editing session, I learned you can also glitch-kill it, but looks harder to accomplish.


Previous entries