SitePoint
  • Premium
  • Library
  • Community
  • Jobs
  • Blog
LoginStart Free Trial
Your First Year in Code
Your First Year in Code
Guide
Foreword
About the editor
About this book
Code is the best
Code is the worst
Code is just a tool
The night I discovered code
The path of self-learning
My decision between college and a coding bootcamp
Why I chose a bootcamp
A high-level overview of coding bootcamps
The cost of forsaking a computer science degree
Differences between bootcamps, colleges and self-taught pathways
Similarities: bootcamps & college
Additional resources
Build intuition
Knowledge debt
PDL: Problem-Driven Learning
Multiple sources of truth
Fewer subjects at a time
Ask your own questions
Challenge your material
Go back and review
Fundamentals are important
What is a computer program?
The tools of the trade
Programming languages
Putting data in code
Complex types
APIs
Functions
Logical branches and comparisons
Loops
Null and undefined
Scopes
Comments
Searching for clues
What is an application?
Conclusion
0. Naming things
1. Separation of concerns
2. Global variables (are bad)
3. DRY
4. Hiding complexity
5. Proximity
6. Deep nesting (is bad)
7. Pure functions
8. Automated tests
Conclusion
Wars? What wars?
The ancient editor war
The Windows/Linux war
Browser and style wars
Use what you like, focus on learning
Nobody cares about your code
Sharing the journey of the user
Everything and yet nothing we want
Part of a larger development community
Deserving of trust and autonomy
Becoming a great programmer
Reading error messages
How to Google stuff
How to read technical documentation
Ask for help
In conclusion
Famous examples
My projects
Cons
Pros
How
So why not start one?
Side projects
Revising your resume
Meetups, events and channels
Mentors
Interviewing
Negotiating
Growing and succeeding
What else is out there?
How to start preparing
Exercise
Sabrina’s story
My software developer journey
LGBT
Introduction
Choosing a company with the right values
The importance of telling the truth
How to grow a thick skin and handle complexities
Breaking stereotypes: educate men at work
1. Be self-aware
2. Timebox your frustration
3. Rubber-duck it
4. Draw it
5. Take five
6. Ask for help
7. Isolate the problem
8. Write it up
9. Get a buddy and ask the internet
10. Find a workaround
Finally, document the solution
Are you a coder, programmer, developer, engineer, architect or something else?
Sources
Salary data
Analysis
Bibliography & further reading
Till not many years ago…
DevOps
The public
What is the main problem when deploying to the cloud?
Running an application in various operating systems
Docker and containers in general
Docker vs. virtual machines
Provisioning
Continuous Integration and Continuous Delivery (CI/CD)
Tips for the future
Privacy
Preventing bugs and outages
Avoiding dark patterns
Impartiality and accessibility
Do no harm
The golden user story
Asking hard questions
Contributing to UX and feature discussions
Talking to users
Writing documentation
Code design
Development isn’t just code
What is a code review?
Why do we do code reviews?
Who should review a junior developer’s code?
How should you review someone’s code?
Guest authors
Beta readers
Cover design

Introduction: Code is the best, code is the worst

Code is the best

Coding is an act of pure creation. It’s often exhilarating: you type a sequence of words into the void and, assuming you don’t mess up, entire worlds begin to exist. Software development is one of the few fields where you can create something of extraordinary value without expending any raw materials. In a way, coding more closely resembles the TV stereotype of witches and wizards than the TV stereotype of coders (or developers, or engineers, or whatever they call themselves—see my chapter “Choosing a job title” for more on that topic).

There are moments as a software engineer when you know exactly what you’re doing. You come into a project, see a problem you’ve solved before, and every component of the solution springs into your mind. Suddenly you are a being of unstoppable force; you are elemental. You are typing as fast as you can, everything is working perfectly, every piece is elegant. You hand off the finished product and take in the admiration of your peers. It’s a triumph.

There are other times where you come up against a challenge you don’t have the first idea how to solve. And this makes you happy too, because learning is fun. You start exploring, surfing Q&A sites, reading the 11th page of old forum threads, copying snippets, compiling and debugging code, and before you know it you’ve figured it out. You tuck the solution safely away in your mind for next time. You can’t wait to do it again.

In the right environment, code is the ultimate brain teaser. Every last scrap of intelligence, creativity, determination, quirkiness, playfulness, intuition—none of it goes to waste when you’re writing code. You get so close to your own potential that you feel like you could reach out and touch it. That’s not to say you’ll always be recognized for it, but it’s satisfying in and of itself.

Programming is a science, as we all know. But it’s also an art. Like the painter who imagines beautiful sun-dappled landscapes, or the musician who wakes up whistling a tune, many programmers find their imagination filling up with code. They daydream of apps and libraries. Their GitHub profiles are full of projects that never got finished, but only because they were so eager to start on something else. Not everyone is so obsessed—you certainly don’t need to be to have a successful career in code—but everybody is here for something, even if it’s just the salary and benefits. And whatever your reason is, there’s a place for you.

Code is the worst

Coding can be a real headache.

There’s a well-known cycle to fixing bugs. You examine the problem; you make a guess about what might be causing it; you update the code based on your theory; you test the new code; if the problem isn’t fixed, you start over. Sometimes this goes on for hours. Sometimes for days. Sometimes until it just doesn’t seem worth it anymore.

In the best of circumstances, you’ll be on a team of compassionate and attentive people. They’ll listen to you and make tactful suggestions. You’ll take their ideas back to your computer and ride a wave of genius all the way to your next task. Your boss will drop by your office afterward to tell you what a great job you did. You’ll go home at 4:30 and spend the evening relaxing at home.

You don’t always get to work in the best of circumstances. Someday you may find yourself struggling to concentrate in an open floor plan office, sharing a desk with eight other programmers, drowning in noise from phone calls and water-cooler conversations. The company will expect you to work 16-hour days if you’re not meeting their deadlines, which they never consulted you about in the first place. Your manager will think coding is black magic. Your teammates won’t seem to think you belong in tech, and some of them will have never learned how to hold a polite conversation. Some days will be a nightmare of egotistical managers, unreadable error messages, burnout and anxiety.

Sometimes you’ll wonder if you chose the wrong career.

Code is just a tool

The truth is, most of the time coding isn’t amazing. And most of the time it isn’t miserable. Code is a means to an end, and the ups and downs of your career will be more about people than about lines of code.

For now other people will decide what you build, who’s on your team, and whether you feel emotionally safe at the office. But you’ve still got a few responsibilities. To be a good teammate—to say things like “you belong here” and “it’s okay to make mistakes” and “you deserve a break.” To break stereotypes about programmers being insensitive and rude. To have the courage to quit if your boss doesn’t treat you or your teammates well.

Later on, you’ll be the one making decisions. Code will be the best on some days and the worst on others, and it’ll be because of you. You’ll set the tone for an entire team or department or company.

We’re trusting you to do the right thing.

End of PreviewSign Up to unlock the rest of this title.

Community Questions