Hey, Bryan here! Welcome to my newsletter. Each week I publish content to help you get to the next level in your career. Here we talk about coding, from what a programming language is to how to become an outstanding tech lead. If you have questions, don’t agree with something, or just want to say “Hi!” don’t hesitate to send me a message ❤️
Do you want to learn how to program, but aren't sure what tools you need?
I’d walk you through all tools you need to know for writing code. So, let’s dive in!
1. Code Editor
Certainly, you can write code in a simple text editor, but an editor with the following features would make you more productive:
IntelliSense (code completion, parameters info, references, code usages, etc)
Debugging tools
Plugins to integrate with another tech like Databases, Docker, terminal, etc.
Linter & auto-formatting.
The choice is going to depend on what programming language you’re using. But the main options I use are:
Visual Studio Code (free):
You can use it for a variety of programming languages like Javascript, Node.js, Python, Go, Rust, etc
Download it: https://code.visualstudio.com/
Webstorm, Pycharm (from Jetbrains):
If your company can afford it, it’s worth trying them. Webstorm is for web development, and Pycharm is for Python.
They also have for .NET & Java.
Download it: https://www.jetbrains.com/
Now that you have an editor, the next step would be to actually create a project. In technologies like web, node.js, or Python, usually we create a folder that contains a bunch of files written in that particular programming language. That’s it, there is no rocket science in this part.
The following image is an example of a personal project, where you can see the project folder called BLOG
with a bunch of folders to separate concerns (on the left) and a given file opened (on the right side), the file edit area.
2. Choose a programming language
Then you need to decide what programming language you’re going to use.
Web project: Nowadays would need to download node.js. All of the toolings used to run the server locally, process the files, etc are done with node.js.
Download it from here: https://nodejs.org/en/
When installing node.js, npm is installed as well (see package managers)
Python project
Download it from here: https://www.python.org/downloads/
When installing python, pip is installed as well (see package managers)
Package managers
Package managers usually are installed along with the programming language and their main goal is to let you download third-party libraries to reference from a given project.
For javascript/node.js all dependencies are specified in a package.json file whereas in Python you should add them to a requirements.txt file.
Why do we use it? Imagine you’re new in the team and need to set up the project, it would be a nightmare to go file by file identifying all dependencies and installing them. So it’s easier to keep track and install them from one central place.
3. Version Control System
Have you heard of Git & Github (free for personal usage)? If not, these tools help us keep track of the code, see who changes what files, what were the changes, when the changes were introduced, etc.
Controlling this is critical in a collaborative environment where many people might be adding/editing/removing multiple files.
Also, have you ever lost some work that you had on a computer? Maybe you didn’t save the files and you spill some coffee on your computer and you were not able to recover them.
If that is the case, when you use a VCS, it’s guaranteed that there would be no loss, so your code would be safe.
We aren't going to cover Git here, but you can follow this guide https://www.freecodecamp.org/news/git-and-github-for-beginners/
4. Virtual Environments
Years ago, I worked on a Java project that used SDK version 7 and everything was working fine until I tried to access my Bank Account, the site was using Java and the page didn’t load because I didn’t have the newer SDK. So I updated it, did some transactions, and head back to work, but to my surprise, the project didn’t load because I had a newer SDK version!!
In programming languages like Node.js & Python, you can use nvm or virtualenv in order to have more than one version of the programming language on your computer without any collision like what happened to me.
The key benefits are:
Your computer can remain “clean” without globally installed packages.
You can have several projects using different versions of the programming language.
Resources:
https://github.com/nvm-sh/nvm
https://docs.python.org/3/library/venv.html
5. Tools for kick-start projects
There are many tools that help you create a scaffolding project. For instance create-react-app, Django (python), Yeoman.
Those tools would create a folder with configuration files and commands to execute and build the code.
Resources:
https://reactjs.org/docs/create-a-new-react-app.html
https://www.djangoproject.com/start/
https://yeoman.io/
6. Execution
Did you write the code and want to try it out?
If you create a simple website you could install a server on your machine https://www.npmjs.com/package/serve and serve the folder directly.
If you created a python file you can run ‘python filename.py'
At this point, if you feel overwhelmed by how many things could be involved in writing code, I suggest you start with scaffolding, usually those projects have a README.md file with all instructions needed to set up and run the project locally.
Shoot me a message if you need help setting up your first project! 🔥