refactor_master
refactor_master on Hacker News
And of course you never change the test suite in the process… That would be bad developer practice, LLM or not.
While tearing down Adobe you’ve probably paid Nvidia, Anthropic, and Microsoft in the process, while at the same time no amount of Claude will make a dent in any of these behemoth strongholds. Adobe, evil as they are, aren’t the ones controlling the world’s knowledge, flow of goods or compute.
This is almost comically similar to “the immigrants are taking our jobs and are eating our pets” and how in-fighting about this has enshitified the real world, while not having solved any single problem along the way.
It’s like overthrowing governments with machine guns and guerilla armies. Yes, the playfield has been leveled. Literally.
Except, nobody does that. So that’s not a real number.
Think you’re clever because your LLM contacts 100 businesses? Imagine 100000 businesses doing the same thing. You’ve just eradicated human support, because nobody’s going to sit through this BS bot future. Good luck when you get auto-flagged for some reason and there’s not a single human to revert or care.
“In mice” - actually not even.
Cars:
- create environments we hate being in
- directly impacts public health
- widens inequality
- makes us productively go faster through the terrible environment we’ve set up
LLMs:
- create markets we hate being in
- directly impacts public health
- widens inequality
- makes us productively put out slop faster through the terrible market we’ve set up
Was this unintended satire?
There was a saying where I went to high school: “the language programme students are not better at languages, they’re just worse at math”.
Now, how can I be so sure? Because I’ve been starving at some of these events, whereas others can seemingly call a single slice of pizza dinner.
There’s most definitely a health aspect in there too, but I don’t think it paints the whole story.
We have all the linters, tests, and AI writing code for us. I don’t need the left hand to tell the right hand it did a good job. I’m very certain my code runs when I push the PR.
What I need now is architectural, long-horizon and business perspective.
Still not solved? Guess it was really about the commas and not the value delivered anyway, so do whatever you feel like.
E.g. to move to the capital permanently from outside you're basically under the same scrutiny as an immigrant on a greencard.
The sequence of commits I present a purely optimized for reviewing, and not an actual record of what happened. I’m not going to read another person’s 100 turn slop factory, because they couldn’t express their change in one paragraph.
If I grossly neglected to maintain live deadly bacteria in my containment facility, am I absolved of blame? Since, you know, the bacteria is the real bad guy who should be put in jail?
So… letters?
import polars as pl
# 1. Base Dataset
lazy_df = pl.LazyFrame(
{
"store_id": ["S01", "S02", "S03", "S04", "S05"],
"revenue": [5000.0, 2400.0, 15000.0, 900.0, 3200.0],
"margin": [0.45, 0.30, 0.60, 0.15, 0.50],
"tx_count": [120, 45, 300, 20, 85],
"returns": [5, 12, 45, 2, 8],
}
)
# 2. Define Layer Abstractions
def get_kpi_layer() -> list[pl.Expr]:
return [
(pl.col("returns") / pl.col("tx_count")).alias("return_rate"),
(pl.col("revenue") / pl.col("tx_count")).alias("avg_order_value"),
]
def get_threshold_layer(thresholds: dict[str, list[float]]) -> list[pl.Expr]:
return [
(pl.col(col) > limit).alias(f"is_{col}above{int(limit)}")
for col, limits in thresholds.items()
for limit in limits
]
def get_interaction_layer(numeric_cols: list[str]) -> list[pl.Expr]:
return [
(pl.col(a) / (pl.col(b) + 1e-5)).alias(f"ratio_{a}per{b}")
for i, a in enumerate(numeric_cols)
for b in numeric_cols[i + 1 :]
]
def get_segmentation_layer() -> list[pl.Expr]:
return [
pl.when(pl.col("margin") > 0.4)
.then(pl.literal("High"))
.otherwise(pl.literal("Low"))
.alias("margin_profile")
]
# 3. Consolidate and Execute Single Graph Pass
thresholds = {"revenue": [1000.0, 5000.0, 10000.0], "tx_count": [50, 100, 200]}
numeric_cols = ["revenue", "margin", "tx_count", "returns"]
expr_pool = [
*get_kpi_layer(),
*get_threshold_layer(thresholds),
*get_interaction_layer(numeric_cols),
*get_segmentation_layer(),
]
final_df = lazy_df.with_columns(expr_pool).collect()