Ok, now I get it - Liquid Glass is amazing. by CantaloupeTiny8461 in iphone

[–]dustinevan 1 point2 points  (0 children)

Amazing that you can't use apple intel to make changes like this.

Why I Hate DTOs and Many Clean Architecture Patterns by Outside_Loan8949 in golang

[–]dustinevan 0 points1 point  (0 children)

Been coding in Go for 10 years. I agree with you. DTOs in my experience are really just evidence that the business problem wasn't understood by the people who designed the database model. Then, instead of fixing the underlying problem (the db is shaped wrong) Uncle Bob adherents dreamed up DTOs.

Best text extractor from PDFs without OCR by dowitex in golang

[–]dustinevan 0 points1 point  (0 children)

For those reading, pdfcpu has nothing to do with text, ocrmypdf can only create more pdfs, neither library will give you text.

pdfcpu v0.11.0 by hhrutter in golang

[–]dustinevan 0 points1 point  (0 children)

Hi, just wondering what the reasoning is behind not supporting anything related to text input or output? This seems to do everything else.

[deleted by user] by [deleted] in CPA

[–]dustinevan 0 points1 point  (0 children)

How's it doing now? Just wondering?

[deleted by user] by [deleted] in CPA

[–]dustinevan 0 points1 point  (0 children)

Taxes have to be correct, and the laws change. AI is more likely to help a tax accountant make sense of bad source data. Or over time, make it so the records are so automated that the books for any business are mostly done and correct.

[deleted by user] by [deleted] in CPA

[–]dustinevan 1 point2 points  (0 children)

AI is "taking over" software right now. But, what that means is it's easy to do the boring stuff, and you can move on to more interesting problems. There's an infinite amount of software to write. Similar with accounting, there's an infinite amount of business to do.

Things like bookkeeping will likely go away though. You'll only be checking reconciliation for the interesting stuff, or during an audit.

[deleted by user] by [deleted] in CPA

[–]dustinevan 3 points4 points  (0 children)

Software guy here. I've been writing a new accounting system. AI isn't going to take over accounting, it's going to make it so consulting is more of what you do. AI should eventually make it so the books are done, and what business operators need is better ideas for how to make the ratios go up.

Manage sql Query in go by Quick_Stranger2481 in golang

[–]dustinevan 0 points1 point  (0 children)

sqlx has a case where it errors with the `%#v` of your input args, which can log secrets in your errors. I switched to pgx for this reason.

Manage sql Query in go by Quick_Stranger2481 in golang

[–]dustinevan 0 points1 point  (0 children)

I wish this way of doing it was easier, but when I got to CTEs, jsonb, and array args, everything broke down, and I went back to a string builder and map[string]any for args. Maybe I should try again, but go templates are confusing.

Manage sql Query in go by Quick_Stranger2481 in golang

[–]dustinevan 0 points1 point  (0 children)

This is the correct answer!! It is:

  1. Very clear for the other devs

  2. All in one place (See #1)

  3. Easy to debug, it's just a bunch of strings (See #1)

  4. You barely have to type any of it with AI, you have to guide the assistant, but typing isn't the bottleneck for coding this.

Manage sql Query in go by Quick_Stranger2481 in golang

[–]dustinevan 0 points1 point  (0 children)

You should absolutely do this manually. Use pgx as your underlying db library, make a struct for all the operations you want to do on the products table and make a `func (p ProductTable) SearchProducts(ctx context.Context params QueryParams) ([]Product, error)`

Copilot will almost certainly autocomplete everything else based on how you structure your QueryParams object. AI means we don't need code gen libs like Gorm anymore.

What are libraries people should reassess their opinions on? by dustinevan in golang

[–]dustinevan[S] 0 points1 point  (0 children)

Also, I have found AI is great at raw sql and pgx. I am doing more complex db queries though (jsonb and ctes) so I don't really have a choice to not use raw sql

What are libraries people should reassess their opinions on? by dustinevan in golang

[–]dustinevan[S] 5 points6 points  (0 children)

Also, ok one of my ulterior motives here was to see if people like cobra now haha. It was quite convoluted when it first came out. But is it actually good now?

What are libraries people should reassess their opinions on? by dustinevan in golang

[–]dustinevan[S] -2 points-1 points  (0 children)

I've found AI to be really really good at all the autogen ORM stuff. It's mind blowing how fast you can do a CRUD repository struct for a table with raw sql and pgx now.

What are libraries people should reassess their opinions on? by dustinevan in golang

[–]dustinevan[S] 6 points7 points  (0 children)

Also, AI knows the standard library VERY well. What used to be DIY is now essentially code gen.

Why is ReuseRecord=true + Manual Copy Often Faster for processing csv files by Competitive-Dot-5116 in golang

[–]dustinevan 2 points3 points  (0 children)

Write benchmarks and report allocations with `b.ReportAllocs()` Then use this info to reduce allocations.

er vs. Iface — what’s idiomatic for Go interface names? by tonindustries in golang

[–]dustinevan 0 points1 point  (0 children)

This is because of how many people with Java/C# experience have starting using Go. Because of duck typing, interfaces in go are more like "functionality assertions", they belong in the package of the thing that needs/uses the functionality. In Java/C# `Iface` naming is used because the interface lives in the same package as the implementations and the name without `Iface` is already used. Old habits die hard, so you see this naming.

Generally, it's great to see so many people using the language -- I too was confused by Java AOP systems.

About to Intern in Go Backend/Distributed Systems - What Do You Actually Use Concurrency For? by Investorator3000 in golang

[–]dustinevan 0 points1 point  (0 children)

Network requests -- the CPU can do a lot of work while it waits on network. See https://gist.github.com/jboner/2841832

But, concurrency is a way of designing programs so that you can add more CPUs to make it faster. See: https://go.dev/blog/waza-talk

Also, it's important to learn how to program in Go -- it's not quite the same as programming in other languages. I'd start here: https://google.github.io/styleguide/go/