Programming is super fun but...

in #blog7 years ago (edited)

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.

https://www.youtube.com/watch?v=kVYjfp4vhhg

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)

Sort:  

Dear @cryptosharon

Awesome choice of topic. How have you been lately? Hope you're well and fine.

These last few days I've been living at around 70/30 % of time with and without energy service in my home

Ehm. Are you perhaps from Venezuela ? Most people over there seem to struggle currently with that problem.

Hope your PC will last much longer. After all we never have a "budget" for computer repair. We never have money for that purpose ready, so it always affect our current lifestyle. I know how awful does it feel.

Pls Maduro, your infrastructure is so bad you're even breaking my personal computer

Oh okey, so now I already know the answer to my previous question :) And those blackouts must be scary thing to go through.

ps.
Did you program your bot in Python or some other programming langage? Just curious (not that I know much about that stuf hehe).

Cheers
Piotr

Hi, Piotr! It seems we're both from the Crypto- family.

I am from Caracas, Venezuela, and yes, our national electricity supplier had their main two plants blow up and this leaves them in a very sticky and practically unsolvable situation without foreign assistance (because they're corrupt and have stolen all the funds assigned to fix the issues, you can read up about Jessie Chacón if you want, but it's a heavy topic and not in everyone's interest).

I made my bot in Javascript. It's the only programming language I know. I'm trying to learn a bit of Python but I'm lazy and like Javascript too much to make the switch. I'm also trying to learn a little Rust but, same as with Python, I'd rather do many other things than learn a new programming language at this stage of my life. :)

Dear @cryptosharon

How come your english is so good? Most Venezuelans are just okey with languages (that's my impression). But you impressed me heavily.

I made my bot in Javascript.

Would it be difficult to build a bot that checks list of everyone I follow and would provide me with raport of accounts that didnt post anything in 30 days? I've been thinking of such a tool.

Manually I managed to track number of people who stopped posting and few of them came back after I reached out to them. It's simple as that: people like to see that someone out there cares.

What do you think?

Yours
Piotr

It would be very easy to make this bot. Hahaha, I hadn't read this message you sent. Ahh, so sad. If you still want it, I can help you with it.

Good morning @cryptosharon

I must admit that I didn't expect your answer 9 months later hehe :)

If you still want it, I can help you with it.

Can I find you on discord or telegram?

ps.
Would you mind if I take few minutes of your time? (I hope I'm not asking this question to often ;)

Anyway .... together with few core members of project.hope team - we'te trying to promote our recent publication: an article explaining economy behind our non-profit community project build on STEEM blockchain.

Perhaps I could ask you to spare few minutes and check it out and share your feedback with me.

I would absolutely appreciate it a lot. I read all comments and I drop solid upvote on each valuable one.

Link: https://steemit.com/hive-175254/@project.hope/3-ways-of-joining-our-efforts-project-hope-economy-explained

Yours, Piotr

Hit me up on Telegram.

And I read the post but I don't understand what Project Hope is about apart from a curation project for Venezuelans.

sitting in a red van listening to black metal... good.

Why do you have a red van? :o

Posted using Partiko Android

because why not :)

rottrip-canari.jpg
@rot-trip

Waaaait, your van has a Steem account? Hahaha

yes. And soon it will post, too :p

What will it post about?

Posted using Partiko Android

about trips, views and of course its transformation to become a cozy and efficient digital nomad homebase.

Hi @cryptosharon!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 4.602 which ranks you at #1814 across all Steem accounts.
Your rank has dropped 1 places in the last three days (old rank 1813).

In our last Algorithmic Curation Round, consisting of 238 contributions, your post is ranked at #195.

Evaluation of your UA score:
  • Some people are already following you, keep going!
  • The readers like your work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Hi, @cryptosharon!

You just got a 2.88% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Congratulations @cryptosharon! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 22000 upvotes. Your next target is to reach 23000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

3 years on Steem - The distribution of commemorative badges has begun!
Happy Birthday! The Steem blockchain is running for 3 years.
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Loading...