Driving on Sunshine

Cleaner code, Easier Resumes, and.. Isaac Newton?

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…

This original logo, from 1976, was designed by Apple’s third cofounder, Ronald Wayne. It only lasted for about a year before Jobs had it changed in 1977 to the simple Apple we all know.

I guess they didn’t think Newton’s head would fit on the back of a Mac very well.

Handy Coding Tool

All the Docs, All in One Place - DevDocs.io

DevDocs is a one-stop shop for developer documentation, combining multiple languages, frameworks, and tools into a single, fast, and searchable interface. Whether you’re looking for JavaScript methods, Python libraries, or CSS properties, it’s all here.

Tech Highlights

EVs Get a New Paint Job

Since the dawn of electric vehicles, range has been their primary concern. While the distribution of EV chargers in recent years has made this less of an issue, some new tech could completely change the game:

  • Solar Paint: Mercedez Benz recently announced their latest project: solar charging paint. While solar panels attached to cars isn’t totally new (Source)

  • Roads Go Wireless: In 2023, Detroit built the first road that wirelessly charges cars as they drive on it. Los Angeles is hoping to follow suite ahead of the 2028 olympics as they plan to install their own. While these wireless charging roads are currently pricey (~2million per mile), they could prove to be a great solution (Source)

I never thought I’d have to ask the dealership, “which color gets the best mileage?”

Programming Tip

Avoid Deep Nesting

If your code has several layers of nested loops or conditionals, it might be time to step back and rethink your approach. Deeply nested code is harder to read, debug, and maintain. Instead of creating a labyrinth of brackets, aim for flatter, more modular designs.

Why it matters:

  • Readability: Deeply nested code can feel like solving a puzzle just to figure out what’s happening.

  • Debugging: The more levels of nesting, the harder it is to trace errors.

  • Flexibility: Refactoring deeply nested code is more challenging than modular, straightforward designs.

Bad:

def process_orders(orders):
    for order in orders:
        if order["status"] == "shipped":
            if order["priority"] == "high":
                if order["payment"]["confirmed"]:
                    print(f"Processing high-priority shipped order: {order['id']}")

Good:

def is_shipped(order):
    return order["status"] == "shipped"

def is_high_priority(order):
    return order["priority"] == "high"

def is_payment_confirmed(order):
    return order["payment"]["confirmed"]

def process_orders(orders):
    for order in orders:
        if is_shipped(order) and is_high_priority(order) and is_payment_confirmed(order):
            print(f"Processing high-priority shipped order: {order['id']}")

Ask the Experts

“What are some of the best ways for someone to learn to code on their own?”

There are so many free resources to be able to learn to code in almost any language. A good way to learn to code is to think of a problem you have and code to solve it. You end up more invested in the outcome and it causes you to break out your critical thinking skills vs just following a tutorial that gives you every step.

Kimberly Brown, Engineering Manager @ TestBox

Open Source Highlight

Simplifying Everyone’s Least Favorite Task - RXResume

If you don’t like writing a resume, then you’re a normal person. But luckily for you, this open source project simplifies the process for you. Fill in your info, select a template, and let them do all the formatting for you.

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

Find the Bug

def sum_numbers(numbers):
    total = 0
    for num in numbers:
        total = num
    return total

print(sum_numbers([1, 2, 3]))

Find the answer at the bottom of the newsletter!

Rate this weeks newsletter:

Login or Subscribe to participate in polls.

Pop Quiz Answer: It returns 3 because total is overwritten on each iteration. Instead of “total = num”, it should be “total += num”