|
code:
|
# ? Jun 5, 2015 12:07 |
|
|
# ? May 30, 2024 08:58 |
|
Is that Hungarian Notation in C# or something?
|
# ? Jun 5, 2015 12:15 |
|
Make it stop e: any chance this just keeps going and you've cut it short for brevity?
|
# ? Jun 5, 2015 12:37 |
|
Why is Pointer(bool, int, int) the only overload that actually checks the passed-in boolean?
|
# ? Jun 5, 2015 13:00 |
|
Volmarias posted:
I think what happened is that the back end used to be written in Ruby, then they got a new CTO who decided to have the back end rewritten in Scala - this resulted in a lot of Ruby developers programming in Scala until the CTO realized that they should probably hire some Scala (or in my case Java) developers.
|
# ? Jun 5, 2015 14:17 |
|
FeloniousDrunk posted:
This is beside the point, and I realize that it might be the result of anonymization/simplification you applied. Is it really possible to catch an Exception e in a catch block that already catches an Exception with the same name in Java? If so, that seems like a horror to me.
|
# ? Jun 5, 2015 15:43 |
|
dwazegek posted:This is beside the point, and I realize that it might be the result of anonymization/simplification you applied. Yeah. 'e' is just the name of a variable, so the nested 'e' shadows the outer 'e', so within the scope of the nested catch block only the nested 'e' is accessible. I don't think that's really different from scope for any other variable names in most languages. edit: And as horrifying as that block might be, that's sadly exactly what they teach you to do at university these days. The professor that taught Java literally said "most of the time, when you catch an exception, the best you can do is dump a stack trace and carry on." No trying to fix the error condition, certainly not quitting since we now know the program's in an error state. Just print a stack trace and leave the user to be quietly hosed.
|
# ? Jun 5, 2015 15:51 |
|
ATM Machine posted:Make it stop 100% chance.
|
# ? Jun 5, 2015 17:23 |
|
How does one extract the octets from a .NET IPAddress object? Very carefully.C# code:
Gazpacho fucked around with this message at 22:26 on Jun 5, 2015 |
# ? Jun 5, 2015 19:05 |
|
Gazpacho posted:How does one extract the octets from a .NET IPAddress object? Very carefully. Carefully, and with blind disregard for IPv6.
|
# ? Jun 5, 2015 19:54 |
|
loinburger posted:I think what happened is that the back end used to be written in Ruby, then they got a new CTO who decided to have the back end rewritten in Scala - this resulted in a lot of Ruby developers programming in Scala until the CTO realized that they should probably hire some Scala (or in my case Java) developers. Which IN NO TANGIBLE WAY excuses them from making a call to a third party webSITE (not even webservice) to figure out what the name of the class they want to invoke is, unless you're implying that Ruby programmers are objectively braindead. This ignores the fact that reflection requires a enough code to be used here that I cannot for the life of me figure out how they were able to correctly use it to do what they wanted while at the same time doing the whole thing so incredibly wrong!
|
# ? Jun 5, 2015 22:27 |
|
Volmarias posted:Which IN NO TANGIBLE WAY excuses them from making a call to a third party webSITE (not even webservice) to figure out what the name of the class they want to invoke is, unless you're implying that Ruby programmers are objectively braindead. This ignores the fact that reflection requires a enough code to be used here that I cannot for the life of me figure out how they were able to correctly use it to do what they wanted while at the same time doing the whole thing so incredibly wrong! That is seriously one of the best horrors to be posted here in a while. Someone not only floats that idea at a meeting, but everyone else agrees that it's the best solution? How does that even happen?
|
# ? Jun 5, 2015 22:55 |
|
Woah they were using the website? I thought they just downloaded the corpus. I've done that before in python. Your coworkers are loving nuts.
|
# ? Jun 5, 2015 23:13 |
|
They downloaded the corpus - no doubt they tried using the website at first, but then noticed that it was taking several seconds for every page to load. On the first day at that job I was assigned the task of tracking down an infinite loop that had been plaguing them for over a month. That raised a few red flags, but whatever, they paid well.
|
# ? Jun 5, 2015 23:16 |
|
loinburger posted:I think what happened is that the back end used to be written in Ruby, then they got a new CTO who decided to have the back end rewritten in Scala - this resulted in a lot of Ruby developers programming in Scala until the CTO realized that they should probably hire some Scala (or in my case Java) developers. Evil_Greven fucked around with this message at 01:46 on Jun 7, 2015 |
# ? Jun 7, 2015 01:41 |
|
loinburger posted:They downloaded the corpus - no doubt they tried using the website at first, but then noticed that it was taking several seconds for every page to load. Oh. That wasn't clear, I just assumed the worst.
|
# ? Jun 7, 2015 01:50 |
|
C++ code:
For those not familiar with winapi, it's basically initiating an asynchronous write (to a pipe) and then... just waiting for the completion. It can be replaced with a single synchronous WriteFile() call.
|
# ? Jun 8, 2015 02:23 |
|
Just sat through a presentation on how we're going to abuse MEF to do DI on new projects
|
# ? Jun 8, 2015 17:01 |
|
Munkeymon posted:Just sat through a presentation on how we're going to abuse MEF to do DI on new projects Ugh. Has anyone tried to explain that mef is not for di?
|
# ? Jun 8, 2015 17:29 |
|
Ithaqua posted:Ugh. Has anyone tried to explain that mef is not for di? Yeah. It works so they don't care.
|
# ? Jun 8, 2015 18:45 |
|
Gross. Microsoft themselves have said MEF is NOT for DI.
|
# ? Jun 8, 2015 21:28 |
|
Ithaqua posted:Ugh. Has anyone tried to explain that mef is not for di? What is it for? Ive never used it but when one the problems it says it "solves" is the need to modify source when making changes to an application, I'm skeptical.
|
# ? Jun 8, 2015 21:44 |
|
TheBlackVegetable posted:What is it for? Ive never used it but when one the problems it says it "solves" is the need to modify source when making changes to an application, I'm skeptical. Plugin discovery and loading, basically. The E is "Extensibility". We're just using it to lazy-load dependencies. Oh, you'll have to remember not to use them until the event that tells you they're all loaded has fired because that's cool and good. Here, have another horror: C# code:
I think I might post in the looking for a job thread soon :\
|
# ? Jun 8, 2015 21:56 |
|
Munkeymon posted:Just sat through a presentation on how we're going to abuse MEF to do DI on new projects So what's their reasoning behind doing this and not just using one of the many DI frameworks?
|
# ? Jun 8, 2015 22:21 |
|
piratepilates posted:So what's their reasoning behind doing this and not just using one of the many DI frameworks? Unity is annoying to configure and manage because the config lives off in some XML files somewhere rather than in the code and it also throws annoyingly cryptic errors if something is missing. It actually isn't uncommon to have to hand-copy assemblies around to get a debug session working, but I'm betting that's actually our fault, too, because someone at some point read that using post-build command to copy required assemblies (instead of using a project reference like a normal person) was the way the cool kids were managing relationships when doing DI, so there are a bunch of straight-up broken projects. By that I mean I can't just check them out and hit Build or Run and expect it to work the first time. "Just build it again - it'll probably work the second or third time" is legit advice around here and it drives me nuts that it doesn't bother the guys who made the mess originally.
|
# ? Jun 8, 2015 22:35 |
|
Munkeymon posted:Unity is annoying to configure and manage because the config lives off in some XML files somewhere rather than in the code What? I've never used XML config with Unity (I'd probably kill someone if I had to use XML for wiring up DI), all of our configuration is in code. Also since it's in code, project dependencies "just work". edit: Unless you're specifically trying to support late binding? You can't really do that in code. Bognar fucked around with this message at 22:43 on Jun 8, 2015 |
# ? Jun 8, 2015 22:41 |
|
Bognar posted:What? I've never used XML config with Unity (I'd probably kill someone if I had to use XML for wiring up DI), all of our configuration is in code. Also since it's in code, project dependencies "just work". Yeah there's a bunch of lazy/late binding because that's easier than working out a way to not have cycles in the dependency graph in all situations without repeating ourselves.
|
# ? Jun 8, 2015 22:53 |
|
SupSuper posted:http://c2.com/cgi/wiki?StringlyTyped True story, my colleagues and I invented this term while working at a games company.
|
# ? Jun 9, 2015 01:00 |
|
Munkeymon posted:Yeah there's a bunch of lazy/late binding because that's easier than working out a way to not have cycles in the dependency graph in all situations without repeating ourselves. It's horrors all the way down...
|
# ? Jun 9, 2015 10:32 |
|
omeg posted:For those not familiar with winapi, it's basically initiating an asynchronous write (to a pipe) and then... just waiting for the completion. It can be replaced with a single synchronous WriteFile() call. Of course, the Linux/Unix-y way to do this is simply to call write() synchronously too, it's async i/o which would be weird and different
|
# ? Jun 9, 2015 14:35 |
|
Rails by default compacts arrays when it munges incoming request parameters, which means that if you pass it a null value in an array it will silently remove it.
|
# ? Jun 9, 2015 15:28 |
|
Pollyanna posted:Rails by default compacts arrays when it munges incoming request parameters, which means that if you pass it a null value in an array it will silently remove it. Why on earth would this be considered desirable behavior?
|
# ? Jun 9, 2015 16:32 |
|
Internet Janitor posted:Why on earth would this be considered desirable behavior? ~omakase~
|
# ? Jun 9, 2015 16:40 |
|
If you wanted it, you should have put a value in it.
|
# ? Jun 9, 2015 16:41 |
|
Internet Janitor posted:Why on earth would this be considered desirable behavior? Ostensibly security, but in reality it doesn't matter cause the whole thing is a shitstorm anyway: https://github.com/rails/rails/issues/8832
|
# ? Jun 9, 2015 17:37 |
|
So, someone took a moderately objective and somewhat constructive view of the old classic bastion of coding horrors: TempleOS http://www.codersnotes.com/notes/a-constructive-look-at-templeos
|
# ? Jun 9, 2015 18:48 |
|
Rails is bad. People who like it are neophytes or stockholmed. However when you're doing rails apps the "bad, because webdev" and "bad, because rails" all starts to blur together and after awhile it's easier to just go with the flow and get paid ¯\_(ツ)_/¯
|
# ? Jun 9, 2015 18:50 |
|
No Safe Word posted:So, someone took a moderately objective and somewhat constructive view of the old classic bastion of coding horrors: TempleOS I don't remember who called TempleOS "outsider art" but that seems like the most apt description of it, and when I saw it called that I immediately understood why my friend was so interested in the music I created before I knew anything about making music. The dude created an entire OS from scratch by himself with tons of interesting features. He may be crazy but he is also a genius. Dessert Rose fucked around with this message at 19:54 on Jun 9, 2015 |
# ? Jun 9, 2015 19:51 |
|
Just found this and it made me laugh:code:
|
# ? Jun 9, 2015 20:36 |
|
|
# ? May 30, 2024 08:58 |
|
Pollyanna posted:Ostensibly security, but in reality it doesn't matter cause the whole thing is a shitstorm anyway: https://github.com/rails/rails/issues/8832 I wandered around the related issues and I'm trying to understand how nils represent a security risk. It sounds like the Rails ORM uses arbitrary JSON requests to construct SQL queries and the logic underlying that is incapable of validating input structure in certain ways such that nils can result in queries which return more rows than desired, possibly leaking sensitive information. This seems like an inherently insecure architecture which places unnecessary trust in user input. Could anyone more familiar with the issue clarify?
|
# ? Jun 9, 2015 20:47 |