DEV Community

Maciej Zaręba
Maciej Zaręba

Posted on

Importance of clean Production Environment.

Since the start of my developer career, I was always looking forward to handling projects with a hard hand. I love when code is clean and doesn't have unnecessary things hiding in the nook of a method/function however you wanna call that. Some of the tools like TSLint and other code analyzers handle a lot of issues regarding unnecessary code which stays in our code base. But not every single language has that kind of stuff. Some of them don't Have it and in that case, we most certainly handle those things manually read 'Pull Requests', but as everybody knows some of the stuff is hidden in our plain sight.

Since I'm Salesforce developer I've started to think is there a way to be always sure if code base still doesn't have to debug or console logs hidden in our code base. Most certainly it will be always present, even though You will probably look at search in the project and be persistent in deleting in stuff that helped you in debugging. A lot of things will happen in environments that bridge to Production.

As for some of the time I've encouraged myself to create a tool that will help You and other fellow teams to break the barrier of unnecessary check-ins If I left some debug stuff. I've created a finder which will help every Continous Integration tool to handle that kind of issue.

Let me present You a "Debug Finder"

Currently, it's fully supported for Salesforce projects, which uses Package.xml as one of the main files to handle which files I should look and parse.

Why Rust?

So I was looking for a fast and new language that will provide me necessary and easy to handle functionality. As for now with over 300 lines of code, I'm parsing a huge amount of code and it's a matter of .5 sec do 2 sec to parse over 60k lines in 100 files.

Why I've done that?

As I said before I love clean code and I know that now everyone is like me. Not everyone looks at Pull Request and says "Yea you've provided the good solution but you didn't remove debug stuff". This approach gives us a certain safe point which helps us to keep our codebase clean and easy to maintain.

Roadmap

For now, there's some stuff that I want to introduce to my tool which will not be bounded to only one technology which currently is Salesforce. I'm looking to extend it to other technologies.

Greetings and Have a nice day.

Top comments (0)