Weblog

Posts

:blog: Blog

:info: Welcome to the blog section! This is probably the most unhined page on this website. There will be no quality control here.

I’m sure I’m not the only one to notice that radio stations are transmitting unhealthy messages about love and relationships, but I’ve only just noticed another prevalent track on air, which also reaffirms this.

Take the song “Csakazértis Szerelem” (1987), by the band Első Emelet. The title, which could roughly be translated as “just-in-spite love” already sets some expectations, suggesting some amount of persistence and endurance. This alone could be a fertile foundation for a song about difficulties within a relationship meeting the strong insistent will of both parties, but not too many lines later, the verses paint a darker image.

Van, aki megy, és van, aki jön,
Aki rád nevet és elköszön,
De a végállomás én leszek, esküszöm.

The first two lines simply declare “There are people who go, and there are people who come, who laugh at you and say goodbye.” This is pretty much just saying a trivial, general truth, as if the sky was blue. It doesn’t really say anything about the speaker of the one being addressed. I can somewhat excuse it as a setup, since diving deep could have been quite jarring as well.

The answer to my complaints lies in the third line. “But the final station will be me, I swear”. Finally, a sentence which is saying something. A bold declaration.

Van, aki szebb, és van, aki jobb,
De olyan nincs, aki én vagyok.
Nyomodban maradok, jól tudod.

Verse two is much the same. “There are people who are prettier, who are better, but there is no one like me.” Pretty much another set of generic nothingburgers. “I’ll stay on your trail, you know it well.” Is where it gets somewhat creepy. The speaker declares that he will stay on her trail. In other words, he is following her.

Nekem ítélt már a véletlen,
Nem menekülsz meg az életben,
Elér bárhol a csakazértis szerelem.
Kigúnyolhatsz és ellökhetsz,
Az Északi sarkig is elszökhetsz,
Elér bárhol a csakazértis szerelem.

The song has two more verses, but this is the last one which I will look at. This is not meant to be some grand analysis. This starts off rather bold again, with the sentence “Chance has already assigned you to me, you will not escape in this life. Just-in-spite love will reach you anywhere.” What? At this point, the speaker is far gone beyond what naive assumptions one could have had. This line relinquishes the addressed’s rights to their choices. It nullifies their own desires and decisions, placing them as subordinate to the speaker’s. “You can mock me and push me away, even flee to the North pole, the just-in-spite love will reach you anywhere.” This isn’t really love, but control mania.

However it is worth noting that these ideals are on air not because of some grand evil. It is merely what is popular, or what was popular at a time. Societies and their tastes change a lot over time, but pushing the boundaries, and exploring taboo topics has always had some amount of popularity to it. “Csakazértis Szerelem” is a semi-decently composed, catchy song about something you wouldn’t wish on anyone.

A screenshot from the game Bioshock, showing a gift teddy.
What's this? It's Life.

It is often unpleasant, but we only get a single shot at it. We can work towards bettering the conditions of ourselves, and our peers.

The release of a custom level editor for Batman: Arkham City (https://github.com/etkramer/BmEditor) is wonderful news! I hope I will be able to learn how to use it. This could be the start of something awesome.

The awesome thing about Microsoft as a comapny is that their values are clearly set and held onto. Microsoft Teams is a disfunctional product in which your console is littered with 99+ Exceptions a few moments after you open the page. You're prompted to log in again, but first you have to press the log-out button, because you're in a limbo between two allegedly distinct states. When you wish to download a file, the button for it just sometimes does nothing. But you can right click on the popup button and get another popup with another download button. But hey, at least Microsoft Paint has AI integration? Cool nah? All a beloved piece of software needs is a feature which completely ruins it. Classic Modern Microsoft!

A picture showing a few discrete mathematical statements
Who said that discrete mathematics is not fun?

It dumbfounds me that the original Bioshock from 2007 runs almost perfectly on my computer, while Bioshock 2 from 2010 struggles unless I play the remastered version.

Among the many problems I've encountered and had to solve with the Arduino microcontroller, there are two I would like to write about. These will likely be obvious to anyone more accustomed to microcontrollers, however I feel like my experience with them has been really valuable for me, and may just well serve as examples of why I find this so intriguing.

In my previous post, I’ve said how I’d wanted to create a kind of music player. To store the notes, at first I naively created a note class, with a frequency, and a hold time. Both fields were integers. Little did I notice, that while I was struggling to somehow transcribe sheet music, or MIDI files by hand, that the memory of the Arduino was being significantly loaded. I reached about 49% of the Flash Storage with just one song that didn’t even sound like the original. Then I started thinking about it.

The day after, I devised a two-byte solution which blows the 8 bytes per note out of the water. The format is not yet final, and I’m still not educated in music, but for the time being, this is the breakdown:

Sometimes you’ll see notes written as such: A#4. This essentially encodes that. The first two bits are flags. IsAccord, and then isSharp. Simple enough, they do not require much explanation. Then three bits follow for the letter, so like C, A, G, E, F… there are seven of them, stored in three bits, which means that one of the possible combinations is never used and is promptly lost. Following this, another three bits, for the pitch. This is the number, ranging from 0 to 7 here. Limited, but hopefully covers quite a decent range. It certainly covers the frequencies in the pitches.h floating around in Arduino related communities. The second byte, in entirety, is just the hold time.

Speaking of pitches.h, the idea is that the Arduino will encounter a note, bit-mask the letter, pitch, and sharpness, and use a lookup table to find the appropriate pitch.

The other problem I’ve encountered was with buttons serving as digital inputs. More pressingly, three buttons in a resistor ladder. It happened quite sometimes that I pressed it, and nothing was happening, to my absolute confusion. At this time, I had already abandoned delay()-based polling, because I had to run multiple timers independent of one another. It still puzzled me that even with relatively frequent polling, the buttons just did not work for some time.

Then I learnt about interrupts. I’ve heard about them before, but I’ve never really dealt with them, or wrote them. Arduino made the implementation quite easy. I quickly pulled out the analog reader wire, and replaced it with the digital required for the interrupts so that I could detect changes with the buttons. I’m sure someone already caught the mistake, digital pins cannot read analog voltages. The solution is dead simple, yet its discovery made me feel very proud of myself. I could just have both wires. The interrupt would raise a flag, which if encountered in the loop would prompt the analog reading. This completely sidesteps the timing misery, and allows me to have three buttons wired into only two pins. (one digital, one analog). Computing, and electronics really are a rollercoaster that takes you between the feelings of being unstoppable and being incapable of anything.

I think model trains are awesome. Since I study programming, it came naturally to me that I would want to build a model train that is controlled by software that I write. Unfortunately that seemed a little too improbable with my current conditions, so it got shelved, and it molded. I wasn't quite sure what to call it, I labeled this concept physical programming. Probably a bonkers title, but that is how it lived in my head for a while. Eventually I found myself on subreddits of interesting fun contraptions, (/r/doohickeycorporation/) and model trains.

Another time I was also growing a bit frustrated with some forms of advertising, so I contemplated using a Pi-hole, but realized that it wouldn't help much in my specific case. However the concept was planted, that it'd be cool to craft something myself with some microcontroller. I found out about the Arduino line of microcontrollers, and the accessibility, combined with all the stuff I saw online convinced me, that I should probably get one to learn something this Summer.

I got my hands on a Arduino Starter Kit R4 today. I picked this, because it has components which are surely to be compatible with one another, and a neat little guide was provided too. Sure I could have gotten cheaper clones, the blueprints are open-source, however official gave me the security that I won't have to deal with finding out what components to get and where, which was valuable, considering that I had known practically nothing about these components until a few hours ago.

Admittedly, this write-up is a little pre-mature, considering I'm not too far into it yet, practically only having done the first example project.

I never really engaged with electronics on this level. I did have physics classes but we never actually wired anything. After completing my first circuit to turn a light on with a button, I slowly modified it. Now it has a blue LED, and a red LED, both with buttons, so you can turn them on independently. The inspiration was a police light. Of course there is nothing stopping you from pressing down both of them at the same time, and the circuit is very basic. I'm just surprised with how much fun I had with something so simple. It must seem second nature to some, but novelty can craft very pleasant experiences. Of course this was just electronics, and I have not touched programming it. I'm looking forward to the challenges offered by limited resources, and the environment where a C like language can thrive instead of feeling tedious like on full computers.

My goal, which probably isn't that advanced as I might believe it to be, is to have a little music player. The Piezo buzzer would synthetize audio, and buttons would allow stopping, playing, and cycling between hard-coded tracks. The LCD would show the name of the song, and perhaps even time.

I'm looking forward to making it real!

A GIF animation of the blue and red lights being pressed one after another
[MOTD]