5 ms·
every time someone brings up "Code that doesn't need to deal with edge cases" I like to point at that such code is not likely to be used for anything that matte
by sidewndr46 2y ago
every time someone brings up "Code that doesn't need to deal with edge cases" I like to point at that such code is not likely to be used for anything that matters
- SoftTalker 2y agoI write code like that all the time. It's used for very specific use cases, only by myself or something I've also written. It's not exposed to random end users or inputs.
- Panzer04 2y agoIs such code hard to write in the first place? Automating the easy 80% sounds useful, but in practice I'm not convinced that's all that helpful. Reading and putting together code you didn't write is hard enough to begin with.
- Ferret7446 2y agoIt's not hard, but it's time consuming.
- skydhash 2y agoThe things I'm wary of are pitfalls that are often only in the command/function docs. Kinda like rsync with how it handles terminating slashes at the end of the path. Which is why I always took a moment to read them.
- brulard 2y agoOh, but it is. I can have code that does something nice to have, needs not to be 100% correct etc. For example, I want a background for my playful webpage. Maybe a WebGL shader. It might not be exactly what I asked for, but I can have it in few minutes up and running. Or some non-critical internal tools - like scraper for lunch menus from restaurants around office. Or simple parking spot sharing app. Or any kind of prototypes which in some companies are being created all the time. There are so many use cases that are forgiving regarding correctness and are much more sensitive to development effort.
- nonchalantsui 2y agoThere is a cost burden to not being 100% correct when it comes to programming. You simply have chosen to ignore that burden, but it still exists for others. Whether it's for example a percent of your users now getting stalled pages due to the webgl shader, or your lunch scraper ddosing local restaurants. They aren't actually forgiving regarding correctness. Which is fine for actual testing you're doing internally, since that cost burden is then remedied by you fixing those issues. However, no feature is as free as you're making it sound, not even the "nice to have" additions that seem so insignificant.
- brulard 2y agoI never said it's free. (But also aiming for 100% correctness is very very expensive) I'm talking about trading correctness, readability, security and maybe others for another metrics. What I said is just not every project that has value should be optimized for the same metrics. Bank or medical software needs to be correct as close to 100% as possible. Some tool I'm creating for my team to simplify a process does not necessarily need to. I would not mind my webgl shader possibly causing problems to some users. It would get reported and fixed. Or not. It's my call what I would spend my effort on. Of course the tradeoffs should be well considered. That's why it may get out of hand real bad if software will be created (or vibe coded) by people with little understanding of these metrics and tradeoffs. I'm absolutely not advocating for that.
- School-Cotton 2y agoYou never write code to automate something in your personal environment, or to analyze some one-off data, rather than to actually go into production?
- mplanchard 2y agoI’m always amazed in these discussions how many people apparently have jobs doing a bunch of stuff that either doesn’t need to be correct or is simple enough that it doesn’t require any significant amount of external context.
- grg0 2y agoIn other words, people preaching LLMs are noobs with no real stake in what they are doing. But you can't really call people noobs these days.
- mplanchard 2y agoHa, a little harsher than I intended it to come off, but it really does make me wonder.
- joquarky 2y agoI'm always amazed by the arrogance that if you can't hack it, then everyone else can't either.
- mplanchard 2y agoYes, my arrogance amazes even me. The point is more that everyone seems to acknowledge that a) output is spotty, and b) it’s difficult to provide enough context to work on anything that’s not fairly self-contained. And yet we also constantly have people saying that they’re using AI for some ridiculous percentage of their actual job output. So, I’m just curious how one reconciles those two things. Either most people’s jobs consist of a lot more small, self-contained mini-projects than my jobs generally have, or people’s jobs are more accepting of incorrect output than I’m used to, or people are overstating their use of the tool. Or something else!