The XYMbassadors learn Python

In this Symbol Blog article I am going to write about the experiences of some of the XYMbassadors (aka Community Managers) in their efforts to learn how to code in Python. Some of them had previous programming experience and others were complete novices starting from scratch and learning the building blocks of conditionals, loops and data structures. There were a lot of “Hello World”‘s going on! 😊

I had originally planned to summarise the experiences of each of the XYMbassadors and write a general overview of tips, tricks and resources that you might find useful to take your first steps in Python. Actually each of the participants wrote really detailed responses so I don’t want to edit too heavily and will post their stories in full. Hopefully they will inspire some of you to become budding developers! 😊

Firstly I would like to give you some of my tips. Many of these are echoed in the stories below along with further recommendations and inspiration.

 

Thinking of learning a programming language?

I’m going to assume that you have already chosen a language to learn – this is a whole other can of worms which I am not going to open, your language of choice is going to depend on what you want to do. In our case we chose to use Python, it’s a good all rounder, it is touted as being an easy language to learn and it is becoming the language of choice for many ((https://spectrum.ieee.org/top-programming-languages-2021)).

So here are a few tips to keep in the back of your mind when you start out.

1. Find a learning resource that you like

People all learn differently. For some people a YouTube video might be an effective way to learn. For others an online, interactive resource, others may be more old school and prefer a big textbook to work through. Find what is right for you as it makes learning less of a chore if you are engaged.

2. Take it slowly

I always fall foul of this rule whenever I start something new. I have great intentions, spend hours studying and working away and then burn out and give up. Pace yourself! Set aside a few hours a week and try to stick to a routine, don’t pull a 12 hour learning session, your brain will be mush by the end of it and you will lose motivation.

3. Practice

This for me is the key. If you start learning and you think that you understand a concept, practice it and practice it again. That way it will stick. It’s easy to look at a website or a book and think you get it. When you are staring at a blank text editor trying to remember how to do something it is very different. It is a case of “use it or lose it” I’m afraid.

4. Don’t expect too much too early

Sorry to break it to you guys, unless you are already an expert in another language you are not going to be a very good Python programmer for a while. You have to start simple and over time set yourself more ambitious challenges. If you set yourself achievable goals then you will feel a sense of achievement when you accomplish them. If you set out to change the world with your first bit of code then it will be disheartening when you fail.

5. Find a decent text editor or IDE

Please don’t write your code in Notepad! You need at least a text editor that has syntax highlighting and many of you may want to choose a more powerful IDE. I keep it simple, on my Mac I just use bbedit – it’s not the best but it is something that I am used to. I know people that use Sublime and it was also recommended by Hatchet so this would probably be a good place to start! It is available for Linux, Mac and Windows so give it a go. Hatchet also mentioned atom which looks pretty cool, I may download this myself and have a play later 😁

6. Once you have the basics get creative

For me there is nothing more boring than going through set examples in a book or online learning resource. The key for me learning my first programming language was the ability to use it to help me in my job. I then applied it to write code to scan expiring domain names for keywords, phrases and patterns. I picked up a few gems this way back in the day. Applying your coding knowledge to something that you are passionate about can spark that enjoyment and eagerness to learn.

7. Don’t give up

It sucks starting out. It’s easy to say “it’s hard” and give up but I promise with a bit of perseverance and practice you will suddenly realise that you can do it. I guess it is a bit like learning a language, you may never be fluent but you can learn enough to get by and have a decent understanding of other people’s code.

8. Find a learning buddy

The XYMbassadors all started learning Python at the same time. I think this may have spurred some of them on more, it was a shared experience and nobody wanted to let the side down and slack off 😆 If you know anyone else that might be interested then why not learn with them. Then you have someone to discuss your progress with, look at your code, set each other challenges etc. This might give your motivation a bit of a boost.

Stories from the XYMbassadors

All of the sections below are written by the XYMbassadors themselves. Some have links to their code so go have a look and see what they have achieved!

 

CB – @DjCellBlock

I’ve enjoyed learning Python and it was a great experience. I was already familiar with other coding languages, so it didn’t take me too much to get through Python I – V on Progate.

There is a lot more to learn and we shouldn’t stop here. Now I’m using PyCharm Community Edition to learn more and start writing my own code. You can install different packages to make your code smoother and ease your workflow.

At the moment I’m in a searching process, going through Google pages that offer information, Python plugins, and examples of code I could use in my own code.

In this process I found EarSketch. If you go to this page press “RUN” and wait for the code to load in your DAW, then press the Play button. You will see that you can make music by only using Python code and a library of WAV samples.

I (@XHarvesting) have just done this and it is really cool! – go check it out!

This is one way to make music using Python code, the easiest way I could find so far, but I’m looking for a more complex open-source plugin that I could use to build an app alike on the Symbol blockchain.

So wish me luck, cause I need it. 😄

 

Angel – @bestgoldangel

Since childhood, I wanted to study programming. Physics at school and university was my favorite subject, but life turned out in such a way that I had to go to work in the field of culture and sports! I feared that programming would be very difficult. I thought that to master it you would need to spend several years studying at university studying computer science or mathematics. But as it turned out, thanks to our team of XYMbassadors is was not so scary, and I want to tell you about it.

To begin with, I want to emphasize an important idea for beginners – in order to learn a programming language, you do not need to have special knowledge. If you don’t understand a topic, try studying it in using different sources. It is not necessary to pay for courses, you can get the necessary skills from books or from other free sources on the web. The main thing is to approach the choice thoroughly and be sure to practice the knowledge you gain. When learning from books, choose the latest publications with up-to-date information. The most important thing a programmer needs is a passion for programming, everything else is secondary.

I liked Python because it can do any job. It has a library for mobile applications, for desktop applications, you can write automation scripts for servers on it, you can also use it for web applications. The syntax turned out to be really simple. I also learned Python from YouTube videos and articles! To keep the courses from becoming useless, only one thing will help – practice. If you just watch and listen, it won’t work. For a beginner, it will even be a practice to rewrite the code that the instructor shows on the screen. Rewrite and think about how it works. The required minimum for classes is four hours a week. Two days a week for two hours. But I would recommend setting aside an hour a day to write your own code.

The main thing is not to dive into programming head first and overdo things. When you study all three days, you will end up a mess in your head! Very difficult! There are about 70 functions and several dozen reserved words in a basic Python configuration, but even a good programmer doesn’t necessarily use all of them. That is, in order to learn a hundred words and understand what they are doing, you can spend from one to three weeks, if you want, and work actively.

Now I’m slowly putting together a very simple text game piece by piece using Pyxel. But when faced with the first real problem, I threw everything away. But programming problems are inevitable; constantly something does not work, and it can be completely incomprehensible why it failed. I banged my head against the keyboard and tried to figure out incomprehensible error messages. Moreover, my ultimate goal was to create a game that I thought that people would not care about and that no one would ever play. I would like to create a simple game and bind it to Symbol transactions!

I will gradually get to this! It’s important to stay motivated! Inspiration! When you are learning something difficult (especially if you are a beginner) you want small wins as early as possible. They help you believe that you can actually do what you are about to do. I was inspired by the work of my friends Mikun, Klim, DJ СB, Simon, they always inspire and help! If something is not clear to me, I always turn to my friends and they help me – it is always customary in our team to help and motivate each other! we are NEMbers – and we always help each other!🔥✊🏻💜⛓

Learn the basics first and there will always be time for your own projects. Do not lose faith, go for your goal. Take a break, awareness of your goals will give you strength and movement forward! I wish you success and never give up!

Hexagon – @Hexagon_tr

We feel more and more every day that learning to code is now a necessity. The Symbol community is like a school, and I said “now it’s time to start learning coding” because of the developer team saying that coding is the future and we need to learn. I thought that Python would be the most suitable language for learning to code. My goal was to produce an application that would work on the web. That’s why I became interested in Flask along with Python. This duo has a lot of documents and videos on the internet. Currently, as a learning method, I take the approach of making small changes in the existing code and seeing what happens. My main goal is to solve algorithm logic. Code writing rules are already being corrected by IDEs or you can easily find the right version on the internet.

Turning the code into an algorithm and thinking about the code as a whole… This seems to take a very long time. 🙂 But make sure that you make the process fun by making fun projects and listening to music, it works.

In summary, in order to turn your ideas into reality or to communicate better with a developer, you need to know entry-level coding languages ​​and I am currently focusing on this stage.

By the way, running symbol nodes on different platforms is one of my biggest hobbies. Just like they do in Doom 🙂 https://www.gamesradar.com/12-things-that-prove-that-doom-will-run-on-literally-anything/

(Raspberry Pi soon :))

 

KLIM – @GeranKlim

I started my learning of the Python programming language with the Progate course

Then I decided to make a small game and made the calculation of points in the form of XYM, adding 10 XYM, for each cube when the snake eats it, then I changed the points by 1 XYM.

https://github.com/klimgeran/Symbol_Game – The code itself is here.

130586900-a67dfc9e-04ec-4549-b3f7-5d19eb35c35e.png (1708×916)

Here, you can see how to send transactions using Python on the Symbol blockchain

Johnny Tongki – @TongkiJohnny

Thanks to our team, the community managers have a strong desire to learn Python.

Reading lessons and completing assignments, I got a good understanding of the syntax of the language. But – there was no feeling that I really own it. The first rakes I stepped on were tabs and spaces (indentation which is important when writing Python code). I re-read the code I had written a bunch of times and did not understand why it did not work, I tried to change the logic, tested and debugged. It turned out that the whole point was that I was not indenting my code correctly.

Now I have some idea of ​​how programming languages ​​work, what they are. English! It is 100% needed, it is difficult and not comfortable to learn, but it needs to be done. I’m still in the process, studying, the Progate course – I didn’t really like it.

 

Mikun – @mikunNEM

I learned Python with Progate. Then, I tried to make a XYM transfer on Symbol by referring to the article by XEMbook. I was thrilled when I ran the program and heard the sound from the wallet.

I wanted to send a mosaic in a game. After some research, I found Pyxel and tried it out following this guide.

Here is the completed product:

 

I (@XHarvesting) have played mikun’s game on the NEM tomatina day – it works really well 🙂

Me (XHarvesting) – @XHarvesting

I don’t really have much to share (for once! 😁). I knew a little basic Python and have programmed in Perl for a number of years now. I don’t really write much code in my day job any more, I just manage other people 😮‍💨

I took the Progate course like most of the other XYMbassadors just to see what it taught you. I think it was an OK basic introduction but really lacked depth so although it will teach you the basic concepts you will need to put a lot of additional work in to get a deeper knowledge and retain that information. Luckily apart from differences in syntax everything was pretty straightforward. Although, I have to admit I still struggle a little with classes and inheritance in Python but that is something that I need to practice before it becomes second nature and is in all my future code.

One thing I am determined to do is to write my code in Python in the future. I have been meaning to do this for a while and but I am still too comfortable with a language that I have been using since the mid-2000s 😁 I am now a dinosaur though 🦖😂

I first learnt to program in Perl using an O’Reilly book (ahh the Llama book 🥰) so this will be my new bible

Finally

Firstly I want to say a HUGE thank you to everyone that contributed to this article! I really appreciate it! I didn’t include individual links in the article but all of the participants run their own Symbol nodes – you can find further details here if you would like to delegate to them.

Thanks for reading, I hope that some of you found some small spark of inspiration to start coding. Just remember, it’s not rocket science and it is nothing to be scared of. I can’t promise that you will be a superstar programmer and make your fortune with the next killer app but I can assure you that it will give you a useful life skill which will look great on your CV.

Avatar photo
NineLives
admin@symbolblog.com

I'm a Symbol and NEM enthusiast and run this blog to try to grow awareness of the platform in the English-speaking world. If you have any Symbol news you would like me to report on or you have an article that you would like to publish then please let me know!

No Comments

Sorry, the comment form is closed at this time.