It can be extended upon.. I see a lot of ORM based solutions that pull a full record just to check a single property sometimes. E.g.:
var user = repository.GetUserById(userId);
return user.IsDisabled;
That's not even a facetious example, I have seen it multiple times. In some cases that query is pulling multiple columns, and a few joins.. just to pull a single bit value.
This is not necessarally terrible in some scenarios: namely, when the repository caches enties for the duration of the unit of work, and the user in question is used elsewhere in the request (or at least is used elsewhere in the common case).
In that scenario, this can be strictly more efficient than doing a specialized query here, and a more general fetch of the user later, because it becomes just one sql command instead of two.
Obviously though there are ORMs that don't offer such caching, or cases where the value will not be used again elsewhere in the request, and in those cases this is clearly undesirable. It is generally quicker and easier to do this than adding a new custom method to the repository to get exactly the desired data which is why it remains common even in those scenarios.
I didn't meant to blame ORM, only highlight the (mis)use of them in this type of scenario - but yes, you are correct. It is an abuse of the repository - ORM or other. :)
Laravel Eloquent permits sparse loading of a model; but the way ORM is used in general, this might be a bug factory. Nevertheless I do use the technique where the objects exist only within the scope of a given subroutine.
On the other hand, if the user object was already recently used somewhere else it will be cached and this code will produce no database/network traffic at all.
Likewise most of the hooks (useReducer being the obvious primary example), and functional components in general. That's how 99% of functional programming is done - state and function are separate, first class, concepts. The line is very distinct.
I don’t thinks hooks are a great example. Hooks are by definition effectful. Best compared to ‘Applicative’s in Haskell. (Not monadic unfortunately)
So a functional component in react using hooks is not pure. You can translate it into FP with a bit of magic, but requires a context. The line is not that distinct at all.
Recently switched from SVGs to PNGs because the toolset the designers are using means every SVG has the same HTML ID attribute value. So when rendering >1 SVG on a page, they all render the same as the last one in the dom.
Especially considering the svg that a design tool produces is often gigantic. FWIW I have found svgcleaner to be better than svgo. svgo seems to have more bugs and chokes on svgs more often in my experience.
"SVGO's Missing GUI". Give it to the designers and they can make sure to give you the smallest possible file that makes sense. I find that some files look great at "0" precision, some require "1" or "2".
I decided to switch from SVG with build time manipulation of attributes (scale, colours, rotation, etc) to an image optimisation library (and soon probably a saas like imgix).
I'd prefer to have stuck with SVG had it not been for the I'd collision thing, so with one of these tools in our chain we just might do that.
IMG tags pointing to SVG's don't have ID collsions since the SVG is in a isolated context, it's opaque to the referencing page because it's treated like any other img reference.
We use some server side code to recolor svg's on the fly with caching headers so they aren't requested all the time, mostly through img tags since we moved from PNG to SVG, its just works.
It's a no-go for this use case. Simply because we cannot manipulate the SVG's attributes (at least not as easily) when using them within img tags. Can when they are "inlined". We reluctantly adopted PNGs and convinced designers to provided assets for a whole spread of sizes and colours which doubled or even trippled their workload, just because we were stalling and trying to find alternatives (we have begun building an automation chain for PNG colour conversion etc). Moving forward, I'm going to experiment with one/some of the SVG optimisers and try going back to build/run-time SVG attribute manipulation. It's what SVGs were built for.
Using inline SVGs also reduces our caching complexity _dramatically_. I'm now "just" caching markup with no binary asset caching.
Yeah sorry just not getting it, you can't use SVG's with image tags due to not being able to manipulate them however you then go to PNG's which are even harder to manipulate and are img tags right?
At least SVG as images can be resized so you only need one asset regardless of size, color manipulation then is the issue, but since SVG is just xml it pretty easy to do server side and again the browser will handle caching just like any other image.
shrug The switch to PNG was in haste after we suddenly saw our icons etc all using whatever the last loaded SVG looks like. We already have a PNG "solution" (more like a hack.. someone remembered how to use imagemagick to setup up some build time manipulation of the PNGs -- we didn't even check if we could do this for SVGs we just wanted it fixed asap) plus the designers offered to export the bulk of variants as PNGs for us without much discussion at all, and the rest we made up with the imagemagick hack.
So we jumped to PNGs (like 2 weeks ago, fyi). Now that we (know about, and) can use one of the svg cleaners, we'll switch to that and go back to inline SVGs.
PNGs were always seen as inferior. We don't want extra requests to load them - our app is very sensitive to the number of requests we make - we're importing them as datastrings even.
Anyway, the choice was made. Now we're 90% likely to revert to inlining SVGs with some kind of cleaner in the pipeline. Please don't lose any sleep over it. We'll be just fine.
I see the same. Maybe I'm getting confused by the wording and layout.
I interpreted the "Reject All"/"Confirm My Choices" buttons at the bottom to belong only to the "Manage Consent Preferences" section. The "Information Our Partners Collect" part above it is a separate section, with a separate "Accept All" button, and an opt-out link in the text, so I figured the final "Reject All" might only reject the second section. Because why else would they have separate sections with separate buttons?
Either way, none of this inspires confidence that they have my interests in mind.
> Either way, none of this inspires confidence that they have my interests in mind.
Bingo. This is the underlying issue. And indeed this dual opt out is probably intentionally confusing - and I'm never sure either whether 'refuse all' refuses also the partners.
I would wager that "Reject All" does not, in fact, opt you out of "Legitimate Interests" - sites are using the language "Object to Legitimate Interests" for this.
> But ultimately, should Google have hired me? Yes, absolutely yes. I am often a dick, I am often difficult, I often don’t know computer science, but. BUT. I make really good things, maybe they aren't perfect, but people really like them. Surely, surely Google could have used that.
Actually, no. There's no level of rockstarness that excuses being a dick and difficult to work with. That kind of attitude can turn a whole team's culture sour and result in way more damage than any one person can make up for through their individual contributions.
It's clear from reading his thoughts on the matter why Google didn't hire him, and it's also clear he still doesn't understand why either.
Yeah, my takeaway from his telling of the story was that he is someone I would give a Strong No to, and not because of anything related to his CS ability. The fact that he wrote that after an unsuccessful short tenure at Apple where he ran into the exact same problems as he would have at Google yet still thinks Google should have hired him just reinforces that.
Absolutely this. I sense no work ethic, no humility (“I make really good things“). This, from my experience, usually correlates with an overgrown ego and unwillingness to confess to a mistake allowing to act quickly to mitigate the side effects. So when it actually happens the damage can be catastrophic.
These are closer to pop-sci articles than proper papers. Please read everything Macintyre ever published on the topic of masking in healthcare works before 2020. Start with this one:
Linking me a bunch of public health websites isn’t convincing because these organizations don’t actually maintain epistemiological rigor, they just parrot whatever the dogma is.
The only RCT of masking for COVID-19 ever performed showed an insignificant benefit in terms of self-infection at best.
Meanwhile studies in HCW can’t rule out cloth masks causing bacterial pneumonia and increased self-infection.
Literally all of them link scientific papers, if you'd care to read.
And it's not "self-infection" that masking is a protection of. Nobody has claimed that. You wear a mask to protect those around you, and they wear their's to protect you.
Though it figures you are obsessed with the self and have no regard for the other.
No studies exist of infection to others for the obvious reason (too hard to track accurately). If you had read any of the literature you would know this.
Before the internet we were passing video tapes/films, magazines, and prints around with porn and gore. Pre-teen me saw a lot of the kind of things you mention before the internet was a thing. The students at my school had pseudo-competitions for who could get the best porn/gore, earning kudos for the bloodiest gore or "hottest" porn. Often the lines would blur whens someone found scat or snuff but that's a different matter.
Later on in life, I think everyone knew "a guy" at work that had all kinds of taboo material. The Weird Eddies or Creepy Colins of the world had a black-market snatched from them when the internet got popular.
For more than a decade I've been campaigning (to any of my employers that utilise adverts on their platform) to drop adverts with the primary factor being that of performance for page load. The last time I looked, adverts were adding an additional ~35% load time to the page. Anywhere from 5% to _60%_ (!!) of vistors were navigating away before page load completed (Varied depending on company/product of course) and a staggering 80+% of those vistors would have had a full page load if the adverts were not there.
I often wonder incredulously whether developers responsible for particular sites really comprehend how bad performance has gotten. Browsing threads like this on HN makes it clear that they are probably well aware, but have no choice in the matter. In a way that's even more depressing because only a tiny minority of people are happy with the arrangement.
I walked away from one project. 3rd party scripts were not the only problem but were the last straw.
I have a community site I want to build. If it stays small I can probably run it for $20 a month all in and not pester anyone. But I’m still keeping my eye on some of the saner ad networks that use subject matter instead of user tracking to target ads. That might be an option.
Linus tech tips has a video where he gives us a peek into their finances. Among other things the merchandizing arm makes them about a third of their revenue, and no one advertiser is allowed to pay more than that, so they can maintain a degree of objectivity. I think a lot of us don’t want to approach sponsors so we feel sort of stuck with ad networks.
And I’m not much of a materialist but I’m a tool nerd (you possibly don’t need it, but if you’re gonna buy it, get a really good one) so I’m not sure how I’d do merchandizing, since I’m more likely to recommend a brand than have something made for us. That leaves what? Amazon’s “influencer” BS, which is more money for Amazon? Discount codes, which are untargeted consumerism?
Sunk cost is/was my conclusion. At one firm in ~2013, advertising was bringing in $600k revenue per annum - we estimated a loss of potentially triple that (!) - but the response was apathetic. There was very much a reluctance to accept that the "advert management team" (yep, they had a team dedicated to managing the adverts, who had the duty of "managing" Google Ads) would need terminating, too.