Semi tangent but I am curious. for those with more experience in python, do you just pass around generic Pandas Dataframes or do you parse each row into an object and write logic that manipulates those instead?
Speaking personally, I try not to write code that passes around dataframes at all. I only really want to interact with them when I have to in order to read/write parquet.
Pass as immutable values, and try to enforce schema (eg, arrow) to keep typed & predictable. This is generally easy by ensuring initial data loads get validated, and then basic testing of subsequent operations goes far.
If python had dependent types, that's how i'd think about them, and keeping them typed would be even easier, eg, nulls sneaking in unexpectedly and breaking numeric columns
When using something like dask, which forces stronger adherence to typings, this can get more painful
The circumstances where you would use one or the other are vastly different. A dataframe is an optimized datastructure for dealing with columnar data, filtering, sorting, aggregating, etc. So if that is what you are dealing with, use a dataframe.
The goal is more about cleaning and massaging data at the perimeter (coming in, and going out) versus what specific tool (a collection of objects vs a dataframe) is used.
I find it hilarious that people applaud Norway, whose economy is heavily driven by exporting petroleum gas and crude oil, for leading the world in clean energy adoption.
What would you like Norway to do? It's been more successful than other countries (generally speaking) insulating its economy from Oil. Would it be better to _not_ also try to drive adoption of clean energy?
What? Their economy is highly dependent on fossil fuel exports. Just because the oil is being burned somewhere else does not absolve them from having dug it up in the first place. Everyone is living on the same planet
Wasn't my point. Domestic economy has suffered less from Dutch Disease than a lot of other countries in their position.
My point is that reducing this to "Norwegians still buy cars and cars are bad" is reductive, and if people are going to buy cars, reaching high levels of electric car use is a good outcome.
Now there should also be focus on reducing car use period. But that doesn't mean it was a mistake to electrify transportation in the meantime.
My point is that whatever is working for them is not even remotely applicable to 90% of the other countries. They are better than Saudi Arabia and other rich countries, but that's about it.
Climate change is a global problem.
Fossil fuels burned in Norway or somewhere contributes the same amount of CO2.
It's kinda like shipping your plastic trash to another country and have them dumping it into the ocean and going "look how clean we are, 0 plastic trash!"
Is the oil company evil for selling me oil or am I evil for buying it. I know which message is more palatable for the average consumer. I also know that without buyers there would be no sellers.
People are blaming vibe coding but the real culprit was hiring leetcoders in the first place. I genuinely believe the stark decrease in quality of most products across the industry has been driven by that.
A developer said to me once, outside of work hours: "Why are you serious about [fundamentals]? [Framework] is where all the money is at." Work cultures that embrace those with his philosophy will have trouble. And here we are.
They exist but are rare and don't hire often. I know a guy (self taught programmer) who got his first major a job at a company doing native ui (not even using OS frameworks, straight GPU stuff).
The company does highly complex simulation software used by movie studios for explosions and other effects.
He got hired by word of mouth recommendation from someone at the company that had met him.
It takes as much luck as it takes skill to get these sorts of jobs, sadly.
There's definitely room for new math but , at least for banks, the process of getting your fancy model validated by internal model validation teams and regulators is so time and energy consuming that most people don't want to bother with using all the fancy math they could use and instead rely on simplifications and simple extensions.
Okay, literature aside, I've often discussed this with my SO. I feel like Americans are obsessed with heroes/villains. Every single issue that arises and is discussed online, is always viewed from the angle of "who do we support and/or who do we hate". During COVID it was Fauci and Dolly Parton, now it's Bovino and Good. I feel like Americans often have a need to put a single person on a pedestal as if they yearn for a symbol. A true cult of personality, for better or for worse.
It's honestly hilarious how fragile all those checks and balances you keep hearing about are. Americans are the first people to criticise other regimes for being authoritarian but I guess the turns have tabled!
They became so bad so quickly and now all that's happening is more and more people swearing never to vote Labour again.
This is leaving the door open for Reform at the next election.
Youtube ruins videos with godawful AI-generated autodubbing if it detects a video in a language that differs from your locale. You can access the original audio from the settings cog.
It doesn't even respect the locale of the user interface, but uses IP geolocation and sends you HTML containing the video titles in the language it "knows" you want... And there is no setting to change this.
Big tech has changed over the last bit to trying to tell us exactly what and how we should think - or maybe more precisely to see thought as “friction” and want to remove it all together. This is a very minor example in the scheme of things, but I see it everywhere now.
Not really, reliably detecting a user's preferred languages has been a persistent Hard Problem in tech since the start of the internet. Every proposed alternative solution ends up having vastly more false positives due to browsers/people incorrectly setting of default preferences so companies begrudgingly default to geographic heuristics knowing it is a terrible experience for an outlier group of people.
Why wouldn’t you just ask them, and particularly for media like this that has a native language, default to that? I don’t want software to think for me about what I want to see, if I want something different I’ll change it.
It's probably Microservices(TM)... The black box responsible for rendering the HTML is some other black box to the UI or whatever. The UI offers you locale options, but the renderer that fetches video titles hasn't been configured to respect this, probably uses locale from geolocation and some overpaid genius said "always use machine translation if locale doesn't match video title language"...
The homepage of google.com is also localized. I remember noticing that even when requesting and getting the English locale, the tooltip for the doodle was still in my region's language... wahey!
I would! Learning Japanese has been a mind-stretching experience.
And there's just some passages of literature that you can't translate. Or rather, you can but it just doesn't work, simply because the target language doesn't let you structure or rhyme in the same way as the source language. Every language has a potential for generating unique literature simply because each language has a unique vocabulary + sentence structure.
reply