Search
Close this search box.
Search
Close this search box.
Search
Close this search box.

Three tools that can help you become a better web developer

Facebook
Twitter
LinkedIn
Pinterest
WhatsApp

TL;DR

Use git, use eslint, and write unit tests.
Want to know the reasoning behind each tool? Keep reading!

Introduction

Whether you are starting out as a developer or already have some experience, improving your coding skills is an ongoing endeavor. But what does it mean to be a better coder?
While there are many ways to solve a problem with code, some of them are better than others. As Robert Martin wrote:
Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees.
Good code doesn’t just work. It is also easy to maintain and reuse. That means that others (or the future you) can understand this code easily, which in turn allows them to solve bugs, add features and refactor it faster and without degrading the whole application.
As such, code quality has a big impact on the happiness of everyone involved with the project: engineers, managers, product people, and even end users.
Being a better coder means writing better code, and getting there requires a lot of practice.
If you work in a well-operated team, this practice usually comes through design and code reviews, but this is not always the case – especially if you are working on small pet projects which are not developed in a team.
If that’s the situation, you can use readily available tools that will help you experiment, get feedback, and learn better coding practices.

 

Git 

These days, it’s hard to find software development teams that don’t use some tool for version management of their code. Git is one such tool and is probably the most popular. CVS tracks changes in the code and allows multiple developers to work in parallel and collaborate on the same codebase.
But what if I’m working alone? what if I’m just playing with some code to learn a new library or try out some ideas? I don’t need any git, right?
Wrong!
Small children learn by experimentation. They try out different actions in a safe environment, see the results and then try again something different.
The same approach can be applied to coding, and git is the tool that enables that.
When used correctly, git enables one to explore different solutions to a problem, try out different libraries, and experiment freely, with the knowledge that at any point in time it is trivial to roll back the changes, get back a good version of the code and start over if needed.
It’s like having an ‘undo’ button for entire change sets and is really liberating.
I recommend using git for every project — even if it stays local and not uploaded to a remote repository like GitHub.
If you already know git it will be trivial and if not you’ll learn a new and important tool.

ESLint

Linting tools, like ESLint, perform static analysis of the code and recommend changes that can improve it according to a variety of rules.
They are used in software projects to maintain a consistent standard of code style and quality in the project.
However, with the right approach, they can also help improve one’s coding skills even in personal projects.
I would divide the eslint rules into two major categories: code style and best practices. When working in a team it is very important to maintain a standard code style because it makes reading the code easier, but there is no one right code style and this category of rules is less important in the context of this article (I don’t think you’ll be a better coder if you use tabs instead of spaces).
The second category, however, is very relevant to our subject. It includes rules that are meant to prevent potential bugs, and make the code more readable and thus more maintainable.
This is important for development, but if you pay attention these rules can also teach you what patterns to avoid in the future which is a great win. It’s almost like having an experienced developer reviewing every line of your code in real-time and giving focused, well-explained recommendations for improving your code.
Starting out with eslint can be a bit frustrating because there will be many warnings and errors and the reasoning behind each rule is not always clear, but remember that these rules were created by highly experienced developers and were refined over years of usage.
Note that the list of rules that are enabled can be customized, so I recommend starting with a strict set of rules and disabling a rule only after you understand why it was created and what is the reasoning behind it.
As a side note, I’ll add that even the rules in the “Stylistic Issues” section, which are said to be “quite subjective”, can make your code better (if not prettier).
Take, for example, the rule max-lines-per-function which limits the number of lines that a function can have. Even though it is considered a styling rule, it has importance beyond just style. This is because a function having too many lines usually indicates that it has too much logic or too many responsibilities and should be broken into smaller, simpler pieces of logic.
Also note that there are plugins for ESLint which add rules that enforce best practices for more special cases like specific frameworks, functional programming, arrays, promises, etc. and it’s a good idea to get to know them too.

Unit Tests

Unit tests have a major part in assuring the quality of code in software projects. They help avoid bugs and make refactoring easier.
But besides that, unit tests can also teach you to write better code. The reason for that is that bad code is usually also hard to test, so as you gain experience writing tests, you will always think about the testability of your code even if you don’t follow a strict Test-Driven-Development workflow. Let’s see two examples of how good testability goes hand-in-hand with good coding practices.
The first example is global variables.
Using global variables is considered a bad practice for various reasons which are not necessarily related to tests. Mainly, they cause the code to be less predictable, less manageable, and less reusable as they create implicit, unregulated couplings between different areas of the code base.
In the context of unit tests, source code that uses global variables is more difficult to test. The reason is that to be effective, each separate test case has to run in a controlled, well-defined setup to consistently produce the expected results. Having global variables around makes it tricky to control the test setup completely as they create implicit dependencies which are hard to control.
Because of this difficulty, when you keep unit tests in mind, you will tend to avoid using global variables and get better code.
For the second example, let’s consider a function with complicated logic and many arguments. Writing good tests for such a function is going to be a nightmare, as in order to be effective we must check all execution paths in the function which require as many combinations of input values as possible. Breaking such functions down into smaller, simpler functions will make testing easier and at the same time will make the tested code better (= easier to understand and so easier to maintain and reuse).
Again — a definite win-win, thanks to the use of unit tests.

Summary

I hope I managed to explain the meaning and importance of good code and that you agree that becoming a better coder it is a goal worth pursuing.
The tools that I introduced above were created for and are used by teams of software developers to enable better collaboration, better standards, and better quality.
However, as I hopefully demonstrated, these tools also have massive value beyond their mainstream use as aids for self-growth and improvement for individual developers and small projects.
These tools, when used wisely allow us to interactively and incrementally learn best practices and produce better code.
I believe that any software project, even small solo ones should use them.

Happy coding!

Subscribe for Email Updates:

Categories:

Tags:

Hybrid Work
Lean-Agile Software Development
Jira Plans
Limiting Work in Progress
Entrepreneurial Operating System®
Product Ownership
Agile Mindset
Sprint Retrospectives
Software Development Estimation
Lean Agile Management
chatgpt
POPM
WIP
Kanban Kickstart Example
Continuous Integration
Agile Techniques
Team Flow
Lean Agile Basics
predictability
Retrospectives
Spotify
Release Train Engineer
System Team
Iterative Incremental Development
RSA
ROI
SAFe Release Planning
Scrum and XP
Agile Release Planning
User stories
Lean Agile
Managing Projects
speed @ scale
Daily Scrum
Lean Software Development
Tips
ARTs
Agile and DevOps Journey
ATDD
Reading List
Agile Marketing
NIT
DevOps
Agile Product Development
ScrumMaster Tales
Implementing SAFe
SPC
RTE Role
BDD
transformation
Quality Assurance
RTE
Jira
PI Objectives
Code
What Is Kanban
Kanban
Frameworks
Amdocs
Agile Development
Kanban Game
Lean Agile Organization
ALM Tools
Agile Program
Scrum Master Role
Achieve Business Agility
EOS®
Nexus Integration Team
Scrum
Pomodoro Technique
Certified SAFe
System Archetypes
SAFe DevOps
Development Value Streams
AI
Effective Agile Retrospectives
Agile Project Management
IT Operations
Kanban Basics
Covid19
Presentation
Sprint Iteration
Manage Budget Creation
Operational Value Stream
Introduction to Test Driven Development
Self-organization
Built-In Quality
Lean and Agile Principles and Practices
Scrum Primer
Continuous Improvement
Lean Budgeting
Webinar
Applying Agile Methodology
Agile Israel
Scrum.org
LeSS
agileisrael
ATDD vs. BDD
Agile Israel Events
Continuous Delivery
Nexus
Product Management
Agile
Engineering Practices
Games and Exercises
Advanced Roadmaps
Scrum Values
Professional Scrum Product Owner
LAB
Continuous Planning
Atlaassian
Rapid RTC
Risk Management on Agile Projects
Tools
Keith Sawyer
Agility
Agile Release Management
Kaizen
Agile Delivery
SA
Accelerate Value Delivery At Scale
Portfolio for Jira
Agile Product Ownership
ART Success
Agile for Embedded Systems
Video
TDD
Slides
Change Management
Agile in the Enterprise
Professional Scrum Master
Principles of Lean-Agile Leadership
Agile Risk Management
QA
Agile Games and Exercises
Nexus and SAFe
Agile India
Kaizen Workshop
Agile Community
Agile Assembly Architecture
An Appreciative Retrospective
Agile Games
Coaching Agile Teams
Large Scale Scrum
Risk Management in Kanban
Scrum With Kanban
SAFe
Jira Cloud
Nexus vs SAFe
Scaled Agile Framework
Rovo
Program Increment
AgileSparks
Lean Risk Management
Releases Using Lean
Legacy Code
Atlassian
Managing Risk on Agile Projects
Legacy Enterprise
Systems Thinking
Scrum Master
Agile Outsourcing
Scrum Guide
Perfection Game
Jira admin
Lean Agile Leadership
The Agile Coach
GanttBan
Lean-Agile Budgeting
Value Streams
Continuous Deployment
Sprint Planning
Elastic Leadership
Agile Contracts Best Practices
A Kanban System for Software Engineering
LPM
AI Artificial Intelligence
Agile Exercises
Artificial Intelligence
Nexus and Kanban
Lean and Agile Techniques
Agile Project
Confluence
Software Development
Risk-aware Product Development
Acceptance Test-Driven Development
Agile Testing Practices
Business Agility
Agile Basics
lean agile change management
Introduction to ATDD
Test Driven Development
The Kanban Method
PI Planning
Implementation of Lean and Agile
Enterprise DevOps
Professional Scrum with Kanban
System Integration Environments
Process Improvement
Planning
Certification
Story Slicing
Kanban 101
Lean Startup
AgileSparks
Logo
Enable registration in settings - general

Contact Us

Request for additional information and prices

AgileSparks Newsletter

Subscribe to our newsletter, and stay updated on the latest Agile news and events

This website uses Cookies to provide a better experience
Shopping cart