Thoughts on DebuggabilityIn the early days of web browsers, there were no developer tools. From Netscape to Internet Explorer, and the first version of Firefox, if something wasn’t aligning properly or your JavaScript wasn’t behaving as expected, there was little you could do. The browser provided no additional information. Everything changed with the arrival of Firebug, the first real developer tool for web applications. As a Firefox plugin, it exposed the inner workings of a web browser to software engineers. Firebug set the stage for native browser developer tools and inspired frameworks, servers, and more to create their own developer tools. It also underscored a new critical aspect of web application development: debuggability. Debuggable code not only performs its intended functions but also allows you to inspect its actions to identify the source of problems. When code isn't debuggable, issues are opaque, hard to diagnose, and consume a lot of time. This was the case with the old ESLint configuration system, eslintrc. While the eslintrc system had served us well for a decade, it had become a growing maintenance burden. The developers who implemented many of the newer features were no longer on the team, leaving the remaining team members struggling to address the increasing error reports. We spent a significant amount of time investigating whether issues were bugs or misconfigurations, and the volume of requests continued to grow. This ultimately led to the creation of a new configuration system, called flat config. The flat config system, as the name suggests, represents the entire configuration in a one-dimensional array. It loads a single configuration file instead of merging multiple files as eslintrc did. This simplification makes the new configuration system much more debuggable. Additionally, we developed a tool called Config Inspector to help developers understand their configuration files. Even the ESLint team relies on Config Inspector for debugging configuration issues. Some of the things that make code debuggable include:
Whenever you design a feature or system, it's worth investing extra time to make it debuggable. Asking, “When this fails, how will I figure out the problem?” now will save you and your team significant time later. Key Takeaways
Stuff I've Enjoyed this Month🎬 Prioritizing Technical Debt as if Time and Money Matters by Adam Torhill (GOTO Conferences) 📖 An Introduction to Coaching Skills by Christian Van Nieuwerburgh 📝Epic Programming Principles by Kent C. Dodds 🎬 Custom dropdowns just got a whole lot easier (finally!) by Wes Bos 📝Add browser speech input & output to your app by Pamela Fox 🎬 Understanding the V8 JavaScript Engine by Lydia Hallie (freeCodeCamp talks) 📖 Leading Effective Engineering Teams by Addy Osmani What I'm Working On🏠 Real Estate: Another issue at a property ended up costing me a lot of money. The dryer broke, so I opted to buy a new one. Unfortunately, the new one wouldn't mount onto the old washer, and because there is no place else to put these appliances, I ended up needing to buy a new washer too. Follow my Instagram for real estate photos. 💻 Open Source: I updated Crosspost, my utility and CLI for posting messages across different social media networks at the same time. I improved the API to make it possible to post to the same social network multiple times with different credentials and also cleaned up the CLI output. 💻 ESLint: The two things I've been spending time on are:
|
A once-per-month newsletter discussing topics important to senior-level software engineers, with a particular focus on frontend technology and leadership.
Static Analysis and AI If you’re like me, the way you write code has changed significantly in the past year. December 2024 was the first time I decided to use AI to write code, and today it generates most of the code I work on. It also writes the tests and documentation. My job is now focused on reviewing code, and that can get tiring. How can I be confident that the code meets my standards, remains secure, and scales well? The answer is static analysis. Static analysis tools inspect code...
Working with Legacy Code The term “legacy code” often strikes fear into the hearts of software engineers. While there’s no single definition, IBM describes it as “code that still serves its purpose but was developed using now outdated technologies.” Any successful tech company has some amount of legacy code because that code worked well enough to attract and keep customers. When something is working, especially if it’s difficult to change, the logical choice is often to let it keep running...
npm Security For the past few weeks, an ongoing supply chain attack on npm packages has shaken the JavaScript community. It’s not that npm packages haven’t been compromised before, but this time, the targets were surprising. Attackers went after popular packages maintained by well-known authors, creating the potential for widespread damage. In late August, the popular monorepo tool Nx was compromised, leading to several malicious package versions. These included a postinstall script that...