Learning a new language/framework
Tags: beginners, codenewbie, learning, laravel
Published: 2024-06-30 19:43:26

I recently took up an internship role where I had to use a programming language and framework I was unfamiliar with. The role involved using Laravel as the backend framework and I had to learn it. [Laravel](https://laravel.com) is a PHP framework for building web applications.
In this post, I'd like to outline some steps I took from being clueless to contributing to the codebase within 2 months.
Don't be alarmed if this timeframe seems too short, this is probably, as I'll talk about in a minute, because I have had a little experience in programming and backend development before then. If you don't fall into this category or you are a total beginner in your field, these tips should still be helpful to you as a developer. Hang tight, let's explore.

## Having a good programming background

A really smart guy once said, "People need to start learning programming instead of programming languages". I agree with this saying. Programming languages are just tools software developers use to implement their solutions. The underlying way of thinking and problem-solving are still required no matter the number of languages you know.
Knowing a lot of programming languages, although impressive, doesn't mean the person can apply these concepts to build cool and helpful software, especially in this age of rising use of AI tools and companions.

Understanding concepts like Variables, Data types, control flow, data structures, algorithms, programming paradigms like Object Oriented Programming (OOP) and Functional programming, Design patterns, Testing, concurrency and parallelism, and error handling is a good start. In the real world, or even now, we apply and implement most of these without consciously/intentionally thinking about them.

## Learn the language first

I've heard people say "I'm good with React, but I have issues with JavaScript". This shouldn't be the case. One should be very familiar with a language and how it works before learning any of its frameworks.
Some key questions to ask when learning a new language may include:
- What does the general **Syntax** look?
- What are the provided/built-in **Data Types**?
- How do I declare **Variables**?
- Provided **Operators**.
- How to implement **Control Flows**
- How to declare **Function**
- Manual **Memory Management**?
- How to run my programs? **Compiled** or **Interpreted**?
- Is it a **Static or Dynamic Type** language?
- What **Paradigm** does it belong?

Of course, You'll notice answers to these questions for any programming language you choose are not the same. You might also get a "Not Quite" or "It depends" answer from some of these in some languages, and understanding these "It depends" scenarios is key.

For example, answering the question "How do I run my Java Program". You can run your Java program by first compiling it to bytecode with the java compiler: `javac MyCode.java`, then running the generated `.class` file with `java MyCode`. Despite the compilation step, java is "Not Quite" a compiled language. Java is considered both compiled and interpreted. It compiles to bytecode, then the bytecode is interpreted with the Java Virtual Machine (JVM).

Most of the knowledge you gain in this stage is transferable to other programming languages.

## Build Projects

This is a very important step in the process. Building projects is a way for you to exercise the knowledge you've acquired. It also allows you to experiment with the language or framework, which gives you a more in-depth knowledge of the language.
It is okay to start small as no one expects you to build anything too complex as you start, you are only advised to take up challenges.

## Introducing Frameworks/Libraries 

After getting a grasp of the language through the docs/tutorials and building projects, it's time to choose a framework.
Frameworks are pre-written blocks of code that programmers can incorporate into their projects to save time and effort. Frameworks and libraries make implementation of common tasks very easy because of the provided *abstraction*.

Choosing a framework to learn can be hard and confusing as you're new to the space, so here are some tips:
- Start with a Popular one: Learning a popular framework with a vast community and resources makes it easier to find help and learning materials.
- Experiment: Once you're comfortable with one framework, consider exploring others in different domains to broaden your skillset and knowledge.
- Focus on Core Programming Concepts: Regardless of the framework, a solid understanding of programming fundamentals is crucial. The ability to learn new frameworks becomes easier as your programming foundation strengthens.

## Start learning the framework

Before diving into the framework, ensure you have a good grasp of the programming language it's built on. This will make understanding the framework's syntax and concepts much smoother.

Finding the right resources to learn the chosen framework is not always easy, but I always recommend the Official framework documentation. Most frameworks have comprehensive documentation that covers everything from basic concepts to advanced features. Start here to get a solid understanding of the framework's core principles and functionalities.
Other sources for learning about a framework include Tutorials (e.g. YouTube Videos, Blogs, and Articles), Video Courses (like Udemy or Coursera), and Forums.

Do not waste time in this stage before moving to the next step so you don't get stuck in "Tutorial Hell".

## Notice the Key concepts

Don't try to learn everything at once. Prioritize understanding of the framework's core functionalities, architecture, and design patterns. This foundational knowledge will be essential as you build more complex projects.

## Build Projects

Yet again, Build projects. Don't wait until you're an expert to start building. Look for small project ideas that allow you to practice the framework's concepts. This will solidify your learning and boost your confidence.

Speaking of taking challenges, allow me to introduce the [HNG internship program](https://hng.tech/internship). HNG is a company with a mission — we work with the very best techies to help them enhance their skills through our HNG internship program and build their network. HNG Internship is a fast-paced boot camp for learning digital skills. It's focused on advanced learners and those with some pre-knowledge, and it gets people into shape for job offers. To register for this program, click [here](https://hng.tech/internship).

I hope these tips were helpful. Remember, growth takes time and dedication so set realistic goals, take breaks and you can also find a study buddy to help you in your journey. Stay consistent friends🙋‍♂️.