The Official Status Thread
-
@izzion And now somebody accidentally didn't notice the poorly visible parked there before they called city services to have it removed?
-
-
@PleegWat said in The Official Status Thread:
@izzion And now somebody accidentally didn't notice the poorly visible parked there before they called city services to have it removed?
Eh, the
was too strong to do more than shake my head and rush back here to shitpost about it after I finished my walk.
Plus fu-- the parking (Con)troll.
-
-
@sloosecannon said in The Official Status Thread:
Perplexed as to the point of an antivirus
The point is to fight the virus. You don't want it to spread do you. Everyone must do their part! AV has 90% efficacy in preventing further infections.
Too soon?
-
@DogsB said in The Official Status Thread:
three different code bases operating in three similiar ways but just different enough to warrant three different solutions but we're trying to jury rig a one size fits all solution.
Hey, I've seen this one!
-
Status: When it rains, it pours.
Insurance company decided not to renew my house insurance because I didn't clean the green marks on some parts of the siding to their satisfaction. I've called for more information but haven't heard back and suspect I'll be calling a different place for coverage. That scares me because I don't know what that'll involve and my house being cluttered inside may now pose a problem. Then I got a letter from the local tax collector, which I expect is either for this year's being late or the last two years being lost in the mail due to the pandemic. Either way I have to dig up some tax information to satisfy them at a very inconvenient time.
Also, I continue to be perplexed by a problem with shirts being ruined. I suddenly notice a few random little holes, all on the bottom half. At first I thought it was carpet beetles since I have cedar blocks to ward off moths but I've never seen anything that looks like what the internet says they look like.
Then I started watching other factors. I noticed it's only this brand of shirt and, further, only shirts that have been worn. I have shirts from years ago and brand new shirts I left sit out that don't have any holes. One would think if it were bugs that the odds would hit at least one of them. Now I'm starting to read typical COVID/eggs/celltower confusion about whether fabric softener is good or bad for clothes. I'm thinking the brand of shirt TeePublic uses now is just shit. Which sucks because stores, if you can find any still open these days, are full of shit.
-
@Arantor said in The Official Status Thread:
So having both can be reasonable for a given class of problem.
That I'd agree with. It's some of the horrible its-an-UUID-but-we-dont-do-it-right code that has been paraded round this site that I'm objecting to.
-
@dkf said in The Official Status Thread:
@Arantor said in The Official Status Thread:
So having both can be reasonable for a given class of problem.
That I'd agree with. It's some of the horrible its-an-UUID-but-we-dont-do-it-right code that has been paraded round this site that I'm objecting to.
In a very brief spat off sleep-deprived-ness I was considering hand generating them to include some extra metadata.
This was followed by a nightmare.
The two have nothing to do with each other, honest!
-
@dkf oh god yes. Though that was funny recently; I had to generate said UUIDs and I naturally knocked out a quick UUID generator (using real random bytes I might add)... took me 20 minutes to write and check for correctness, took about 10 lines of PHP.
This turned into an argument about libraries vs rolling my own when I pointed out that even his recommended choice (first thing he'd found online) would take me longer to audit (at his request) than for me to write my own...
-
@GOG said in The Official Status Thread:
Seriously, though, isn't this the kind of problem OOP is designed to solve?
Carefully controlling what versions of libraries you build and deploy with is what a proper build system helps with, at least these days. And you check runtime versions with your CI. (I've got 4 java runtimes in regular use, but only one version of everything else; I don't need to support most non-LTS versions.)
-
@Tsaukpaetra said in The Official Status Thread:
Status: Pondering if I want to build up table relationships in my hand-crafted ORM or not.
Couldn't be worse than a hand-maintained index table, right?
The "or not" point should've been before you made a hand-crafted ORM
-
@hungrier said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
Status: Pondering if I want to build up table relationships in my hand-crafted ORM or not.
Couldn't be worse than a hand-maintained index table, right?
The "or not" point should've been before you made a hand-crafted ORM
I'm refactoring a hand-made ORM-that's-not-an-ORM into something slightly more usable and less copy-pastaing.
Any (implied) relationships are already not being taken advantage of, so this would be new functionality whereas currently I have not actually done anything really new.
I'll most likely continue to keep them implied rather than enforced....
-
-
-
@Arantor said in The Official Status Thread:
check for correctness
@Arantor said in The Official Status Thread:
PHP
-
@Zenith said in The Official Status Thread:
Insurance company decided not to renew my house insurance because I didn't clean the green marks on some parts of the siding to their satisfaction.
-
@Zerosquare PHP is insane now.
Like since PHP 8 it's almost like it's a real language.
We have named arguments for when you can skip all the bullshit optional parameters.
htmlspecialchars($string, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
becomes:
htmlspecialchars($string, double_encode: false);
Want to declare a bunch of properties in the class that you're going to initialise in the constructor? Boom.
class Point { public function __construct( public float $x = 0.0, public float $y = 0.0, public float $z = 0.0, ) {} }
Union type hints that are language enforced?
class Number { public function __construct( private int|float $number ) {} } new Number('NaN'); // TypeError
And so much more.
It's almost a real language. Now if only we can deprecate the bullshit that is some of the weirdness of the standard library, we'll be golden.
-
@Arantor said in The Official Status Thread:
Want to declare a bunch of properties in the class that you're going to initialise in the constructor? Boom.
Shit! I've been doing it like this:
public string $dbType; public ?string $lengthOrEnumValues; public ?bool $isNullable; public bool $isPrimary; public bool $isUnique; public bool $isKey; public ?string $defaultValue; public ?string $customPostfix; public function __construct( string $dbType, ?string $lengthOrEnumValues = null, ?bool $isNullable = true, bool $isPrimary = false, bool $isUnique = false, bool $isKey = false, ?string $defaultValue = null, bool $isAutoIncrement = false, ?string $customPostfix = null, ) { $this->dbType = $dbType; $this->lengthOrEnumValues = $lengthOrEnumValues; $this->isNullable = $isNullable; $this->isPrimary = $isPrimary; $this->isUnique = $isUnique; $this->isKey = $isKey; $this->defaultValue = $defaultValue; $this->isAutoIncrement = $isAutoIncrement; $this->customPostfix = $customPostfix; }
That'll reduce cruft by a factor of three!
-
@Arantor said in The Official Status Thread:
I naturally knocked out a quick UUID generator (using real random bytes I might add)...
Did you remember to set 13th digit to 4 and higher two bits of 17th digit to 10?
-
@Gąska said in The Official Status Thread:
@Arantor said in The Official Status Thread:
I naturally knocked out a quick UUID generator (using real random bytes I might add)...
Did you remember to set 13th digit to 4 and higher two bits of 17th digit to 10?
Only when the decade is divisible by 7 but not by 3. That one always gets me!
-
@Arantor Yeah, now I'll only have to wait for RHEL9 to be our lowest supported release before I can start using these improvements in our codebase.
-
@Gąska no because that wouldn’t be a fully correct type 4 GUID - as per https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random) you only set certain bits rather than whole digits.
-
-
@topspin We are, at this time, still supporting RHEL6 and derivatives. Which is over a decade old now. So that means PHP 5.2.
-
@PleegWat said in The Official Status Thread:
@topspin We are, at this time, still supporting RHEL6 and derivatives. Which is over a decade old now.
Same here. I have to call that one customer some time and have them nag their IT if they really still use RHEL6. Because it’s becoming difficult for me to support.
-
@topspin See: https://what.thedailywtf.com/post/1764552
Must remember to post "Snow
" on the first day of December.
-
@topspin Well I don't have to wonder. I've been getting bug reports from them, and our diagnostics bundle includes the OS release.
Not that that matters. There's a support matrix and that says we do rhel6 for (I think) another 2 years.
-
@dkf said in The Official Status Thread:
I suspect it's only applicable in applications where the model is understood completely before the development starts
When you write a function, you have an idea what the function should do. Write the test for that little piece of code. That's it.
-
Yesterday I had a tasty lunch at a vietnamese restaurant: duck with vegetables and rice.
Found several chunks of chicken among the vegetables.
Fortunately, I am not a vegan.
-
In my current project "test-driven development" means "the client tested something and seen it's not working. Develop a quick hack quickly so you can get them off your back and return to your normal headaches and refactoring surgery"
I so want to rewrite the whole thing from scratch. At least the inevitable bugs which would come up from that would be easierly understood because I'd keep the cyclomatic complexity down.
-
@BernieTheBernie said in The Official Status Thread:
Yesterday I had a tasty lunch at a vietnamese restaurant: duck with vegetables and rice.
Found several chunks of chicken among the vegetables.
Fortunately, I am not a vegan.Last time I checked, duck isn’t a vegan food either
-
@Applied-Mediocrity said in The Official Status Thread:
@topspin See: https://what.thedailywtf.com/post/1764552
Must remember to post "Snow
" on the first day of December.
Goddamnit, I'm too predictable even for WTDWTF's repetitive in-jokes.
Filed under: it's called consistency and I consider it a virtue
-
@Jaloopa said in The Official Status Thread:
@BernieTheBernie said in The Official Status Thread:
Yesterday I had a tasty lunch at a vietnamese restaurant: duck with vegetables and rice.
Found several chunks of chicken among the vegetables.
Fortunately, I am not a vegan.Last time I checked, duck isn’t a vegan food either
-
@PleegWat :sad-trombone-noises:
-
STATUS I'm beginning to wonder if anyone here is using anything cutting edge from after 2012. I had a breif acquaintance with technology from 2015 a couple years ago but since then I've being stuck in 2008 for the most part. Does anyone get to use anything new and shiney? Who are these people that get to bleed with the cutting edge. Is it just hobbist coders doing shit in their own time. Will it ever filter down to the rest of us? Is it just me making terrible decisions?
-
@DogsB you need to be doing JS, then you can install a new framework with 8000 broken dependencies every other week.
-
@topspin This is the one true way!
-
@DogsB What tech are you using anyway?
-
@stillwater said in The Official Status Thread:
@DogsB What tech are you using anyway?
some kind of java ejb monstrosity with Spring 2.X thrown into the mix. I think I might break my record for disengagment with this stint.
-
@Arantor said in The Official Status Thread:
@Gąska no because that wouldn’t be a fully correct type 4 GUID - as per https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random) you only set certain bits rather than whole digits.
Specifically, all 4 bits of the 13th digit and higher two bits of the 17th digit, just like I said.
-
@BernieTheBernie said in The Official Status Thread:
Yesterday I had a tasty lunch at a vietnamese restaurant: duck with vegetables and rice.
Found several chunks of chicken among the vegetables.That chicken was obviously duck-typed.
-
@Gąska your pendantry was before I had had enough caffeine since I did not correctly process that 4 bits = 1 hex digit. Yes, this I got correct and I used the 2-big signifier of variant 1 not 3-bit signifier of variant 2.
Also it was months ago I mangled that particular bit of code, but yes, I checked thoroughly at the time that it was correct.
Having the tech lead ask if
random_bytes
was random enough was funny to me.
-
@Arantor just making sure. I've seen many "UUID" generators that don't generate valid UUIDs.
Having the tech lead ask if
random_bytes
was random enough was funny to me.I'd ask the same question TBF, if I wasn't familiar with that function. Many RNG functions in standard libraries are thin wrappers/reimplementations of C runtime's
rand
seeded withsrand(time(NULL))
. You don't want that in a distributed system.
-
status: rolling headache ongoing for 12 hours now. Argh.
-
@Gąska sure. I give you the man page for it, see what conclusion you’d come to: https://www.php.net/random_bytes and whether this is good enough.
-
@Tsaukpaetra said in The Official Status Thread:
status: rolling headache ongoing for 12 hours now. Argh.
Try drinking more water and eating more carbs.
STATUS OMFG! I've being looking at a broken tag in a jsp for a fucking hour now.
-
@DogsB said in The Official Status Thread:
OMFG! I've being looking at a broken tag in a jsp for a fucking hour now.
Have you tried fixing it rather than just looking at it?
-
@Jaloopa said in The Official Status Thread:
@BernieTheBernie said in The Official Status Thread:
Yesterday I had a tasty lunch at a vietnamese restaurant: duck with vegetables and rice.
Found several chunks of chicken among the vegetables.
Fortunately, I am not a vegan.Last time I checked, duck isn’t a vegan food either
No, for that you have to misspell it: d'ck, chick'n, be'f. Although vegan duck is somewhat ambiguous.
-
@Zecc said in The Official Status Thread:
In my current project "test-driven development" means "the client tested something and seen it's not working. Develop a quick hack quickly so you can get them off your back and return to your normal headaches and refactoring surgery"
This really isn't a bad approach, as long as each bugfix also adds an automated test verifying the fix. But by the tone of your post I somehow doubt that's the case.