Skip to main content

My experience going from PHP to JavaScript

How I started programming with PHP, switched to JavaScript without really planning it, and why exciting projects are what make knowledge stick.

Hi! I started programming with PHP. I remember opening my first .php file and looking at my code through the browser. Literally, because I needed a local server (XAMPP, which bundles Apache and PHP) to run it. (PHP doesn’t get compiled. The server interprets it every time you load the page, so double-clicking the file just shows you the raw code.)

I didn’t understand anything back then. Now I understand a little more, so here’s how I moved from one language to another.

The environment where you learn a technology can shape a lot of how you get along with it. That’s why many of us aren’t that excited about Java or C#. I hadn’t touched them until I started technical school, and a lot of people don’t until university.

PHP was different. I chose it (or I think I did). I was interested in programming and just wanted to build my idea. And as far as the language goes, I don’t think I could have had a better start. PHP was easy for me to learn. I picked up the basics of programming by figuring out how to list data, show content based on conditions, and so on.

Using something for the first time is exciting, and the second time can be great, but at some point you want to do more. You want to stop repeating yourself and try something new, either to make the project better or to get better at building software.

I started studying JavaScript in December 2016. Moving things in the console, playing with the DOM. Then I found React. From that moment on, everything started to light up.

Great projects keep you learning, and above all, they make sure that what you learned stays with you.

Learning rules and commands takes time, but I learn much faster when I’m motivated by an interesting project. Sometimes it’s a new framework. Sometimes it’s just trying to keep an app fast while I keep adding features.

That’s my favorite note in this post: the projects that excite you the most are the best glue for knowledge. When I started programming in PHP, and later in JavaScript, I was really afraid of making mistakes. But the satisfaction of finishing pieces of interaction that people could actually use made it worth it.

In the end, this is how my transition went:

  1. Without thinking about it, I switched my main programming language.
  2. Wanting to build more, I went deeper into what the language could do.
  3. I loved it, so I decided to specialize in front-end engineering.
  4. Now I keep learning other areas of Computer Science that I can connect with building user interfaces: Machine Learning, Web3, or even Virtual Reality.

It’s not about JavaScript.

The future looks bright, even without PHP.

Thanks for everything ?>