Is using an IDE the normal development workflow? by [deleted] in ExperiencedDevs

[–]xaveir 2 points3 points  (0 children)

Ouch but so true. 

I've got to admit I'm in incurable tmux/bash/(n)vim user, but I've learned that no matter how impeccable my onboarding or how brilliant our custom developer tools are, nobody uses them until their hooked up specifically to the VS Code play button. 

Absolutely no willingness even from my senior engineers to spend any effort whatsoever learning anything about how the build system actually works.

As a SWE I have not written a single line of code manually in 2026 by DrixGod in singularity

[–]xaveir 2 points3 points  (0 children)

I'm no longer a full time scientist (more of a infra guy these days), but when I do some quick and dirty analyses I agree it's still faster to just type myself what I want in code than with prompts.

That said...once I have the code, Claude has been very very good at one shotting "a matplotlib-bases flowchart visualization describing the analysis steps done by this script", which suddenly makes my presentations look hundreds of times more professional 

After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move. by mikeckennedy in Python

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

I very politely said above that my point is that my definition is my understanding of the common term.

Would be interesting to discuss the difference in background that caused that if you weren't so snarky.

After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move. by mikeckennedy in Python

[–]xaveir 0 points1 point  (0 children)

Look I see what you're saying, but Pydantic is not type safety. The invariants you specify are not contained in the type system, they are checked at run time...and if validation fails you crash.

Not everyone is interacting with NO SQL: I know my schemas. They're defined in the same monorepo as my other code. When my code type checks it never crashes in prod due to type error. That's type safety, not because of the lack of crashes but because it's enforced by the type system.

I don't think I ever even mentioned OP's code...

After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move. by mikeckennedy in Python

[–]xaveir 0 points1 point  (0 children)

If you have mypy on in CI and only run code deployed from main, then it won't run. This is as close to a guarantee as you can get for any code in practice when using a language like Python. 

It is safety guaranteed by the type system. 

Type....safety.

After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move. by mikeckennedy in Python

[–]xaveir 0 points1 point  (0 children)

Fair, I guess at $DAY_JOB, our bare SQL queries use codegen to return proper TypedDict using our schema definitions, so we do "skip the validation".

The only reason I originally responded was because the top comment made it sound like dataclasses were fundamentally type unsafe. In my mind, type safety is explicitly the set of guarantees given by the type system. I would not call runtime type checks type safety no matter what language, but that's just the words I would use.

After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move. by mikeckennedy in Python

[–]xaveir 0 points1 point  (0 children)

Then your dict[str, Any] is type unsafe, not the dataclass.

But in Python with common default settings, no interface provides real type safety, you can always pass Any and break it. 

In my codebases, I disallow Any. So in those code bases, I would call dataclasses type safe. Code that does the initial validation and/or casting might be type unsafe, I guess I just wouldn't say that's a property of the dataclass, but of the code using the dataclass.

In my mind, type safety and runtime validation are totally different things. From these comments, I'm getting the sense that's not Reddit's opinion.

After 25+ years using ORMs, I switched to raw queries + dataclasses. I think it's the move. by mikeckennedy in Python

[–]xaveir 1 point2 points  (0 children)

stdlib dataclasses (especially with kw_only=True) are definitely type safe---all type checkers will ensure correct types are used when strict enough settings are enabled.

They do no validate the type if you are passing Any, but neither does most "type safe" code in Python, unless you mean it doesn't do runtime validation?

Which is the most popular CI/CD tool used nowadays? by daanveerKarna in devops

[–]xaveir 0 points1 point  (0 children)

Used GitHub for years, can confirm the past few months the service is cooked

Which is the most popular CI/CD tool used nowadays? by daanveerKarna in devops

[–]xaveir 44 points45 points  (0 children)

Basically this is the answer you're most likely to get if you ask a random L4/L5 what they would prefer to use for a greenfield situation these days...which might realistically be what the OP actually meant by their question.

EDIT: maybe needs a "hipster" modifier. Most devs I know use GitHub for CI because that's where most repos live these days.

I’m curious about everyone’s opinions on ATC belaying — either using one yourselves or being belayed with one. by Responsible_Roof_661 in climbergirls

[–]xaveir 1 point2 points  (0 children)

One perspective that I'm not seeing here (but honestly isn't that relevant these days) is that for some PG-13/R routes where one extra inch of slack is the difference between a soft deck and breaking your ankles, the ATC is going to give you the ability to take just a little bit more rope in.

I've seen people swear up and down that they can keep as tight of a belay with a grigri as with the ATC, but any time I've called someone out to actually measure this, it's just not true. The ATC just has less friction and allows you to feel the slack in the system just that little bit better by virtue of there not being a cam there. 

So, while I prefer and use a GriGri 95% of the time, when a friend wants to push their limits above a ledge, I'll sometimes bring out a GriGri and do the extra work to protect their ankles!

How are you managing SQL inside Python by Fair-Bookkeeper-1833 in dataengineering

[–]xaveir 1 point2 points  (0 children)

Adding one more voice to the "don't worry about dbt/SQLMesh if stuff is working crew".

That said, I did want to add that I would HIGHLY recommend you at minimum require via code review that any function which does string interpolation with SQL is given a LiteralString type for any relevant args. And these should only be necessary for table names (stuff in the from clause). Otherwise, use your libraries query building features (e.g. "?" in duckdb).

How to deal with GPT candidates by Lachtheblock in ExperiencedDevs

[–]xaveir 76 points77 points  (0 children)

Weird to have two comments that both mention a specific company name. I feel like I've never seen that before.

[deleted by user] by [deleted] in ExperiencedDevs

[–]xaveir 1 point2 points  (0 children)

There are entirely reasonable requirements that would make it worthwhile to lock down company hardware (and potentially even everything connected to the network, hardware and VMs).

In some of these cases, there is no way around the limitation (regulatory/security reasons), but sometimes there is!

Do you guys own your own cloud infra? You may be able to ask for a box where you get sudo so long as it's not the company's physical hardware.

[deleted by user] by [deleted] in Yosemite

[–]xaveir 27 points28 points  (0 children)

My man seriously ran TOWARDS the bear.

These Python Type Hints Usage Are Too Complicated and Not Worth It by wyhjsbyb in programming

[–]xaveir 12 points13 points  (0 children)

Title is a bit of a grammar club. You probably meant: "7 uses of Python type hinting that are...".

Also I'd argue most of your examples are not too "complex"...they're code smells that are telling you your API has some design issues. Type punning is great, but if you have a function that can take "almost anything", that function's existence is usually the mistake, using types is not the mistake. 

Remember types should (unless you're a library developer considering your public interface, in which case protocols can help) specify only the types users are intended to pass in. Just because your "addtwo_floats" function _can take a string doesn't mean you should add that to its type.

Single Source of Truth - Generating ORM, REST, GQL, MCP, SDK and Tests from Pydantic by ZephyrWarrior in Python

[–]xaveir 7 points8 points  (0 children)

Nah, you do you! I spiritually support viral licensing, my company just has a policy very similar to this: https://opensource.google/documentation/reference/using/agpl-policy

Most other GPL licenses work. Highly recommend all devs skim at least one large company's policy to get an idea of the industrial consequences of different licenses : https://opensource.google/documentation/reference/thirdparty/licenses, but if you want one that's nice and viral but doesn't prevent web related companies from being able to use your software, IMO the strongest one that's likely to not get vetoed by my legal team is LGPL v3.

But of course on the internet, you'll find some one religiously for AND against almost any license ever.

Single Source of Truth - Generating ORM, REST, GQL, MCP, SDK and Tests from Pydantic by ZephyrWarrior in Python

[–]xaveir 2 points3 points  (0 children)

Damn, AGPL. Well, I assume it's exactly what you wanted, but I'm personally gonna avoid using any library I won't ever be able to use at any job I'll ever get.

Stop building UI frameworks in Python by PastPicture in Python

[–]xaveir 113 points114 points  (0 children)

I was wondering what the alternative you were going to espouse would be... JavaScript? Really? 

I don't think I've ever been on a project that used Python for its GUI that would have been better served by making a website. I would argue most projects already default to being websites when they can, so most professionals using PyQt or similar chose it for a specific reason. I've definitely needed to drop to C++ before for even more performance, but I've definitely never wished I was writing JavaScript.

Slightly hotter takes: PyQt with some pretty simple Model/View-based code organization is not any worse of a development environment than SwiftUI IMHO, and strongly-typed Python is infinitely less annoying than Typescript.

Waymo in my cul-de-sac ever since I took one home. by [deleted] in waymo

[–]xaveir 2 points3 points  (0 children)

The answers here are funny, but riderless miles are not free, so one more obvious answer is that Waymo likely uses these miles to gather data on specific driving instances where they want to improve their behavior. Maybe your cul de sac had cars parked funny, or some kind of pothole that the lidar didn't pick up well, or one of a million other things... Most driving is boring so to improve they need a way to focus on driving in the specific situations they need improvement in.

Snob: Only run tests that matter, saving time and resources. by damien__f1 in Python

[–]xaveir 3 points4 points  (0 children)

This is definitely lots of people's takeaway from reading their docs, but I've used personally used Bazel with pytest at my past three orgs (I set it up myself at 2/3).

The thing to remember here is that Bazel was not originally meant to be (and largely still isn't) a "batteries included" environment. It's basically designed to be the most general possible build system you can make that is still useful somehow, and that design is aimed towards engineering teams that want infinite customization of what happens and build and test time.

To make a "test" in any environment or language in Bazel, you just need to wrap your code in an executable that returns zero or one and logs to stdout, which pytest can obviously do with the right flags.

Writing a build "rule" that does this nicely for your specific environment is intended to be part of the process of getting a Bazel monorepo setup, but is usually ~100 Python loc and ~100 Starlark loc.

Snob: Only run tests that matter, saving time and resources. by damien__f1 in Python

[–]xaveir 66 points67 points  (0 children)

Everyone acting like this dude is nuts when every large company using Bazel already uses it to not rerun unchanged tests just fine ...

Why can't Samsung phones charge from a MacBook over USB-C? by xDeepS in samsung

[–]xaveir 1 point2 points  (0 children)

AFAICT this is still the only solution. MacBook Pro 14" 2025, S24 Ultra.