|
Spatial posted:This is so terrible, it's like human clippy giving C++ advice Does anybody remember the username of that weirdo who would open issues in GitHub C repos demanding that they fix some usually harmless warning or lint and then proceed to completely ignore responses or insist in the most obtuse manner, to the degree that some goons thought it was a bot?
|
# ? Jul 27, 2021 12:30 |
|
|
# ? Jun 5, 2024 14:11 |
|
nielsm posted:Personally I'd prefer this written as (std::signbit(lhs) != std::signbit(rhs)), to make the expression explicitly read as "the left and right hand sides have different sign". TIL about signbit, stealing this now.
|
# ? Jul 27, 2021 12:37 |
|
I know basically nothing about modern C++ / template shenanigans and haven't worked with it since school (so ah... 20 years ago?), so I'm not even sure if this is introducing some subtle error/UDB, but one thing I still find a tiny bit confusing is:C++ code:
C++ code:
Unclear: if ( x == SOMETHING ) x = SOMETHING Clear: if ( x == SOMETHING ) x = ANOTHERTHING (even though SOMETHING and ANOTHERTHING are the same internally) I'm also assuming something like this is not possible? C++ code:
|
# ? Jul 27, 2021 12:42 |
|
SirViver posted:Just whatever it takes to document that the == is a fuzzy comparison here. I feel the c++ overtaking me "if you're in a templated function in c++ talking about ufps, you should know that == is a fuzzy comparison for fp types" aaaaaah
|
# ? Jul 27, 2021 12:52 |
|
Ah that's cool a code review of a nice hairy fp detail knowing function. Now to take a biiiig ulp of this soda and read it,
|
# ? Jul 27, 2021 12:54 |
|
adding a comment that 0.0 == -0.0 is the kind of borderline comment where in i understand why people ask for them, but after they've heard they explaination they don't need the comment
|
# ? Jul 27, 2021 12:57 |
|
Also if you wanted to go nuts with it you could jump up to c++20 and put that is_iec559 as a requires:C++ code:
|
# ? Jul 27, 2021 13:00 |
|
NihilCredo posted:Does anybody remember the username of that weirdo who would open issues in GitHub C repos demanding that they fix some usually harmless warning or lint and then proceed to completely ignore responses or insist in the most obtuse manner, to the degree that some goons thought it was a bot? Markus Elfring?
|
# ? Jul 27, 2021 13:24 |
|
NihilCredo posted:Does anybody remember the username of that weirdo who would open issues in GitHub C repos demanding that they fix some usually harmless warning or lint and then proceed to completely ignore responses or insist in the most obtuse manner, to the degree that some goons thought it was a bot? Markus Elfring. He, or his bot, is still at it
|
# ? Jul 27, 2021 13:27 |
|
repiv posted:Markus Elfring? So whats everyone here opinion of SonarCube ?
|
# ? Jul 27, 2021 13:39 |
|
repiv posted:Markus Elfring? Winter Stormer posted:Markus Elfring. He, or his bot, is still at it Thanks!
|
# ? Jul 27, 2021 13:47 |
|
NihilCredo posted:Thanks! quote:Evolutions and software refactorings are just happening.
|
# ? Jul 27, 2021 15:38 |
|
pro grammer
|
# ? Jul 27, 2021 15:41 |
|
This morning a developer on my offshore team alerted me to a new issue that just came up with a third-party dependency we're using. The actual issue: they removed package-lock.json from source control, and now they don't understand why different versions of things are working differently. At least it's git and that's an easy restoration!
|
# ? Jul 27, 2021 16:12 |
|
Tei posted:So whats everyone here opinion of SonarCube ? The only experience I've had is someone opening an issue on a library I maintain (might have been some other static analysis tool, don't remember) with "a tool flagged a problem in line X", and I looked at line X and said "I believe you but I don't understand where the problem is, can you tell me anything more?" and they never replied.
|
# ? Jul 27, 2021 16:50 |
|
Carbon dioxide posted:Can we list the crimes of Eich? Can we just never mention Eich, if they're a trash human?
|
# ? Jul 27, 2021 16:59 |
|
Tei posted:So whats everyone here opinion of SonarCube ? i can never take it seriously because of the name (and because it's spelled with a 'q'). i need to constantly remind myself that it's not a late-90s mp3 player with a neon green alien spaceship theme
|
# ? Jul 27, 2021 16:59 |
|
pokeyman posted:The only experience I've had is someone opening an issue on a library I maintain (might have been some other static analysis tool, don't remember) with "a tool flagged a problem in line X", and I looked at line X and said "I believe you but I don't understand where the problem is, can you tell me anything more?" and they never replied. 90% of what these tools produce is false positives. They have hardcoded arbitrary rules that use everywhere. Some of these rules have good intention, but the tools are not subtle enough to ignore files and uses that a programmer would ignore. Some industries have adopted these tools as a way to measure code quality, so now some programmers live by the sword that is these tools. I have started working on two codebases where is a requirement and asked to see what other people think of them, but I guess the people here is free from this new damnation.
|
# ? Jul 27, 2021 17:08 |
|
I appreciate checker tools that also allow you to annotate the suspect region with "yes this is actually fine, do not warn" since you get the benefit of automated spot checks without just tuning then out altogether.
|
# ? Jul 27, 2021 17:12 |
|
NihilCredo posted:i can never take it seriously because of the name
|
# ? Jul 27, 2021 17:29 |
|
Presto posted:See also: Cap'n Proto I almost thought you were making fun of me for a second but then I Google'd it and... yup.
|
# ? Jul 27, 2021 17:31 |
SirViver posted:I know basically nothing about modern C++ / template shenanigans and haven't worked with it since school (so ah... 20 years ago?), so I'm not even sure if this is introducing some subtle error/UDB, but one thing I still find a tiny bit confusing is: Another option would be to dig fully into the floating point support library and write: C++ code:
|
|
# ? Jul 27, 2021 17:46 |
|
NihilCredo posted:Does anybody remember the username of that weirdo who would open issues in GitHub C repos demanding that they fix some usually harmless warning or lint and then proceed to completely ignore responses or insist in the most obtuse manner, to the degree that some goons thought it was a bot? https://github.com/elfring
|
# ? Jul 28, 2021 22:31 |
|
nielsm posted:If you wanted to use a keywords-only type that in most implementations end up as a 64 bit unsigned integer then unsigned long long would be the way to go. I've been bit a few too many times by the same type being different sizes on different platforms to even think about using that instead of the explicit size.
|
# ? Jul 29, 2021 01:14 |
|
NihilCredo posted:Does anybody remember the username of that weirdo who would open issues in GitHub C repos demanding that they fix some usually harmless warning or lint and then proceed to completely ignore responses or insist in the most obtuse manner, to the degree that some goons thought it was a bot? Odds are they're just padding their resume with "ACTIVE CONTRIBUTOR TO OPEN SOURCE PROJECTS". As for Sonarcube, it's not completely terrible in terms of build integration, but it didn't really find anything for us other than a ton of false positives.
|
# ? Aug 2, 2021 15:16 |
|
fritz posted:I've been bit a few too many times by the same type being different sizes on different platforms to even think about using that instead of the explicit size. Falcorum posted:Odds are they're just padding their resume with "ACTIVE CONTRIBUTOR TO OPEN SOURCE PROJECTS".
|
# ? Aug 2, 2021 17:37 |
|
Falcorum posted:Odds are they're just padding their resume with "ACTIVE CONTRIBUTOR TO OPEN SOURCE PROJECTS". wasn't there a guy who carpet bombed NPM with hundreds of trivial one-line packages then put on his resume that his code was used by all the top tech companies (because the big JS frameworks had a 50 level deep dependency on his package that checks if a number is odd or something)
|
# ? Aug 2, 2021 20:15 |
|
repiv posted:wasn't there a guy who carpet bombed NPM with hundreds of trivial one-line packages then put on his resume that his code was used by all the top tech companies (because the big JS frameworks had a 50 level deep dependency on his package that checks if a number is odd or something) Jon Schlinkert. His is probably the worst code I've ever read.
|
# ? Aug 2, 2021 22:20 |
|
Shits about to hit the fan. The main project just got my parasoft checks merged in. Any new warnings or rule violations are a hard error. I marked all pending pull requests as “needs work” to force all the developers to rebase against the develop branch. This is going to be so much fun. Tomorrow I am flipping the switch of code coverage for unit tests as well.
|
# ? Aug 3, 2021 02:10 |
|
14 failed pipelines and counting.
|
# ? Aug 3, 2021 17:10 |
|
Someone just ran automation to submit 1000 PRs to add a line of config in 1000 repos. I'm not sure they thought about how badly this would completely overwhelm our terribly underprovisioned build system. Oh well!
|
# ? Aug 3, 2021 23:48 |
|
YanniRotten posted:Someone just ran automation to submit 1000 PRs to add a line of config in 1000 repos. I'm not sure they thought about how badly this would completely overwhelm our terribly underprovisioned build system. 1000 repos?
|
# ? Aug 4, 2021 00:30 |
|
Yeah it's sort of a fractal of horrors here, best not to look directly at it.
|
# ? Aug 4, 2021 00:36 |
|
When you realize that you require a kubernetes cluster just to run git submodule --init --recursive
QuarkJets fucked around with this message at 07:58 on Aug 4, 2021 |
# ? Aug 4, 2021 06:45 |
|
YanniRotten posted:Someone just ran automation to submit 1000 PRs to add a line of config in 1000 repos. I'm not sure they thought about how badly this would completely overwhelm our terribly underprovisioned build system. I guess they didn't add [skip-ci] to the commit message? (This works for many - but not all - automated build systems.)
|
# ? Aug 4, 2021 07:31 |
|
YanniRotten posted:Yeah it's sort of a fractal of horrors here, best not to look directly at it. Is it a one-repo-per-customer-data-migration situation?
|
# ? Aug 4, 2021 17:17 |
|
Woodsy Owl posted:Is it a one-repo-per-customer-data-migration situation? No! A large company that went nuts with microservices plus tons and tons of bespoke tooling and reporting systems.
|
# ? Aug 5, 2021 12:58 |
|
Now I’m no expert in microservices, but I think that’s kinda wrapped around to a completely different problem set at this point. Now, tangentially related, if anyone has any good reading materials on microservices, I would be a very grateful goon.
|
# ? Aug 5, 2021 13:37 |
|
I’ve worked for a company that went into git submodules so hard that wouldn’t be unusual to have a superrepo with at least a couple hundred of them. None of them used semantic versioning, or a coherent feature / bug fix branching scheme, and you’d better believe there were interdependencies. Like DLL Hell all over again but it would take half a day to update submodules and get a good build going.
|
# ? Aug 5, 2021 14:13 |
|
|
# ? Jun 5, 2024 14:11 |
I found a really lazy dumb hack today. We had a place where some old angularJS code was supposed to be validating a date that was being stored as a string. Rather than like actually validating the string it just checked that it was 57 characters long. For example: Thu Aug 05 2021 12:20:23 GMT-0400 (Eastern Daylight Time) The problem with this is obviously that other time zones exist, so that portion inside the parentheses changes length. So now that we're hiring remote workers outside of Central, Pacific, and Eastern timezones, which are all conveniently the same length, a bunch of forms that used this code are broken. This also has the fun side effect that if a completely invalid string got into that field, it would be considered valid if it just happened to be 57 characters long.
|
|
# ? Aug 5, 2021 17:24 |