12 ms·
Bug #915: Solved
- lilSebastian 7y agoPreviously: https://news.ycombinator.com/item?id=22028581 https://news.ycombinator.com/item?id=22028581
- egdod 7y agoThat was quick.
- alpb 7y agoPretty funny how the entire HN rallied together to solve some github issue on someone's personal repo. I'll try posting some of my bugs here to see if it'll work for me as well.
- dang 7y agoThere's a power-law dropoff when it comes to follow-up submissions, since the hivemind craves novelty. But it would be fun to try. Maybe it could become a thing: Bug HN! The trick would be to make the bugs interesting: weird or hard, preferably both.
- codezero 7y agoBug HN might become a huge hobby for me if people follow through on that.
- teej 7y agoYep, when I sent out a call for help for a bug on HN in 2012, I got ~190 votes. When I posted the followup I got 5. It’s a little strange because for Reddit’s r/legaladvice it’s the opposite. Follow up posts can rank much more highly than the original.
- vermilingua 7y agoOne reason why that might be the case is that HN is a community of people that like to find and solve problems. Reddit on the other hand is passive entertainment, users are more interested in a novel problem that someone else dealt with.
- Dylan16807 7y agoIt's something else entirely. Almost all the posts on /r/legaladvice are shouting into a void. Hopefully it helps, maybe there's some interesting side discussion... But an update? That means there's actual feedback and conclusions! Something that's desperately lacking on that particular board. It's not about reddit as a whole.
- read_if_gay_ 7y agoYou could argue that HN, too, is passive entertainment. Many posts are exactly “a novel problem someone else dealt with”.
- SEJeff 7y agoThat hard part would be preventing HN from doing people's job / homework here.
- vermilingua 7y agoI think that would be more or less self-solving. Most homework bugs won’t be interesting, and most job bugs won’t be publishable. The only bugs that HN will want to solve, will be the ones that should be solved by the community.
- SEJeff 7y agoThe Gordian Bugs!
- incompatible 7y agoAt very least, there would have to be apparently well-written source code and an apparently competent person who can't figure out the problem.
- dredmorbius 7y agoAn entomology etymology ontology difficulty-novelty hierarchy?
- taneq 7y agoBravo!
- dredmorbius 7y agoFirst fan is best fan.
- swebs 7y agoI think the biggest dragon to slay would be the legendary GTK issue #233 which has been open for 15 years and has become sort of a meme by now. So many people try to solve it but fail since it requires intricate knowledge of the framework. https://gitlab.gnome.org/GNOME/gtk/issues/233 https://gitlab.gnome.org/GNOME/gtk/issues/233
- hiccuphippo 7y agoDidn't one of the other gtk derived DM replaced the file picker with their own which had thumbnail view? I thought Gnome never changed it because it didn't fit their vision.
- Aeolun 7y agoI dunno, but the GTK devs do not seem like a sympathetic bunch there. In fact it looks downright toxic. After reading an issue like that I would be very hard pressed to motivate myself to contribute anything.
- mmmrk 7y agoMy impression is the opposite: random users demanding that some devs spend their time on a tricky corner issue and getting angry about it. After reading their comments, I'd be very hard pressed to motivate myself to work on it.
- swebs 7y agoWell one person actually provided a solution, but then one of the maintainers just dismissed it because it was on Github, then locked the issue.
- mmmrk 7y agoIt seemed unclear that the patch addressed all the issues raised in the ticket, and looking at random patches still requires dev time. It is a different story when someone else actively works on getting it upstreamed and working on resolving any issues. It's about who volunteers to do the hard work. Given that no one stepped up to do it yet and random users chimed in with aggressive and/or unhelpful noise, locking the issue was adequate. I find it concerning how much abuse GNOME devs get, and I can completely understand that they respond like this.
- LockAndLol 7y agoThat would most certainly be abused by companies looking for free labor.
- ehsankia 7y agoTo be fair, it was a great nerd snipe, as it was a mysterious bug that happened when things aligned perfectly, yet still had a very good repro making it easy to test.
- AdmiralAsshat 7y agoSoon: "Hacker News Code Review As A Service"
- jnwatson 7y agoIt is hardly just "someone's personal repo". coveragepy has 1k github stars and is used by nearly every Python project under the sun.
- hermitdev 7y agoIve been a Python (among other languages) dev for about 25 years and I've never heard about this project until just now.
- incongruity 7y agoThat in no way means that Ned’s work hasn’t impacted yours or that you haven’t used his work without being aware of the dependency. Just say’n is all.
- SEJeff 7y agoDo you write unit tests? Do you care about coverage of your tests? Serious question.
- srik 7y agocoverage.py is quite popular - it was the 55th most downloaded python package last year. For reference, virtualenv was 57th. Source: https://hugovk.github.io/top-pypi-packages/ https://hugovk.github.io/top-pypi-packages/
- rhizome31 7y agoWe all have blind spots.
- mixmastamyk 7y agoTime to climb out of your hole, Mr. Hermit! Seriously though, we can't know every single third-party package under the sun. But this one is more important than the average.
- zaptheimpaler 7y agoMechanicalHNTurk
- the_jeremy 7y agoI don't know about "personal repo". My employer uses this tool to help test production code.
- alpb 7y agoYeah that’s how many personal repos work. I assume you don’t use Node.js or Go or Python where most nontrivial dependencies often come from non-corporate third parties.
- sefk 7y agoPart of the reason this got a good response is due to Ned himself. nedbat@ has a great reputation in several communities. Also he showed his homework. And then posted with a good, tight repro case. Fun to see the problem and the solution. Thanks Ned and thanks HN. Source: have seen nedbat@ in action.
- julienfr112 7y agoThat's not funny, that's the community being nice ! I don't want to live in a world where being nice is so rare that it ends up being funny.
- pjc50 7y agoIt's the kind of drive that made stackoverflow work.
- ehsankia 7y agoSo the final answer is basically, there's nothing the author can do. The problem was half with the user's code mocking with internals, and half with downstream library not cleaning up properly.
- gowld 7y agoMocks are terrible and should almost never be used, but this wasn't a mock. This was a monkeypatch. Does anyone expect that their software would function properly in the face of arbitrary changes patched in by untrusted third parties ?
- kortilla 7y agoMonkey patching is a key feature of the python mock library. Get used to it if you’re getting into python development because you’re going to come across it.
- hinkley 7y agoThe first really bizarre bug I fixed was a file descriptor bug. The code was streaming data and in some cases the app would just stop processing network packets. He or I figured out that keyboard input would temporarily unblock things. He had a compound conditional without enough parentheses in it, and one of the possible outcomes resulted in fd=1, which is stdin on many operating systems. My general advice now is to assume a 5th grade reading level for math (which consists of +-x/), and use parentheses for everything else. Especially if you think yourself to be clever (narrator: he did).
- nneonneo 7y agoThe very low precedence of & is the source of an unbelievable number of bugs, especially in embedded programming. For example: if(PORTA & 3 != 0) looks like it should be true if either of the low two bits is set. But actually, it only fires if the low bit is set because this resolves to PORTA & (3 != 0), which is PORTA & 1. Some C compilers will warn you about this. Embedded C compilers are not usually the sort of compilers that are nice enough to have these warnings. As a bonus, different languages handle precedence of &,|,^ differently: Python, for instance, binds & more tightly than ==.
- Dylan16807 7y agoIt's a shame. C made the precedence blatantly wrong so a few thousand lines of legacy code wouldn't have to be updated. And then everyone decides their own languages will copy it forever.
- Cthulhu_ 7y agoThat should give a warning at least because it (and this is probably a C thing) treats or implicitly casts a boolean true / false to a 0/1. You shouldn't be able to do PORTA & true. One more for my list of "why I don't like C".
- bigpeet 7y agoDepending on what version of C you are using, there are no "boolean" values. X != Y returns an integer value, no "implicit cast" required for &.
- yhoiseth 7y agoThis made me laugh out loud: > Hacker News can be helpful, in spite of the tangents about shell redirection, authorship attribution, and GitHub monoculture.
- kjksf 7y agoThis bug, the HN thread and how hard it is to fix (https://bugs.python.org/issue39318 https://bugs.python.org/issue39318) is a pretty good argument against exceptions. A code that looks simple and correct has been hiding a very subtle bug because no one understood the implications of an arbitrary exception being thrown at any point under the caller. And of all the people who looked at the bug not a single one looked at this seemingly simple code and said "oh yeah, that's because this code is obviously wrong". It took someone skilled enough to script gdb to figure out the buggy interactions. So the next time someone makes fun of `if err != nil`, send them the buggy implementation of tempfile.NamedTemporaryFile and ask them to spot the bug. Also, KeyboardInterrupt should not be an exception. It's a signal, not an error or exceptional situation that code wants to report to the caller. But once you have a hammer, everything looks like like a nail. In addition to making the code impossible to reason about, no-one can agree what exactly is an exception so they randomly commingle expected errors with exceptional circumstances and, in case of Python, out-of-band signals. ("randomly" as in: why is "open file" throwing an exception when file doesn't exist but "find substring" returns -1 when substring doesn't exist?)
- excpointer 7y agoPopcorn time...
- deanCommie 7y agoAn extremely obscure and rare scenario that exposes a flaw with a convenient tool does not negate the value of the tool in all other cases. Are you also going to throw out all use of automatic garbage collection in languages because of a bug caused by a GC pause. Should we stop bothering with encryption because people discover weaknesses and attack vectors? Come on, man. > Also, KeyboardInterrupt should not be an exception. It's a signal, not an error or exceptional situation that code wants to report to the caller. OP doesn't mention anything about KeyboardInterrupt, but I'll bite. Some languages like C# make "Events" a 1st party citizen, making it really easy to write non-sequential code and handling such events. Most don't, so when people want to GUARANTEE a caller handles a particular signal, they use the Exception tool because it posesses the necessary qualities. "Using Exceptions as flow control" is a well-known anti-pattern but even anti-patterns have their use in exceptional circumstances. > ("randomly" as in: why is "open file" throwing an exception when file doesn't exist but "find substring" returns -1 when substring doesn't exist?) I'll concede this one point. In-memory utility methods shouldn't throw exceptions when a useful error code would be just as good - it keeps code cleaner without trycatch blocks. NumberFormatException is my bane in Java.
- deleted 7y ago[deleted]
- gjs278 7y agogodawful title. I refuse to read this. put a fucking description of what software project this is.
- mkl 7y agoIt's a followup to a story that got nearly 600 votes two days ago and spent a long time on the front page, so most of us are well aware of the context, but which project it is is beside the point. The bug was interesting and the debugging and conversation about it was interesting. https://news.ycombinator.com/item?id=22028581 https://news.ycombinator.com/item?id=22028581
- gjs278 7y agothat first title is also bad
- gigatexal 7y ago2020 is the year of good vibes so far. The cool story of the reader getting hired from his experiences being featured on HN and now this.