JavaRush /Java Blog /Random EN /One language to rule them all

One language to rule them all

Published in the Random EN group
There is a language that lies beneath every layer of code, in any programming language. And he waits to be discovered... Translation and adaptation of an article by Eric Girois from the Better programming community on Medium. One language to rule them all - 1When I wrote this article, the number of search queries in the style of “what programming language to learn” exceeded 517 million (!). Each page from the search results list tells about the advantages of a particular language over others, and in 90% of cases you will be recommended the same thing, like Python, JavaSctipt (or something from the top 3 authoritative ratings of language languages. The current rating for July is here ;) Let me be bold and officially disagree with all 517 million results and say that the first programming language you should learn is logic . It's not enough to just know how to write code. The market is overcrowded with graduates of various courses, which is why the position of junior developer has essentially ceased to exist. To succeed in these realities, you need not only to write code, but also to have a logical mind.

My first computer science lesson

My first acquaintance with computer science happened in an elective class in the tenth grade. I came to class and felt a feeling of delight: there were a bunch of boxes of ice cream and jars of syrups in the classroom. When we took our seats, the teacher announced: “Today we will make sundays ( a dessert made from ice cream and syrups - editor's note ). But on one condition: you need to write down exact instructions for preparing the dessert, and I will follow them.” “ No question ,” I thought, “ it will be easy .” In just a minute, I jotted down the perfect instructions: Place three scoops of raspberry ice cream in a cup Pour two tablespoons of chocolate syrup into that cup Add whipped cream to the cup Add sprinkles and a cherry to the top of the sunday Then my teacher—acting as the “computer”—followed exactly instructions, she performed the most caustic performance I have ever seen. She began to furiously “attack” the cardboard box of ice cream, but the durable lid remained unharmed. “Okay, first take off the lid,” I said, hoping to get dessert quickly. “You failed to write the instructions correctly for me, so unfortunately I couldn’t make Sunday NEXT for you!”

Fast forward to attempt #2

Open a carton of raspberry ice cream by removing the lid Place three scoops of raspberry ice cream in a cup Open the chocolate syrup and add two tablespoons to that cup Open the whipped cream and add some to the cup Add sprinkles and a cherry to the top of the sunday I was confident I had nailed this one once. The teacher took off the lid, scooped up three scoops of ice cream and put them in a cup. Finally, my Sunday is about to be ready! She then opened the chocolate syrup and put two tablespoons into the cup. But not two spoons of syrup - just spoons, without it! My instructions were again not precise enough. When it was all over, I received a cup of ice cream, two metal spoons, a ton of whipped cream, and about 300 scoops of sprinkles. It seems that at that moment everything became clear to me: a computer is an entity that is guided by pure logic. He doesn't understand the context and doesn't make assumptions. He follows a strict set of instructions and follows them to the letter. The final instructions for making the Sunday were terribly long-winded, but it was necessary: ​​If not already opened, open the packaging of all of the following items: Raspberry Ice Cream, Chocolate Syrup, Toppings and Whipped Cream Take a cup from the shelf and place it in front of you Take an ice cream scoop and, One at a time, scoop and place three scoops of ice cream into a cup. When everything is done, put the spoon on the table. Grab a chocolate syrup spoon if you don't already have one. Then take a spoonful of chocolate syrup and pour it into a cup. Do this action twice. Place the chocolate syrup on a shelf when done. Turn the bottle of whipped cream upside down and press the button near the spout of the bottle with your finger for three seconds, then return the bottle to its original position. Sprinkle 40 granules of sprinkles on top of the ice cream and chocolate syrup in the cup, then return the sprinkle shaker to its original position. Remove one cherry from the cherry jar and carefully place it on top of the sunday. Give the student the Sunday and dessert spoon. The last command in the instructions was very important, because without it the teacher began to eat Sunday herself. This is the reality of programming - you need to give the most precise instructions to the computer. In essence, all programming languages ​​are made up of instructions.

Careers in Software Development

Software development is at a stage in its development where talking about it as a separate industry seems too general. And the position “software developer” sounds vague in light of this. Two developers with different skill sets may be equally in demand in the job market, which suggests that a successful career in development requires more than just programming skills. Experienced developers have a common trait that is separate from programming - logic . The best developers are strong at critical thinking. This is significant because most software development projects are poorly documented patchwork nightmares. It will take someone with critical thinking to collect all the data and fill in the gaps. Therefore, those specialists who are not able to connect the facts into a single whole are trailing behind. All this leads to another very important statement: The fundamentals of computer science - both now and in the future - are primary. They are more important than the ability to write code. Popular languages ​​come and go. Frameworks are becoming obsolete, and companies are responding to changing market demands by combining the stack of technologies used. What remains unchanged? Basics of the basics.

How to develop logical thinking

Logic and critical thinking can and should be developed. I advise you to pay attention to the following:

1. Study the effectiveness of algorithms in runtime environments

Known as Big-O notation is used to describe the complexity of algorithms. If you are able to evaluate your code in Big O terms and analyze the number of steps performed versus the time spent, consider that you have taken the first step in the right direction.

2. Learn data structures

Data structure is the basis of every complex program. Knowing which type is best to use in which case is an important skill. Data structures are directly related to the complexity of algorithms, because choosing the wrong structure can kill the program.

3. Read/watch/listen

Well, to understand the basics, read books about design concepts, best practices, and coding style. Those who are learning programming are highly recommended to read:
  • “Object-oriented design techniques. Design Patterns” (E. Gamma R. Helm R. Johnson J. Vlissides),
  • “Refactoring. Improving existing code” (M. Fowler),
  • “Perfect Code” (S. McConnell)
  • “Clean Code” (B. Martin)
  • “Pragmatic programmer” (E. Hunt)
  • “Algorithms: construction and analysis” (T. Cormen, C. Leiserson, R. Rivest and K. Stein)

4. Practice!

You can't become a good cellist without hundreds of hours of practice. Daily practice is the key to programming success. Today there are a lot of online platforms where you can find thousands of tasks that require an understanding of data structures and algorithms (HackerRank, LeetCode, CodeWars and others).
Java programming problems, from simple to complex, are available on JavaRush. There are more than 1200 of them in the course. And also mini-projects and task-games .
For me, the most effective way to work with such platforms is to think of a unique approach to the problem and post your solution on Github. Then look at the top solutions to a similar problem and analyze the approaches of other programmers. This brings us to our final tip:

5. Analyze other people's code

The main mistake in learning programming and in the initial stages of work is self-isolation. Software development is a field that largely depends on teamwork. We create standards together, make mistakes, and over time (again, through trial and error) we figure out what works best. Taking the time to read the code of experienced developers will pay off. Just make sure the code is actually good.

Conclusion

Personal advice: never be ashamed of what you don’t (yet) know. As stated above, this industry is huge, the number of languages ​​is incredible, and there is a sea of ​​information. It takes a lot of time and effort to form at least a general idea of ​​programming, even more to gain experience, and many times more to become a real pro. When I finally succeed, I'll let you know :)
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION