New 42-day free trial
Smarty

5 principles for creating stupidly brilliant JavaScript applications

Andrew Townsend
Andrew Townsend
 | 
April 11, 2022
Tags
Smarty header pin graphic

Have you ever tried to add a minor feature to your application only to discover that you’ll have to re-write large blocks of code first? Or maybe you’ve spent hours deciphering hundreds, or perhaps thousands, of lines of existing code just to find out a task only required two lines of additional code. If you’re like most developers, you’ve wasted countless, frustrating hours wading through immensely complicated code trying to force it to do things it wasn’t built for.

In his presentation, Mike Manwill, Frontend Team Lead here at Smarty, discussed 5 principles to help you create stupidly-simple applications that are maintainable, extendable, and bug-resistant. He calls it “writing stupid code”.

“If you can’t explain it simply, you don’t understand it well enough.” - Albert Einstein.

Mike explained that “smart” code is “dumb” for several reasons. It is difficult to read and understand, making it difficult to hand off to predecessors or other coders on the team. It is bug-prone, and debugging can be very very difficult. Extending it becomes time-consuming and difficult, especially if you’re not the one who authored it. Estimating work needed becomes virtually impossible if your code is too smart. And finally, it tends to have a short lifespan and needs to be overhauled frequently because it can be so frustrating to work with.

Smart code is dumb image

Aside from spotting those challenges, there are five other symptoms of “smart code”.

  1. Your functions take lots of parameters
  2. There is a lot of conditional logic
  3. You need to explain your code via commented code
  4. Brittle code (it breaks every time you change it)
  5. The code is difficult to follow

So, we’ve identified the problem. You’re tired of being frustrated with this “smart code”. How can you make it better? For the main part of his presentation Mike went over the five principles you can follow to create brilliant “dumb code” that lasts.

  1. Take time to really understand the problem
  2. Decouple different ideas
  3. Pass the thing instead of the parts to build the thing
  4. Refactor (just because it’s working doesn’t mean you’re done)
  5. TDD (Red, Green, Refactor)

You can watch the video recording of his session (super short, only 28 minutes!) and see his examples and explanations first hand by clicking the button below.

Try our stupidly brilliant address validation and address autocomplete tools. You can sign up for a free account by clicking the link below.

Subscribe to our blog!
Learn more about RSS feeds here.
rss feed icon
Subscribe Now
Read our recent posts
Smarty announces virtual user conference: Save the date for Pinpoint, by Smarty
Arrow Icon
OREM, UT, August 18, 2025—Smarty®, the leader in address data intelligence, is inviting developers, data decision-makers, and certified address nerds to join our first-ever 2-day virtual user conference: Pinpoint. This interactive online event will begin on November 11, 2025, and bring together a verifiably fun mix of industry experts, technical deep dives, and business-boosting insights. Participants will walk away with a better understanding of how address validation, geocoding, data enrichment, and autocomplete can solve their toughest data challenges—and maybe even score some sweet prizes while they’re at it.
How address data became Fabletics's (and others') secret sauce
Arrow Icon
Address data accuracy isn't just about getting mail delivered. Having quality address data will directly impact revenue, compliance, and customer experience. In a recent webinar, we explored real-world case studies showing how companies across industries leverage address verification and geocoding to solve expensive problems and unlock new opportunities. Healthcare data: Compliance and accuracy at scaleCuratus, a healthcare data provider, faced a critical challenge with provider directory accuracy.
Usage notifications | Get notified before hitting your lookup limit
Arrow Icon
Burning the end of a brisket can lead to some tasty results (we’re looking at you, burnt ends), but unexpectedly burning through your lookups? Not so appetizing. All users receive notifications when their API usage reaches 90% and 100%. To help users further leverage their lookups, Smarty’s cooked up a solution: the ability to get notification emails when usage reaches three additional intervals: 25%, 50%, and 70%. With these notifications working alongside usage by key and limit by key, you can manage your API usage better.

Ready to get started?