Artificial intelligence
fromMedium
21 hours agoMost Developers Are Using AI Wrong.
Using AI in coding can create an illusion of speed, leading to a lack of understanding and ownership of the code.
With its Alpha series of game-playing AIs, Google's DeepMind group seemed to have found a way for its AIs to tackle any game, mastering games like chess and by repeatedly playing itself during training. But then some odd things happened as people started identifying Go positions that would lose against relative newcomers to the game but easily defeat a similar Go-playing AI.
Which Algorithm Is This? If you step back, this maps almost perfectly to the Top K Frequent Elements problem.We usually solve it for integers in a list. Here, the "elements" are audience profiles age and body-type combinations. First, define what an audience profile looks like: case class Profile(age: Int, height: Int, weight: Int) What we want is a function like this:
Christopher shares an article titled "The Uselessness of 'Fast' and 'Slow' in Programming." It digs into how the different aspects of software performance span a wide range of orders of magnitude, and how developers can obsess over irrelevant performance details, often losing more time working in suboptimal environments than building what they need with tools they already know. We also discuss an article about why uv is fast, which explains how most of its speed comes from engineering decisions rather than just being written in Rust.
This is a state where we see that the teams that move fastest will be the ones with clear tests, tight review policies, automated enforcement and reliable merge paths. Those guardrails are what make AI useful. If your systems can automatically catch mistakes, enforce standards, and prove what changed and why, then you can safely let agents do the heavy lifting. If not, you're just accelerating risk,
Structural pattern matching excels at... matching the structure of your objects! For the two examples in this article, we'll be using a number of dataclasses that you can use to build abstract Boolean expressions: from dataclasses import dataclass class Expr: pass @dataclass class And(Expr): exprs: list[Expr] @dataclass class Or(Expr): exprs: list[Expr] @dataclass class Not(Expr): expr: Expr @dataclass class Var(Expr): name: str
If you're trying to make sure your software is fast, or at least doesn't get slower, automated tests for performance would also be useful. But where should you start? My suggestion: start by testing big-O scaling. It's a critical aspect of your software's speed, and it doesn't require a complex benchmarking setup. In this article I'll cover: A reminder of what big-O scaling means for algorithms. Why this is such a critical performance property.