# You Can Do Better

Source: https://www.yegor256.com/2018/11/27/you-can-do-better.html

OK, it's time to publish this piece. I've been dancing around it for quite a while,
telling you how to make [more per hour]({% pst 2014/oct/2014-10-29-how-much-do-you-cost %}),
how to manage those [stupid managers]({% pst 2017/aug/2017-08-01-how-to-manage-a-manager %}) that don't let you grow,
how to [boost your career]({% pst 2017/jan/2017-01-24-career-advice %})
and how to deal with [office slavery]({% pst 2015/oct/2015-10-06-how-to-be-good-office-slave %}).
Now here is a simple, plain list of recommendations for you: what you should do
if you want to be a more successful programmer. Not a better algorithm
designer, even though that's [important]({% pst 2014/oct/2014-10-26-hacker-vs-programmer-mentality %}).
Not a funnier ~~clown~~
[team player]({% pst 2018/aug/2018-08-29-soft-skills %}), even though that's
also important. But a more successful software engineer, both
[financially]({% pst 2014/sep/2014-09-24-why-monetary-awards-dont-work %})
and socially.


{% jb_picture_body %}

There is no particular order here, just everything I have in mind, in one list.

**Make Your Own Product**.
Learning how to program and *actually* programming are not the same thing. The best,
and the only right way to learn is "by doing." The best way of doing is
to create something meaningful and important. If it's your own product---even
better. If someone pays you for that---best of all. Every time I want
to learn something new I make up a realistic goal and [attempt](/pets.html) to achieve it.
A few years ago I was interested in learning Python. Instead of going to online
courses or reading books I tried to create a small web app for my own marketing purposes.
At that time I knew Java, but I wrote that app in Python. My recommendation: never study
anything in an academic way, always do something real using the tech stack you want
to learn.

**Change Languages**.
Don't get stuck with one stack of technologies, no matter how much you love it.
Of course, you don't want to be a "jack of all trades," since they are never
paid well. You want to be focused. But "one focus" in life is not enough. I switch
languages every 4-6 years. I started with Pascal, then it was C++, then Java,
then PHP (yes, you heard right, I'm
[ZCE](https://www.zend.com/en/yellow-pages/ZEND007965)/[ZFCE](https://www.zend.com/en/yellow-pages/ZEND007965)),
then Java again, and now it's Ruby.

**Go Full Cycle**.
Writing code that "works on your laptop" is a great achievement... for a junior
programmer. A senior knows that it's only a part of the job. The smaller part.
The bigger part is turning your "working" code into a market-ready product,
which means merging and auto-testing, compiling and packaging for multiple platforms,
staging and acceptance testing, bug reporting, metrics collecting, A/B testing,
stress and load testing, deploying to production, and even reporting to investors.
Modern software development life cycle is a giant ~~mess~~ show.
Do you know how it all works?
You don't? You don't care? You are not a senior developer.

**Open Your Sources**.
Like I said in my talk [_How Bright Is Your Future?_](https://www.youtube.com/watch?v=IGbteQpTNCA)
at RigaDevDays, the future of software will almost entirely be open source. The
amount of code that companies keep proprietary is decreasing every year. You have
to be an open source advocate if you want to be successful. If you are still
[afraid]({% pst 2015/dec/2015-12-22-why-dont-you-contribute-to-open-source %}),
or don't have time, [reconsider]({% pst 2017/may/2017-05-30-why-contribute-to-open-source %}).
Writing code for yourself and your office buddies, and writing it for a few
thousand anonymous GitHub hooligans, are two very different stories. You will
need time to get up to speed in this wild territory. It took me over three years.
Don't wait, start now.

{% quote I truly believe that a professional programmer spends more time creating automated tests than writing production code %}

**Test Everything**.
To be honest, almost everything I've learned about software quality, I owe
to the painful hours of [writing unit tests]({% pst 2015/jul/2015-07-16-fools-dont-write-unit-tests %}),
mocks, fixtures, stubs, integration
tests, and so on. I truly believe that a professional programmer spends more
time creating automated tests than writing production code. That's why
I'd recommend you focus on testing if you want to become a better engineer.
Start with the great book [_Growing Object-Oriented Software, Guided by Tests_](https://amzn.to/1PBpoDT)
by Steve Freeman and Nat Pryce and make yourself [a rule]({% pst 2017/mar/2017-03-24-tdd-that-works %}):
every line of code, that you are at all in doubt about, must be proven by a test.

**Statically Analyze**.
Well, half of my knowledge about software quality I owe to unit testing. The
other half I owe to static analyzers. I learned much more from
[Checkstyle](http://checkstyle.sourceforge.net/) and [PMD](https://pmd.github.io/)
than from all the Java books I've ever read. Every new programming language I learn
I start by configuring the strictest static analyzer I can find and then listening
to its complaints. I'd recommend you do the same. Listen to your tools and
[make sure]({% pst 2018/jan/2018-01-16-educational-aspect-of-static-analysis %})
your code is 100% compliant with their quality expectations. Don't just
use them as recommendation providers, but make yourself a rule:
[never commit]({% pst 2014/jul/2014-07-21-read-only-master-branch %})
anything that doesn't fully pass all static analyzers.

**Humiliate Yourself on Stack Overflow**.
Robert Sheckley [said](https://amzn.to/2ToSdws)
that "in order to ask a question you must already know most of the answer."
Friends, online chats, and office kitchen talks are
great places to find help... for junior programmers. Those people understand you
no matter how stupid your questions are and that is how they spoil you. You don't
grow while talking to them and getting their help. You degrade. Instead, you should
ask questions where nobody knows you and will only answer if your question is perfectly
formulated and expressed. There are many places, but Stack Overflow is the best.
Make sure every question you have goes to Stack Overflow first. Then you may share the
link with your buddies. But Stack Overflow comes first.

**Earn Certificates**.
I've got some of them and I'm planning to get more, even though I'm not really
a programmer [on a payroll]({% pst 2015/jul/2015-07-21-hourly-pay-modern-slavery %})
and I'm not going to be employed by any enterprise that
cares about badges in
[my CV](https://latexonline.cc/compile?git=https%3A%2F%2Fgithub.com%2Fyegor256%2Fblog&target=_latex%2Fboring.tex&command=pdflatex&trackId=1520166474432).
Still, I want more certificates. Why? Because I learn a lot when I pass them.
Also when I fail (I have done, twice, up to now). There are two things certificates
give you: 1) they help you fill up your knowledge gaps, and 2) they boost your
self-respect (when and if you pass, of course). Make yourself a rule: one
new certificate every year.

**Go to Job Interviews**.
“Changing jobs every couple of years used to look bad on a resume. It told
recruiters you can't hold down a job, can't get along with colleagues, or
that you're simply disloyal and can't commit. That stigma is fast
becoming antiquated. Workers who stay with a company longer than
two years are said to get paid 50% less,” according to
[Vivian Giang](https://www.fastcompany.com/3055035/you-should-plan-on-switching-jobs-every-three-years-for-the-rest-of-your-).
The bottom line is that you must be ready to change jobs, because you will have to, and soon.
If you don't, you will lose. Regular job interviews are the best way to prepare
yourself. Make it a rule: every three months you go to an interview.

**Change Jobs**.
You will never be a truly senior developer or an architect if you stay with one
company or project for a long time. You have to change jobs. Frequently. I know,
it's painful for most of us, but this is how we grow. You need new tasks, new
challenges, new technologies, new customers, and new bosses in order to learn
how to survive and become stronger. Ideally, you should become a freelancer
and forget about full-time [nine-to-five]({% pst 2015/jul/2015-07-21-hourly-pay-modern-slavery %})
office ~~slavery~~ employment.

**Read Books**.
One book per month. How does that sound? Twelve books per year. That's an easily
achievable goal. However, ask yourself, did you manage to read a dozen books
over the last calendar year? I seriously doubt many of you will answer positively.
Books are important because they are way more formal and "complete" than blog
posts, news articles, or conference presentations. They cover entire topics,
not parts of them. For example, did you read the [Git book](https://amzn.to/2crIfoY) ever? Most programmers
I know who use Git never even touched the book. They use Git, but barely understand
what's under the hood. This is how junior developers behave. Be professional,
read the manual!

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Please, remember, how many technical books you&#39;ve read this year? <a href="https://twitter.com/hashtag/career?src=hash&amp;ref_src=twsrc%5Etfw">#career</a></p>&mdash; Yegor Bugayenko (@yegor256) <a href="https://twitter.com/yegor256/status/1069103139972935680?ref_src=twsrc%5Etfw">December 2, 2018</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

**Follow Key People**.
I mean Twitter (I'm [@yegor256](https://twitter.com/yegor256)),
Facebook ([here](https://www.facebook.com/yegor256) I am),
Telegram ([my channel](https://t.me/yegor256news)),
Instagram ([click here](https://instagram.com/yegor256) to follow me), and, of course,
GitHub (I'm [@yegor256](https://github.com/yegor256)). What's new that you can hear from me?
Probably not so much, but you will get a feeling for what's going on
in my professional life, where I'm heading, what I read, what I write, etc. Who do I follow?
All authors of all books I like, all bloggers I've ever enjoyed reading,
all speakers I liked watching, key public figures and politicians,
no matter whether I agree with them or not. I believe you should do the same, to
stay informed about the trends.

**Lurk**.
Regularly check [Hacker News](https://news.ycombinator.com/),
[/programming](https://en.reddit.com/r/programming/) Reddit, and, maybe,
[Changelog](https://changelog.com/). That's pretty much all you need to read.
A few times a week. Just ~~read~~ scroll what's hot and move on.
Will it make you a better programmer? Unlikely. Will it help your career
and your life? Definitely. You never know what's coming and where the
next opportunity is. I still [feel sorry]({% pst 2017/aug/2017-08-15-bitcoin-pyramid %})
about not paying enough attention to
the [announcement](https://news.ycombinator.com/item?id=1532670) of Bitcoin
at HN many years ago.

**Attend Conferences and Meetups**.
Ideally, as a speaker. Otherwise, _at least once a month_ as a listener. Will
you learn something new? I don't think so. But you will definitely motivate
yourself by meeting the most active and motivated people in the industry,
including speakers and other listeners. Most companies will be ready to
sponsor your tickets. Two big conferences per year will be enough. The rest
of the time attend your local meetups, you can find them
at [meetup.com](https://www.meetup.com).

That's pretty much it. Hope this list helps.
