Example: Junior is confused by where to put a new file/module/function in a frontend app and the app is built with Angular. Angular has Models, Components, Directives, Services, etc (I don't really use the framework, but same applies to Rails with MVC, Concerns, /lib, etc).
Learn your framework's constructs so you can frame your solutions in terms of the frameowork. You'll be more productive by reducing the scope of your decisions. Downside: you won't be able to find the 'best' solution to your problem - you are constrained by the framework's model of how a webapp should be built. This is ok, you are learning the ropes, so an increase in productivity is worth the constraint in freedom to choose.
First, imitate and understand why the framework does these things and what problems it means to solve. Once you've seen enough of these patterns/opinions (hmm maybe binding the view to a model manually isn't such a good idea, i've been forgeting and causing memleaks - hey Backbone days!) and have real life examples of where the patterns present problems, you'll be able to improvise/tweak/decide-yourself.
Read books/practice software design patterns and learn how to write tests. (Unit, integration, end to end)
I'd second this. "Junior developer" is generally just used to pay developers less.
Abstraction and encapsulation is overrated. Premature generalization is the root of all evil.
Knowledge is no substitute for experience.
You cannot google what you do not know it exists.
Don't decide too early. If you can postpone a decision that doesn't delay your overall work, then postpone it. You may have more data later to take the right decision.
Don't optimize too early (premature optimization). Always try first the simpler approach, you will finish earlier, get simpler code and find out that some minor optimizations or not at all are needed. You should always check this with real world data / scenarios.
2. Don't write clever code, write readable code. Participate in code golf or obfuscation contests to scratch the itch if you have one, but keep it out of production code, even if its a private project that you will never share with anyone; it will save you from yourself.
If you write something cool and you're thinking "oh yeah! I am such a Ninja!" then step back and decide whether it needs commenting to explain what it does.
If it does need commenting, consider whether you could rewrite it in such a way that comments are unnecessary. Assume your colleagues and future code maintainers are trainee ninjas at best.
I think Rob Pike's 5 Rules of Programming are better advice here -- in particular rules 3 through 5.
Of course its possible. People can shift gears in manual transmission without clutch by revv matching, but its not for everyday use.
Good one. Clever code is really tempting. It feels cool to do something in one line instead of six and call it a day. In many cases, the mature thing to do is to know how to do the cryptic one-liner, but write the six lines anyway for readability and comment them.
Try frontend, backend, write random Bash scripts, try multiple paradigms, try every language out there. Try multiple databases too. Don't just write toy stuff, write something substantial that takes you 2-3 weekends to complete.
All of the best developers I've worked with have mastered at least two languages, if not 3-4.
Will you necessarily use all that in the field? No, you might end up at a Python shop and decide you love programming Python. That's fine.
But you will gain so much perspective on what is possible in programming, and avoid getting stuck in the idioms of certain languages for the rest of your career. It will give you a great design sense. It will give you the ability to dive into any problem, in any language, and be successful.
That last sentence is part of my piece of advice: Try to add stuff (comments, logging statements, etc) to your projects that will make things easier in the future, either for you or other developers.
1- Find solace in the fact that "senior" engineers often spend a significant amount of time searching the web/stack overflow just like you do.
2- Have respect for the code that came before you. Be generous when passing judgment on architecture or design decisions made in a codebase you've adopted. Approach inheriting legacy code with an "opportunity mindset".
Learn to tear down abstractions instead of building them up. As a junior developer, it may be hard to get acceptance for removing layers, but add as few as possible. Somebody is going to come through later and need to understand what you've done, when the stack is deep, that's much harder.
Don't trust other people's code to do what the readme says. If anything claims it's lightweight, count the lines of code and see. If you use other people's code and it's broken, it's going to hurt your users and you're responsible.
On a people skills level, learn how to disagree without being disagreeable. Invite people to share their reasons for things with real questions, and listen to their answers -- while they're sharing you can discuss why to do it their way vs the way you want to do it. This is a good practice for when you are the senior person instructing the junior person as well. Often the senior person is going to make the decision, but having a discussion about it can make it easier to accept.
Don't do this for everything though. Choose your battles, don't be the person who fights everything; unless you're getting good results and people are happy changing everything.
Conversely, don’t spread yourself too thin. Try a lot of languages out then narrow it down to a few you find interesting and useful, then focus on learning those few.
This is one of the things that is dangerous about these code bootcamps you see. They are taught enough to write cogent programs for a given language, but the underlying bits and pieces of what make software tick is left out. There simply isn't enough time to truly learn the craft in a 6-8 week course.
I haven't seen this one so far (but haven't yet read all comments):
Whenever possible, try to avoid bugs. But, even more importantly: When given a bug report, FIX the damn bug. Don't:
- Shrug, mutter incomprehensible things and wish the person with the bug report goes away (yes, I've seen that. It infuriates me.)
- Say "that's not possible" (cf ). It is. It happened, no user makes this stuff up for fun.
- Say "that doesn't happen on my machine." Well done! Now make sure it doesn't on all the other ones, too!
- Say, "well, if you had configured it right,...". That's also a bug: Your documentation sucks. Fix it. Also make sure impossible/nonsensical configurations are visible (best done during startup, for example).
- Avoid commenting on the report/contacting the author because there's not enough information. Tell them you need more, what they must gather and how. If you tell everyone the same things, write a HOWTO and link there.
- Ignore bug reports. Valid reasons you're not fixing a bug are 1) you're currently busy fixing another, more important one or 2) you already understand the bug completely and have discussed the tradeoffs involved with others (write a WONTFIX with sound reasoning, please).
To sum it up: Be helpful to your users/admins/etc. Don't be a "Code Monkey".
Edit: Formatting, reference to 6debug :)
Its called "self.debug - An Emotional Guide To Being A World Class Software Engineer" - you can download it here (its free) - https://leanpub.com/selfdebug
Feel free to provide feedback on twitter to me.
But if anything this simple rule is the best: K.I.S.S. (Keep It Simple and Small) Make small things. If you ever find yourself saying "do this and then do that" your talking about two things and make them two things (separate functions/objects) and name them.
Also - I have been coding for 10 years now (as of September). It’s interesting to see as I gain experience the biggest differences looking back are (1) I choose to use more git branches and release 1:10 ratio smaller commits. (2) I try not to ever go back to “refactor” or clean up code and instead spend time on changes to accomplish the next feature or bug fix. (3) I never plan ahead and think “what happens if ...” instead focus on the present. In reality the future often never comes or it looks different than expected.
When seeking a job: It's not about you. It's also not about the company you're working for.
When improving the ugly code in the job you just started: It's not about you. Don't argue about silly things like brace styles.
The more fond you are of your tools, the less likely you may be to try others. Don't develop preferences too quickly. Try not to emotionally invest yourself in decisions you've made about languages, libraries, editors, operating systems, and other technologies that you will spend thousands of hours with. Technology changes so quickly that you can easily find yourself mastering a local Maxima where others have already left and moved onto higher ground. Try new technologies and adapt with the times.
2) Learn to love working on legacy codebases. This will happen everywhere you work. You will rarely (if ever) have the opportunity to start from scratch. If someone asks you to use an existing piece of code, and you decide to re-write it because you don't want to take the time to understand what's going on, you will A) appear to be anti-collaborative and B) reinvent the wheel, thereby wasting time. Obviously, there are scenarios where re-writing something from the ground up is necessary, but make sure all stakeholders involved agree and that you can estimate it correctly.
3) Always try to coax out as many details from designers and product managers/owners wherever possible. Perfect requirements will never exist but you want to be equipped with as many use-cases as you can before you start hacking on something. This may sound a bit waterfall-ish, but PMs and designers are not omniscient creatures. There is almost always some sort of gap that you may be able to help identify.
4) Don't be a dick, because there will almost always be someone who knows more than you. This applies to comments in PRs! Even if the entire company treats you like a god, that does not give you the freedom to treat others like worshippers.
5) If you are asked to estimate how long X will take, DO NOT give an answer until you have enough details so that you can make a reasonable estimate. If they force you to give one, pad it 2x or more depending on how much you don't know about what needs to happen for the task to be marked 'done'. Even better, ask them for a separate fact-finding task (spike, POC, or whatever you want to call it) so that this can be more easily tracked.
I could go on forever but these are some of the more non-obvious things I don't hear talked about enough.
Write code for fun. Find a hobby away from computer for sanity.
Consider the risk of burnout - even with great mentor and challenging work a toxic environment is not worth it long term.
Care about ergonomy of your workspace now - adjusting height of monitor costs you nothing, good keyboard and wrist rest cost less than you make before lunch. Carpal tunnel, ulnar neuropathy and back problems will start hitting you and your friends when you are teaching peak of your career and are no fun in general.
Biggest issue I find with developers right out of school, is that they often feel ok throwing a problem over the wall to a more senior dev. The truth is, all of us are confronted with problems we don't know how to solve. That is the job, but if we don't solve them, who will? You will not magically discover an ability to solve impossible problems and diagnose inscrutable bugs. But if you don't give up, and you fight your way through these problems again and again, you will develop confidence, and the instincts that allow you to do it a bit quicker next time.
On a related note, do NOT rejoice when a bug you've been struggling with suddenly goes away (another thing I've seen many times). Nasty bugs "going away" is one of the worst things that can happen. I promise you, 90% of the time it's coming back. And it's coming back at the worst possible moment, and possibly in a less friendly form.
The mistake I see all the time is juniors nodding because they fear letting me know they don't understand is a weakness. A sign they do not master the language (in fact I see this with most people). Always ask questions. It has multiple advantages: (1) it answers your question so you can understand, (2) it shows me you want to understand the topic under discussion, (3) it helps me explain the topic by guiding me to the parts you find complex, (4) the nature of your questions shows me how much you understand of the topic
Being able to stop someone and ask what a particular term or concept means is a super important skill for any engineer. It does not list you as a fraud, it lists you as a great learner. Remember that. Always.
Now, when asking questions ask the right questions. There is enough material here for me to provide just two links and let you google for the rest. 
P.s. Bonus reason: Assumptions are the mother of all f*ckups. Ask to verify things you think you know!
Some things you can do for example:
- Using linux? Learn to use the CLI
- Learn to use git/svn/... (whichever you use at work)
- Get comfortable with your IDE (shortcuts, customize to your liking, ...)
- Learn to use a profiler (JProfile, ..)
Those are some pretty general things but they'll help you in any job where you write code.
The tools are (imo) just as important as knowing the language you use.
- Confidence comes from trying, and failing, and trying again.
- Burnout is real. Know when you are close to it by knowing what triggers your anxiety and stop. Having the ability to remove yourself from a stressful situation, even if just for an hour makes all the difference .
- Test your steps. If you can write code to test your steps then it's great but most of the time a simple browser reload/button click or command line run action with verify if your change works will be good enough.
- It's fine if you don't know. Having the ability to ask for help will mostly be met with respect.
- You are not defined by your code as a person :)
- Theoretical pureness mostly gets in the way of solving an actual problem because of the endless debate it sparks in a team. If your goal is to write code that is readable for someone in the future then it doesn't matter what design pattern you use. Computers are fantastic at understanding code. Humans however need some help.
- Try and clean up as you go. Like your home, if the dishes pile up too much it becomes unliveable.
- Lastly, learn how to understand legacy code. It's a fantastic snapshot into the way the business was thinking at the time and to see it evolve and be that change is a privilege to be part off.
Don't trust your manager(s) that they are going to lead/manage/mentor you in a way that will really help you. They are not.
If I allowed myself to be really cynical, they are mostly out for themselves. Most will have no problem using you or even throwing you under the bus to get themselves ahead (or protect their own jobs). And this involves things like having you do things (aka work with less valuable techs) that they don't want to waste their time with. That is what `delegation` is.
But don't worry though. Most of the time, they have little time left to think about ways to take advantage of you. They are just busy managing their own jobs, your fellow team mates, and their own bosses. Oh, and figuring out how to beat fellow managers. They have their own family/retirement-plan to take care of. They don't have much time left to manage you after sharing extended pleasantries with their own bosses.
And the more successful your manager seems, the more guarded you should be about them using you to their advantage. I've been around and of the bosses I had over me, two are now in high level position (VP) at really well known brand name companies in US. Because we were in smallish startup shop with cubes/offices near, I was able to observe them from nearby. Both were really good at pleasing higher ups (not necessarily through excellent work but with friendship), have no problem with pushing around those under them, and just do good enough job of actually managing the team.
Also, don't settle.
Don't settle into a role that you feel comfortable. If you feel comfortable at a role, it's time to move on.
And time flies. Make most of it.
Avoid what is known as 'Somebody Else's Problem Field' behavior. (Here is the link: https://en.wikipedia.org/wiki/Somebody_else%27s_problem)
What I mean to say is, a lot of times developers have an attitude which says "I'm done with my work, now if its not working, it's somebody else's task" or variants of that dialogue. As a developer, I understand and concur with your position that you might have done all the things right, but as a team, you are not helping matters by saying that. Volunteer to check your code, do more, and try to figure out where the problem is, like what input you are getting, what is the output, where is the code failing. the more you help in these cases, the faster the things get done.
This is also a common behavior, when someone asks you for a data or a piece of code, and you send her a straight forward export/import in the raw format. Occasionally, that might need the other person to do a lot of clean up and other operations, (with a bit less context), and would have been easy for you to do in the first place. As a developer I did that a lot. On the receiving end, this is one of the most frustrating things, since I need to account for it in my tasks beforehand. (Example would be a simple dataset, given to me at SKU level - cos requires a straightforward query - while if extracted aggregated, would have taken 5-10 more minutes for the developer, but now the asker is expected to spend sometime cleaning up and aggregating that data set. Might not always be this, but I hope you get the point.).
my 2 cents.
Figure out what parts of the stack you're more passionate about. This may shift over time, but if your working on things that you truly think is interesting it will keep work from being work.
Most importantly, junior software engineers and interns often complain that the work they do is not impactful - it may seem that those around you are doing impactful work (and it might actually be true in a very few cases), but don't let this effect your peace of mind and not let you give your best. Every work you do must show a characteristic of your quality. Engineers must be able to provide anything in their field, at all levels of their stack, regardless of how important they feel their work might be. Always respect your work and be grateful for getting an opportunity for working on it because someone did not get that chance.
It sounds silly at first but for those of us who like to share what we learn, or think others aren't interested, we love it when anyone has questions for us!
Don't be afraid of failing a lot either. Personally I've learnt a great deal of things just because I tried to do nonsense things that failed and taught me a lesson.
I first dove into unicode (and did a talk at a meetup) because I had this absurdly stupid idea to make a program that "prints hotdog emojis every X minutes". It didn't work but just asking "Why?" lead me to a lot of answers and even more questions.
You never know when seemingly useless info comes in handy again (like obscure modules in the docs for your favourite language)
You'll probably have plenty of times where you know that "if I write this line of code, this thing happens, and that solves the problem". Dig into exactly what that is doing and understand why it works as it does. A lot of the time this just means reading all the documentation (not just the 1-liner you can copy/paste and move along) and source code of libraries.
A good exercise you can do is to open up some code (ask a coworker for a good place to start), look at it line-by-line, and ask yourself if you know exactly what is happening on each line. You probably won't know and that's your trigger to go read up on something. From there you'll have great questions that a coworker should be happy to talk about with you.
In my experience, new developers that take this approach of truly learning (rather than just making things work) grow fast and impress the team.
If you never say "that estimate is too small" then you cant blame manager for assuming the estimate is good. Saying no is an option, learn to do it politely.
Sometimes manager is pressuring you, sometimes he/she really just asked when it is going to be done. Don't panic, answer truthfully.
You cant make up tomorrow or next week for time unexpected spent on something else or just wasted. That is not how it works. Factor that into estimates (whether formal or informal).
1. Chances are you'll meet very interesting people, with a background different than yours. This is invaluable, in my opinion
2. You'll understand how the organization works and how information dissipates.
3. You can learn about their jobs, and if possible, find ways to make their jobs easier for them. Do someone a favor, they'll most likely return it.
3. Networking can provide very interesting opportunities in the future
4. You'll get perspective from outside the technology bubble
Physical exercise. If possible, try to do it at least 2 days a week. Besides the obvious physical health aspects, regular exercise is a performance boost for intelectual work.
Best of luck!
Even if the questions sound silly, which is what terrifies the most, just ask. At my first job, I was too afraid of asking my teammates unless I came up with some smart-sounding question.
Fast-forward a couple of years until now: I have a teammate who is quite less experienced, and revealed me he does not want to ask questions because he thinks it's a waste of time for the other person and/or he feels silly to the whole team.
I attempt to mentor him and teach him to ask questions, no matter how dumb may be. We've always been there.
This leads me to another aspect: have empathy towards your colleagues.
Be a bit sceptical of people who pass out judgement and advise
What is important is a willingness and skill to learn new stuff; all else is in a flux.
Also I don't like this distinction between junior and old hands; it can make you complacent.
To do this, keep your eyes open for opportunities to go deep into something interesting at your job and be the company expert on that topic. This is a nugget of a personal brand. Then take this and expand on it outside your first job. Blog about it. Speak about it. Create open source about it. Find the next job that hires you for these specialized skills. Rinse repeat...
Worst case is you can still switch, or go back to just “software developer”
Which is a fluffy way of saying when you tell someone at 4:55pm "I'm leaving now but I'll get to it first thing in the morning", you actually do it first thing in the morning.
There is no better source of knowledge than solving software issues. You see it all in that backlog. Deployment issue, build issues, bug fixes, feature changes, merging problems, log files, web server configurations, DNS issues, certificate installations, database errors, database updates, connection issues, you name it. It is in there.
Once you feel comfortable with that backlog, look at the source code of your application and you will then ask your self, WHY IN THE WORLD WAS THIs BUILT THIS WAY?!?! you will find everything wrong with the application and that is a good feeling.
Start with Supporting an application before developing it.
1: Never trust a recruitment agent.
Don't be afraid to ask questions. I've had 30+ contracts in 18 years, and I've lost count of the number of times I've been in a big meeting where some manager or director is specifying something which makes no sense, and all the other developers are just nodding quietly. It saves a LOT of time if someone politely says "sorry, maybe I'm being a bit dumb, but I don't understand" right there and then. 4 times out of 5 it turns out that nobody understands, including the guy talking about it.
I know there is a lot of stuff you do not know, and it can be truly overwhelming to try to stop, and read for 20 minutes when your parsing might get you the answer you want in 1. But you will learn a lot more, and you will start running into issues less and less frequently.
In the long run, it will genuinely save you time, and you will understand the tools you are working with much more deeply.
Ask whether you can sit in on calls with customers, either prospective or current. You will find out what they want, and whether your product is solving their problems.
Writing some React code and it doesn't work for Chrome on Linux?
You should in principle be prepared to debug not just your own code, but React's internals, the Chrome JS engine, and the Linux kernel itself until the problem is identified.
Obviously that sort of thing is a last result, but you should in principle be prepared to do it.
It will be golden six months down the line when you're questioning your career.
Both have some flaws and highly subjective advice in them, and if something doesn't seem to add up, it's very possible that there's a better way. Try things out and see how they fit.
Respect self and others.
Seek perfection of character.
And would also share the following quote from Hiroshi Saito (CEO of Chateraise) which I came across later in life and thought it helps to change your perspective:
Everything outside of me has something to teach me.
This change is starting to emerge and the programming opportunities for the future will start to erode.
This was true 20 years ago too, and yet the demand for developers is as great as ever despite more and more COTS type solutions available each day. I'm not being critical of your viewpoint, rather I'd like to understand what you believe has changed or is changing. Especially, I'm curious what role you believe robotics plays in that.
When you get to this level of simplicity then the human factor can be quickly replaced. That's where robotics comes in.
It's why sites such as stackoverflow.com are so popular.
It can be both your portfolio and motivate you to keep pushing the envelop.
I do these short little exercises in programming to explore different concepts. Usually make a rough POC for an idea or some kind of interface.
Ask HN: Senior developers, what would you tell a younger you?
Draw lots of doodle-diagrams, then throw them away. Draw again.
Watch YouTube videos. Some people learn better by watching.
Above all, code a lot. If it doesn't make you happy, quit. If it does make you happy, look for more ways to improve your personal learning style.
Writers write. To become a better writer, write more.
But then I've always treated programming as a form of communication. Maybe not literature, there's still beauty, awe, and whimsy to create and behold.
Practice things like TDD to ensure you have a good set of tests that will allow you to maintain the software for years to come.
don't listen to management team saying "this guy is the best developer I've known" - his code still might be crappy
put "solved" after the phrase you're searching in google
always have your CV ready on your computer
It'll give you a lot of higher level things to think about as you're diving deep into your first tech stack.
Where to live, what apartment to live in, where to work, who to become involved with, what bed to get, etc.
Nootropics. Cognition enhancement. A multivitamin + D & K + chelated/TRAACS magnesium supplement. Meditation and/or brainwave entrainment audio. Stress management. Ensure quality sleep.
Nootropics that increase verbal fluidity tend to be great in corporate environment, especially as it becomes clearer what leads to a promotion/raise.
Being promoted every other year (0 = entry, 2 = mid-level, 4 = senior, 6 = staff, etc) is conservative/typical/traditional. Fast risers get promoted every year. Move around, especially if your job isn't great or well-paying, to maintain a pace.
Though an engineer, still network. Weak ties are better than deep friendships when networking. Approach all as though they are friends. No need to let someone draining waste your time. Cast a wide net, but choose wisely.
Don't let them work you to the bone. Startups fail 98% of the time (78% if BS exits are included) and corporations typically don't care about you.
Your employer owns everything you develop on company time or using company equipment.
Understand the business, users, and political landscape at your company. Avoid getting involved in politics and gossiping. Commit to maintaining ethics and professionalism, then set everything up such that it doesn't sabotage you.
People tend to be selfish, two-faced, and unconcerned about you. Smile and be happy while remembering they'll likely stab you in the back with little hesitation.
There's being irreplaceable and there's them knowing/thinking you're irreplaceable. Only the latter matters.
Many years ago, it was estimated that 4% of executives/CEOs were psychopaths (versus 1% of the general population). A study released in 2016 now puts the estimate at 21%.
Read, read, read, read...
Avoid stagnating and blindly following whatever's said. Things change and the world has little problem leaving you behind. Staying fresh/competitive can be difficult, especially as many companies heavy-handedly try to push you into the trap.
Take-home salary: 20% to savings (max out 401k even if just up to company match), 30% max to rent, and 50% toward expenses.
house_price <= 3 * yearly_salary. 20% down payment. mortgage <= 2.4 * yearly_salary.
Car: down payment >= 20% of car's value, finance period = 4 years, principal + interest + insurance + license + registration + gas + maintenance = 10% of one's gross monthly income. Buying without taking a loan is even better.
Ageism. Software Engineers have an expiration date. If not in management or a founder/consultant by mid 30s, things can easily get difficult.
I find this to be a myth more than a fact - unless you care about working at one of the cool hipster startups. Most companies don’t care how old you are as long as you can code - I say that as a 40+ year old developer who agressively keeps my skills up.
For one, in this context, a junior developer will rarely be the smartest person in the room. So it’s really terrible advice for the context.
I think it’s really terrible advice in general though, the places I’ve learned the most is exactly when I’m the smartest person in the room, doing stuff like mentoring or teaching.
In fact I do part time work as an external examiner at IT educations in my country, exactly because they teach me a lot. I’m almost always the smartest person in those rooms, but by evaluating i relearn/refresh things that I haven’t touched in a while.
Aside from that, you’re almost never in a room where there isn’t an opportunity to learn. Maybe you’re the best programmer in the room, maybe you’re the best architect, but you’re very rarely the best at everything, and the modern workplaces thrives the most from teams, in which everyone is the best at something, because they become more than their individual sums by cooperating.
Also just because your the teacher doesn't mean your smarter than all your students you may know more.
I’m not an algorithmic genius don’t get me wrong, that part doesn’t appeal as much to me.
IMO: Being too comfortable in the same position is not good enough
Explore your options, never settle.
Asking questions like "How does this work" can be the fastest way to learn.
Trying to make computers do the things humans do well is nearly impossible.
1. Think Big. I have seen many people who aimed higher from the beginning and did manage their way up (e.g., becoming a VP in just ten years, that too in a large company).
2. People skills is a must. You should be thinking of people or organizational challenges all the time, or you'll miss the mindset to rise significantly up.
3. Many people complain about their team leads, managers or senior leaders. This usually happens because these senior are working at a higher level of responsibility and ambiguity than you are. You should rather be thinking what would you have done if you were in their position. Understand the challenges they have, by directly asking if needed. This will not only help develop your relationship with them, but also position you to develop the skills needed faster, without yet being in the position of responsibility that they are in!
4. There is a lot of entropy in any team/organization, and unfortunately also a lot of people who are increasing it. Be the one who reduces the risks and brings order to the chaos, whose judgment can be trusted. Keep in mind for this that the real challenges are often not on technology side (in other words, if you think technology challenges are more critical, you are perhaps missing the big picture).
5. Try to become irreplaceable for the team/company in your project and beyond. In my experience, this will not come in your way as  suggests. You must however not get limited to the tools and technologies specific to the company, or else your market value will suffer within a few years.
6. Never say (or even feel) anything bad about anyone ever, keeping Hanlon's razor in mind . But then, how do you deal with the stupidity? Well, <b>their stupidity is your opportunity</b>. (I created this out of Jeff Bezos' famous quote, "Your margin is my opportunity." )
7. Do not let yourself be masked from political issues around. A good manager would aim to mask you , but that can curb your growth since you won't develop the skills needed to master and survive corporate politics while being masked.
8. There are books available today that teach you corporate politics [2-3], showing how easy it is for anyone to do it, and how difficult it is to counter. Reading these books should be a required reading for anyone aiming to go significantly high. And trust me, it's better to learn this from books or from other people's experience than learning this stuff the hard way. (The latter would be painful for one, and second, you may never actually learn.) I have read  and felt that I should have read it earlier.
9. Ask questions whenever you do not understand something or if your own thoughts do not align with the decisions being made. Of course, be polite in this (e.g., "I was wondering if option X also has been considered" instead of "why are we not going for option X"). People around would be happy to explain to you while also developing trust in you, and often would take the suggestion if it will actually reduce their mental burden. The sooner the better in asking questions.
In seriousness: get exercise. If you aren't in good shape it's draining, and making your life harder. Coding is hard enough
The latter happens when a developer becomes too comfortable with their knowledge and stops learning, or when they emphasize development speed over learning.
If you want to be an expert, cargo cult needs to stop with you. Don't blindly imitate what others do, try to understand how things work and how they can work better.
But not exclusively. Both are incredibly useful tools that will open a lot of door for you, but I personally wouldn't want either of these to be considered my bread and butter.
TLDR; I would give an eye or a hand if someone had given me this advice when I was 20.
Please do elaborate!
Related to this is realizing that most software degrades over time, being touched by many people under varying deadlines. Assume best intentions of your teammates until you _know_ there's a endemic problem.
Read code. Don't despair if you check out some cool OSS project and a lot of it is going over your head: pick another project or start consuming the code in small chunks.
Don't engage in bikeshedding.
Don't be an asshole.
Always be able to explain _why_ you: picked that solution, developed it that way, favor X over Y, etc. Explain your thinking.
The "right choice" is typically right at the time the decision was made; time will usually erode that "right choice" until it looks wrong.
If possible, document the reasons why critical/large decisions were made in the project/codebase (e.g. "we had to do this like X since system Y wasn't compatible with system Z at the time of writing").
Think of the next developer to touch your code. Think of you touching your code 8 months from the time of writing. Both will help you documenting the "whys" of your strategies if it may not be abundantly clear.
Follow coding conventions of everyone else at your company; don't try to buck the standards.
Don't be cynical. Don't be a source of constant negativity. Those people suck to work with.
Find programming forums/message boards and consume at least a few times a week.
Don't obsess over picking the "absolute right solution", pick the one that sucks the least given the information on-hand at the time. If it's a big choice, document why you made that choice.
Do not burn out. If your company commonly features "death march" projects, seriously consider leaving. I suffered a nervous breakdown around 5 years into my career by working 60-80 hour weeks for months on end while dealing with veiled threats about all our jobs. This was during an economic downturn and an especially hard time to find dev jobs, but I still think it would have been better in the long run to leave. I believe our company, knowing the tough local market for devs, intentionally grossly overpromised on a deadline to a huge customer because they knew many of us wouldn't have many options. I probably made less than minimum wage that year, never did the math.
Related: in many cases, the company is not loyal to you at all. Do not devalue yourself for loyalty to your company.
Always, always give credit where it's due. Never take credit for another's work or ideas.
One of the best things you can do for teammates is relieving them of stress and sharing the burdens; leave no one on your team behind (metaphorically). This obviously depends on how close-knit your team is, but there were many times I stayed late to help a close teammate with a production problem that technically I wasn't directly involved with. When they did the same for me, I was very thankful to have that other set of eyes, the person to discuss the problems out loud. I know together we solved those problems quicker, to boot.
It's just fine to bang out scripts or hobby projects you can see work easily enough without formal tests. In the real world not everything is tested (although probably more stuff should be than is).
Your project will be cancelled and your team will be reorganized. The manager you love to work for will leave.
The most important part of writing software is being able to understand it. You should be able to understand it when you're writing it, debugging it, and six months after you haven't touched it. Other people should be able to understand it. That principal informs the following rules:
1. Code for simplicity first. Do the simplest thing that can possibly work. For whatever reason in this industry, people are seduced by cleverness and complexity. You're doing a job, not trying to prove how smart you are. Clever code that is hard to understand isn't smart. The problem you're working on is probably simple. Don't try to make it fun and sexy when it isn't. Don't make something harder than it is because it would be cool to use the new shiny ____ to write it.
2. Don't repeat yourself. This is the opposite of simplicity, and your problems compound the more you do it.
3. If you have code that you are afraid to change for fear of breaking it, you've failed to make it simple and understandable. All the testing in the world won't help you if you don't understand the black box, and need to change the black box.
4. Code for readability. If you can't look at a line of code or an error message and understand what's going on, you've failed to make it simple and understandable enough. Functional code helps here; if you have to navigate between 50 different files to understand what a function is doing, something is wrong.
5. YAGNI. You will never, ever, ever need the thing you're about to spend time on and that dramatically increases the code complexity. If you ever do, it's much easier to refactor something simple than it is to work around something complex that made the wrong assumptions. Build systems in small steps.
6. Use the compiler and type system. Everything should be as strongly typed as possible to prevent future you from messing things up. The compiler is your best friend; make it work for you and write code so that when you inevitably have to change it, the type system prevents you from making a mistake.
7. Get good at debugging. This is a skill that you develop that nobody teaches you for whatever reason. When you're writing code while thinking about how it will be easily debuggable later, you're doing it right.
8. Use spaces instead of tabs. You'll make more money. Also turn on visible whitespace in whatever editor you're using and delete those silly extra spaces on the end of lines. I can see those and they're the code equivalent of walking out of the restroom with toilet paper on your shoe.
Rack up experience. It's much better to be working than not working. It is much better to have 2 years of experience and learning vs. 6-9 months looking for something perfect -- this is especially the case for juniors. Just take the first job you can get. Also, don't underestimate how much the rate of learning differs between various workplaces.
Try to work somewhere that invests in people, especially juniors. Startups will be "more fun", and you'll likely to get to work you're not really "qualified" to do, but you won't learn how to do it well. One of my biggest regrets is not finding effective mentors earlier in my career. Sometimes a more "boring" workplace is better for this.
Most employers will judge your skills by the brands on your resume. This mostly happens because there's no other reliable way of determining how good someone is when hiring them, short of "I have personally worked with this person before and can vouch for them" (the gold standard). A mediocre developer who managed to clear Google's bar may be less of a good hire than someone who worked diligently at a consulting company -- probably not in the average case, but it's possible. Note this contradicts a lot with the last piece of advice. It's a puzzle -- brand vs. skills.
Focus on your social network. Most good jobs, especially in more senior roles, will be obtained through prior coworkers, investors, or other people you know/have worked with. Keep up with people. Try not to piss people off. You'd be surprised how useful it can be to leave a trail of goodwill behind you.
Understand that it is management's job to advance the shareholder's interests. Most of the time this means they'll try to do what's right for employees. But it also means that when the situation demands it, they will lie, withhold information, fire people, report things to HR, and try to pay you as little as possible -- that is their job. Filter every announcement and communication through the lens of "how does this advance shareholder interests"? It's not fair to say "everything management says is bullshit", but it's directionally correct. Truth is not the priority.
Focus on developing skills that won't become obsolete. This means prioritizing domain knowledge, CS fundamentals, etc. over the details of one language, company, or programming environment. Try not to specialize in writing software per se -- the market rate for this is rapidly heading to zero with outsourcing and remote work. My friends who have the best careers (happiest, best-paid) are people with very deep expertise (PhD + 10 years experience) in areas like semiconductors, networking, or a particular business domain (e.g. hospitality/travel, high-frequency trading) . The trick is not to specialize too early -- wait to find something you really love.
Most startups aren't worth it. Some are. Many people have a binary view of this: "startups good"/"startups bad". It depends on the people, the market, and a lot of other factors. There are a relatively small number of investors and founders who can reliably beat the averages. But not many. Informational advantages in this area are worth a lot.
Silicon Valley is basically Hollywood. People move around a lot. Packs of people who work together cross-recruit into new companies all the time. Try to get into one of these "tribes". It will help you immensely for your entire career. The PayPal mafia is a great example of what I'm talking about.
As you get more senior, do your homework and really stress out about which job to take. It's worth it. This might be counter to what a lot of others say but IT MATTERS. It's the difference between working your ass off for four years and getting nothing, vs being able to afford a modest retirement after 4-6 years.
Plan to work 3-6 years in places, if not longer. It demonstrates commitment and people in the upper echelons of business (investors, CEOs, high-level management) respects that a lot.
If you work at a startup, don't always optimize for the biggest stock grant. 0.5% of a company that fails is worse than 0.25% of a huge success. Understand that bad companies fail and good ones sell for tens of billions. Our intuition wasn't built to handle 10 orders of magnitude differences in outcome.
I blog about a lot of this. http://davidralbrecht.com/
Being a software developer is easy, I've seen loads of them, these are the people who's work I end up fixing, it stresses me out and it costs the company more because they've paid two people to do the job.
Being a good software developer is a way of life; if you're going home after work and looking at ways to improve your life or other peoples lives by writing software, you're doing it right.
Work with the best people you can find, the more experience these people have than you, the better. Learn what you can, and make it your aim to be the best, one day they'll come and ask you for help. This is the point where you thank them.
Find something you're good at, find a niche language in your company or tool set and become the go-to developer for it. As soon as you attain that, and you're known as the go-to, find something else, work on the new thing, and maintain the old, find languages you enjoy and master them.
Eventually, you get to a point where you're asked to fix/write code in a language you've never used, and yet, with the API docs at hand, you don't even skip a beat.
Also, remember this, no matter what you think, not everyone is far better than you at this. There are some exceptional developers, but most are either putting in a lot of hard work for the results you see, or they're average.
Finally; Never release on a Friday, and never make changes to production.
I don't think programming is something you become good at simply by doing your 9-5. I've worked with a lot of 9-5'ers and they're rarely the best or most rewarded developers.
What I'm certainly NOT saying is that you should work _all_ hours, in fact I will say exactly the opposite, don't, but, do be willing (if you're able) to finish solving a problem before you call it a day. For your sake, not for your employer's sake. I prefer to finish my work day on the last "problem solved". It leaves you in a much better position to leave your work at work, than when you have a problem you didn't solve and which will bug you until you solve it. If you find a problem is going to take more than "minutes" to solve, accept that its a problem for another day and try to leave it at that.
To further elaborate on my first statement, so it isn't misinterpreted again;
Do it because you enjoy it, and you _want_ to do more of it outside of work; even if you don't do, but, even IF you don't, you can visit conferences, meetups, hack-spaces, various other <insert-tech-or-language>-con, you'll meet cool people, learn about things you didn't know and perhaps teach other something. If you can make it "a way of life", contrary to ck425, do spend _some_ of your free time working on programming tasks, find something different from your work, for example, contribute some time to an OSS project you like (for e.g. I use and like to contribute to Home Assistant) or some other project you enjoy using, where you'll interact with the skilled people behind those projects.
To be clear, that I'm not disagreeing with ck425, just that he (and probably others) might misinterpret what I'm saying as "you should spend all your time programming or else you'll suck": Do all of this, only after you done the other things you enjoy doing more.
I agree that we certainly need more diversity. I've been fortunate enough to work in some reasonably diverse places and I'd hope to see more of it in our industry.
To turn my argument around, I'll say that I'm a Software Engineer _because_ I love it, I would be doing it anyway when I have the time, it's one of my "hobbies" so to speak.
Given that I can't immediately think of a way to re-structure what I've said in my previous comments, to meet this argument of yours, which I agree with, I'll simply concede that I was wrong and leave it at that.
That's better than sitting there for another hour or two in the evening getting increasingly tired and ineffective, missing dinner, annoying your partner, etc.
This is the part about not taking your work home. I'm often pre-occupied with problems I haven't solved, I find for me, taking the time to solve them, or to be sure that I can't solve it now helps with that.
I'm not disagreeing with you, some problems need to be left for another day, and I've said that already.
What I'm trying to say is that I think we're both right in a way, and that finding balance is what we need.