At the time of this writing, the query “programming what language to learn first” gives 517 million search results. Each of these sites will extol one specific language, and 90% of them will eventually recommend Python or JavaScript.
Without long preludes, I would like to officially declare that all of these 517 million sites are wrong and declare that the language to be studied first is fundamental logic .
Just knowing how to code is not enough. The market is so saturated with graduates of institutes and courses that the position of the junior practically ceased to exist *. To succeed in today's world, you need to code and have advanced fundamental logical thinking.
* here and below, please remember that this is a translation, and the situation in the labor market of the author and in your country may be different (like other nuances), which, however, does not in itself make the original article worse - approx. trans.
My first acquaintance with computer science was an elective, which I took in 10th grade. On the very first day, having entered the audience, I was delighted to see a large number of ice cream buckets and various toppings in front of me. After everyone sat down, the teacher proclaimed:
“Today we will taste independently cooked ice cream. But with one condition: you must make a list of specific instructions on how to prepare the dessert, and I will follow them. ”
"Without problems," I thought, "this lesson will not be long." Somewhere in a minute I sketched a great recipe for the ice cream of my dreams:
- Scoop up and put three balls of raspberry ice cream in a bowl.
- Open the chocolate sauce and add two tablespoons to the same bowl.
- Add whipped cream to bowl
- Sprinkle it all with sugar sticks and put the cherry on top.
My teacher - “computer” in this nice metaphor - played a more sarcastic and literal than I had ever seen before. She began to poke eagerly a bucket of ice cream with a spoon for balls, without even touching the lid.
“Good, good, but first you need to open it!” I exclaimed, trying to get a treat as soon as possible.
“You did not write this in the instructions, but I could not make you ice cream. FOLLOWING!"
- Open raspberry ice cream by removing the lid
- Scoop up and put three balls of raspberry ice cream in a bowl.
- Open the chocolate sauce and add two tablespoons to the same bowl.
- Add whipped cream to bowl
- Sprinkle it all with sugar sticks and half the cherry on top.
Well now for sure there shouldn't be any problems. Just in case, I was convinced that all the ingredients for making my culinary masterpiece are open.
The teacher removed the lid, scooped up and put three balls of ice cream in a bowl. “At last, my beautiful ice cream began to turn into reality!” She then opened the chocolate sauce and added two tablespoons to the bowl. I didn’t “add two tablespoons of chocolate sauce” - you don’t think - she, of course, put the spoons in the bowl. No sauce in them. Again I did not bother to paint everything exactly. After the rest was done in the same way, I got a bowl of ice cream and two tablespoons, barely noticeable under the sea of whipped cream. On top was a pair of sugar sticks.
It seems that at this moment it finally reached me: computer is logic in a vacuum. He does not know about the surrounding circumstances and makes no assumptions. He performs only well-defined instructions and follows them word for word.
My end result was the result of a long but necessary series of trial and error:
- Open, if not already done, each of the following packages: raspberry ice cream, chocolate sauce, whipped cream, sugar sticks.
- Get the bowl and set it before you.
- Take a spoon for ice cream and one by one put three balls of raspberry ice cream in a bowl. Put the ice cream spoon in place.
- Take a jar of chocolate sauce, scoop the sauce and pour the contents of a tablespoon into a bowl. Repeat the action with the sauce being scratched and poured one more time. Put the spoon and jar in place.
- Take and turn the package of whipped cream upside down and, holding it over the bowl, pour ice cream on them for 3 seconds, then return the package to its place.
- Take a jar of sugar sticks, pour out about forty sticks in a bowl and put the jar in place.
- Take one cherry from a bowl of cherries and place it on top of ice cream.
- Give the student a bowl of ready-made ice cream and a spoon.
The last point was especially important, because without it, the penultimate time the teacher just started eating my ice cream.
But this is programming. Strenuous creation of a thorough set of computer instructions. Essentially, this is what each programming language comes down to — instructions.
Programming has reached the point where it is difficult to discuss it as a single industry, just as it is difficult to use a single word “programmer” as a job description. Two developers can be equally demanded by the market, knowing completely different languages, and therefore, the ability to develop is more important than knowledge of a particular language. A universal attribute common to all successful developers is the fundamental logic .
The best programmer is able to look at the code from a new angle. And this is fundamentally important, because most software products are a collection of undocumented fragments of bad code. They constantly need to gather together, closing gaps as needed. People who are not able to connect disparate points with a single line will have to be on the sidelines forever.
All this brings me to another declaration, this time a Bold: fundamental knowledge has always been and will be paramount for the programmer .
Languages come and go. The frameworks become obsolete, and companies respond to demand by changing the stack of technologies used. Is there a thing that will never change? Yes - fundamental knowledge, which is why they are called fundamental, that they are the basis of everything!
If you are looking for a starting point to improve fundamental logical thinking, try starting from here:
Also called Big O, “algorithm complexity” refers to the dependence of the time to execute a program on the size of its input data (n) . Keeping abreast of the algorithms used is an important step.
Data structures underlie any modern program. Knowing which structure to use in which case is an independent discipline. Data structures are directly related to runtime complexity and choosing the wrong structure can lead to fundamental performance problems. The search for an element in an array is O (n) , which indicates the high cost of using arrays as input. The hash table search is O (1) , which means that in this case the search time of the value does not depend on the number of elements.
People came to me for an interview, claiming to search the array faster than the hash table. It was the surest sign that you should not hire them - know your data structures.
Sites such as Udemy , Pluralsight and CodeAcademy are a great choice for learning new programming languages. But for the basics, refer to books on general principles, practices, and coding styles. The most recommended books are Design Patterns, Refactoring. Improving Existing Code ”,“ Perfect Code ”,“ Clean Code ”and“ Pragmatist Programmer ”. Finally, each developer must keep a copy of Algorithms at hand.
You can't make scrambled eggs without breaking eggs. Sites such as HackerRank , CodeWars , CoderByte , TopCoder and LeetCode offer thousands of interesting tasks to test knowledge of data structures and algorithms. Try your luck in solving the problem you like, post your version on Github, and then look at how others approached it. Which brings us to the last point:
The biggest mistake that you can make when you go along the development path is to make this path alone. Software development is largely a team work. Together we create standards, together we make mistakes and, in spite of all the failures, we are getting better together. The time spent on reading someone else's code will pay off a hundredfold. Just make sure this is a good code.
Well, the best advice I can give is never to be ashamed of not knowing something yet. As already mentioned, our industry is huge, and the number of technologies is immense. It takes a lot of time and effort to build the big picture, even more to become a professional in something concrete, and an order of magnitude more to hone skills in their field. I'll let you know when I get it myself.
Source: https://habr.com/ru/post/456342/