It takes time to learn your first programming language

New developers frequently post online questions like “how long does it take to learn JavaScript” or “how long to become proficient with Java”. The thing is, everyone is different, we all learn differently, we all learn at different rates. Don’t pay any attention to whether some other developer learned language xyz in 1 week or whatever time they say.

Rather than focus on fixed time goals, it’s important that learning to develop software is an ongoing and continuous activity. You don’t ‘finish’ learning how to code, there is always something new to learn because the industry is still evolving, or tools, libraries and frameworks are always evolving. Trends also change. What’s the hot new frontend framework today may be replaced with something completely new 6 months from now.

It’s impossible to give a precise answer to ‘how long will it take me to learn language xyz’. Instead of thinking about a finite journey, you need to accept that a career in software development is a career of continuous and endless learning, and to keep your skills relevant and up to date you need to commit time and effort to your skills development.

Getting started in software development: the majority of software development is not web development

Frontend dev gets a lot of traffic in software development online communities where new developers are just getting started. That’s understandable, since if you have a computer with a web browser, you only need a text editor of some kind and you’ve got all you need to start writing and running code. It’s arguably the most accessible area of software development to get started with.

The fact is though that the majority of software development is not web dev, and most is not even backend apis to support frontend apps either. If you think about the electronic devices that fill our lives nowadays, our phones, tablets, watches, laptops, even household appliances like clothes washers, microwave ovens, all these devices run software. Modern cars have multiple systems that are comprised of millions of lines code. And this is not even thinking about the business systems that are behind the curtain and invisible to most people, financial and accounting systems, payroll processing, all quietly running 24/7

There is no golden rule that says you should start your career by learning frontend dev first and then moving into other areas. Pursue what is interesting to you. Over their careers some developers may move back and forth between roles, some may only ever work on backemd dev and never write a line of HTML Find what interests you and go for it!

Think before you build

This should not be a surprise to any experience developer, but for new developers just starting out there is a tendency to sit down at your computer and just coding coding. Shortly following this, there are complaints that programming is hard, and why when they sit at their computer to they get a mental block and don’t know how to solve a problem?

The majority of time and effort in software development is about understanding a problem and then thinking ow ways to solve that problem. It’s not about sitting at a keyboard and typing code.Actually typing code at your computer is probably the smallest part of total time spent solving a problem.

If you find yourself sitting at your computing and wondering why you can’t solve a problem, take a step back and think about the problem first, and spend some time thinking of suitable approaches for how you can solve the problem.

When should you optimize your code?

Once new developers get beyond the basics, there is a tendency to start looking for ‘clever’ solutions to problems, or worrying about whether solution A is faster than solution B.

Unless you know you have a performance problem with a solution now, or have a design constraint where you know you need to account for a performance goal and ensure your approach will meet that goal, then you’re worry about problems you don’t have.

Spend time worrying about whether your code is easily to read and understand. Worry about performance problems when you understand what performance problem you have.

Donald Knuth is famously quoted as saying “premature optimization is the root of all evil” – meaning, don’t spend time optimizing for problems you don’t have. In his paper “Structured Programming with goto Statements”, the full quote where this well known expression originated has more context:

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%”

When you know you have performance issues then spend time to address them, otherwise, focus on making sure your solution works, and that your code is easy to maintain in the future.