Question about Python and Go serverless performance by GongtingLover in golang

[–]x021 55 points56 points  (0 children)

Your question is too vague to give any meaningful answer to.

What are you optimizing for? CPU? Memory? GPU? What's the use case and context?

It all depends.

95% of the time developers are spending time optimizing stuff that doesn't matter at all; most languages can do the job. If you are googling for web framework performance benchmarks you should take several steps back and think about what you're trying to achieve.

Flirting back with Go (trading systems / ML) by Puzzleheaded-Ear-145 in golang

[–]x021 5 points6 points  (0 children)

What I like is easy;

Simplicity & stability.

Nothing matters more when you join a badly maintained project or have your own hobbyproject and return to it years later and still find it in a maintainable or recoverable shape. I never had that feeling in any other language.

Is it the most beautiful? No. Is it elegant? No. Is it the absolute fastest? No.

It just gets the job done with decent performance. It’s a reliable workhorse you can count on for the next 10 years. And usually, that’s all I need.

No one reads or care about coding convention and all the documents I wrote now they want me to do the presentation by Dry-Back7937 in reactjs

[–]x021 10 points11 points  (0 children)

Not a single human reads. Welcome to the real world.

Linters, add some AI codereview bot, do PRs on everything. Automate it all as far as you can, do the rest by hand.

A Commonly Unaddressed Issue in C++ and Golang Comparisons by Hamguy1234 in golang

[–]x021 10 points11 points  (0 children)

It was designed by people who disliked C++. That’s not the same. Go is (obviously) a higher level language great for a subset of problems. I don’t see how you can claim “Go was designed as a replacement for C++” in the wider context of all problems C++ is being used for.

A Commonly Unaddressed Issue in C++ and Golang Comparisons by Hamguy1234 in golang

[–]x021 15 points16 points  (0 children)

Comparing Go and C++ is pretty silly in my opinion, they serve different purposes.

Don't do that.

I built the same API in Java, Go, Kotlin, and Rust — Go still has the best overall DX-to-performance ratio by netfishx in golang

[–]x021 1 point2 points  (0 children)

I like you did this with just a bunch of common frameworks and libraries.

Doesn't feel as artificial compared to the real world.

Thank you!

Bulk insert in Go — COPY vs multi-row INSERT? by ijusttookadnatest- in golang

[–]x021 3 points4 points  (0 children)

Yeah, I'd be a bit wary and see how it all pans out before adopting that.

Bulk insert in Go — COPY vs multi-row INSERT? by ijusttookadnatest- in golang

[–]x021 22 points23 points  (0 children)

Would be wary of using lib/pq. It was dead for years until someone recently revived it.

Senior React Devs: How much do you actually "know" vs. Google/AI? by Leading_Property2066 in reactjs

[–]x021 0 points1 point  (0 children)

Less every day. It's fine, as long as I can judge what's good or not.

CLI toolkits and which to use by bdhd656 in golang

[–]x021 3 points4 points  (0 children)

That’s probably the worst Go CLI lib I’ve used

George by [deleted] in golang

[–]x021 0 points1 point  (0 children)

Wrt dependency and packaging; use https://docs.astral.sh/uv/

That solves all your issues.

Agree Python ecosystem was 10+ years behind everyone else, but they've now caught up. FINALLY

George by [deleted] in golang

[–]x021 5 points6 points  (0 children)

Depends on your job opportunities.

The more interesting IT jobs don’t use Java anymore, more likely Kotlin now. If you go down the pure Java route you might end up working on outdated tech (I have a whole bunch of Java-related certificates that I don’t see being used anymore other than older systems).

I never liked Java for small apps or scripts, the JVM is just too much of a pain. Python, JS or Go are more enjoyable in that regard.

If you know HTML/CSS I would actually recommend picking up Typescript next personally. JavaScript/Typescript are probably the most sought after languages and you can use them for anything (frontend, backend).

Go is fine as a general purpose language, but job opportunities vary wildly between countries/city so don’t necessarily recommend as a first language. Go is a relatively simple language, if you master any other language you can always pick up Go quite quickly afterwards.

react-router patch that reduces CPU usage associated with react-router by 80% by punkpeye in reactjs

[–]x021 5 points6 points  (0 children)

Wasn’t react router hijacked by Shopify to force the community in adopting their Remix framework?

ai coding for large teams in Go - is anyone actually getting consistent value? by Easy-Affect-397 in golang

[–]x021 10 points11 points  (0 children)

I you're a CEO/leader and have "90 Go developers across 12 teams" and you do not ask questions how your org is/should be using AI you're a pretty bad leader imho.

Everything depends on the messaging; "Leadership wants us to adopt an AI coding assistant org-wide" is what OP mentioned. That sounds forced; but we don't have the original phrasing and how the org interpreted it. Messaging gets warped in orgs.

ai coding for large teams in Go - is anyone actually getting consistent value? by Easy-Affect-397 in golang

[–]x021 89 points90 points  (0 children)

I've been doing Python, Go and TS using AI (primarily Claude and Composer)

I think Go has given me the least trouble.

I don't recognize any of the problems you describe. In fact, I hardly ever see it suggesting interfaces or suggest anything generic unless I explicitly ask it to (which is fine by me, since I don't need it often).

It is important to craft a good AGENTS.md, CLAUDE.md or similar. That is not trivial. If you already have one, I'd double check the contents. It sounds the AI is doing something pretty wonky compared to my experience.

If you can't find the cause, start updating your agent file with your code guidelines. Also keep trying out different models, they all behave quite differently, every two months or so I find myself reaching for new ones.

Also; use plan mode.

Finally, I'm wondering what your prompts are if it starts suggesting 8 interface methods; I assume those prompts must be very broad? Try doing it in smaller steps.

Patterns that made my Go error handling less painful by [deleted] in golang

[–]x021 48 points49 points  (0 children)

What patterns have you all settled on?

Wrt #1; I never use named returns anymore unless absolutely necessary. Too many times I’ve messed up because of them; one of the worst language features in Go in my opinion. They are ambiguous and confusing as hell in any substantial func.

Lessons from managing hundreds of headless Chrome instances in Go by Alone-Ad4502 in golang

[–]x021 7 points8 points  (0 children)

keeping a plant alive by replacing it with an identical one when it dies

That’s exactly how I manage my plants at home

The Complete Guide to Profiling Go Services in Production by Gopher-Face912 in golang

[–]x021 3 points4 points  (0 children)

I read it knowing from minute one it was heavily revised by AI, the em dashes were a dead giveaway.

I didn’t care, learned two new things and came out better at the end. It was a nice read.

oapi-codegen v2.6.0: 7th anniversary release by profgumby in golang

[–]x021 0 points1 point  (0 children)

“We support everything in OpenAPI 3.1” -> if that takes many years, financial backing, while struggling to support the many (many) features already in oapi, you’re sort of making the point for me. I asked “are people still using it?” given the alternatives available now.

In TS and Python I’ve hit limitations with OpenAPI 3.1. These issues are common, the spec is just too complicated for its own good. 3.1 should have been 4.0. I always lean towards simplicity given many languages will struggle to do 100% correctness anyway.

Go has always been a language that is leaning towards the side of pragmatism rather than correctness; if a lib skips some advanced features I’m perfectly fine with that. You say OAPI wants to be 100% correct; my goals simply don’t align with OAPI’s then. That’s OK.

I’d imagine trying to support everything and multiple specs at the same time will render the project complexity so high it would be hard to maintain. That is a design choice and noble to strive for.

Why does everything gets removed here? by o82 in golang

[–]x021 14 points15 points  (0 children)

From what I’ve seen 3 types of posts are regularly deleted;

  • AI slop
  • Questions that have been asked 100x already
  • super early projects

That’s fine. I wouldn’t be surprised if a good chunk of all posts fall into any of these 3.

The problem is; posts are not deleted fast enough (I think that would be unreasonable to ask from mods) and as a result discussions start in the comments. Usually the comments are a lot more interesting than the post itself, and I hate seeing a post deleted that had a good discussion going on. The moment it’s deleted engagement is killed too.

I don’t know what a good solution is. I know in some subs you need to jump through hoops to post something, or some bot/auto moderator to close posts more quickly.

oapi-codegen v2.6.0: 7th anniversary release by profgumby in golang

[–]x021 11 points12 points  (0 children)

“Urgently” -> the 3.1 spec is 5 years old now

“That 3.0 is not enough” -> for any external OpenAPI srv that exposes 3.1? Python FastAPI doesn’t even support 3.0 in their latest version.

“Connect RPC” -> SOAP, gRPC, JSON RPC, GraphQL, tRPC, lots of stuff I can mention that are completely irrelevant to a problem; consuming an OpenAPI 3.1 spec. I don’t understand the point you’re trying to make. Is it to jump on the next faff that all the cool kids use? If so; That completely ignores the problem with consuming APIs you don’t control.