There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

kambusha , in After 6 hours

Working at a company with no automated tests. There’s not even a collection of regression tests or anything to follow. I was wondering if anyone could share or point me towards a good template to start building out test cases as a first step?

big_slap ,

I think this is something you’re gonna have to just jump into and start since you don’t have anything to work off of. it’s going to take a lot of work, but at least you’ll be able to work off your own ATFs once you finish. good luck…

Rentlar ,

I mean, start with trivial cases of the core functionality of what your system does. Then build upon it based on your own findings and what your clients report.

E.g. if your system loads images then put in a tiny 5x5px solid square or checkerboard pattern and see if it loads. Then try putting multiple images, different formats (webp, gif, png, tga) etc. see if that breaks anything, keep building out.

qwop ,

It probably really depends on the project, though I’d probably try and start with the tests that are easiest/nicest to write and those which will be most useful. Look for complex logic that is also quite self-contained.

That will probably help to convince others of the value of tests if they aren’t onboard already.

occams_chainsaw ,

if there are zero automated tests, things probably weren’t written with (automated) testing in mind, so there may be a lot of coupling… starting off with integration tests just to validate existing behavior is a good start. hopefully the existing applications aren’t also inextricably bound to environments that are run on pet servers and managed by other teams…

kambusha ,

Thankfully, the team has full control without external team dependencies

Eonandahalf , in Imagine

OMFG!! Don’t give them ideas!

evatronic , in After 6 hours

The one I hate? Your unit tests pass when run locally, and in your sandbox environment, and in dev, and in UAT, but prod? Fuck that, failing with reckless abandon.

koper ,

Unit tests or integration tests?

philm ,

Yes

SomeKindaName ,

Are you kidding me? Tests in prod? Hopefully that means you didn’t fully roll out. That means someone didn’t get a 3am page.

This sounds like a god-damned resounding success.

aard , in After 6 hours
@aard@kyu.de avatar

I recently spent about two weeks trying to figure out why an intercontinental connection between two of our sites was broken. Not really my job, I just care about application level, but the network guys were beyond useless.

In the end I had the problem isolated to a specific network segment in India, which made them look at the right system and fix things. The reason? “We put up a firewall the day your problems started which blocks everything, if we allow your connection it works”.

jscummy ,

“If we allow your connection, it works”

Oh, surprising

Colour_me_triggered , in Imagine

DELET THIS

nickwitha_k , in Imagine

No. Just no.

alphacyberranger , in After 6 hours
@alphacyberranger@lemmy.world avatar

Everyone talks about testing, but I have never seen it in the wild

Jaydeep ,

It’s common in critical projects.

alphacyberranger ,
@alphacyberranger@lemmy.world avatar

Chuckles… you have not worked in my company.

fibojoly ,

After many years (10+), I finally find a company that actually, really, implements CI/CD. Then I look at the tests and it’s actually the most inane shit imaginable, tacked on top of ancient existing code, not maintained. I spent more time fixing the stupid tests than actually fixing the bugs I was tasked fixing. Amazing.

gerryflap ,
@gerryflap@feddit.nl avatar

I can’t really imagine working on any code base that has to actually be maintained and doesn’t have tests. The amount of times that tests have safed my ass at my job are uncountable

huginn ,

Meanwhile I’m very upset our unit test coverage is only 40%.

Like, it’s the number 1 priority for the principle & staff engineers to get that up to 80% across the codebase.

floofloof ,

And it’s number 1 priority for management to employ as few developers as possible and stretch their team as thinly as possible. Hence still no unit tests in any of the companies I’ve worked at recently, despite everyone knowing they’re worth it, including lip service from management. They just won’t invest in testing, no matter what. One company even fired all the testers then complained to the developers that the product was getting less reliable.

buzziebee ,

We test the shit out of our Apis. We do more API level/integration testing though.

I.e. a test will be something like “if the db is in this state, and we hit this endpoint with these params, does it return what we expect and update the db correctly”.

Our app is primarily about users maintaining stuff on big datasets with complicated aggregation and approval logic. So setting up a scenario and checking the app does what the business logic says it will do is what we want to know.

It makes refactoring wayyyyy less painful to just know that the app will always behave itself. Rather than testing whether a function can add 1 + 2 correctly, we can test each endpoint does what it’s supposed to do.

It gives us loads of confidence that the backend is doing what it’s supposed to. If you do a huge refactor you don’t need to worry about whether you broke the test or if the test is failing correctly. If the tests all pass everything is working as it should.

Downside is longer test execution times (because a temporary db needs set up) when running the full suite. Worth the trade off for us though.

jaybone ,

Those are good tests. But that sounds more like an integration test than a unit test. And we should have both.

shotgun_crab , in After 6 hours

You guys have unit tests…?

igorlogius ,
@igorlogius@lemmy.world avatar

mostly deprecated or disabled … but yes. /jk

BradleyUffner ,

Ohh yeah, loads! Do they actually test anything useful? Not so much.

jaybone ,

You just have to mock everything, so it’s basically testing nothing. But you get those code coverage numbers.

gornius ,

I actually had to refactor configuration module some time ago. These really came in handy. But was it worth it? Well… it saved some time, the time that could be used to debug problems manually, but it made me a lot more confident that the functionality that worked before, worked after.

fibojoly ,

The ones I have seen so far are probably written by the same people who don’t understand the usefulness of comments, I reckon. And maintained with the same enthusiasm.

attero , in Every Single Freaking Time

⌘ cmd >> ctrl toshy.app

RagingRobot , in My poor RAM...

What are you saving your ram for? You bought it to use it!!!

xusontha OP ,

But I like to snack on it…

Acters , in My poor RAM...

People kept arguing with me that not using is a choice and wonder why it is not freedom of choice.

TigrisMorte , in My poor RAM...

It isn't to save RAM the you should use the website over the app for.

xusontha OP , (edited )
QuazarOmega ,

I think they’re referring to the fact that often installed apps will be able to mine more of your data

Zeragamba ,
@Zeragamba@lemmy.ca avatar

that sounds like just plain old paranoia and fear mongering

QuazarOmega ,

I wish it were… But well, I guess I’ve been exposed to far too many privacy news articles, so I’m now paranoid too (with good reason)

fu ,

@Zeragamba @QuazarOmega just because something is paranoia doesn't mean it isn't true. Whenever I turn on the DuckDuckGo "VPN" to stop tracking by third party apps, I'm amazed at how many request are happening from apps I hardly use and many I don't expect (though I should know that something can still be open source Free Software and that the open code contains surveillance capitalsm tracking in order to fund the project)

GlitchSir , in Who is this "Jenkins" and what now has broken him?

The build system issue is getting out of control. Just look at cmake

When your build system is a build system for build systems you know something went wrong years ago

GlitchSir , in The lengths we have to go to

Just draw whitespace…

Bipta , in My poor RAM...

This meme is really only true for things like Slack where the app is just the webpage in an app, and even then it's not quite true because Electron is a lot heavier than a webpage because it has to now run the webpage and the app - which I think is terrible.

But then also, Electron enables actual apps to be developed using web standards - which I think is great.

TLDR: Use Electron to make apps, not glorified webpages.

habanhero ,

??

Slack IS an app.

Chadus_Maximus ,

??

Slack IS a webpage.

habanhero ,

Calling Slack a webpage is like calling an office building a room.

Slack is just as much a complex app as anything else even if it’s built on web tech and standards.

firelizzard ,
@firelizzard@programming.dev avatar

The point is that Slack does not take advantage of Electron at all. It’s no better than running it in a browser.

habanhero ,

For Slack it does. Building an app via Electron means it’s cross-platform by default, so Slack doesn’t need to invest in separate platform teams to solve the same problem (Windows, macOS, Linux).

Electron also has better support for things like native notifications, video and voice calls, offline capabilities, and to other native APIs etc that are either unsupported or spottily supported via the browser.

pkill ,

Flutter?

habanhero ,

What about Flutter?

pkill ,

It’s a much more lightweight option for building cross platfrom apps than Electron. Heck, even Tauri is better than Electron even though it also uses web technologies for UI.

habanhero ,

Flutter came to market much later. It wasn’t even a thing when Slack started building using Electron. I’m sure the same applies to Tauri as well.

railsdev ,

It has all this support for native platforms yet it’s always a clunky memory hog that makes zero effort to respect the design language of the OS it’s running on.

I’m on macOS, I want the app to be a native macOS app. If I wanted it to look like a webpage, or Windows, or Linux GTK then I’d switch to one of those and expect it to match those paradigms.

habanhero ,

It has all this support for native platforms yet it’s always a clunky memory hog

Maybe so but it has improved a lot over time. The app devs share some responsibility too so it’s not all on Electron.

zero effort to respect the design language of the OS it’s running on.

That’s the Dev’s design choice, not a limitation of Electron.

I’m on macOS, I want the app to be a native macOS app. If I wanted it to look like a webpage, or Windows, or Linux GTK then I’d switch to one of those and expect it to match those paradigms.

I don’t disagree but at the end of the day it doesn’t matter to enough people for it to become an issue. People are used to Slack and the way it works.

Moreover the cost of building the same app 2x or 3x simply doesn’t make business sense.

railsdev ,

I’m a web developer but is there no concept of classes, libraries, etc in other programming languages?

What happened to writing the “core” of an app that doesn’t rely on UI then simply writing the front ends for each platform you want to support?

You keep saying Electron is used for better compatibility and listing out Linux, Windows, macOS but here’s the thing — most companies are only targeting those. That’s just three (if you don’t write for a million desktops on Linux).

Is it really so hard to support just three environments with only the UI being tailored for the OS it’s running on?

Honestly, it just feels like poor tooling and a poor excuse.

habanhero ,

What happened to writing the “core” of an app that doesn’t rely on UI then simply writing the front ends for each platform you want to support?

What do you mean? I can’t speak for Slack but I’m sure some degree of business logic / client side logic separation exists.

By the way, what you just described is the essence of cross-platform development, rather than an argument for building apps natively.

simply writing the front ends for each platform you want to support?

But why would you rewrite the “front-end” for each platform if you have one you could just port over? Who is going to pay for those 2x developers and what would be the ROI on this effort?

That’s just three (if you don’t write for a million desktops on Linux).

Is it really so hard to support just three environments with only the UI being tailored for the OS it’s running on?

In Slack’s case I’d wager the answer to be a resounding YES. I don’t think you fully grasp the full scope Slack’s capabilities, and the amount of work involved to build native clients for not just one or two, but three different platforms - it’s definitely not just the “UI”.

Honestly, it just feels like poor tooling and a poor excuse.

Quite the opposite - frameworks like Electron let’s devs with your skillset build with the stack you already know, and abstracts away quite a bit of the cross-platform complexities, which strangely enough is what you are suggesting but also what you are arguing against

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines