Pool talks
178 subscribers
396 photos
19 videos
1 file
67 links
Pool talks. You listen.


Secret discussion group: https://t.me/joinchat/DG7UjkWX3VqonmUgoHgZgg

Website: https://poolitzer.eu
Download Telegram
Someone hungry?
😢1
:)
Bit of a long post incoming, so I am going to give you a very quick TL;DR in the beginning:

I wrote a bot for reddit, which got with only one comment 373 followers, which is pretty insane given that the post only got a small number of views because it was posted in the authors own subreddit and not in one of the larger ones.

Lets set back and enjoy a little story, shall we:

I woke up pretty early this morning, so I did what every reasonable guy would do and opened reddit. Scrolling around, I again stumbled upon a comic from u/SrGrafo. I realized how much I liked them (really, especially the darker ones). So I opened his profile and saw a pinned comic in his user side, this one. And he mentions in the picture in the bottom left corner that people won't get notified after subscribing when he posts in a different subreddit, which is how reddit works.

At 04:45, my brain decided that this problem could be relativ easily be solved with a bot. Without getting too much into boring programming details, just constantly checking for a new post from said user (which is a very basic reddit call) and if this user posts something new, it should notify me. It's as easy as it hopefully sounds.

So after maybe a quarter of an hour, I had written this part. Then I thought that maybe a few other users would also enjoy this, so I added a line which let the bot comment on the post. Then I just had to check if someone either sends the bot subscribe or unsubscribe, then add or remove this person to my database (yeah, json cause json rulez) and notify it when a new post appears.

half an hour later, this was finished as well with a nice little workaround to check simultaniuosly for new submissions from SrGrafo and new inbox items from commenting/PMing users.

4 hours ago, SrGrafo made a new post, and my bot got an unbelievable amount of attention. I'm still trying to get my head around this, but there were a staggering amount of people subscribing. My bot handled it pretty well, and it notified each redditor on the following posts from SrGrafo.

So now I'm suddenly responsible for all these people, have a privat chat with the guy himself and had a blast.
Update: We are at 657 redditors wanting to get notified, and I get comments like these:
The bot now has 5000 subscribers. It takes about one hour and a half to notify all of them, so the reddit limits are in our favour now apparently.

I will just have to implement a proper way to restart the bot when it crashes. Someone pointed me at supervisor, which I will check out now.


Hope you all had a good day :)
Forwarded from Poolitzer X
Dinner. Tasty. Im done
So, over the last couple of weeks I developed a bot for a closer group on telegram, with more testing and bug fixing pre-release than I've ever done. Releasing it's source to the public does not make sense at all, because it depends on a lot enclosed internal stuff. But I learned about the beauty of modules.

If you ever start scripting, you will have everything in one file. And thats cool in the beginning. But trust me when I tell you this: After you finished and want to pick up your work after some weeks, it will just look unordned, awful; its pure madness. If you however write functions, put those in fitting files and import them where needed, everything looks better and you can actually start working without having to spend half of an hour to get yourself back into your code.

Thats what I am doing now with another project of mine. It is its second rewrite, but it will be worth it
1
Over the last two days, I developed a userbot for a friend of mine, Sköll (@skollwolf).

It essentially checks if you currently play a song over spotify. If you do, the bot updates your biography accordingly with the title, interpret, the duration and how long you listen to it already. If you don't, it changes your biography back to your original one.

There are three reasons why I tell you about it:
1. This is my first project with a nice readme and comments in its code, so you can run it by yourself with little programming knowledge.
2. Spotify has a really annoying update of it's access token, which takes about 7% of my main code to deal with, but about half of my developing time - and I'm not even sure this works now. Also it of course needs its own loop. So now I'm not the only one annoyed by it, you as well, because you had to read it.
3. I really need a better name then spotify telegram bio updater for it. If you have a good idea, hit me up.


Have a great (rest) day otherwise, and here is the source code:

https://github.com/Poolitzer/spotify_telegram_bio_updater
1
Hello guys.

New post, new project. Another reddit bot is born today: The BrandConnoisseur.

It automatically comments below posts in the r/battleofthebrands community, giving the users there the ability to vote on each "battle". The challenging parts were the cron_jobs, which means that the bot does something every x seconds (in this specific situation: getting upvotes to the bot comments so it can dtermine which brand wins the battle). This is important because old posts won't get as much attention as new ones, so it is not worth to call the API on those as often as on fresh submission. We have to work with a rather harsh request limit, so getting those to work was rather crucial. The current refresh rate (subject to change ofc):
* For the first five hours: every five minutes
* For 24 hours after that: every hour
* for a week after that: every day
* foever after that: weekly

It is a fairly new subreddit, I'm looking forward to see where it wents from here. But I played my part in getting it initially up and running.

P.S.: Source code, as always.
Fun is fun, but who needs that. I will be at my PC.

Take an amazing sentence from Rick & Morty (S02E03), slightly alter the place and you have me irl :)
🔥1
Hey guys.

I am starting a five day vacation from nothing (since I currently have education free time. Im still at my school but dont have to attend, so I could prepare for my final exams). My class decided to take one last trip together - we booked a house in Denmark and will be there the next five days. I dont know how the internet coverage will be, so I may respond later then usually to queries :)
Pool got a pool :D
And with these generic shots I could have taken anywhere (they are from Denmark though, I swear) is my vacation over. It was nice. I also enjoy having my PC back though, getting back to work.
Today quite a lot happend:
• I finished my "A levels" with a spoken exam. So I finished school. I got an average grade of 2,2!

• I almost finished a rewrite of bot project which I had laying around since at least November. This current version will probably go into "production" and has some features which you may encounter later in your life as well, at least if you visit the telegram support groups :) The difference between this version and the one before the rewrite shows how much I learned with modules and functions, which is amazing. The bot has quite a lot to do behind the scenes, we end up with 1.800 lines of code. Still can't believe it just works.

• I had a meeting for the two weeks sailing I will do in two weeks. I did this three times already and really look forward to it again. I also got a free T-Shirt and a pullover, so thats nice.
Pool talks
Today quite a lot happend: • I finished my "A levels" with a spoken exam. So I finished school. I got an average grade of 2,2! • I almost finished a rewrite of bot project which I had laying around since at least November. This current version will probably…
Hey guys.

Remember the last point here? It essentially means for you that I wont be online at all for two weeks, starting at saturday morning (29th, so in like three days).

If you have unfinished business with me I forgot about, now would be the perfect time to ping me.
And I'm back :)