CodeWrite your story
Is it worth using libraries for the sake of a few simple functions? Wouldn't writing them yourself be easier? These questions regularly come up with novice developers. They are asked by almost everyone who does Hexlet projects. Let's take a closer look.
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.
From zero to a developer. Refunds in case you won't get a job