|
DONT THREAD ON ME posted:I spent a day doing unity without a whole lot of game dev or c# experience and it was very clear to me that there are untold horrors hiding there. I've posted it here before but it's one of my favs: C# code:
|
# ? Feb 17, 2019 23:23 |
|
|
# ? May 21, 2024 01:29 |
|
Nude posted:I've posted it here before but it's one of my favs: That's what I mean and if you do a code:
|
# ? Feb 17, 2019 23:47 |
|
Hughlander posted:Well I assume it’s for Unity3D which does questionable things with overriding.Equals for null checks that causes Elvis operator to work in the editor but fail on a device. They asked for a way to override ?. And were told to go gently caress themselves. They are overriding equality comparisons for objects derived from their UnityEngine.Object (so basically every game resource and component), so they can add a lot of additional error checking. Serialized Object fields are never truly "null", they have various states, like "unassigned", or "destroyed" and so on, so they can give separate error messages for if that null-reference exception you got was due to the object never having been assigned a value in the first place, or if it used to have a value but was destroyed elsewhere, and possibly some other things. In release builds much of that additional stuff is stripped away and accessing a null might in some cases result in a null reference crash on some unmanaged devices, rather than just a friendly exception. All this of course results in the ?? operator not working for UnityEngine.Objects, since that relies on reference equality to null, which you can't really override. ?. too relies on reference equality.
|
# ? Feb 17, 2019 23:57 |
|
That sounds like unity doesn’t trust its users. I assume unreal is just a different kind of horrible?
|
# ? Feb 18, 2019 00:20 |
|
DONT THREAD ON ME posted:I will say this: if you need a dynamic language on the JVM, you could do a hell of a lot worse than Clojure. gently caress Groovy. It's my hell at work. I keep fishing around for a replacement and Spring Boot + Thymeleaf looks reasonable, but I don't want to write a bunch of useless getters and setters again, nor do I want to use a hack like Lombok. Ideally, I could use Ceylon with Spring Boot, but that's uncharted territory and Ceylon has one foot in the grave nowadays.
|
# ? Feb 18, 2019 01:39 |
|
Ah, I didn’t realize Unity made such interesting decisions. Good to know in case I ever find myself in a position I use it.
|
# ? Feb 18, 2019 04:39 |
|
CPColin posted:gently caress Groovy. It's my hell at work. I keep fishing around for a replacement and Spring Boot + Thymeleaf looks reasonable, but I don't want to write a bunch of useless getters and setters again, nor do I want to use a hack like Lombok. Ideally, I could use Ceylon with Spring Boot, but that's uncharted territory and Ceylon has one foot in the grave nowadays. While it ain't the perfect solution, surely you can just press some combination of keys in your favored IDE to bring up a window where you click "select all" and press enter to generate all those getters and setters? I mean, even Netbeans of all things has support for that.
|
# ? Feb 18, 2019 06:20 |
|
CPColin posted:gently caress Groovy. It's my hell at work. I keep fishing around for a replacement and Spring Boot + Thymeleaf looks reasonable, but I don't want to write a bunch of useless getters and setters again, nor do I want to use a hack like Lombok. Ideally, I could use Ceylon with Spring Boot, but that's uncharted territory and Ceylon has one foot in the grave nowadays. Is Kotlin an option?
|
# ? Feb 18, 2019 06:24 |
|
CPColin posted:gently caress Groovy. It's my hell at work. I keep fishing around for a replacement and Spring Boot + Thymeleaf looks reasonable, but I don't want to write a bunch of useless getters and setters again, nor do I want to use a hack like Lombok. Ideally, I could use Ceylon with Spring Boot, but that's uncharted territory and Ceylon has one foot in the grave nowadays. I honestly didn't realize anyone used groovy for anything other than gradle, and it was just poo poo because all build DSLs are poo poo.
|
# ? Feb 18, 2019 06:36 |
|
I haven't regretted my decision to apply to a Scala job for even one second. I mean, I had to relearn most of what I knew because functional programming is a whole other can of worms, but Scala does a good job of not bothering you with Java internals unless you hook in Java libraries yourself. And every update, the scala compiler gets a little bit less slow.
|
# ? Feb 18, 2019 07:57 |
|
DONT THREAD ON ME posted:That sounds like unity doesn’t trust its users. Well Unity's target users are beginners, or at least were when they decided on that thing, which I believe has always been there. Or perhaps they wrote it for themselves, as they too were pretty much beginners when they first made Unty... They have thought about changing it for some time now, but doing so would probably break a lot of existing code, since Object references are in effect weak references actually managed by the underlying native code engine. Having had the pleasure of working with UE3 for the last year or so though, I'm extremely hesitant to touch anything Unreal ever again
|
# ? Feb 18, 2019 10:05 |
|
Java code:
return productId & 0xFF; Bonus: Java code:
|
# ? Feb 18, 2019 12:12 |
|
Loezi posted:While it ain't the perfect solution, surely you can just press some combination of keys in your favored IDE to bring up a window where you click "select all" and press enter to generate all those getters and setters? I mean, even Netbeans of all things has support for that. Oh, for sure. It's just nice not having the clutter. DONT THREAD ON ME posted:Is Kotlin an option? I'm figuring Kotlin is what I'll eventually pick. Every now and then, I search for "kotlin + spring boot" or something similar, to see if anybody else is doing it. All I've found so far are the usual Hello World demos, but I haven't dug too deeply. Hughlander posted:I honestly didn't realize anyone used groovy for anything other than gradle, and it was just poo poo because all build DSLs are poo poo. Yeah, I don't know how or why my predecessor picked it. All the code has the hallmarks of stuff that a one-person team barfed out, piece-by-piece, with no concern over maintainability or structure. They said they didn't even use an IDE while developing, which just boggles my mind.
|
# ? Feb 18, 2019 16:34 |
|
Mooey Cow posted:Having had the pleasure of working with UE3 for the last year or so though, I'm extremely hesitant to touch anything Unreal ever again Unreal has a function-like macro called "check". They know it's terrible and causes problems, but won't get rid of it due to backwards-compatibility.
|
# ? Feb 18, 2019 16:58 |
|
CPColin posted:I'm figuring Kotlin is what I'll eventually pick. Every now and then, I search for "kotlin + spring boot" or something similar, to see if anybody else is doing it. All I've found so far are the usual Hello World demos, but I haven't dug too deeply. If it helps, a colleague started a new thing using spring boot with Kotlin and gave up after a couple days, citing too much magic and not enough/inaccurate documentation.
|
# ? Feb 18, 2019 18:12 |
|
I'm happily using Kotlin and Spring Boot. It's your colleague who is not enough and/or inaccurate.
|
# ? Feb 18, 2019 18:48 |
|
Hughlander posted:I honestly didn't realize anyone used groovy for anything other than gradle, and it was just poo poo because all build DSLs are poo poo. At my last job we used it for something related to coding Jenkins jobs for a while but abandonded it and just did the jobs manually
|
# ? Feb 18, 2019 19:06 |
|
netcat posted:At my last job we used it for something related to coding Jenkins jobs for a while but abandonded it and just did the jobs manually Yes but that's still a build DSL. (We have a Jenkinsfile.groovy as well which shares code with Gradle files.)
|
# ? Feb 18, 2019 22:58 |
|
maintaining jenkins jobs is such a loving pain in the rear end
|
# ? Feb 18, 2019 23:36 |
|
testsubject posted:
I dunno Java but I can't see how the spoiler code isn't off by one
|
# ? Feb 19, 2019 01:36 |
|
Winter Stormer posted:I dunno Java but I can't see how the spoiler code isn't off by one
|
# ? Feb 19, 2019 03:14 |
|
Fatty Crabcakes posted:That's why this is a horror: it's an overly complicated way of doing it wrong. My preferred coding method.
|
# ? Feb 19, 2019 03:28 |
|
Fatty Crabcakes posted:That's why this is a horror: it's an overly complicated way of doing it wrong. It's lacking context, and a reasonable read of "convertProductIdToIndex" without context is that product IDs are 1-indexed and this is for accessing products in some array that is 0-indexed. Of course, it's still an overly complex implementation if that were the case.
|
# ? Feb 19, 2019 03:37 |
|
Steve French posted:It's lacking context, and a reasonable read of "convertProductIdToIndex" without context is that product IDs are 1-indexed and this is for accessing products in some array that is 0-indexed. Of course, it's still an overly complex implementation if that were the case.
|
# ? Feb 19, 2019 05:54 |
|
Fatty Crabcakes posted:Yeah, but with this it'll end up with the third value instead of the second. I don't follow. It seems like you're saying it will return 2 (third value when zero indexed) when it should return 1. Is that right?
|
# ? Feb 19, 2019 06:50 |
|
Steve French posted:I don't follow. It seems like you're saying it will return 2 (third value when zero indexed) when it should return 1. Is that right? It's me! I'm the horror!
|
# ? Feb 19, 2019 07:32 |
|
ToxicFrog posted:While I love Clojure and had the same experience with it, it is never far from my mind that its error reporting sucks endless fields of rotting rear end, and that's the main thing that prevents me from wholeheartedly recommending it to everyone. The stacktraces are gross, but most tooling has an option to hide the java and internal stuff (at least Cider does), and there have been some improvements in version 1.10
|
# ? Feb 19, 2019 15:27 |
|
Fatty Crabcakes posted:That's why this is a horror: it's an overly complicated way of doing it wrong. Ah, enterprise programming.
|
# ? Feb 19, 2019 16:42 |
|
boo_radley posted:Ah, enterprise programming.
|
# ? Feb 19, 2019 17:01 |
|
CPColin posted:gently caress Groovy. It's my hell at work. I keep fishing around for a replacement and Spring Boot + Thymeleaf looks reasonable, but I don't want to write a bunch of useless getters and setters again, nor do I want to use a hack like Lombok. Ideally, I could use Ceylon with Spring Boot, but that's uncharted territory and Ceylon has one foot in the grave nowadays. Sounds like you hate Groovy on Grails and not Groovy the language? I've used Groovy + Spring Boot + Thymeleaf for side projects and it's just fine. To be fair, I've only used Groovy to sidestep some of the verboseness of pure Java. I don't mess with the AST stuff. Also Groovy and Spock Framework for testing is my favorite and it's literally the only way I can get people to write tests no matter what company I'm at. Truly the path of least resistance.
|
# ? Feb 19, 2019 17:03 |
|
Votlook posted:The stacktraces are gross, but most tooling has an option to hide the java and internal stuff (at least Cider does), and there have been some improvements in version 1.10 Most of my projects are still on 1.8 or 1.9, so that's good to know. I generally link in Pretty, which does the same thing, at least for runtime errors -- compile-time errors are still a total shitshow. None of this should be necessary, though.
|
# ? Feb 19, 2019 17:31 |
|
poemdexter posted:Sounds like you hate Groovy on Grails and not Groovy the language? I might hate Groovy less if my predecessor hadn't coded it so sloppily. Also if I weren't stuck on whatever Groovy version is supported by Grails 2.3. Spock is all right, though. Being able to put my test parameters in a big data table is pretty nice. This is not compatible with Grails 2.3, of course. Groovy's definitely got some surprises lurking under the hood, though, like how the == operator always tries calling compareTo() first, so you'd better make drat sure your implementation is compatible with equals()! (Guess if my predecessor's implementations were!)
|
# ? Feb 19, 2019 18:32 |
|
Are companies that don't have a clue a horror? I work for a place that has basically bought licenses to an (industry standard) application and we now resell those licenes and offer support to our direct customers. In return, we get...."expert" support from the company (hereby referred to as Poop Ltd) that has made the application. This support includes server configuration etc. So the application has been slow. Really slow, considering the amount of users and such. So we open up a ticket with Poop Ltd. We wait. And we wait some more. No action from Poop Ltd. This isn't unusual though, they're slow as gently caress. I get tired of waiting and go check out the server settings myself, despite knowing very little about it. There's quite a lot of settings that look suspicious, so I report these to Poop Ltd. They say they'll look into it. We wait again. By this time, the ticket has been open for the better part of 2 months. But suddenly, I receive a reply to the ticket! Oh glorious joy! The reply... "We cannot find the setting you mentioned. Could you please let our tech team know where this setting can be found?" It's not an obscure setting. It is a very loving basic server setting. And that's not even what makes me angry. What makes me angry is that they literally didn't go through the effort of googling the server name and setting and clicking on the first result. That would have given them plenty of material to bullshit their way to a response. But no, even that is too much loving effort for Poop Ltd.
|
# ? Feb 19, 2019 20:46 |
|
More like Poop Unlimited
|
# ? Feb 19, 2019 21:13 |
|
Here's quite the horror from the BitCoin thread. Solidity is the programming language used for Ethereum butt coins.DominoKitten posted:Not being able to correct bugs and errors in smart contract code in Ethereum is one of my favorite parts of the whole cryptocurrency boondoggle, expressed quite eloquently by someone in one of the bad with money threads:
|
# ? Feb 19, 2019 23:56 |
|
It's almost enough to make you think someone just cobbled it together to scam people.
|
# ? Feb 20, 2019 00:12 |
|
Ola posted:It's almost enough to make you think someone just cobbled it together to scam people. nah, more likely it was cargo-culted together by some idiot who desperately wanted to design a pl/vm for a financial system despite not knowing anything about pl design, vms, or finance
|
# ? Feb 20, 2019 00:36 |
|
Soricidus posted:nah, more likely it was cargo-culted together by some idiot who desperately wanted to design a pl/vm for a financial system despite not knowing anything about pl design, vms, or finance i do think a language with no garbage collector which also doesn't support manual memory management is complete genius and i wish all languages were like that. "gently caress it, nothing we can do about that memory leak."
|
# ? Feb 20, 2019 00:45 |
|
Bruegels Fuckbooks posted:i do think a language with no garbage collector which also doesn't support manual memory management is complete genius and i wish all languages were like that. "gently caress it, nothing we can do about that memory leak." yet another reason why java is the best
|
# ? Feb 20, 2019 00:51 |
|
|
# ? May 21, 2024 01:29 |
|
Soricidus posted:yet another reason why java is the best For an extremely narrow set of problems that actually is really loving cool.
|
# ? Feb 20, 2019 03:40 |