Leon Pahole

All posts - page 2

How exercising less intensely helped me become healthier

10 minPersonalHealth

Written by Leon Pahole

Connect with me:

Exercise - we all know we have to do it, but the thought of spending hours upon hours in the gym doing painful and intense exercises doesn't exactly sound the most inviting. Still, I kept up with a pretty intense exercise routine for many years - until I decided to bring it down a notch. I made my workouts shorter and less intense, which made me the healthiest I've ever been. But how? It sounds paradoxical - shouldn't exercising less make me less healthy?

Read full blog post >>

Using TypeScript namespaces for better code organization in ES modules

4 minProgrammingClean code

Written by Leon Pahole

Connect with me:

JavaScript's ES modules are a great way to organize code into separate files and keep the code clean. I have noticed however that as projects get larger, it gets harder and harder to keep mental track of the code and assign proper names to identifiers. In this blog post, I present TypeScript namespaces as one of the solutions to this problem.

Read full blog post >>

My take on comments in code

12 minProgrammingClean code

Written by Leon Pahole

Connect with me:

There's a lot of conflicting information about code comments in programming communities. Some people believe in writing comments as much as possible, while others advocate for code that is self-documenting and thus renders comments almost useless. In this blog post I lay out my past experiences with comments and how these experiences shaped my current approach to writing clear and understandable code.

Read full blog post >>

How to manage TypeScript enums to prevent maintainability issues

7 minTypeScriptClean Code

Written by Leon Pahole

Connect with me:

Enums are a great way to restrict values of variables to a limited set of chosen constants. This makes the code more readable and less error-prone, as we no longer need to use magic numbers. However, enums can also cause our code to become hard to read and maintain as our codebase expands. In this blog post I describe how I solve these concerns in TypeScript.

Read full blog post >>

Don't use the programmer stereotype to justify bad habits

7 minPersonal

Written by Leon Pahole

Connect with me:

The typical programmer stereotype is humorous, but it can also be used as a justification for bad habits. In my case, this sprung out of control until I could no longer take it and became honest with myself. The blog post details the beginning of my ongoing journey from a typical programmer to a healthy, productive programmer.

Read full blog post >>