CodeWrite your story
It's easy to create functions, but it's far more difficult to do it correctly. Poorly designed functions are frequently rewritten, have difficulty adapting to new requirements, and are poorly tested. We'll look at key methods of how to correctly share responsibilities, build function chains, and design function signatures in this article. The article's content is based on common mistakes made by Hexlet students in their projects.
According to our students, projects are one of Hexlet's strongest features. These are special tasks close to the real world, done outside the Hexlet environment on your own computer.
This article outlines how projects work, how long they take to complete, and why poor code won't work. The text contains our students' impressions of working on the projects.
There are two approaches to writing code: top-down — descending, and bottom-up — ascending. In the first case, high-level logic is implemented first, followed by diving into the details. In the second, everything is reversed — the details come first, and then the general logic.
These approaches are frequently contrasted in books. It is considered that if one approach is chosen, then the second one is excluded. However, this is not the case. In the article, I will explain why following only one direction causes problems.
In dynamic languages, there are two main approaches when designing the input parameters of functions: the first is to use explicit, positional arguments, and the second is to pass a structure containing everything that the function expects. In real code, both explicit and implicit methods of passing arguments are equally common, and, at the same time, it’s not always clear which one should be chosen for a given function. That's what we're going to discuss.
All of our students come to Hexlet with a certain amount of educational experience, at least at school or university. This experience forms not only the idea of what the learning process should look like but also their very attitude toward learning. Unfortunately, sometimes this experience acts as a kind of "brake" on development - formed habits and attitudes often prevent people from seeing alternatives. In this article, we'll take a look at a few common student attitudes about learning and try to see how true they are.
During learning, there will be times when your expectations do not match reality, and you don't see the desired result. There can be many reasons, but among them are those associated with cognitive distortions. This is the type we're going to talk about.
Each of us has our own ideas about how learning should be. They are based on our past experiences, other people's stories, and certain ideals.
These perceptions often differ from how the process of becoming a good developer actually works. The student may feel that they are being taught incorrectly or burdened with unnecessary knowledge. Everyone's had an experience like this at school or university. Hexlet is no different. In this article, I will explain some theoretical basics of the learning process and give you a different perspective on what is going on around you. This will help you to improve your learning and cope with difficulties more easily.
From zero to a developer. Refunds in case you won't get a job