Learning how to KISS

Writing clean code and the ongoing AI wars

Morning folks! This is Beyond Code - the newsletter designed to help developers build their careers, one Thursday at a time.

Note: This newsletter is not sponsored. Any websites/tools/apps we recommend are purely because we enjoy them personally

Did You Know…

 The First Computer Bug Was an Actual Moth

In 1947, Grace Hopper and her team found a literal moth stuck in the relays of their computer. They taped it to their logbook and called it a “bug.”

So the next time you find yourself searching for “bugs” in your code, be glad that yours don’t literally move around on you

Handy Coding Tool

No Need to Relearn Regex Every 6 Months

Regex is powerful, but it can also feel like a foreign language if you only use it occasionally. That’s where Regexr comes in. It’s an interactive tool that highlights matches in real-time, provides a detailed breakdown of your expression, and offers helpful cheatsheets.

Real-time Testing: Instantly see how your pattern matches sample text.
Clear Explanations: Hover over different parts of your regex to see what they do.
Community Examples: Learn from shared patterns or post your own.

Tech Highlights

The AI Wars Intensify in the Tech Industry

Tech news has been nothing but AI for the past year, and things don’t seem to be slowing at all.

  • Record-breaking Funding: Databricks and other companies are raising unprecedented funding rounds to attract and retain top AI talent, highlighting the increasing demand for AI expertise in the tech industry. (TheVerge)

  • Big Tech Wants All the Chips: In 2024, Microsoft purchased 485,000 of Nvidia’s Hopper AI chips, doubling the amount bought by its closest rival, Meta, as part of its aggressive push into AI infrastructure. (Financial Times)

  • It’s Not Just Tech: Recent studies show the adoption of Generative AI tools has shot up in 2024 across nearly every industry. A July study from McKinsey and Co reported 65% of organizations regularly use Gen AI, nearly double from 10 months prior. (McKinsey)

At this rate, AI is going to dominate every industry—except writing unit tests. Nobody wants that job, not even the robots.

Programming Tip

The Greatest Coding Rule of All - Always K.I.S.S.

And, no, we’re not trying to hit on you.

When writing code, one of the best rules to remember is to always KISS, or Keep It Simple Stupid. Essentially, don’t add unnecessary complexity to your code. Clear, simple, and readable code is always better than overly clever hacks. Why?

• Easier debugging: You won’t hate past-you after a 4 hour bug hunt.
Faster onboarding: New team members won’t need a Rosetta Stone to decipher your code.
• Fewer comments: Your code should explain itself.

Bad:

const d = arr.reduce((a, b) => a > b ? a : b);

Good:

function findMaxValue(numbers) {
  let maxValue = numbers[0];
  for (let number of numbers) {
    if (number > maxValue) {
      maxValue = number;
    }
  }
  return maxValue;
}

Simpler? Yes. More readable? Absolutely.

Ask the Experts

"What are some of the biggest mistakes you've seen junior developers make, and how can they avoid them?"

I’ve seen a lot of junior developers struggle when they don’t ask questions and don’t ask for help when they get stuck. Your team will expect you to reach out when you need help. Learning how to get help quickly when you need it is one of the most important skills when you’re starting out.

Aubrey Rhodes, Chief Technology Officer @ Workful

Open Source Highlight

Excalidraw: Collaborative Diagrams for All

If you ever find yourself doodling architecture designs on the back of a napkin, Excalidraw might just be the perfect tool for you. It’s an open-source whiteboard tool that lets you create and collaborate on diagrams in a fun, hand-drawn style.

Collaborative: Invite your teammates and watch changes in real-time.
Browser-Based: No installation needed, works right in your browser.
Open Source: Contribute to the project or fork it to build your own version.

What’s Open Source?
“Open sourced projects” refer to projects that have their code open to the public. They allow anyone to contribute to the project and help maintain it. Not only are they a great way to get hands on experience early on in your career, they also provide you a way to add bigger projects to your resume!

Shameless Plug

Enjoying Beyond Code?

If you enjoy our newsletter, be sure to check out our full site! We’ve got:

Courses for building your tech career.
Interviews with professional developers.
Handy resources to make coding life easier.
• A Discord community to network with fellow devs.

www.beyondcode.app - Join for free!

Pop Quiz

Which background color wins, and why?

body {
  background-color: blue;
}

html body {
  background-color: red;
}

Find the answer at the bottom of the newsletter!

Rate this weeks newsletter:

Login or Subscribe to participate in polls.

Pop Quiz Answer: The page ends up with a red background because html body {} is the more specific selector compared to body {} alone. In the cascade, more specific rules override less specific ones.