Hello! Three months ago I was taken to work in a small organization, for the needs of which you need to write an application (for Android, I write in Java). At the interview, no special questions were asked. They said, they say, the application will be simple, we will learn together and so on. My leader, a C # programmer, he gives me tasks. Because I have an extremely weak programming base, I just trust in Google. Over time, understanding begins to come, brains work. Those. We are constantly working with the search for code, its reading, analysis, which is not immediately clear in the docks, books, articles. Once I even found a programmer in the city, and I asked for a meeting where he wrote me a piece of code that saved me from being fired. I even registered here for the stack flow ... But I am writing a frank shit. Head scolds me for low speed. And it can sometimes take punitive measures, although not fatal. I am really working inefficiently. The conclusion arises, it is necessary to increase knowledge of the java core. And to write, write, write ... But after a working day, if I honestly work it out, frankly without messing around, then my brain cannot perceive the information in the right amount. I dream about the code at night already. More often, my working day is 12 hours, during which I manage to squeeze myself like a lemon, spend time on distractions and write something, or rather “ off-duty ”. The project is moving, growing and every day I understand that this is the Tower of Babel.

I need your advice, able programmers. What is your life experience. How to stop shit ?? Thank!

Blocked by Nicolas Chabanovsky ♦ 5 Sep '17 at 16:46 .

This question has been preserved because of its historical importance, but it is not regarded as a good question on a topic relevant to the specifics of this site , therefore we ask you not to consider it as confirmation of your ability to publish similar questions. This question and its answers are frozen, they cannot be changed. Read more: help .

Read more about blocked messages here .

Transferred from ru.meta.stackoverflow.com Sep 5 '17 at 16:45 .

This question was originally posted on the discussion forum, support and innovations for the site programmers.

  • four
    I will go against the other answers and say that the first and main step - awareness - has already been taken. And add separately:> The head scolds me for low speed. And it can sometimes take punitive measures, although not fatal. It should be understood that, of course, the ideal plan is not being fulfilled, but at least not you alone are to blame, if at all. The head can scold you at least a hundred times, but resource planning and building a plan are within his competence. - etki
  • four
    About the experience already written. I will add only that do not overdo it with work. In humans, there are temporary periods of activity and decline, which also affect the work. Lack of rest and breaks, on the contrary, can negatively affect work, as the brain still processes the information obtained during rest without your direct participation (hence your dreams are possible). If you force yourself for 12 hours every day, then closer to the year you will get a sharp antipathy and the so-called “burnout syndrome”. - Alex Krass
  • @Alex Krass thanks for the comment, it is useful to remember this - Garf1eld

3 answers 3

Yes, in general, nothing. The ability to write literate code will come with time, if, of course, to practice regularly. For a newbie (especially when it comes to just three months of experience) shit-code and the slow speed of work is quite a normal picture. He simply has no place to know how to write code correctly and quickly (unfortunately, this is not taught even in the institutes). Over time, if a beginner has a head on his shoulders and a desire to develop, he will accumulate positive and negative experiences, learn how to correctly allocate his time and efforts, and little by little this process will move from the dead center. The main conditions are regular practice and self-study. The picture you described is very well known to many (reading your lines, recalled that almost the same thing happened to me) - disruption of work terms, regular bugs, love of crutches, ubiquitous shit, scolding from the bosses. Silver bullet is not here, it is growing pains. It is cured with time if the above conditions are met.

In any case, a good help will be picking other people's sources (GitHub to your services), reading the appropriate literature ( "Perfect Code" by McConnell or "Refactoring and improving the existing code" by Fowler). Take an interest in such a thing as refactring - the study of its principles can help in understanding how to write code. If you are writing in C # in Visual Studio, Resharper can be a great helper for you. It is able to see a thousand potential problems in your code and simply facilitate the work. It is also very beneficial to have a mentor who could show and explain something. Although this is usually more difficult.

    1. Understand how to write in Java correctly: Thinking in Java , Effective Java .
    2. Write the code.
    3. Read about good code: Clean Code , Beautiful Code , Code Complete , Implementation Patterns .
    4. Write the code.
    5. Read someone else's good code. Explore the sources of popular open-source products. Of course, you cannot immediately distinguish good code examples from bad ones. But it will give you food for thought and role models (even if not the best). It turns out to be a kind of free experience: you did not have to waste time on developing and writing, you are already looking at the finished code.
    6. Keep writing code. Re-read material from points 1-3. Throw out a bad code. Write more. Do not be afraid to refactor.
    7. It will be great if you can learn from other programmers and someone will adequately criticize your code, for example in an open-source project.
    8. Read about design, SOLID principles, patterns, testing. Gradually, you will learn to distinguish a good class from a bad one.
    9. Return to your old code (even six months old). Consider what is wrong in it that you would improve. Lean further on this experience.

    That's what I am: the ability to write good code does not come spontaneously. It is necessary to accumulate a certain critical mass of experience only in order to begin to understand what is better and what is worse. Much faster this experience is gained in the environment of experienced developers, where you have something to compare your code with than in isolation.

    More often my working day is 12 hours, during which I manage to squeeze myself like a lemon

    I don't think it's worth it. Such work is the way to stagnation and disillusionment in the profession.

    Three months ago, they took me to work.

    And this is not a term at all. All ahead. The main thing is not to let the work bring itself to the "creative burnout."

    • +1 The truth is to allow yourself to work this way you have to be either indispensable or someone’s relative. No one will pay for the development of a novice programmer for too long. For this, presumably there are already years of the institute, perhaps schools. "We will learn together," I suppose that we will learn to write under the android together, and not learn to write at all. I do not think that such a job is worth holding on with all the forces, fearing dismissal, finance finances, but health is more expensive. - Yura Ivanov
    • @Yura Ivanov, just in case, I wrote "if I honestly work it out, frankly not messing around . " It often happens that the day merges into nowhere, I do not understand what. Of course, I do not play games. The problem is that 8 hours is not enough for me to move together, often. Just sometimes you have to work for wear. Well, even so, I want to grow into a programmer, so I endure. And everything is better than working as a loader) - Garf1eld

    1) read books, if it doesn’t reach the first time - read again and again, so that you know well the basic programming techniques and the language itself, so as not to write bicycles

    2) as much as possible to try to learn someone else's code (not govnokod)

    3) practice