|
why is method input validation so verbose in c# im tired of dealing with void foo(object bar, object baz) { if(bar == null) {throw new argumentnullexception(nameof(bar));} if(baz == null)... why did they remove the [notnull] attribute why isnt there a less annoying syntax for this yes i could write some stupid helper extension methods but thats not the point
|
![]() |
|
![]()
|
# ? Feb 17, 2025 21:22 |
|
i think they removed the attribute because instead you can just just use object! and it not being null is actually enforced
|
![]() |
|
wait what
|
![]() |
|
just like you have nullable value types like int?, you have non-nullable reference types like string!
|
![]() |
|
Jabor posted:just like you have nullable value types like int?, you have non-nullable reference types like string! that's an optional c# 8 thing that just came out and you know that
|
![]() |
|
i remember them talking about it for 7, did it end up getting punted?
|
![]() |
|
I'm not usually one to make fun butratbert90 posted:I did a small interview for Amazon and apparently failed the coding test? isn't this guy the one who casually admitted to farming his job out to a team of cutrate Brazilian programmers without telling his employer? did he really think he could run that con on Amazon?
|
![]() |
|
Ciaphas posted:I've not encountered this professionally, somehow, so I'll just ask Much like others have said, option 2. I've encountered bugs like that a few times in my somewhat limited professional experience, and that's generally the best answer. First, if you try to focus all of your energy on a bug and track it down like Moby-Dick, you're just going to start being blind to issues and will essentially burn out on it, thus wasting most of the effort you put in on it. Second, if you think there's a chance you fixed it via option two, then at least deploy it and see if occurrences of the bug decrease in frequency ( ![]() Basically, once you've accomplished option 2, which I think is generally a subset of option 1, then you should just work until you feel like you're literally just guessing. Once you're there, as frustrating as it may be, it's time to step back and focus on something else to clear your mind's palette. If the bug keeps occurring, then, hopefully thanks to option 2, you'll have more diagnostic data available AND a fresh, relaxed pair of eyes when reviewing the bug areas again.
|
![]() |
|
CRIP EATIN BREAD posted:ctps: wanted to use some third party application that only supports a few auth mechanisms one of which was LDAP, so I wrote up a small server based on apache ds to implement my own in-memory LDAP to fake LDAP bind auth requests and hit the database to check the username/password hash. slick gonna do radius next?
|
![]() |
|
Ciaphas posted:oops did that thing where i ramble mostly to myself in a post it’s interesting too don’t undersell thyself
|
![]() |
|
jit bull transpile posted:I'm not usually one to make fun but i mean its amazon who cares? ripping off your employer is the most american thing.
|
![]() |
|
jit bull transpile posted:I'm not usually one to make fun but The correct answer is to pipe the string queries into an Amazon SQS queue, which is read by an Amazon Lambda serverless script, which then uses Mechanical Turk to have people balance the brackets. Then, you sell this Bracket Balancing as a Service online, and charge the interviewer $0.0001 for each of their queries.
|
![]() |
|
pseudorandom posted:The correct answer is to pipe the string queries into an Amazon SQS queue, which is read by an Amazon Lambda serverless script, which then uses Mechanical Turk to have people balance the brackets. Then, you sell this Bracket Balancing as a Service online, and charge the interviewer $0.0001 for each of their queries. hired
|
![]() |
|
Amazon Turk is cool http://mattrichardson.com/Descriptive-Camera/
|
![]() |
|
Ciaphas posted:when you've got a bug like this that you think you've put in enough defensive code to prevent relapse, BUT for whatever reason you can't reproduce the original bug in the first place, how is my time best spent going forward add a bunch of debugging info then wait for a repro when you'll then hopefully have more clues/context. ideally you'd want to dump as much state as possible so that you can reconstruct what else was happening at the time 50/50 it'll end up being something totally unrelated to what you thought it was collecting information is an underutilized but critical part of solving problems
|
![]() |
|
Bloody posted:why is method input validation so verbose in c# if you’re on c# 7 you can do C# code:
|
![]() |
|
ctps Your job ran 418 tests with 69 failures trying to get 2 more passing tests in there
|
![]() |
|
cjs: boss seems ok with me punting on the irreproducible bug from yesterday, long as my "story" (guess I gotta do a JIRA ticket? half day today so I'll inquire tomorrow) about what's likely going on and my proposed defenses and traces pass the change control board so uh, yay, thanks for the advice ![]()
|
![]() |
|
jit bull transpile posted:I'm not usually one to make fun but i think ratbert was the embedded programmer who finally quit their abusive below-market-rate job a few months back and then their former employer basically went into crisis because ratbert was the only programmer they had left at the time
|
![]() |
|
Ciaphas posted:cjs: boss seems ok with me punting on the irreproducible bug from yesterday, long as my "story" (guess I gotta do a JIRA ticket? half day today so I'll inquire tomorrow) about what's likely going on and my proposed defenses and traces pass the change control board it's okay, you'll work on something unrelated and a few weeks from now a random idea will come and you'll figure out most of it without explicitly thinking about it, just by soaking in that environment and having it in the back of your mind.
|
![]() |
|
Ciaphas posted:I've not encountered this professionally, somehow, so I'll just ask i either do the second one, close the jira with a reference to the CL, then wait and see if qa reopens it or if it concerns something where lots of adjacent changes/fixes have happened since the tested version I close as "cannot reproduce" and comment "probably fixed by cl XYZ please reopen if this still happens in a newer build that includes this cl" it also depends on which kind of product you are working on and on how bad it would be if that bug were to end up in production
|
![]() |
|
I'm looking at a program that requires jvm 10+ to run. To run, not to compile. any idea how somebody managed this?
|
![]() |
|
gonadic io posted:I'm looking at a program that requires jvm 10+ to run. To run, not to compile. any idea how somebody managed this?
|
![]() |
|
yeah, if the code uses any of the new stuff in java 10s standard lib then it'll require java 10
|
![]() |
|
Yeah all you'd need would be a new fangled Local Type Interface and it'll need Java 10. E have to move to Java 10 in January for reasons and our code will very quickly become non backwards compatible. The day we de-supported WebSphere I wrote some Java8 in celebration.
|
![]() |
|
if you are talking about local type inference that actually doesn't require anything new in the JVM. its purely syntatic sugar.
|
![]() |
|
In general it seems like maybe backwardly compatibility with earlier JVMs isn't a huge concern for them based on how the language is being developed now. I guess it's the same thing with .net where when the assumption was that only one runtime would be installed on every computer it was extremely important, but now that they're moving to a model where the runtime is distributed with applications they can pretty much do whatever they want. Although I guess some of the changes they made to stuff like reflection were actually much worse than anything .net has done. I think .net has generally avoided any changes that would make existing code stop compiling despite internally changing a lot of things in .net core to use stuff like spans. mystes fucked around with this message at 20:33 on Jun 19, 2019 |
![]() |
|
mystes posted:I think .net has generally avoided any changes that would make existing code stop compiling despite internally changing a lot of things in .net core to use stuff like spans. .net core 1.0 made a lot of breaking changes versus .net framework. the internal feedback was "don't do that, that's stupid." then the external feedback was "why did you do this? porting existing code to .net core 1.0 is annoying as gently caress." and so a large part of .net core 2 was undoing the stupid decisions made for .net core 1.0.
|
![]() |
|
I guess I forgot how bad .net core 1 was. Now that I think about it, I did have problems like methods from .net framework randomly not existing, which was annoying because IIRC even if you were looking at the .net core docs online the examples would still be the same as the .net framework ones and might not even compile. I don't think I've had that sort of problem with .net core 2 at all.
|
![]() |
|
.net core 1 seemed super rushed and half-baked tbh
|
![]() |
|
mystes posted:In general it seems like maybe backwardly compatibility with earlier JVMs isn't a huge concern for them based on how the language is being developed now. I guess it's the same thing with .net where when the assumption was that only one runtime would be installed on every computer it was extremely important, but now that they're moving to a model where the runtime is distributed with applications they can pretty much do whatever they want. I thought there was a big thing that bytecode was extremely backwards compatible? Why the gently caress are there still the nongeneric collections then?
|
![]() |
|
Bloody posted:.net core 1 seemed super rushed and half-baked tbh yeah. and that despite shipping many, many months behind schedule.
|
![]() |
|
gonadic io posted:I thought there was a big thing that bytecode was extremely backwards compatible? Why the gently caress are there still the nongeneric collections then? it’s forwards compatible ![]()
|
![]() |
|
Bloody posted:.net core 1 seemed super rushed and half-baked tbh but now .net core is good and getter better with 3
|
![]() |
|
I spun up a beefy Fedora Server 30 instance at my hosting and set up OpenCyc 4.0 that required installing OpenJDK 1.8, which was the closest to the version of Java with which it claimed to be compatible (1.6, 1.7) on the plus side, Cyc is pretty zippy on this instance and also has a Lisp running atop the JVM that it’s actually implemented with
|
![]() |
|
Bloody posted:.net core 1 seemed super rushed and half-baked tbh the whole thing sucked. they briefly had some lovely json project/reference file thing as well. fortunately they fixed that with the new xml one.
|
![]() |
|
akadajet posted:but now .net core is good and getter better with 3 ya i am excited for when we try to migrate our giant legacy app to .net 5. at least were on 4.5.something how hard could it be
|
![]() |
|
eschaton posted:beefy Fedora Linux Distro version names are getting out of hand.
|
![]() |
|
Aramoro posted:Linux Distro version names are getting out of hand. i wasnt aware "throbbing" was the name of a toy story character but i guess you do you, debian
|
![]() |
|
![]()
|
# ? Feb 17, 2025 21:22 |
|
mystes posted:In general it seems like maybe backwardly compatibility with earlier JVMs isn't a huge concern for them based on how the language is being developed now. I guess it's the same thing with .net where when the assumption was that only one runtime would be installed on every computer it was extremely important, but now that they're moving to a model where the runtime is distributed with applications they can pretty much do whatever they want. they've literally moved to a model where they are just going to automatically increment the bytecode version number in every new jvm release, even if they haven't changed any aspect of the bytecode at all. that's how few fucks they give now.
|
![]() |