That’s not enough, a better idea is to, somehow, poison the location data. Otherwise by disabling location tracking you still leak the information that you are going to a clinic.
That’s not enough, a better idea is to, somehow, poison the location data. Otherwise by disabling location tracking you still leak the information that you are going to a clinic.
deleted by creator
deleted by creator
deleted by creator
Until you write a compiler error in some deeply templated C++ code, in which case just reading every word takes all day
/s but not too much
As a dev, I had to fix an O( n! ) algorithm once because the outsourced developer that wrote it had no clue about anything. This algorithm was making database queries. To an on-device database, granted, so no network requests, but jesus christ man. I questioned the sanity of the world that time, and haven’t stopped since.
Thank you for the explanation, now I understand the context on the original message. It’s definitely an entirely different environment, especially the kind of software that runs on a bunch of servers.
I have built business programs before being a game dev, still the kinds that runs on device rather than on a server. Even then, I always strived to write the most correct and performant code. Of course, I still wrote bugs like that time that a release broke the app for a subset of users because one of the database migrations didn’t apply to some real-world use case. Unfortunately, that one was due to us not having access to real world databases pr good enough surrogates due to customer policy (we were writing an unification software of sorts, up until this project every customer could give different meanings to each database column as they were just freeform text fields. Some customers even changed the schema). The migrations ran perfectly on each one of the test databases that we did have access to, but even then I did the obvious: roll the release back, add another test database that replicated the failing real world use case, fixed the failing migrations, and re released.
So yeah, from your post it sounds that either the company is bad at hiring, bad at teaching new hires, or simply has the culture of “lol who cares someone else will fix it”. You should probably talk to management. It probably won’t do anything in the majority of cases, but it’s the only way change can actually happen.
Try to schedule one on one session with your manager every 2 to 3 weeks to assess which systematic errors in the company are causing issues. 30 minutes sessions, just to make them aware of which parts of the company need fixing.
Sorry, this comment is causing me mental whiplash so I am either ignorant, am subject to non-standard circumstances, or both.
My personal experience is that developers (the decent ones at least) know hardware better than IT people. But maybe we mean different things by “hardware”?
You see, I work as a game dev so a good chunk of the technical part of my job is thinking about things like memory layout, cache locality, memory access patterns, branch predictor behavior, cache lines, false sharing, and so on and so forth. I know very little about hardware, and yet all of the above are things I need to keep in mind and consider and know to at least some usable extent to do my job.
While IT are mostly concerned on how to keep the idiots from shooting the company in the foot, by having to roll out software that allows them to diagnose, reset, install or uninstall things on, etc, to entire fleets of computers at once. It also just so happens that this software is often buggy and uses 99% of your cpu taking it for spin loops (they had to roll that back of course) or the antivirus rules don’t apply on your system for whatever reason causing the antivirus to scan all the object files generated by the compiler even if they are generated in a whitelisted directory, causing a rebuild to take an hour rather than 10 minutes.
They are also the ones that force me to change my (already unique and internal) password every few months for “security”.
So yeah, when you say that developers often have no idea how the hardware works, the chief questions that come to mind are
It’s one thing to pay, and another to be squeezed dry.
When ads were mostly static banners on websites almost nobody was blocking them, because they were mostly unobtrusive.
However, they would often link to shady websites that would install random crap, so the usecase for blocking them was already there.
Then they became animated, and they multiplied. It was one at the bottom of content at first. Then a couple. Then two vertical banners on the sides too. Then more rectangular banners here and there for good measure.
Then they became unkillable javascript popups, then proper new browser windows. Then autoplaying videos with audio were added. And this is just the visible stuff. Add tracking pixels, tracking cookies, browser fingerprinting, and tons of other spying technology deployed under the guise of “but the content is free”.
After every step the use of ad and tracking blockers became more legitimate as serving ads moved further and further away from paying for free content and squarely in the space of selling user data collected without consent for huge profit margins.
If ads and subscriptions were enough to just make a normal amount of profit, very few would be blocking ads or pirating content, because the amount of ads or the price of subscriptions would be reasonable and affordable.
But since everyone wants to make a 1000% markup on the content they generate, they will drive their very own paying customers away.
Youtube could have served me a couple ads per video and I would have kept using it forever. Instead they served me a minimum of 20 ads per video, so now they will serve me zero, forever.
Netflix could have gotten 12 euros every month out of me for their dwindling and dwindling content selection. Instead they wanted 14 after a while. And 17 after a while. And 19 after a little while more. All the while refusing to serve me the 4k content I paid for.
So instead they now get zero too.
I am very happy to pay for content, and a lot of people like me. But the comment you originally replied to was in reference to youtube increasing the price of their subscription by ludicrous amounts. You replied there content isn’t free, and I replied that youtube has no problem making money. The increases are not to keep youtube afloat, is to make youtube make 10 billions in profit rather than 8 next year.
It’s not about paying a fair amount of money for content, it’s about making you pay all that you can give and suck you dry.
So to your question “how do you pay for content/services in general?” I answer “with money”, but that is not what is happening here.
Meh. Been developing professionally with C++ for 10 years at this point. I’m one of the weird people that kinda likes C++ and its pragmatism despite all its warts.
I’d like C++ better if it didn’t have inheritance. There are better solutions to model interfaces, and without inheritance people can’t write class hierarchies that are 10 levels deep with a different set of virtual functions overridden (and new virtual functions added) at each level.
And yes, that is not hypothetical. Real codebases in the real world shipping working products do that, and it’s about as nice as you can imagine.
You do have a terminology mismatch. In C++, an abstract class is a class with at least one pure virtual method.
Such classes cannot be instantiated, so they are useful only as base classes.
An interface is more of a concept than a thing.
Sure you can say that Iterable
is an interface that provides the Next()
and Prev()
methods and you can say that Array
is an Iterable
because it inherits from Iterable
(and then you override those methods to do the correct thing), and that’s one way to implement an interface in C++.
But you can also say that Iterable
is a class template that provides a Next()
and Prev()
methods that call the methods of the same name on the type that they wrap (CRTP aka static polymorphism).
Or you can say that an algorithm that scans a collection T
forward requires the collection to have a Next()
method by calling Next()
on it.
And I can think of at least 2 other ways to define an interface that isn’t using abstract classes.
And even if using abstract classes, inheriting from them is definitely the least flexible way to use them to define an interface, because it doesn’t allow one to do something like mocking functionality in tests, because it’s not possible to redefine the class to be tested to inherit from the test interface implementation with mocked functionality, so one still needs something to the effect of dependency injection anyway.
So yeah, abstract class is very different from inheritance, and it’s also very different from interface, even though it relates to both.
My logitech G900 is plug n play on all my linux installations.
The same is true for the inexpensive logitech mouse that I have as backup (although it’s a piece of shit of a mouse and what made me decide to avoid logitech like the plague going forward).
What is this mysterious device that requires specific libraries and kernel modules? So I can state the fuck away from the device and the brand
deleted by creator
If by vim you mean neovim
vim.api.nvim_create_autocmd(“fileType”, {
group = file_type_group,
pattern = “make”,
command = “setlocal ts=4 sts=4 sw=4 noexpandtab”,
})
Slap this in your config, done
Since my previous example didn’t really have return value, I am changing it slightly. So if I’m reading your suggestion of “rewriting that in 3 lines and a single nested scope followed by a single return”, I think you mean it like this?
int retval = 0;
// precondition checks:
if (!p1) retval = -ERROR1;
if (p2) retval = -ERROR2;
if (!p3 && p4) retval = -ERROR3;
// business logic:
if (p1 && !p2 && (p3 || !p4))
{
retval = 42;
}
// or perhaps would you prefer the business logic check be like this?
if (retval != -ERROR1 && retval != -ERROR2 && retval != -ERROR3)
{
retval = 42;
}
// or perhaps you'd split the business logic predicate like this? (Assuming the predicates only have a value of 0 or 1)
int ok = p1;
ok &= !p2;
ok &= p3 || !p4;
if (ok)
{
retval = 42;
}
return retval;
as opposed to this?
// precondition checks:
if(!p1) return -ERROR1;
if(p2) return -ERROR2;
if(!p3 && p4) return -ERROR3;
// business logic:
return 42;
Using a retval has the exact problem that you want to avoid: at the point where we do return retval
, we have no idea how retval
was manipulated, or if it was set multiple times by different branches.
It’s mutable state inside the function, so any line from when the variable is defined to when return retval
is hit must now be examined to know why retval
has the value that it has.
Not to mention that the business logic then needs to be guarded with some predicate, because we can’t early return. And if you need to add another precondition check, you need to add another (but inverted) predicate to the business logic check.
You also mentioned resource leaks, and I find that a more compelling argument for having only a single return. Readability and understandability (both of which directly correlate to maintainability) are undeniably better with early returns. But if you hit an early return after you have allocated resources, you have a resource leak.
Still, there are better solutions to the resource leak problem than to clobber your functions into an unreadable mess. Here’s a couple options I can think of.
defer
Example of option 1
// precondition checks
if(!p1) return -ERROR1;
if(p2) return -ERROR2;
if(!p3 && p4) return -ERROR3;
void* pResource = allocResource();
int retval = 0;
// ...
// some business logic, no return allowed
// ...
freeResource(pResource);
return retval; // no leaks
Example of option 2
// same precondition checks with early returns, won't repeat them for brevity
auto Resource = allocResource();
// ...
// some business logic, return allowed, the destructor of Resource will be called when it goes out of scope, freeing the resources. No leaks
// ...
return 42;
Example of option 3
// precondition checks
void* pResource = allocResource();
defer freeResource(pResource);
// ...
// some business logic, return allowed, deferred statements will be executed before return. No leaks
// ...
return 42;
Example of option 4
int freeAndReturn(void* pResource, const int retval)
{
freeResource(pResource);
return retval;
}
int doWork()
{
// precondition checks
void* pResource = allocResource();
// ...
// some business logic, return allowed only in the same form as the following line
// ...
return freeAndReturn(pResource, 42);
}
TMDB — themoviedb (dot) com