How I dropped out of school but returned to programming after comments on Habr and even wrote the first TG bot

You can read about my belated attempts to enter IT here. The response to the article was decent. Some people scolded me harshly, while others gave very good advice. So much so that I wrote a separate review here. In the end, I finally decided to implement an old idea – to make a Telegram bot for a charity foundation. The link to it will be in the article. The bot has not yet been tested properly and works on my laptop, so it may be unavailable. Please write what else can be done.

This is what I got

Introduction

I will say right away that when the bot started working, even if very clumsily, it was a real joy. Therefore, I can confirm that when learning programming, when you have already reached a certain level, you need to make your own small project.

the right entourage is also important

the right entourage is also important

I also started channel in TG with short tips on writing text. After all, I have been working in this field for more than 12 years, I have something to share. If you are interested, subscribe, I will be very grateful. I promise not to spam and give only really useful information.

Why bot

Because it's simple. And, most importantly, such a program will immediately be useful. Writing code for the sake of code, learning from unrealistic examples and tasks is not much fun. It quickly gets boring, and then apathy, burnout and other delights, which ultimately lead to a firm conviction: “This is not for me.” But when you make a bot, you see that it works, then the emotions are completely different.

What was the idea?

I noticed that very often in the foundation's social networks people asked how this or that ward was doing. This is not some kind of closed information, there is a special section on the site where we publish everything anyway. I thought it would be great to somehow automate the process. For example, to write a bot that would tell about the children, and provide information about the foundation, and even accept donations. The idea is not striking in its freshness and innovation, but it corresponds to my capabilities.

I expected this kind of reaction from the management, but it didn't happen

I expected this kind of reaction from the management, but it didn't happen

Implementation

I work in Pycharm, if it matters to anyone. I started with Visual Studio Code, as recommended in the courses. But then I switched to a domestic product. I think that the interface is in English is rather a plus. You need to get used to the language, which is the main one in programming.

I took someone else's ready-made bot. I watched the tutorial, imported the libraries, copied the code. And at first I just launched it with my token and a link to the necessary page. When it worked, I was happy as a child.

I'm not young anymore, but I haven't forgotten how to be surprised

I'm not young anymore, but I haven't forgotten how to be surprised

Then I started to polish it up. I changed the texts, changed the functionality of the buttons, added the ability to make a donation – it simply led to the website page with translations. In general, something started to work out.

I couldn't figure out why I was constantly getting some kind of conflict, supposedly several bots were running at once, accessing my code. Then I figured it out. And then, of course, my “noobness” showed up in full force. Since I was very afraid of losing my work, I saved the code in several files. And although I later deleted these extra files, and they were not open in Pycharm, they still worked. I discovered this when I clicked on the big red square next to the code launch button. I disabled it and the error went away.

We are all Homer Simpson sometimes

We are all Homer Simpson sometimes

The bot works, but it is not yet clear how it will behave under serious load. It may need to be optimized. I will also have to figure out how to upload the code to the server so that the bot does not depend on my laptop. In short, samurai A programmer has no goal, only a path.

Conclusion

Programming can be very interesting when you understand why it is needed and what you will do with it. I think this is why experienced coders create their Pet projects. This way they avoid burnout, enjoying both the process and the result, which they can brag about in the professional community.

Thank you all for your attention, comments and subscriptions!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *