Hacker Newsnew | past | comments | ask | show | jobs | submit | more z_open's commentslogin

Not a great answer but finish them broken. If they're just for me and/or my company, document when they fail and be done with it. If it's documented then it's not a bug


He didn't mention the worst pattern, the visitor pattern, which has extremely few use cases.


The value of the visitor pattern is that it lets you emulate tagged unions in languages that don't have them (e.g., Java 16 and earlier). Of course, Python has no need of this because you can check the type of anything at runtime and the optional type annotations also support union types.


There is, however, a certain elegance to multiple dispatch, which Python doesn't natively support. Visitors are indeed a common approach to emulating it. Doing the runtime checks is external rather than internal polymorphism; there are reasons for either, and aesthetics count.


Are all major programming languages going to come from corporations in web 2.0?


Where do you think even C and C++ came from?


Web 2.0?


Probably referring to "large tech companies that grew in the Web 2.0".

Yeah, agree that it sounds slightly off initially.


Yeah I have always wondered about the success rate for self help books. Seems like the people who need it have an inherent problem using it.


I am. Every time I cd I ls even though I know what's in there.


Throwing a runtime error seems like an absurd solution compared to changing the comparison operator or using an unordered_map

What's wrong with x.min < y.min || (x. min == y.min && x.max < y. max)


That would indeed satisfy std::map, but then the question is, is that a useful ordering for intervals? To answer that, you need to define what you want to use the interval map for. If you want to be able to lookup in which unique interval a given value is, then you shouldn't have overlapping intervals to begin with. If you do allow overlapping intervals, a query could result in multiple intervals. Are lookups by value (not by interval) still O(log N) with that ordering?


He’s just asserting he’s using the data structure in the way he wants to.


assembly catches integer overflow. You just need to check the flag.


reddit has become unusable with the bots. It's really a shame to see now even universities doing it. I think in the future we will have to find a way to verify if users or posts are real. Otherwise it will end up being dystopian wasteland.


Does your course not have exams or in-lab assignments? Should sort itself out. Honestly, I'm all for homework fading away as professors can't figure out how to prevent people from using AI. It used to be the case that certain kids could get away with not doing much because they were popular enough to get people to let them copy their assignments (at least for certain subjects). Eventually the system will realize they can't detect AI and everything has to be in-person.


Sure, this guy is likely to fail the course. The point is: he is already working in the field. I don't know his exact job, but if it involves programming, or even scripting, he is faking his way with AI, not understanding what he's doing. That is frightening.


> I don't know his exact job, but if it involves programming, or even scripting, he is faking his way with AI, not understanding what he's doing. That is frightening.

That could be considered malpractice. I know our profession currently doesn't have professional standards, but it's just a side effect of it being very new and not yet solidified; it won't be long until some duty of care becomes required, and we're already starting to see some movement in that direction, with things like the EU CRA.


It is a chrome developer. His claims that he was raising the quality level of the web are particularly hilarious given that he worked at google. Maybe the salary of google blinds people into believing this.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: