Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

### MikeMirzayanov's blog

By MikeMirzayanov, 16 months ago, ,

Hey.

Last week I started the experiment.

I believe in semi-automated learning of programming through problem solving. There are clear advantages of this approach: independence of practice from the teacher, good testing of solutions, clear milestones for students, ability of the approach to scale.

The fundamentals of programming in this sense are quite good: it is easy to prepare problems, there is a clear learning plan, and student progress is well understood.

Surely some structured courses for learning the language from scratch already exist. But why not do it exactly the way I like it? IMHO, a set of problems is crucial here. The devil in the details: increase in the level of problems complexity, diversity, lack of requirements in mathematical preparation, and so on. I have teaching experience (OMG, almost 20 years!), some teaching materials from my work with students of Saratov University and the desire to try!

So, experiment. Since February 20, a wonderful girl le.mur has been learning the basics of C ++ from scratch under my supervision and guidance. We agreed that she captures her impressions in a special Instagram account (subscribe, it motivates!) Lena did not study mathematics in any special way, no initial skills in programming and informatics. Every day she practices 2-4 hours. I expect, one homework should be done in 1-4 days. My plan is to minimize individual explanations, as long as it turns out.

I brazenly stole a photo from Instagram

A training plan for the near future (that is, the very beginning) looks like this:

• The concept of a variable, the simplest functions (min, max, abs), problems without conditional operators and loops.
• Conditional operator, both forms (if, if-else). Understanding of scopes of variables, nested if-s. Problems on conditional operators.
• Loop statements: while and for. Problems for the use of loops without additional constructions (that is, they are solved in one loop without nested conditionals/loops).
• Problems to use loops and conditional operators together.
• Problems to use nested loops.

Each item corresponds to one homework and it will contain 10-20 problems on this topic. Further according to the plan, arrays and strings are expected, but they have yet to be reached.

One of the first conclusions that I managed to do for myself: at the initial stage, you should not immerse yourself in unnecessary details, a simplified or incomplete understanding helps to understand the basics. For example, while Lena operates only with integer variables (type int), she always puts curly brackets after control operators, uses only logical && and ||, only approximately understands the meaning of the “using namespace std” magical spell. It seems to me that after obtaining the initial skills, it will be easier to expand understanding with types, additional operators and other details.

I hope that Lena will succeed and she will not lose her motivation to study.

And how did you learn the very basics of programming? What worked well for you?

• +266

 » 16 months ago, # |   +134 Thank you, I will definitely try to do well and learn a lot of new things!
•  » » 16 months ago, # ^ |   0 Good luck!
 » 16 months ago, # |   +24 Hello! I used a Brazilian site, called CodCad, (now its into another one, NepsAcademy). It teached me the very basics at CP and my first teacher was Rogério Júnior, a ex-competitor, silver at IOI 2016. He was the main reason, cause the way he used to teach programming was awesome and enjoing. Now he's at MIT, so im studying here, at codeforces!
•  » » 16 months ago, # ^ |   +4 Can you identify the main reasons and features that made Rogério's course so interesting and useful?
•  » » » 16 months ago, # ^ |   0 The simple way he approached to the questions, pacience to explain and, mainly, the love he showed while coding and teaching. He was so inspiring and he trusted at my potential and told me that I could have a chance to go to IOI. After that, Im studying a lot in order to improve always!
•  » » 16 months ago, # ^ |   0 I also can say that I learned most from CodCad. Really useful to grasp the concept
 » 16 months ago, # |   +7 I did a self-paced online programming course, Harvard's CS50x, on and off when I was in 9th grade. But I feel like I've learned more from competitive programming and doing my own projects rather than taking a structured course, so this idea seems like a good combination of the two.
•  » » 16 months ago, # ^ |   +3 We all know Arrayman was born geniosity don't try to hide it
 » 16 months ago, # |   -13 I think, I know who'll beat tourist one day :D
 » 16 months ago, # |   +8 Yeah, that's basically how I learned programming. I had algorithmic theory from our local correspondence seminar, but as far as actual coding, I was just trying to solve problems and looked up concepts I had the most difficulty with (such as what the hell is standard input/output and how do I use it).
•  » » 16 months ago, # ^ | ← Rev. 2 →   +8 such as what the hell is standard input/output Heck, I had trouble understanding loops and arrays for couple of month in high school
•  » » » 16 months ago, # ^ |   +1 Features of imperative programming languages: you write what computations you want it to do, it does that (or something else... or crashes...).Features of an environment/framework: you write a magic command and a complex process gets done. How does that even work?
 » 16 months ago, # |   0 That's actually the same as my experience for learning my first language, C++. The teacher told us to solve problems using C++, and along the way I started to learn the basics of the language as well as those more advanced techniques (like sort by comparators, etc). I would say that such way of learning is pretty effective since the feedback (which is essentially the most important thing in motivating learning) is given immediately when you solved the problem.
 » 16 months ago, # | ← Rev. 2 →   +14 Cool idea for a blog, but maybe more details would be helpful for other beginners. Are you choosing problems from online judges or preparing something new with small jumps of difficulty?I remember a course of Pascal (and later C++) with simple problems: read A and B, and print the area of a rectangle with dimensions A and B. Reverse the array. Print the christmas tree made of characters '*'. So yeah, I also learned by solving problems.It would be cool to eventually have a start-from-zero series of problems/lessons in Codeforces. On the other hand, such things exist already for sure (like a Polish platform from which I learnt).
•  » » 16 months ago, # ^ |   +11 I use educational problems (mostly just exercises) I used in Saratov State U with students/schoolchildren. Also I prepared some problems because in some topics I don't have much easy educational problems. If this experiment succeeds, I will consider the opportunity to publish the materials in the form of a course.
•  » » » 16 months ago, # ^ |   +18 If you don't mind me asking, how exactly will you define the success of the experiment? Her being able to solve a certain difficulty after a period of time or maybe you have something else in mind?
•  » » » » 16 months ago, # ^ |   0 Maybe rating around 1700?
 » 16 months ago, # | ← Rev. 2 →   0 Great idea! I look forward to hearing how far this goes (I bet very far). And how did you learn the very basics of programming? Solving lots of problems on Project Euler :) What worked well for you? Getting instant feedback, having clear goals (for me, "solve the next 5 problems" is much more motivating than "try to learn Python, I guess"), gradually increasing difficulty
 » 16 months ago, # | ← Rev. 2 →   +151 only approximately understands the meaning of the “using namespace std” magical spell [hashtag]metoo
•  » » 12 months ago, # ^ |   0 \#metoo
 » 16 months ago, # |   0 Good job!
 » 16 months ago, # |   +15 I started solving problems after I had nearly completed 3 years in computer science, and I already knew most of the basic algorithms. Only after I started solving problems and competing online did I realize that I actually had not fully understood a lot of them, or the importance of complexity. I even lacked basic debugging skills, plus a lot of other stuff that I know consider to be basic knowledge. Not only did I gain coding quality and speed, I also started learning and using more advanced algorithms, and even having a good time while doing so, something I would have never done by myself by reading a book or attending some random lecture. TL;DR: I learned the basics in university, but what worked well for me was sitting down and solving problems and competing.
 » 16 months ago, # |   -10 Whats her age. as its also a factor. MikeMirzayanovi learned algorithms from geeks for geeks and online videos of tushar roy. the momentum i get is on codeforces. i practice alone. so when i get bored i watch petr mitrichev stream or his stories. i gets motivated.finally solve problems and as Petr said in one of his early blog. Have a confidence that u will suceed.
 » 16 months ago, # |   0 Thank you, I will definitely try to do well and learn a lot of new things!
 » 16 months ago, # | ← Rev. 2 →   +22 Your idea reminded me of my experience in adaptive simulator (Python example). The essence of the practical approach: a person is looking for information when it is needed. If the problem is not solved, the authors give a simpler one. + The analysis paralysis is unlikely (I know that gkseni loves this concept). This problem occurs among theorists and is sometimes called "overthinking".+ The information that a person searches for himself and immediately applies is best remembered.- Knowledge will not be complete (online course can help).- You need to have the strength to decide to open complex tasks, when you can enjoy only simple ones.And thanks for this post. My not very long way in IT began with a thought: to solve problems on the first date is so romantic. :D
 » 16 months ago, # | ← Rev. 2 →   +17 Update on March, 17: In 3 weeks le.mur solved about 60 problems, studying each day for 2-5 hours except weekends and few day-offs. Now she is studying linear arrays (she uses std::vectors).
•  » » 16 months ago, # ^ |   -10 apart from givig her algorithms teachings . are u giving her maths training too which is required to solve tough problems.
 » 15 months ago, # |   +27 Update on April, 15: In ~7.5 weeks le.mur solved 105 problems. She continues to study each day for 2-5 hours (there was a rest week because of ICPC finals plus weekends). She is starting std::string`s. I think after strings and practice with multi-dimensional arrays, she will be ready to take part in Div3 rounds!
•  » » 12 months ago, # ^ |   0 Сколько задач она решила за 4 месяца ? Вы можете где-нибудь добавит список этих задач?
•  » » » 12 months ago, # ^ |   +31 Please, use English to reply comments in English. I think there were a confirmation windows like "Are you sure your comment in English?" and you ignored it :-(I wrote about here progress below. Most problems are absent on Codeforces, they are not from the contests but they are special educational problems to study basics of a language. Probably, some day I'll publish them as a course for those who are just starting to learn a programming language.
 » 12 months ago, # |   +27 Update on June, 25: In ~4 months le.mur solved 182 problems. Now she is focused on problems with nested vectors.
•  » » 12 months ago, # ^ |   +60 Can't wait to be lower rank than her in Div3.
 » 12 months ago, # | ← Rev. 2 →   +1 I have a friend who wants to get into programming as well, do you Mike, or anyone else have a set of easy problems (truly beginner problems) for my friend to train in.I can explain him some simple things, but I almost never encounter simple problems in Codeforces for him to train in.A's in CF are sometimes what I think would be too hard for him and sometimes too unchallenging (they require simple observation and not a teachable C++ experience).I can probably find some good easy problems on Google, and I will, but if you have any good list that he can follow, it would mean a great deal.
•  » » 12 months ago, # ^ |   0 If he is really learning from the very very beginning, then probably a traditional book is the better option. If it is competitive programming then probably USACO training pages is best.
 » 10 months ago, # |   +11 Update on September, 23: In ~7 months le.mur solved 300 problems. Most of recent problems are from Codeforces with ratings in the range 1000-1400. She started to take part in rounds. Hope, she will return green soon. I'm proud of her progress!
 » 6 months ago, # |   +67 Update on December, 30: In ~10 months le.mur solved 400 problems! She is middle green now. I'm sure: cyan is waiting for here!
•  » » 6 months ago, # ^ |   +7 Hi, I have a suggestion. Now and then many people write blogs asking how to improve. Since you are guiding her, you can make a sheet of problems/links that you asked her to solve or go through and make that thing public. Many people would be benefit from this and they can follow this sheet for training and practising. I am of the view that this would help the masses a lot.Thanks
•  » » 6 months ago, # ^ |   +13 How does codeforces show only 68 were solved? Is she practicing elsewhere? I am confused
•  » » » 6 months ago, # ^ |   +13 Yes, mostly she solves problems in a private group.
•  » » » » 6 months ago, # ^ |   +14 Are you going to make these problems public? They must be very helpful for beginners.
•  » » » » 6 months ago, # ^ |   0 is there a way non-russian beginners can join your training plan online?
 » 3 weeks ago, # |   +19 How's the experiment so far ?
•  » » 3 weeks ago, # ^ |   -33 Failing I guess https://codeforces.com/profile/le.mur
•  » » » 3 weeks ago, # ^ |   +4 why are you booing him? He is technically not wrong.
•  » » » » 3 weeks ago, # ^ |   -6 Because you can't really tell that's someone's failing or succeeding just like that. If a person stays newbie for like 2 to 3 years but improves slowly afterward, eventually becoming a GM in 10 years, would you say that they failed and then succeeded? That doesn't even make sense. You fail only when you give up without reaching your goal.
•  » » » » » 3 weeks ago, # ^ |   0 Very inspiring. You deserve more upvotes
•  » » » » » 3 weeks ago, # ^ | ← Rev. 2 →   0 If you are newbie for more than a year you are doing something wrong.
•  » » » » » » 3 weeks ago, # ^ |   0 Yes I'm wrong at my hobby.
•  » » » 3 weeks ago, # ^ |   +4 Not really, I think the goal was the programming itaelf, not CP. Being good at CP requires strong math, and that is a different story.
•  » » » » 3 weeks ago, # ^ |   -8 Glad to hear that my friend man_of_code has strong maths.
•  » » » » 3 weeks ago, # ^ |   0 Yes, I misunderstood :facepalm:
•  » » » » 3 weeks ago, # ^ |   0 Yes true
•  » » » 3 weeks ago, # ^ |   +15 Unfortunately, Lena's emphasis has changed and now she spends less time on programming. I do not think that the experiment failed — she studied many programming concepts from scratch, continues to solve, and moves forward mainly through problem-solving. Rather, it only confirms the idea that the most important aspect is motivation, which helps diligence. She solved more than 500 problems for now. I think that it is the programming technique that is already quite stable green, but the lack of math background and difficulties with olympiad ideas prevent rating increase. I think that Lena should not pay significant attention to the rating graph and simply move forward in solving problems, understanding the main topics, and increasing the competitive experience.
•  » » » » 3 weeks ago, # ^ |   0 idk if it applies to everyone, but in my case, as a guy who started out cp with 0 math background(not exaggerating, I didn't even know algebra), going through a course on logic and proofs impacted my thinking significantly(made it better of course). I've often used proof techniques during contests to prove facts about possible solutions(of course you need to know a little bit of theory too). So far I've managed to peak expert within a year. As for the resources I used, I grinded through "How to prove it" by Velleman, which took me a few months.
 » 3 weeks ago, # |   +27 Thanks for sharing your experiment Mike!I agree with not explaining super detail about certain things, i have been there myself and tried to teach one of my students that way. I think it makes them feel more "free" to experiment and to less care about how the code could go wrong, which is good for learning in the beginning.I find that your several points about the experiment in this blog remind me that i miss something when i teach nowadays, that's why i feel grateful and lucky enough to be able to find this blog post from year ago.
 » 3 weeks ago, # |   0 Wish everything goes well with the learning program!
 » 3 weeks ago, # | ← Rev. 2 →   -11
•  » » 3 weeks ago, # ^ |   +12 Because the outcome is not known?.. I know people who could not grasp a notion of variable, when explained by experienced programmers.Learning methods are quite important. My first teacher was not doing a good job, I could not understand the loops as she explained it in a way that left me wondering "what is the meaning of going in a loop, you do not get anywhere apart from the starting point".
 » 3 weeks ago, # |   +7 Apparently, the girl must have donated huge amount on 10th anniversary.She owns Codeforces' tee, cap, hoodie and stickers.
 » 3 weeks ago, # |   0 I strongly believe that "Teaching is more than imparting knowledge, it is inspiring change. Learning is more than absorbing facts, it is acquiring understanding." ~ William Arthur Ward.