s

Author profile

somedood

Developer articles and tutorials by somedood.

@somedoodView on DEV

Articles by @somedood

Browse the latest writing surfaced through DevArt.

The Mental Framework for Unlocking Agentic Workflows
#ai#agents#llm#claude

The Mental Framework for Unlocking Agentic Workflows

Long-running agentic workflows will inevitably hit a context wall: the context window fills, compaction runs, and layered summaries start replacing the details you still needed. In this article, we discuss the Principle of Least Context and what that looks like in practice, especially towards effective map-reduce workflows.

Basti OrtizBasti Ortiz11 min read
17 reactions6 commentsRead full article
Mastering Python's Iteration Protocol: Iterables, Iterators, and Generators
#beginners#python#computerscience#programming

Mastering Python's Iteration Protocol: Iterables, Iterators, and Generators

The difference between iterables, iterators, and generators in Python have always been a tricky topic for beginners to learn—so much so that not everyone can think in terms of iterators even later in the Python journey. This article consolidates into one master reference all of my internal lecture notes, private Notion documents, Discord posts, and direct messages on iterators.

Basti OrtizBasti Ortiz9 min read
2 reactions0 commentsRead full article
🔥 Simulating Course Schedules 600x Faster with Web Workers in CourseCast
#javascript#python#webdev#performance

🔥 Simulating Course Schedules 600x Faster with Web Workers in CourseCast

This is the story of how I made a Monte Carlo simulation of student schedule assignments 600x faster with web workers. In this article, we'll discuss how I upgraded CourseCast (a course schedule simulator for the Course Match system of the Wharton School of the University of Pennsylvania) from a prototype that struggled with a hundred concurrent users (with ~60 seconds per simulation request) to an infinitely scalable simulator with sub-second execution speeds (faster than a page load!).

Basti OrtizBasti Ortiz9 min read
6 reactions5 commentsRead full article
You're slicing your architecture wrong!
#beginners#architecture#webdev#devjournal

You're slicing your architecture wrong!

For the longest time, the separation of concerns has been the ultimate guiding principle of software engineering. This eventually gave rise to the ubiquitous MVC architecture. But, in this article, we'll explore a better way to structure a codebase using a vertically sliced architecture.

Basti OrtizBasti Ortiz5 min read
82 reactions28 commentsRead full article
Beware the Global Const
#javascript#security#architecture#devjournal

Beware the Global Const

It is common wisdom in the programming world to discourage the use of global variables. I've recently come across a bug that humbled and reminded me about these pitfalls. Let me tell you a cautionary tale about global configuration objects.

Basti OrtizBasti Ortiz5 min read
1 reactions5 commentsRead full article
The Curse of Verbosity and Indirection
#javascript#java#oop#computerscience

The Curse of Verbosity and Indirection

I've dealt with a wide spectrum of programming languages over the years. One common theme that I've observed is that object-oriented programming patterns tend to yield the most verbose and indirect abstractions. In this article, we explore how pure object-oriented code necessarily leads to more verbose code and more opaque indirections.

Basti OrtizBasti Ortiz8 min read
0 reactions0 commentsRead full article
I was wrong about array methods and generators...
#javascript#performance#computerscience#datascience

I was wrong about array methods and generators...

For the longest time, I've always thought that JavaScript generators perform better than chained array methods in terms of execution time. But are generators actually faster than chained array methods? It's finally time to put that to the test—with statistical rigor of course!

Basti OrtizBasti Ortiz12 min read
2 reactions1 commentsRead full article
A Compelling Case for the Comma Operator
#beginners#javascript#rust#c

A Compelling Case for the Comma Operator

The comma operator is one of the lesser-known operators in C-like languages such as JavaScript and C++. Essentially, it delimits a sequence of expressions and only returns the result of the final one. So why would this ever be useful? In this article, I present a compelling case—perhaps the only one frankly speaking—for the comma operator.

Basti OrtizBasti Ortiz4 min read
83 reactions24 commentsRead full article
JavaScript First, Then TypeScript
#javascript#typescript#webdev#devjournal

JavaScript First, Then TypeScript

A recent trend has shaken up the JavaScript-TypeScript community: the anti-build-step movement. In this article, however, I will not argue whether TypeScript is still relevant today. Instead, I reflect on my own journey of stepping away from TypeScript—but for a completely different reason: consumer semantics!

Basti OrtizBasti Ortiz4 min read
67 reactions68 commentsRead full article
Please don't write confusing conditionals
#beginners#tips#programming#javascript

Please don't write confusing conditionals

Have you ever spent more than a few seconds staring at the same line of code? How often did you find conditionals that were tricky to parse? In this article, we discuss how confusing conditionals manifest in our code. Along the way, we also explore different refactoring techniques for improving the readability of conditional control flows.

Basti OrtizBasti Ortiz5 min read
130 reactions19 commentsRead full article
Dipping Toes into Unsafe Code
#rust#computerscience#showdev

Dipping Toes into Unsafe Code

In this article, we implement a safe implementation of a direct-address table using unsafe code in Rust. In doing so, we explore the mindset and thought processes involved when upholding safety.

Basti OrtizBasti Ortiz10 min read
26 reactions0 commentsRead full article
Optimizing Immutable Strings in Rust
#rust#performance#tips

Optimizing Immutable Strings in Rust

If there's anything about Rust that Rustaceans have a particular aversion to, it would most certainly be cloning and heap allocations. In this article, we will explore how taking advantage of immutability allows us to optimize memory usage.

Basti OrtizBasti Ortiz10 min read
56 reactions3 commentsRead full article
The Proper Way to Write Async Constructors in JavaScript
#javascript#typescript#tips#async

The Proper Way to Write Async Constructors in JavaScript

At the moment, there is no standardized way to write asynchronous constructors in JavaScript. However, this does not mean there aren't any workarounds! In this article, we will discuss the various ways to emulate `async` in `constructor`. Most of them are not-so-ideal, but in the end, I will demonstrate the proper way.

Basti OrtizBasti Ortiz8 min read
152 reactions56 commentsRead full article
Generic `impl` blocks are kinda like macros...
#rust#oop

Generic `impl` blocks are kinda like macros...

As strange as it may seem, generic `impl` blocks actually have macro-like capabilities. When coupled with the trait system, Rust offers a powerful mental framework for composition-based polymorphism. In this article, we will explore how treating generic `impl` blocks like macros can be an insightful shift in perspective when dealing with generics and trait bounds.

Basti OrtizBasti Ortiz12 min read
50 reactions2 commentsRead full article
🦀 Rust Reviewed: Is the hype justified? 🦀
#rust#devjournal#dx#reflection

🦀 Rust Reviewed: Is the hype justified? 🦀

The Rust programming language has steadily been on the rise in terms of adoption and popularity. But is all the hype justified? In this article, I reflect on my experience with Rust in the past year, tackling the golden moments as well as the pain points.

Basti OrtizBasti Ortiz11 min read
189 reactions36 commentsRead full article
The Future of "View Page Source"
#webdev#career#culture

The Future of "View Page Source"

The modern Web boasts leaps and bounds of progress in recent years. The Web has truly become a capable, reliable, scalable, and viable platform for modern applications. However, with all of these fancy features comes the cost of complexity. Build systems rendering the Web as a compilation target have become a common trend among production-grade applications. For new aspiring developers (such as ourselves back then), is this really the best path forward?

Basti OrtizBasti Ortiz5 min read
99 reactions33 commentsRead full article
Best Practices for ES6 Promises
#javascript#node#performance#tips

Best Practices for ES6 Promises

ES6 promises are great! Yet... they are still quite painful to deal with. In this article, I share the best practices I have learned over the years that helped me make the most out of asynchronous JavaScript.

Basti OrtizBasti Ortiz8 min read
65 reactions10 commentsRead full article
Ciphers and Hashes Explained
#beginners#security#computerscience#crypto

Ciphers and Hashes Explained

Cryptography is the fundamental lifeblood of computer security. Unfortunately, with all the hardcore theory and mathematics, it has become one of the least approachable topics in computer science. In this article, as part of our exploration into the essence of cryptography, we will look into the difference between ciphers and hashes.

Basti OrtizBasti Ortiz6 min read
39 reactions0 commentsRead full article
Basti Ortiz developer articles | DevArt