|
Pavlov posted:So I got into a debate about silly 'design patterns', and I thought I'd share two of my favorite Java classes. One is the AbstractSingletonProxyFactoryBean (which I still don't know what you'd use for), and the RequestProcessorFactoryFactory (which is, technically, a factoryfactoryfactory). I try to read the descriptions for classes like this, but my brain always shuts down and starts parsing it as "durr durr durr durr" and I never leave the doc exactly sure of what in the gently caress the thing is supposed to do. "AbstractSingletonProxyFactorBean" is such a chain of buzzwords I don't even know how to attack it. What is a bean? Who knows.
|
# ? Jan 28, 2015 18:47 |
|
|
# ? Jun 13, 2024 06:34 |
|
LeftistMuslimObama posted:I try to read the descriptions for classes like this, but my brain always shuts down and starts parsing it as "durr durr durr durr" and I never leave the doc exactly sure of what in the gently caress the thing is supposed to do. "AbstractSingletonProxyFactorBean" is such a chain of buzzwords I don't even know how to attack it. What is a bean? Who knows. quote:In computing based on the Java Platform, JavaBeans are classes that encapsulate many objects into a single object (the bean). They are serializable, have a 0-argument constructor, and allow access to properties using getter and setter methods.
|
# ? Jan 28, 2015 19:01 |
|
What is meant by the phrase "encapsulate many objects into a single object"? That doesn't seem to be the usage of the verb 'encapsulate' that I'm familiar with.
|
# ? Jan 28, 2015 19:12 |
|
pigdog posted:Nope, frameworks these days often act as web servers themselves. Everyone at least still proxies through nginx or Varnish first, right?
|
# ? Jan 28, 2015 19:32 |
|
Skuto posted:Nobody does because GCC defaults it for -O2 and -Os since many years anyway. Mah durn compiler faithfully follows the spec it claims to Blotto Skorzany posted:What is meant by the phrase "encapsulate many objects into a single object"? That doesn't seem to be the usage of the verb 'encapsulate' that I'm familiar with. Well, you see, they're hidden from clients, so that's "encapsulation" instead of boring ol' aggregation. You can then access each individual object via a getter and setter. Encapsulation! OOP! Design patterns!
|
# ? Jan 28, 2015 19:33 |
|
GrumpyDoctor posted:Mah durn compiler faithfully follows the spec it claims to The committee changed the spec, breaking already existing working code, and the compiler writers didn't bother to detect and warn about these situations 100% of the time.
|
# ? Jan 28, 2015 19:39 |
|
Blotto Skorzany posted:What is meant by the phrase "encapsulate many objects into a single object"? That doesn't seem to be the usage of the verb 'encapsulate' that I'm familiar with. C struct.
|
# ? Jan 28, 2015 19:45 |
|
ExcessBLarg! posted:That's a bigger horror to me. Writing secure Internet services is hard, and it took many years for the big guys (Apache, nginx, etc.) to get it right. I can't imagine that I'm pretty sure everyone proxies those. It'd be pretty insane not to.
|
# ? Jan 28, 2015 20:10 |
|
Java code:
|
# ? Jan 28, 2015 20:42 |
|
Pavlov posted:So I got into a debate about silly 'design patterns', and I thought I'd share two of my favorite Java classes. One is the AbstractSingletonProxyFactoryBean (which I still don't know what you'd use for), and the RequestProcessorFactoryFactory (which is, technically, a factoryfactoryfactory). quote:All Known Implementing Classes: At what point do you step back and marvel at the ridiculousness of what you've created? Actually typing out "RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory" would give me serious pause to wonder if I was actually solving a useful problem, or just solving problems of my own creation.
|
# ? Jan 28, 2015 21:10 |
|
pseudorandom name posted:The committee changed the spec, breaking already existing working code No, they didn't. The first actual specification includes the aliasing rules. Feel free to search your copy of C89 for "/28/". Also, the entire Linux kernel was written starting two years after that standard was published, so while Stephen Bourne would have a legitimate complaint, Linus does not. pseudorandom name posted:and the compiler writers didn't bother to detect and warn about these situations 100% of the time. Other things that compilers don't detect and warn about in 100% of situations:
Examples of undefined behavior that would actually be reasonable to detect and warn about in 100% of situations:
Now, I don't agree with how GCC approached its strict-aliasing optimization; what they do is legal under the standard but really goes out of its way to break reasonable code. There is no good reason to miscompile casting the address of a local int variable to float* and immediately loading/storing, and the legal alternative (memcpying to a temporary) is really a pain in the rear end. This is why Clang's strict-aliasing optimization allows itself to be overridden by the knowledge that two addresses definitely alias. But acting like the entire concept of aliasing optimizations is some gross imposition invented by egg-head compiler writers who don't really understand C, maaaaan, is just obnoxious.
|
# ? Jan 28, 2015 21:12 |
|
You could as well call them DoucheNozzle.LolButt , but pattern-based nimes like *Factory, *Strategy, *Singleton* etc do give a brief idea of what the class is all about and what it's used for, without needing to dwell into them further. Spring does like to take that idea into extremes.
|
# ? Jan 28, 2015 21:15 |
|
pigdog posted:but pattern-based nimes like *Factory, *Strategy, *Singleton* etc do give a brief idea of what the class is all about and what it's used for, without needing to dwell into them further. Yes, it should give you the idea to throw yourself into an active volcano. KaneTW fucked around with this message at 22:02 on Jan 28, 2015 |
# ? Jan 28, 2015 21:18 |
|
rjmccall posted:
What does the spec say about passing objects through varargs? gcc's "... will crash at run time" warning always struck me as, well, a bit of a horror. (In being a warning, that is).
|
# ? Jan 28, 2015 21:33 |
|
rjmccall posted:Examples of undefined behavior that would actually be reasonable to detect and warn about in 100% of situations: I agree with the general thrust of your post, but in some cases it seems like the standards committee just got lazy. For example, apparently this is undefined in c: quote:An unmatched ‘ or ” character is encountered on a logical source line during tokenization. Is it really that hard to detect that and warn about it?
|
# ? Jan 28, 2015 21:57 |
|
OddObserver posted:What does the spec say about passing objects through varargs? gcc's "... will crash at run time" warning always struck me as, well, a bit of a horror. Oh, you're right, I take it back; there is that one example. It's actually theoretically something that compilers could support — this came up on cxx-abi-dev vaguely recently because I believe somebody was asking GCC to support it — but don't because (1) it would significantly complicate va_next and (2) nobody cares, except apparently whoever's paying GCC to implement it. (Supporting this in va_next properly requires va_next to be implemented as a compiler intrinsic, which is often but not always true. Some platforms with really simple calling conventions implement it in system headers instead.) That's a weird exception because the standard only really allows it for the convenience of metaprogramming — you can test whether one type is convertible to another by looking at the result type of a calling an overloaded function, where one overload takes the target type and the other takes ... (i.e. anything). But then it turned out that that normal type-checking doesn't give you quite the right results, so type-checking calls to variadics in unevaluated contexts needs to be a special case anyway.
|
# ? Jan 28, 2015 21:58 |
|
HappyHippo posted:I agree with the general thrust of your post, but in some cases it seems like the standards committee just got lazy. For example, apparently this is undefined in c: A lot of the lexical undefined behavior rules are because the language can't quite guarantee that code won't compile in some perverse case. I don't know what the deal with unmatched quotes is, but every compiler I know about treats it as an error. Maybe they were worried about backwards compatibility.
|
# ? Jan 28, 2015 22:11 |
|
Linus is really terrible. He has some bad idea about something, and then thinks anybody who doesn't agree with his interpretation of complex issues, and I quote, "should be retroactively aborted. Who the f*ck does idiotic things like that? How did they noty die as babies, considering that they were likely too stupid to find a tit to suck on?"
|
# ? Jan 28, 2015 22:58 |
|
... and then a bunch of people rush in to defend his use of acerbic language and laud him as being a straight-shooter who gets things done.
|
# ? Jan 28, 2015 23:00 |
|
Suspicious Dish posted:Linus is really terrible. He has some bad idea about something, and then thinks anybody who doesn't agree with his interpretation of complex issues, and I quote, "should be retroactively aborted. Who the f*ck does idiotic things like that? How did they noty die as babies, considering that they were likely too stupid to find a tit to suck on?" The thing you're quoting appears to be Linus's reaction to some code that read from a file descriptor making a system call to read individual bytes one at a time. I don't see how that's a "complex issue" open to "interpretation," it's just obviously bad practice. Of course the real issue is whether it's appropriate to use such an acerbic rhetoric with long-time contributors to the project you manage (it's probably not!). You don't have to go out of your way to frame his outrage like it's over a mere difference of opinion.
|
# ? Jan 29, 2015 00:53 |
|
Deus Rex posted:The thing you're quoting appears to be Linus's reaction to some code that read from a file descriptor making a system call to read individual bytes one at a time. I don't see how that's a "complex issue" open to "interpretation," it's just obviously bad practice. They were just trying to say Linus is an rear end in a top hat. The quote, even in context, still makes him sound like an rear end in a top hat.
|
# ? Jan 29, 2015 01:09 |
|
Suspicious Dish posted:Linus is really terrible. He has some bad idea about something, and then thinks anybody who doesn't agree with his interpretation of complex issues, and I quote, "should be retroactively aborted. Who the f*ck does idiotic things like that? How did they noty die as babies, considering that they were likely too stupid to find a tit to suck on?" Or maybe you could just not be a pissy little pussy.
|
# ? Jan 29, 2015 01:11 |
|
Pavlov posted:They were just trying to say Linus is an rear end in a top hat. The quote, even in context, still makes him sound like an rear end in a top hat. Sure. I just don't understand the point of mentioning "complex issues" and "interpretations" when the provided example had nothing to do with those things. Linus looks like a weird dick on his own.
|
# ? Jan 29, 2015 01:23 |
|
sarehu posted:Or maybe you could just not be a pissy little pussy. The problem with this style isn't that it pushes away pussies, it's that it pushes away anyone that knows more than Linus. There have been a few cases where he's been the retarded monkey throwing poo poo and driving smart people away.
|
# ? Jan 29, 2015 03:24 |
|
sarehu posted:Or maybe you could just not be a pissy little pussy. Sure, but only after you stop being a horrible racist, sexist shitbag.
|
# ? Jan 29, 2015 03:39 |
|
HappyHippo posted:At what point do you step back and marvel at the ridiculousness of what you've created? Actually typing out "RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory" would give me serious pause to wonder if I was actually solving a useful problem, or just solving problems of my own creation. I think it was the python thread that introduced me to execution in the kingdom of nouns
|
# ? Jan 29, 2015 03:42 |
|
NovemberMike posted:The problem with this style isn't that it pushes away pussies, it's that it pushes away anyone that knows more than Linus. There have been a few cases where he's been the retarded monkey throwing poo poo and driving smart people away. Do you have specific examples, just out of curiosity? Deus Rex fucked around with this message at 03:55 on Jan 29, 2015 |
# ? Jan 29, 2015 03:49 |
|
Deus Rex posted:Do you have specific examples, just out of curiosity? There's this specific thread which happened to a former colleague, where Linus makes bold claims about cache coherency that are just flat out wrong: http://marc.info/?l=linux-mm&m=139939405221810
|
# ? Jan 29, 2015 04:08 |
|
Suspicious Dish posted:There's this specific thread which happened to a former colleague, where Linus makes bold claims about cache coherency that are just flat out wrong: http://marc.info/?l=linux-mm&m=139939405221810 This is (maybe, I don't know anything about this topic, but I'll take your word for it) an example of Linus being wrong, but doesn't seem to me like one where he is abusive or being a retarded monkey throwing poo poo. In fact, someone on the mailing list appears to have corrected him here and I didn't see Linus blow up or anything like that in response. It also doesn't look like this experience dissuaded your colleague from making further contributions.
|
# ? Jan 29, 2015 04:20 |
|
It would take something impressive indeed to get Rik to stop contributing to Linux.
|
# ? Jan 29, 2015 04:22 |
|
Deus Rex posted:This is (maybe, I don't know anything about this topic, but I'll take your word for it) an example of Linus being wrong, but doesn't seem to me like one where he is abusive or being a retarded monkey throwing poo poo. In fact, someone on the mailing list appears to have corrected him here and I didn't see Linus blow up or anything like that in response. It also doesn't look like this experience dissuaded your colleague from making further contributions. My former coworker was Jerome Glisse, not Rik. He's going to continue working on HMM, but he expressed frustration when trying to convey his ideas to Linus. He's not overly abusive in that thread, no, but he was wrong. He's more abusive here: https://lkml.org/lkml/2014/11/10/649 Make sure to read the followup where he admits he hasn't read the actual patches or actually tried to understand the problem space at all while Jerome tries to carefully explain to him the problems he faces using the simple solutions he suggested. In one of those revisions, Linus said "wait, you're doing it way X? What the gently caress is wrong with this idiot? Do it way Y instead!" and then in a follow-up, "jesus, wow, I think I liked way X instead". I can't point to the specific ML posts, since this was just in person talking on the T back home, and also a year ago.
|
# ? Jan 29, 2015 04:28 |
|
Deus Rex posted:Do you have specific examples, just out of curiosity? I can't remember who it was, but there was a contributor that was basically considered the leading expert on a certain space. I can't remember if it was memory management or networking or graphics or security or what, and it's not particularly important. The important bit was that this was an old unix greybeard dude that built everything in this space originally so when he says something you listen. Linus didn't listen, he heard something he didn't understand, mixed it up with a different bug and started bitching at the guy to stop being retarded. They go into a bit of a back and forth and now the dude is building an OS for some weird architecture that was obsoleted in the 80s instead of contributing to Linux.
|
# ? Jan 29, 2015 06:28 |
|
Is a 100,000+ line main.css and a 50,000+ line main.js file a coding horror?
|
# ? Jan 29, 2015 06:30 |
|
NovemberMike posted:They go into a bit of a back and forth and now the dude is building an OS for some weird architecture that was obsoleted in the 80s instead of contributing to Linux. Most Linux contributions are to add bug-for-bug support for some Slovenian knockoff of a Romanian clone of a Soviet re-implementation of some dumb terminal you could only get for a thousand boxtops of a cereal that was discontinued after a month.
|
# ? Jan 29, 2015 06:37 |
|
ratbert90 posted:Is a 100,000+ line main.css and a 50,000+ line main.js file a coding horror? Replace all syntactically-relevant newlines and delete the rest of them, problem solved!
|
# ? Jan 29, 2015 06:44 |
|
Suspicious Dish posted:My former coworker was Jerome Glisse, not Rik. He's going to continue working on HMM, but he expressed frustration when trying to convey his ideas to Linus. He's not overly abusive in that thread, no, but he was wrong. He's expressing confusion and openly stating he might not understand things in that email and the follow up. You're also using the word "abusive" in a new recently-made-popular way to describe comments made online that doesn't actually correspond to anything known as "abuse." Linus is not abusing the recipient of his email, nor is he abusing the email system. So his email is not abusive. Unless you really think having and sharing beliefs about code being bad is a way to abuse somebody and also think having that having and sharing uncertain beliefs while going out of your way to point out that you might be wrong is a way to abuse somebody. (It seems to me you just like to try hard to hate people for no reality-based reason. See for example you calling me a racist because of a post that Skuto made.)
|
# ? Jan 29, 2015 06:47 |
|
ExcessBLarg! posted:That's a bigger horror to me. Writing secure Internet services is hard, and it took many years for the big guys (Apache, nginx, etc.) to get it right. I can't imagine that Passenger fully integrated with nginx, so no need to proxy it. Unicode is explicitly designed to sit behind a reverse proxy. Puma and Thin sorta try to not require a reverse proxy, but in practice do anyway for performance reasons. People totally do toss run production servers on poo poo like unproxied WEBrick all the time, but the application code written by such people is a much larger security concern than the application server.
|
# ? Jan 29, 2015 06:56 |
|
sarehu posted:He's expressing confusion and openly stating he might not understand things in that email and the follow up. You're also using the word "abusive" in a new recently-made-popular way to describe comments made online that doesn't actually correspond to anything known as "abuse." Linus is not abusing the recipient of his email, nor is he abusing the email system. So his email is not abusive. Unless you really think having and sharing beliefs about code being bad is a way to abuse somebody and also think having that having and sharing uncertain beliefs while going out of your way to point out that you might be wrong is a way to abuse somebody. (It seems to me you just like to try hard to hate people for no reality-based reason. See for example you calling me a racist because of a post that Skuto made.) I'm pretty sure he's not saying the criticism itself is abusive, but rather the manner in which it's delivered is. There's way more professional and tactful ways to express disagreement/misunderstanding than literally saying "WHAT? \n NONE OF WHAT YOU SAY MAKES ANY SENSE." and other very vitriolic poo poo ("you should be retroactively aborted", etc). Talking to someone that way (esp. in a semiprofessional environment) honestly is abusive. There's nothing wrong with disagreeing with someone's approach or with not understanding their methodology. However, there's definitely no reason to literally publicly berate someone (especially using the language/statements that Linus does) for making a contribution that you don't yet understand, and don't even try to take the time to read the patches to understand. It's really hosed up to do, and I guarantee you it's turning people away from contributing.
|
# ? Jan 29, 2015 07:45 |
|
Hm, what's that you say? You called read(1);? Jesus Christ, how are you even alive? How have you not gotten the Guinness World Record in racking up the most Darwin Awards by now? You know what, if you don't find a way to run into a truck by next week, I'll just do the world a favor and hire an assassin to rid the face of the planet of you!
Suspicious Dish fucked around with this message at 08:00 on Jan 29, 2015 |
# ? Jan 29, 2015 07:58 |
|
|
# ? Jun 13, 2024 06:34 |
|
sarehu posted:He's expressing confusion and openly stating he might not understand things in that email and the follow up. You're also using the word "abusive" in a new recently-made-popular way to describe comments made online that doesn't actually correspond to anything known as "abuse." Linus is not abusing the recipient of his email, nor is he abusing the email system. So his email is not abusive. Unless you really think having and sharing beliefs about code being bad is a way to abuse somebody and also think having that having and sharing uncertain beliefs while going out of your way to point out that you might be wrong is a way to abuse somebody. (It seems to me you just like to try hard to hate people for no reality-based reason. See for example you calling me a racist because of a post that Skuto made.) Also in what loving world do you live in where repeatedly posting/sending death threats to "express disagreement" to someone online is not abusive? Or having multiple people do it? How about posting their address and threatening to rape and murder them? How is any of that not abusive? Like do you honestly think that the #gamergate bullshit is actually about "ethics in video game journalism" and not a way to further disempower and subjugate women to push them further away from their sacred loving video games or whatever the gently caress their goal is now? Like I honestly want to know how any of that poo poo is not abusive. Please justify it to me, I'd love to hear an explanation. e: (that is not directly related to the linus style stuff, but to explain my reasoning, judging by how you framed your post talking about essentially fake abuse online, it definitely leads me to believe that you view that poo poo in the same way) e2: ((and along the lines of the linus stuff, in what world is it not abusive to talk to someone like that? It's like the very definition of abusive language)) Look Around You fucked around with this message at 08:27 on Jan 29, 2015 |
# ? Jan 29, 2015 08:23 |