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.
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...
Code portability If you’ve been following me recently, you’ve probably seen me mention Bredbox, my new application for saving bookmarks. This is the first time in years I’ve built a web application, so I put a lot of thought into the process. My philosophy is to leave as many options open as possible in case I need to change direction later. That’s why I recommend targeting Node.js for JavaScript applications, even if you plan to run them on Deno or Bun. Both Deno and Bun are largely...
The return of tech specs When I was studying computer science as an undergraduate from 1996 to 2000, I took a course called Software Engineering that focused on the formal process of developing software. We learned to write a functional requirements document describing what the application should do, followed by a technical specification outlining how the software would achieve that. Only after completing both documents, often a semester-long effort with multiple review cycles, were we...