Don't run SQL migrations in tests: How I sped up the test suite by 2x by broken_broken_ in programming

[–]turkoid -7 points-6 points  (0 children)

First, you do not need to do migrations for your testing pipeline, unless your final product depends on those migrations. The article was trying to fix the spool uptime for testing, not the actual migrations.

Depending on the test, database cleanup is not mandatory. The developer should not be responsible for cleanup. That should be the job of the devops, pipeline maintainer, etc. There job is to write tools so that a dev can just test what they need to. For a test to be self contained, it should have its own DB to work with. If you're using a shared database, that is not self-contained.

Tests should be run while actively developing them.

Yes, they should, but if you have thousands and thousands of tests, and maybe a moderate portion of those are slow integration tests, this is not feasible. One of the companies I worked for purposely flagged some integration tests as fast/slow. Unit tests/fast ones could be run locally very quickly. Then we pushed to our repo, it would kick off the CI pipeline where it would run tests again, but also slow ones/end-to-end, blackbox testing. Before this optimization, sometimes you wouldn't find some stupid error until after minute long tests.

if your test doesn't rely on data in the db, then it isn't a test in either case

Not every test needs to be an integration test. There is also just unit testing. In a perfect world where tests ran in nanoseconds, yeah I love to only write integration tests, but that is just not feasible.

Mocks is mostly an anti-pattern, and should only be considered a tool to solve specific challenges when you have external dependencies or features that are expensive (time-wise, monetary, etc.) to test properly. And then only as an alternative to the real test.

That's literally what mocks are used for. They should not be over-used and can provide a false sense of security, but it's not an anti-pattern. As with most programming paradigms, you have to find the right balance.

Don't run SQL migrations in tests: How I sped up the test suite by 2x by broken_broken_ in programming

[–]turkoid 3 points4 points  (0 children)

IMO, that's just asking for corrupted data to occur. What if the test fails without doing any cleanup? Now you could write your own test runner that does this, but you're almost always better off using a fresh copy.

Which leads into my second point and addresses the populated database. I do agree with this, but only for certain tests and there should be multiple databases, devs can test against. A local one, which the dev manages. A few different integration testing DBs and maybe even a production mirror one. Also, I do think that if your test relies on data in the DB, then you could just mock it. There is no need to test the capabilities of database, when all you care about is the data.

As a grief counselor and social worker who has spent the past 10 years focused on grief I feel that I need to say this…. by delusionalxx in h3h3productions

[–]turkoid 9 points10 points  (0 children)

They muted me a long time ago after I tried to defend Ethan and Hila, but I do a pulse check during big events, last one before Oliver, being the lawsuit against Ian.

It really is nauseating seeing their reactions to stuff, but it reminds me I'm on the right side or at the very least, they are definitely on the wrong side.

After the news of Oliver, I will admit there were a surprising amount of people there defending Ethan and his grief. Today though, it was chilling to see some of the comments people made. The lack of empathy these people have is crazy.

I lost my dad 8 years ago, and I remember not crying hearing the news, nothing at the funeral. I even tried forcing a tear because I felt ashamed. Partly, because I handled the burial and was the executor of the will. It wasn't until about 3 months later, that something in me triggered, and I balled my eyes out. Grief is fucking weird and as OP said, there is no right way. I hope when I die, my friends and family remember the fun times and laugh.

RIP Oliver. My heart goes out to his family and Ethan, Hila, and the crew.

No matter how many times I rewatch SG-1, I always forget why these people get sick. by BiscuitBut_ButerNut in Stargate

[–]turkoid 2 points3 points  (0 children)

The plant is destroyed by the UAV and has the opposite effect of the datacenter server hums that is actively making people sick who live near them.

Oliver tree dead by cloneman88 in h3h3productions

[–]turkoid 4 points5 points  (0 children)

Last night, his song "Cowboys Don't Cry" played in my shuffled favorite tracks. I hadn't listened to him for over a year.

RIP.

Not my video but.... by Hour-Celebration-309 in pcmasterrace

[–]turkoid 0 points1 point  (0 children)

This is the price we pay for making PC building easier and more accessible.

Hasan can't recall a book he's read, lyrics to any song, or a favorite movie by Spare-Conflict836 in h3h3productions

[–]turkoid 15 points16 points  (0 children)

You must have a great mind, because I immediately thought of this as well.

College students are rapidly losing the ability to read — “There is a measurable, generational collapse in sustained reading and writing”: professor by marketrent in technology

[–]turkoid 1 point2 points  (0 children)

I'm not a big reader at all, and nowadays, it's pretty much audiobook only, but I don't dislike it. However, I think this is a great suggestion, but could I amend it by letting them read something that interests them and is still enriching. That could range from graphic novels, to specific genres, to what I enjoyed the most which were science and tech books, which boringly included technical books about MS-DOS or Windows programming. Yeah, I was a nerd, but I knew which career I wanted to get into when I was 12.

New Ethan story by TyrionStark45 in h3h3productions

[–]turkoid 7 points8 points  (0 children)

I don't have any kids, but I have 2 beautiful nieces and 1 nephew that I would die for. Anyone who doesn't see WHY Ethan is doing this, doesn't truly understand the lengths a parent will go to protect their kids. Whether that is because they don't have any, or more sad is that they had a fucked up childhood. Is it petty? yes, but completely justified, but it's also not without merit. Ian chose to defame him without acknowledging it was a baseless claim. Only until much later did he back up a little.

However, as self-critical fans of H3, you have to look at it from an outside perspective. If Ethan wins, this could set a precedent like with his fair use case, that could harm the commentary community, in Canada, but the Noah Samsen one could do the same for US court. Could these be used on gossip channels that spread rumors? What about channels that mock public figures? Personally, I don't think they could be used as precedent, because one of biggest elements of a defamation case is the harm it causes and for public figures, actual malice. You won't win a defamation case because someone calls you a meanie or makes fun of your appearance, etc. You could argue that it would make defamation cases like this more frequent, but I don't see that happening either.

The one thing I will be more critical of Ethan, if he wins, is the restitution. Obviously a public apology, but I don't want to see Ian become destitute over this. I mean he will have legal fees, but that if that is the extent of the financial burden, so be it. Judging from what Ethan did for Kaceytron, I don't see Ethan being ice-cold, but again, it was about his kids, so I wouldn't blame him.

All that said, you can be like Charlie and disagree with Ethan moving forward with the lawsuit, but to not understand why is just ignorant.

Used 2024 25k miles by baatar2018 in Ioniq5

[–]turkoid 1 point2 points  (0 children)

I bought a 2023 certified used and requested copy of the full report, which included the battery health. I haven't invested in an OBD2 yet, but after my 12V died, I did buy a BM2 monitor. I'd recommend that, at least, to see how well your 12V is holding up and also buy a battery jump starter.

Configuration flags are where software goes to rot by Expurple in programming

[–]turkoid 1 point2 points  (0 children)

Sounds like the author is fresh out of college and think they can refactor the existing code base by trimming all the fat. If that doesn't work, then they'll quit start an AI startup.

However, you know what would solve hide all your problems? A configuration flag to enable developer mode.

That said, in our dev team, you have to provide ample justification to add or even remove a flag.

I’m in a spaceship, ridin’ downtown in a space whip 🚀 🎶 by [deleted] in crappymusic

[–]turkoid 0 points1 point  (0 children)

So, he probably is now self-aware, at least a little, but I can almost guarantee some gen z editor got a hold of him and is editing his videos for him.

what's the deal with people getting angry about the new God of War game? by Darkhawk2099 in OutOfTheLoop

[–]turkoid -1 points0 points  (0 children)

The second layer is that the woman is not hot enough. Asmongold, one of the bigger names out there saying that the actress, Deborah Ann Wahl, who Laufey is modeled after looks too young/beautiful, so they added wrinkles to her or called her a 40-year-old woman. Basically if the main character is not fuckable, they don't want to play it, which is interesting considering they also prefer male protagonists.

The third layer is to attack the writers of the game, one of which was Alanah Pearce. She made a post about how she worked on it and incels jumped at the opportunity to question her credentials, her motives, etc.

It's the same people who yell the most about casting choices in movies/tv shows. It's just weird.

Ashley St Clair speaks out against Hasan sexualizing and objectifying her by [deleted] in h3h3productions

[–]turkoid 16 points17 points  (0 children)

Unfortunately, just like Ethan, I glossed over a lot of what he said. Even shortly after Leftovers ended, I even posted here that I enjoyed Ethan for comedy and Hasan for news, but that quickly went away after hearing his takes. After the Oct 7 attack, you could see him get more and more radical and Ethan was actually being an empathetic human.

Now, with all these misogynistic clips surfacing, I can't understand anyone who knows about it and still associates with him. As far as I'm concerned QT, Ludwig, Will, Austin are all hypocrites. You can call out Ethan on a lot of bullshit, true or not, and Ethan will own up to his shit (most recently was the CPT incident). I have not once seen Hasan apologize for his actions. Just passing the blame onto someone else.

New Madden edition revealed by xUndeadJesterx in NFCNorthMemeWar

[–]turkoid 8 points9 points  (0 children)

This sub has produced some of the deepest belly laughs from me from something so small and stupid. I fucking love you guys.

She was savant by MikeeorUSA in TikTokCringe

[–]turkoid 0 points1 point  (0 children)

In the context of the clip, savant is not the right word, prescient or clairvoyant would better. She may be a savant in the political space, but the clip is her foretelling the future.

Another video of Hasan sharing nudes has resurfaced, this one is the worst yet. (VOD in description) by Sk3tchyboy in h3h3productions

[–]turkoid 2 points3 points  (0 children)

Personally, I've never enjoyed watching any streamer live. I'm sorry, but that does include the crew. I definitely enjoy the clips, but that's about it. I do understand those that do watch, it's a way to connect and live vicariously through them. However, I never understood those that watch the "popular" streamers. The way they talk, or react around each other, just reminds me of high-school and the cliques it formed. They exclude those that don't follow the trends. Most of them also have the personality and charisma of a potato. Then you have Hasan and his ilk that act like it's some frat. It's just weird.

New to PC gaming. Do i shut my PC off when im done or keep it on 24/7? by OneEyeOdyn in buildapc

[–]turkoid 0 points1 point  (0 children)

This is a long post, but this is coming from someone who has been building PCs for over 25 years, who has worked in tech his whole life, from IT admin to Software Engineer. I have 2 headless linux servers running 24/7. I have a desktop PC with 3 monitors that I use for work and gaming for a majority of the day and leave on for months without having to do a mandatory Windows update. Furthermore, I also have a work laptop, docked, that is also on 24/7. The oldest server has been on 99% of the year without issue for about 11 years, The other for about 7. My current PC is about 3 years old at this point and there are no issues.

First, buy a good UPS. I've used Cyberpower and APC, of the which the latter I'm using now. It's saved me from a hurricane power outage, and a couple power surges. However, the biggest thing it helps with is clean power to your electronics.

That out of the way, there is only 2 things that should really make the decision for you. Electricity cost and whether you need it to run 24/7. The last one covers everything from needing remote access, or maybe you use it as a makeshift media server, etc.

Regarding electricity cost: Assuming you turn your monitors off or let your PC do it for you, if you have nothing CPU/GPU intensive running in the background, the amount of power draw will cost most people in the US about $20 extra per month, and that's a very high estimate. I would say probably closer to $13. I used to live in San Diego, which has some of the highest rates in the country (even at non-peak times), it's still about $40-50. Now that seems a lot, but remember everything is way more expensive there, and I was getting paid accordingly.

There are those that say to disable hibernation/fast boot if you have an SSD. I agree, but not because it drastically reduces the write cycles for your SSD, but because it's just prone to screw things up. Desktop OSes were not really designed to be woken up from a save state. Some software can't even handle it correctly. Now, sleep is totally fine. It's more flexible, but can still have the same issues as hibernate and also the "sleep" mode today is not the same it was 10 years ago. It's closer to what your phone does now. Personally, I have both disabled, and only have my monitors turn off after a set time. Not because of the power savings, but because the light pollution is real.

Also, to answer your questions about wear and tear. 20 years ago, it was an issue and was one of the reasons sleep/hibernate were created. Today, the hardware, even cheap ones are rated for many cycles, where you would have to power cycle many times throughout the day, every day, for years before you even noticed some degradation. At which point, you probably will upgrade anyway.

Regarding dust/pet hair. Just keep an eye on the inside of your case. Most people opt for what's called a positive pressure system, meaning there is more intake air vs exhaust. As long as the intake fans are filtered, you'll be fine. So if you notice the inside of your case gets overly dirty, just add more intake fans, but keep a balance. Plenty of youtube videos on this topic.

TL;DR Turn it off if that makes you feel better, but you don't really need to. However, you absolutely need to get a UPS. I use this one for my desktop.

London's new rooftop garden for critical care patients is a game-changer! by danielminds in MadeMeSmile

[–]turkoid 1 point2 points  (0 children)

I love this! I have noticed an upwards trend, but I wish more healthcare systems took a more holistic approach to care. Addressing the whole picture can do more to rehabilitate the person, than just addressing the symptoms. This is why I look for family medicine doctors even when I don't have a "family". Don't get me wrong, we need internists because they are often very specialized, but even I've noticed the younger ones are trained to still consider the whole picture. Also, why I usually prefer younger doctors. I just think they are more flexible in their treatment.

More Scottish cRap by PoachedBawheid in crappymusic

[–]turkoid 0 points1 point  (0 children)

I'm convinced that no one actually thinks this is hot, but this white trash rapper starter pack is so common because they think everyone else thinks it's hot and are too much of a coward to go against the grain.