Select Page

Language preprocessors are becoming increasingly more important, and some jobs out there may even require a working knowledge of them. I’m talking about CSS preprocessors Sass and Less, and JavaScript preprocessors like CoffeeScript. As to whether or not to use them, I have two answers to that. Yes, you should use them when appropriate. My other answer is No, especially when it’s not necessary.

Now, i’m not going to go into great detail about the benefits of using a preprocessor; I’m just going to go over the pointers here. Using a preprocessor is great for large scale projects. Here’s a great Sass example. Let’s say that you have a moderately large website with multiple complex sections. For organizational purposes, it’s much easier to separate out the different sections into different Sass files (news section goes to news.scss, blog section goes to blogs.scss). This makes it so much easier to micro manage, edit, and dissect with the code on a smaller scale. I also feel like a preprocessor forces people to make more conscious decisions about their code. I have seen some ugly css files before, of which all of them lacked structure, were repetitive, and bloated with old or unused code. I’m not saying that it’s not possible for that to happen with a preprocessor, but it becomes easier to maintain a healthier code base when you use these preprocessors the way they were meant to be used.

Then, there are times when it is absolutely not necessary to use a preprocessor. As yourself the following questions. How large is my project? Will my project get larger in the future? If you say or think something along the lines of “My project isn’t that big, it’s just a one page site. I don’t foresee the project getting any bigger unless it’s an overhaul or a site expansion.”, than don’t use a preprocessor. There is a time and a place, and unless you’re just using a preprocessor for practice or learning on a small scale, it’s just not necessary. Also, if you’re not very comfortable with the original languages to begin with, hold off on the preprocessor. Learn the language as it was meant to be learned to begin with, make mistakes, and learn how to fix those mistakes. You’ll be a better developer once you understand the basics first.

Preprocessors, fundamentally, are a great idea. They are super powerful tools that are only meant to speed up the process and make a developers life easier. However, there is a time, a place, and a project appropriate for using them. Please use them responsibly.