Readit News logoReadit News
jonahx commented on A visual introduction to big O notation   samwho.dev/big-o/... · Posted by u/samwho
wpollock · a day ago
Big-O isn't as relevant as it once was. Modern hardware includes mutithreading, piplining, numa, and complex caching. Some operations can take less than one CPU cycle and others can take hundreds, or exceptionally thousands of cycles. Trying to describe the behavior of algorithms solely as a function of the number of "trips through the innermost loop" can be a very misleading description!

Besides that, other measures such as big-Omega should be referenced in any discussion of big-O.

(I did enjoy Big-O the anime series though! /grin)

jonahx · a day ago
> Big-O isn't as relevant as it once was. Modern hardware includes mutithreading, piplining, numa, and complex caching. Some operations can take less than one CPU cycle and others can take hundreds, or exceptionally thousands of cycles.

Big-O theory was invented precisely to be a measure of computation that is independent of such low-level details. In that sense it is timeless. And any (decent) presentation always includes appropriate caveats like "the constant C may be very relevant for 'smaller' N".

jonahx commented on Waymo granted permit to begin testing in New York City   cnbc.com/2025/08/22/waymo... · Posted by u/achristmascarl
ilamont · 4 days ago
Traffic enforcement, which used to correct some bad driving, has basically evaporated in many parts of the U.S. This has been a long-term trend.

A friend who's a cop told me that only when their department got specific state grants would they set up stings of drivers driving in a pedestrian walkway while someone was crossing the street. Here's an example of one such grant program, which is actually funded by the federal government: https://www.mass.gov/doc/ffy26-municipal-road-safety-grant-a...

Crosswalk Decoy Operations: These operations may involve a plainclothes officer acting as a civilian pedestrian and a uniformed officer making stops OR involve a uniformed officer serving as a spotter to observe and relay violations to an officer making stops. ... All Pedestrian and Bicyclist enforcement must be conducted during overtime shifts, meaning grant-funded activity occurs during hours over and above any regular full-time/part-time schedule.

At other times, he said he would only pull someone over if they were doing something batshit crazy and they happened to be behind the vehicle where it was easy to pull them over. Minor stuff and speeding they would rarely ticket.

The U.S. and other countries need to use automated methods of detecting and applying penalties. Some busy intersections have cameras for this, but it seems to be very limited, maybe because of cost.

Years ago New York used to calculate if you were speeding the NY State Thruway based on the time between toll booths. They cancelled this program for some reason.

Although more recently, the New York State Police have speed cameras set up in a few highway work zones, which is effective (double fines applicable, see https://wnyt.com/top-stories/where-are-automated-speed-camer...) but it still requires a person driving a car to set up the gear.

jonahx · 4 days ago
In Miami, there is very little enforcement and reckless driving flourishes. I used to regularly see cars doing 90, weaving, pass cops who did nothing. I've also talked to multiple cops who confirmed that they rarely enforce unless specifically doing traffic duty. Which never made sense to me, since it's a revenue stream. But however the incentives are set up, they motivate cops to do nothing, and drivers know it.
jonahx commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
dragonwriter · 5 days ago
> That said, I'd be curious to hear a legitimate example of using it to implement "structural subtyping that you can't express with Protocols/ABCs alone".

ABCs with __subclasshook__ have been available since Python 2.6, providing a mechanism to inplement runtime-testable structural subtyping. Protocols and @runtime_checkable, which provide typechecking-time structural subtyping (Protocols) that can also be available at runtime (with @runtime_checkable) were added in Python 3.8, roughly 11 years later.

There may not be much reason to use __subclasshook__ in new code, but there's a pretty good reason it exists.

jonahx · 5 days ago
> There may not be much reason to use __subclasshook__ in new code, but there's a pretty good reason it exists.

That's quite a different claim, and makes a lot of sense. Thanks for the history!

jonahx commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
Spivak · 5 days ago
You better not find out about Protocols in Python then. The behavior you describe is exactly how duck typing / "structural subtyping" works. Your class will be an instance of Iterable if you implement the right methods having never known the Iterable class exists.

I don't find using __subclasshook__ to implement structural subtyping that you can't express with Protocols/ABCs alone to be that much of a crime. You can do evil with it but I can perform evil with any language feature.

jonahx · 5 days ago
> You better not find out about Protocols in Python then. The behavior you describe is exactly how duck typing / "structural subtyping" works. Your class will be an instance of Iterable if you implement the right methods having never known the Iterable class exists.

Conforming to an interface is a widely accepted concept across many popular languages. __subclasshook__ magic is not. So there is a big difference in violating the principle of least surprise.

That said, I'd be curious to hear a legitimate example of using it to implement "structural subtyping that you can't express with Protocols/ABCs alone".

jonahx commented on Code review can be better   tigerbeetle.com/blog/2025... · Posted by u/sealeck
kjgkjhfkjf · 6 days ago
If you want to remain relevant in the AI-enabled software engineering future, you MUST get very good at reviewing code that you did not write.

AI can already write very good code. I have led teams of senior+ software engineers for many years. AI can write better code than most of them can at this point.

Educational establishments MUST prioritize teaching code review skills, and other high-level leadership skills.

jonahx · 6 days ago
There is no reason to think that code review will magically be spared by the AI onslaught while code writing falls, especially as devs themselves lean more on the AI and have less and less experience coding every day.

There just hasn't been as many resources yet poured into improving AI code reviews as there has for writing code.

And in the end the whole paradigm itself may change.

jonahx commented on Anna's Archive: An Update from the Team   annas-archive.org/blog/an... · Posted by u/jerheinze
thaumasiotes · 9 days ago
That's not a real tension. There is no case where the inherent value of some commodity keeps its price high despite easy availability. That's the point of the "diamonds in the desert" thought experiment.

Inherent value provides a ceiling on the price of whatever it is.

Availability also provides a ceiling on the price.

If I give you two theorems that say C < 300 and also C < 10, why would you describe those as being "in tension" with each other?

jonahx · 9 days ago
The tension arises because in some cases, at least for a while, the availability can be suppressed. Like when some expert releases an expensive ebook or video course "Secrets of X". Ofc many such books are scams, but assume for sake of argument the information is actually valuable. The initial buyers are motivated not to share it. It remains a scarce commodity for a while. But all it takes is one person to make a torrent, and the game is over. So there are two incentives -- one trying to keep it scarce, and the other trying to make it free.
jonahx commented on IQ tests results for AI   trackingai.org/home... · Posted by u/stared
jonahx · 10 days ago
Doesn’t training data pollution largely invalidate the usefulness of this benchmark?
jonahx commented on The electric fence stopped working years ago   soonly.com/electric-fence... · Posted by u/stroz
singpolyma3 · 11 days ago
But like, "what have you been up to" is useful because it gives them a chance to mention something interesting that you can then have a conversation about.
jonahx · 11 days ago
I'd say it's a "know your audience" question. It can work well for more extroverted people that enjoy an opportunity to talk about themselves.

But it's also low-effort and asks the other person to do all the conversational work. For me, personally, if I saw an old friend's number pop up on my phone and magically knew "what have you been up to?" was going to be the first question, I wouldn't answer. Otoh, if I knew the opener was going to be "You're gonna love this story..." I'd be excited to pick up.

jonahx commented on The electric fence stopped working years ago   soonly.com/electric-fence... · Posted by u/stroz
bilsbie · 12 days ago
I can see this being good for social connections but for business it might be considered rude? Like an old boss, or employee?
jonahx · 11 days ago
Yes it’s not always appropriate. It’s for friends.
jonahx commented on Claude Opus 4 and 4.1 can now end a rare subset of conversations   anthropic.com/research/en... · Posted by u/virgildotcodes
Alchemista · 11 days ago
Honestly, I think some of these tech bro types are seriously drinking way too much of their own koolaid if they actually think these word calculators are conscious/need welfare.
jonahx · 11 days ago
More cynically, they don't believe it in the least but it's great marketing, and quietly suggests unbounded technical abilities.

u/jonahx

KarmaCake day6632January 18, 2013View Original