Programming is super fun but...

Words
783
Reading
4 min
Listen
Play
7y

Images taken from Pixabay

Tales of national decay

These last few days I've been living at around 70/30 % of time with and without energy service in my home. This means that my computer keeps turning off all the time. I thought it wouldn't be too bad (computers get forced off all the time, right?), but now it's making weird sounds like brrrr and zrrrr and vrrrr. I feel like soon I'm going to have to see what parts are damaged or burnt and replace them.

Nothing is irreplaceable in my computer. Since I've been nomading, having at least 2 different computers per year since 2016 (all borrowed except 2 that I bought), I've learnt to keep all my important data backed up online. That way, even if I move and leave everything behind, I can log in to Steem and have my money. :DD

But I don't want to have to replace my computer! Pls Maduro, your infrastructure is so bad you're even breaking my personal computer, my livelihood, my only tool for money-making!

Botty bot!

I also decided that instead of doing some things manually every day online like transfers and checking some stuff on Steem, I'd make a bot. So I made the bot! I spent 2 days on it haha, but at least when I'm offline due to national electricity outages, or without Internet (because I'm also without Internet, using my phone's data and tethering to my computer right now, but it only works sometimes! It's very irregular.) The bot was pretty hard, and after I "finished" it a few days ago, I ran it and was happy, but then noticed that there was a big error that made it only work every two days.

So, well, I spent the whole day today between sleeping off during the outage and fixing the bot. I discovered a few things I really really like.

const inXMinutes = (xmin, date) => {
  date.setMinutes(date.getMinutes() + xmin)
  db.set('nextDate', date.toISOString())
  schedule.setTime(new CronTime(date))
  schedule.stop(); schedule.start()
}

const cya2moro = () => inXMinutes(1445, db.get('nextDate') || new Date())

const schedule = new CronJob(new Date(db.get('nextDate')), gib, null, null, 'America/Caracas')

I discovered that the NPM library cron is much cooler than I thought, but that it's also lacking a few things. But it's not their fault. Cron is for regular schedules and the schedule I wanted to make was dynamic (the execution time changes every day, 5 minutes ahead each day). I also discovered many things about how the Date global object works. Overall, I had a really good time.

But!!

Ok, so I had a really good time but the last couple of hours were dedicated to fixing through the unfixable! I really wish some library developers made a better effort doing readable error messages! I had an error in my database and all I got was "Can't be null" and not even a message to where or why this was happening. I had to jump through hoops for 40 minutes just to know where the error was.

And then the other library started playing me for a fool as well! Shame on you, nameless dev! If I made a mistake in a whole 20 lines of code, this library made sure to cover the error instead of letting it be displayed on its own. It's ok if library makers sometimes leave some errors slightly undocumented, but to literally cover errors made by very unrelated stuff just because it's running in your loop? I had never seen a library that sabotaged me so much! O.O

Some cutie music!

Last but not least, I have to thank the beautiful musicians that I was listening to all throughout this afternoon and evening, who made the time much more special. The one I liked the most was this album (which I have downloaded because I can't listen to youtube on capped internet!).

This black metal album is full of strange melodies. It's not the best symphony around at the start, and it's a bit repetitive sometimes, but listening to it all is a unique experience. It's very evocative. I think I also like it because I downloaded it a couple of days after it was released :P (I've always been a bit too poor to buy original music. I've made an effort to buy some albums that I loved, though it's also hard to find stuff I like in the shops here!).

Hmm, all the lyrics can be found here with their respective translations into English. Something that I really love love love about this album is its focus on natural aspects of the world. It's just so compatible with my eternal love for landscapes and just feeling and appreciating my surroundings.

Tracklist (links to the lyrics and their translations):

1_._ Wandernd (Instrumental)

2. Nebel und Regen

3. Graues Land

4. Oktobersturm

5_._ Einsamkeit (Instrumental)

6. Regen in der Dämmerung

7. Im Abendrot

8. Nachtgedanken

9_._ Hinaus in die Nacht (Instrumental)

Programming is super fun but... | Ecency