As a programmer who has been in the business for nearly 10 years, I would like to offer some advice to new programmers. These are some of the things I wish I had read when I graduated, and I hope they help you become a better programmer.
To sum up briefly, there are seven in total:
- To keep healthy
- Hobbies outside of programming
- Continuous learning
- Deal with mistakes correctly
- Don’t get bogged down in roles
- Show your creativity
- Practice hand speed deliberately
Let me elaborate on each point.
To keep healthy
Three inches of gas in thousands of use, once impermanence everything rest.
— Jin Ping Mei
The first thing to say, of course, is health. Without this capital, everything is out of the question.
Sitting for too long, not exercising, not getting enough sleep, not being hydrated and sitting at your desk for too long are all bad for your health, and unfortunately, programmers have all of these. Many programmers often have a variety of diseases at a young age: cervical spondylosis, lumbar disc herniation, hyperlipidemia/hypertension, gallstones, tenosynovitis and so on, the news about programmers overwork is to stimulate our nerves every once in a while.
Studies have shown that staying in the same position for long periods of time — whether sitting or standing — can be harmful to your health to varying degrees, and that the damage can’t be undone later. In other words, if you sit for eight hours during the day, hitting the gym for an hour after work won’t help. The same is true of “standing office”, which has been very popular in recent years. If you stand for too long during the day, it will put great pressure on your knee joints, which will also damage your health. The recommended approach is to code for 30-40 minutes and then get up and go for a walk, have a glass of water, look out for a while, and talk to your colleagues.
I know, as a programmer, I’ve often had those moments when writing code so hard that I don’t even want to go to the bathroom. But develop good habits for your long-term health.
Get rid of bad habits
In addition to staying in the same position for long periods of time, many programmers have all sorts of bad habits. Such as:
- smoking
- drinking
- Sugar addiction (carbonated drinks, other drinks high in sugar)
These habits are often called pick-me-up. Everyone knows that programmer overtime is the norm in the industry, and malaise is the norm. But none of these so-called pick-me-up methods actually work. These bad habits are, in the end, an addiction, no different in nature from marijuana. The good news is that you can completely break these bad habits, just stick with them for a while and let the “addiction” go. (Like real addictions, they’re more about mental dependence, and once you get over your mental dependence, you’re free.)
I also smoked heavily in college and in my first few years of work. When you get tired of writing code, you go outside the office to smoke one. The temporary hangover from carbon monoxide poisoning is a bit of a relief, but coming back from smoking a cigarette to write code is even more tiring. Finally one day, I couldn’t stand it anymore and decided to quit smoking (as many people have done countless times before). When THE craving strikes, I go for a glass of water and stand at night. The first 3 days were the hardest, but after a week I could almost control the desire to smoke, and then it became more and more relaxed, and I didn’t feel the effect of the addiction on me at all.
The same goes for fizzy drinks and sugary drinks. In nature, where diets were already scarce, our ancestors encountered energy-rich sugars (such as honey) and naturally consumed them in large quantities. The sugar-craving gene is still at work today, but the difference is that we can now easily consume more sugar in food and drinks than our bodies need. These sugars can cause many health problems, such as obesity, high blood sugar, coronary heart disease and so on.
Most of the time, we want to drink more of the mental dependence, also referred to as “addiction.” Kicking a sugar addiction is a bit harder than smoking or alcohol because there are many pitfalls in life, such as yoghurt, bread, biscuits, fruit and so on.
The coke Zero trap
Cigarette packages now have tar content printed on them, 10mg and 15mg. Tar content is an important factor that affects the taste of a cigarette. The word “cotton” usually means lower tar content, which makes you feel healthier. The catch, however, is that one cigarette doesn’t feel good enough and the nerve stimulation isn’t strong enough to drive you to smoke a second cigarette, which ends up sucking in more tar. One cigarette with 15mg tar would have given you the craving. Now two 10mg cigarettes would have had the same effect, equivalent to 20mg.
The same goes for Coke Zero, the sugar-free sweetener that triggers sugar cravings. You need to eat more sugar to counteract this illusory craving and become less healthy.
Without these hobbies, one might say, what’s the point of living? Trust me, when you get rid of these “addictions” and have a healthy body, you can truly enjoy being alive. The morbid comfort you feel when you are in the grip of these addictions is illusory.
Some advice
Regular exercise can relieve discomfort in the cervical and lumbar vertebrae, speed up metabolism, and consume excess energy that will be deposited. For example, sports that are relatively accessible and easy to learn:
- Yoga/Pilates
- Table tennis
- Jump rope
Choose an exercise routine that works for you and make it a habit (like doing yoga twice a week or playing ping-pong for 30 minutes in the middle of the day). If there is a conflict with your job, such as a requirement to work long nights, consider changing your employer.
Take up a hobby outside of programming
If you asked different people to tag and rank programmers, nerds would be in the top three. Programmers are easy to spot at any party: smart, bespectacled, quiet, a bit dull, easy to catch a cold in conversation, etc. It’s no wonder, then, that it’s easy to talk yourself to death by delving into technology for a long time, immersing yourself in the binary world of black and white, and being inquisitive.
I recommend that new programmers find a hobby outside of programming that expands their social circle and allows them to spend their weekends in a different way (instead of staying home and writing code). Second, it can help you become a better programmer.
You’ve certainly been there: you’ve had a programming problem that’s been bothering you for a long time, you’ve been trying to figure it out, you’ve gone for a walk, or you’ve been talking to someone, and suddenly the answer comes to you in your head. In fact, the way our brains work is so amazing that a completely different context can give the brain a good rest and often produce a 1+1>2 effect. Listening to music or playing table tennis when you’re tired of writing code can relieve fatigue and even open your mind to new ideas.
Some advice
Learn a non-programming skill such as:
- Musical Instruments (e.g. Guitar, drum set)
- Painting (drawing, gouache, watercolor, etc.) or calligraphy
- Production of food
- A particular martial art (boxing, Muay Thai, karate, etc.)
These seemingly unrelated hobbies can help your brain rest. It’s also important to note that you don’t have to be an expert in any particular hobby, and don’t have the added stress of worrying about not playing well, not being able to draw, etc. It’s okay. It’s just a hobby.
I have tried many different hobbies myself, such as sketching, calligraphy, etc.
Continuous learning
Software development is a lifelong learning industry (almost every industry, if you don’t want to be the kind of person who waits to die). When I graduated, SSH (Spring Struts Hibernate) was the mainstream of Web development and jQuery was the new frontier. A few enterprises started experimenting with Adobe’s ActionScript, but the language quickly faded into obscurity. Backbone.js, based on jQUery but integrated with MVC concept, provides higher abstraction capabilities and becomes the first choice for developing “large” front-end applications. Next, the big and comprehensive Angular.js makes front-end development as robust as back-end development with built-in bidirectional binding, dependency injection, and comprehensive testing support. Later, the virtual DOM and Reactive React stack subvert the front-end development mode again. It is not yet known where the next disruption will occur, but it is certain to happen.
In addition to the infrastructure, a variety of build tools have emerged, from maven, rake, to Nodejs-based Grunt, to gulp, to Webpack, and finally back to NPM Script.
Programmers are caught in the middle of technological evolution. As a programmer, you need not only a solid grasp of the basics (operating system principles, computer networks, data structures, algorithms, etc.), but also a strong ability to learn quickly and a willingness to keep learning, which is probably more important.
Some advice
- Reading a book
- Learn new techniques via video/text tutorials etc
Beginners are advised to set aside an hour each day to read, and more on weekends. ThoughtWorks has a reading radar and a great list of classics. There are also online tutorials such as Tutorialplus and Egghead that are well worth checking out. If you have a new and interesting technology, try it yourself.
About English Proficiency
It is no exaggeration to say that English proficiency is the beautiful line separating good programmers from mediocre ones. You have a good command of English, to learn from the database will immediately expand hundreds or even thousands of times: vast amounts of high quality free tutorials, video, and outstanding Chinese tutorial, as they are simple, easy to understand, humorous, only in Chinese will be less, and generally always lags behind the English version.
English proficiency will not only help you familiar with the introduction of various front-end libraries, CSS frameworks, etc. Also can let you learn the world programmer to each kind of library evaluation, frame use experience, step on the pit and so on.
When I joined ThoughtWorks in 2012, I stumbled during an interview and couldn’t speak. By the end of the six-month probation period, I was already able to go on business trips to Australia and chat with clients’ OPs. In August 2013, IN Pune, India, I was able to give lectures in English to students from all over the world.
In addition to more smooth communication and discussion with people from different cultures, I can obviously feel that the speed of learning becomes faster and more efficient.
One of the more effective methods I’ve practiced myself. I spend two hours a day (one hour in the morning and one hour in the evening) watching videos on Voice Of Australia. I will dictate every sentence in the video and repeat it if I can’t hear it clearly. Some sentences may be repeated ten times. By the end, I understood every sentence in the video and was able to write it out as I listened. After persisting in this way for almost three months, I could basically understand the clarification of customers’ needs and fully understand the points discussed by everyone in meetings.
In fact, the trick is to persist, these three months, two hours a day, I did not break a day. After that, it’s easy. Just listen and talk as much as you can.
Another way to improve is to translate a book. I would also recommend that you work with another experienced colleague, who can supervise each other and look after each other. It’s not easy to give up halfway.
Deal with mistakes correctly
Professor Carol Dweck of Stanford University proposed the famous Mindset theory through some experiments and subsequent studies. In short, she found that different people have completely different attitudes towards failure: There are people who are afraid of failure, and when they fail, they become unacceptable and tend to deny themselves and affect further attempts. Professor Dweck calls this type of person an artificial Fixed Mindset. The other type of person “loves” failure, sees failure/mistakes as a way of learning, and is more focused on the process than the outcome, which Professor Dweck calls a Growth Mindset.
Dweck said in his talk that by shifting to a growth mindset and focusing on learning from failure/mistakes, people can achieve their potential and achieve desired results more easily.
Many new employees are afraid to try and are reluctant to let colleagues know their weaknesses. Such an attitude will lead them to choose easier jobs so that they can avoid exposing their weaknesses. Over time, it can become a vicious cycle. In fact, enterprises generally have low expectations for newcomers, and there is a tolerance for their mistakes. Newcomers should have the courage to admit their shortcomings, try new things, make mistakes and learn from them.
Admitting your flaws is a tough thing to do at first, but after you’ve tried it a few times, you’ll realize it’s not that scary. You’ll come to enjoy the joy of focusing on learning without any baggage.
Don’t be limited by the role
Du Liang described peasants in northern Shaanxi in romance of Blood:
Zhong was surprised to find that in such a poor and harsh living situation, the villagers rarely frown. They are always optimistic and their favorite topic of discussion is eating and drinking. In terms of food, since they had never seen anything better, they insisted that sour dumplings and chili dumplings were the most delicious food in the world. If anyone suggested that there were many better things in the world, everyone would agree that the person was too ignorant of the world, and that he must have never eaten sour dumplings, so that he was careless.
Just as sour dumplings are not the most delicious food in the world, development is not the best job in the world. Any good, healthy products, projects need different roles to cooperate and work together. If limit oneself only in programmer this one role, time is long rather can have narrow-minded.
As a programmer, I can not only go upstream to explore the sorting of requirements, the analysis of users’ pain points, and the mining of business value, but also to the downstream, such as test writing, product release, operation and maintenance monitoring. With a broader vision, it is possible to have an overall understanding of the product, and it is easier to do a better job as a programmer.
As a newcomer, it is good to be able to play the strengths in their own areas, but if only limited to their own areas of expertise is too weak. If you have a lot of experience on the front end, in addition to sharing your experience and knowledge with others, you can learn from other characters what they are good at, such as test automation, SBE, etc. Back-end learning of high performance, high availability server technology, database design and optimization, API design, etc. Learn operation and maintenance skills from DevOps, automate provision skills, and more.
These different skills not only broaden your horizons, but also prepare you for different roles and opportunities in the future. In my case, I started out as a Java developer and then started doing front-end development for products. I switched jobs and went to Linux to write services in C. When I joined ThoughtWorks, MY real job was development, but I also worked for a while as QA on projects, doing simple design on some projects when UX wasn’t around, lecturing in the tech community, and consulting on some client sites. I find it very interesting to switch between different characters, and I enjoy the whole process.
Show your creativity
The ability to describe an idea, complex concept or idea succinctly and accurately is a very important skill. I’ve seen too many programmers who are taciturn, speak quietly and nervously, and have trouble getting their ideas fully expressed even when they have a good idea.
But this ability can be developed by prototyping:
- drawing
- Static prototype
- A paper prototype
As the saying goes, a picture is worth a thousand words. You just need to learn a few simple drawing skills to greatly improve your presentation skills.
It is an advantage for programmers to express ideas quickly by using static pages (HTML/CSS/JS), mock data, etc. You can use static data, data files, etc., to make interactive prototypes quickly through some simple code, and then improve gradually by constantly confirming with users. This approach avoids too much waste and delivers customer value as early as possible.
A prototype is not limited to a sketch, a working static page, or a clear, concise presentation. The prototype based on PPT can also be used to analyze the current product pain points, compare the advantages and disadvantages of the scheme, show their own views and so on.
Paper prototyping is another low-cost way to quickly communicate and prototype:
(Image from my colleague Haisheng Liu at ThoughtWorks)
Hand speed
Whether programmers require fast hand speed is a controversial issue. Supporters say it’s a basic skill, that every programmer should type fast. The naysayers argue that the value of a programmer is to think and solve problems, to be fast, and that it is better to hire a typist. My personal opinion is that good programmers should have fast hand speed (including, but not limited to, typing speed).
I have organized many hand-speed workshops in The Xi ‘an office of ThoughtWorks, such as Three Days page, Project Lightning, etc. The basic principle is to practice a specific “task” over and over again.
Recently, I gave two new students a simple assignment:
Photo credit: dirbbble.com
The basic requirements are to implement the page as quickly as possible, with a little interaction (e.g., the checkbox after selecting a contact shows the selected status, the number of remaining Invites reduced, and so on). The first time they did it took over 5 hours (with setup, node.js, NPM package, etc.), the second time took 2 1/2 hours, the third time took 1 1/2 hours, and the fourth time took 50 minutes.
Practicing the same page over and over sounds like reworking, but there are a lot of things that can be linked to:
- Command line familiarity
- Use of shortcut keys
- Use of search engines
- The use of Stackoverflow
When you get really good at it, you’ll have time to think about optimizations, such as how to extract template projects (so you can do the same thing much faster next time), how to streamline DOM structures, and how to use command-line tools to help you speed things up. Hand speed is the main premise, without speed, all optimization is in the mind of the imagination, can not be true to the ground.
conclusion
To be a good programmer, of course, the first is to have a good body. Also take up a hobby outside of programming, which will help you live like a normal person (as opposed to the traditional engineering nerd). Programmer is a job that needs to be continuously learned and enriched. In the process of learning, English ability can help you learn faster and more effectively. In addition, you can correctly deal with the mistakes that will inevitably be made in the process of learning, and treat every mistake as an opportunity to learn.
Development is just one part of the software development process, and programmers need to expand their horizons and work with other roles to ensure product delivery. In daily development, programmers also need to express their ideas and ideas quickly and accurately. Finally, getting your work done faster gives you more time to think and improve your inefficient ways of working.
Author: Anonymous
Source: 51 cto