I want to talk about what should not be done when you are working on a freelancing project. I think in many respects this also applies to office workers, but I have no relation to them yet.
Never use technology you have not learned - during its use there may be a lot of problems, the search for the causes of which can take a lot of time. Thus, use only those technologies that you know and know how to use.
Do not reinvent the wheel . At one time, I really liked the idea of ​​using template engines. Actually, I did not look for ready-made solutions and wrote my template engine for a month, the customer was unhappy and refused my services. By the way, I later used my template in 3 projects, but when I met Smarty I immediately pushed it aside. Now I turn to plain php (in my case Zend_View + Zend_Layout), but in new projects I still use Smarty. Therefore, look for ready-made solutions (classes, functions), it can be faster than writing your bicycle, and five minutes of googling can save you from unnecessary work for anyone in a month .
Do not stop when there is a desire to “do this differently”, when “this is it” works well. This can lead to many hours of googling, and during this time you could write a lot of code!
If you remember exactly what “you have already done”, but don’t remember exactly where and when, and “this” takes quite a bit of code in volume, then you shouldn’t search, write again , rather than search through the heaps of old sources. (Speaking of a bicycle: of course, you need to understand that the harder a function is, the longer it will take to write it and, perhaps, it is better to look for an already implemented version of it :))
(This already has little to do with the code, but it treats the process very well.) Do not watch videos (TVs, youtube and so on ...), do not read Habr, Bash, do not climb social networks, and so on. If you listen to music (or radio) and feel that it bothers you - turn off or select another music / radio station - personally, classical music helps me a lot, and rap I like very often is distracting during coding. So Do not do anything that can interfere with you or take up your working time - you can read Habr during the break.
Do not work a little - watch your working time . I now work no more than 4 hours a day. Yes, yes it is working, at this time does not include discharge into the toilet, drinking coffee and so on. In order to work at least 4 hours a day, I wrote a program that shows me how much I work, and how much is left: by pressing enter, the work stops / starts, and at the end of the specified period (4 hours) it tells me that it would be time and rest.
Do not work 24 hours a day . Give yourself time to relax - long work today can lead to the fact that tomorrow you will not be able to fully work.
This can be said my IMHO, i.e. conclusions that I made for myself.