Better HN
topnewbestaskshowjobs
Log inSign up

m110

200 karma · joined Nov 16, 2015 (11y ago) · 45 submissions

Submissions

comment 3mo ago · link · parent

Makes sense, but this artifact is still a simplification, right? The domain model isn't just this one artifact in the code but the broader "idea".

comment 3mo ago · link · parent

Isn't code what defines the constraints though?

comment 1y ago · link · parent

I noticed this frustration gets worse with a long feedback loop.

I recently reworked a CI pipeline over two weeks, and it was a nightmare to make tiny changes, push it, and wait 5-10 minutes to see another error because of a YAML typo.

If possible, I try to shorten this feedback loop early.

Another option is picking something radically different to work on for a while, if possible.

4.

Watermill 1.4 Released (Event-Driven Go Library)(threedots.tech ↗)

4 points · by m110 · 2y ago · discuss

comment 2y ago · link · parent

Take a look at: https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-exampl...

(I’m one of the authors.)

This project shows how to apply more complex patterns popular in business applications while staying true to the Go ideas, and not copying them blindly from Java.

In the Go community, you’ll often hear people say „just keep things simple” beats all patterns and is all you need. This may be true if you write a CLI tool or a small library, but if you have a team maintaining a big application, some patterns are super helpful.

comment 3y ago · link · parent

Thanks! I had a paragraph about delta time but since Ebitengine works based on the TPS, I eventually decided to drop it to not make it confusing.

Here's a good summary, I think I'll link it in my post: https://ebitencookbook.vercel.app/blog/2022/04/16/TPS

comment 3y ago · link · parent

Oops, that was a leftover! Thank you :)

comment 3y ago · link · parent

GetHarley | REMOTE | Europe | Senior Backend Engineer - Senior Frontend Engineer - Senior Data Engineer | Full-Time

At GetHarley (https://www.getharley.com/) we build the first platform that combines technology, clinicians, knowledge and medical-grade products. We deliver personalised skincare plans which empower our patients to look and feel their best selves.

- Secured series B this year and are now looking for product-minded engineers to help us scale further

- You'll be joining a small product engineering team (6 people) where you will have a real impact

- Looking for people who own their work end-to-end and prefer being close to the product discussions

- The tech stack is Go and React (details in the links below)

Senior Backend Engineer: https://boards.eu.greenhouse.io/getharley/jobs/4209229101

Senior Frontend Engineer: https://boards.eu.greenhouse.io/getharley/jobs/4209222101

Senior Data Engineer: https://boards.eu.greenhouse.io/getharley/jobs/4222751101

comment 3y ago · link · parent

Glad to hear that! :D

As mentioned in the other comment, the heavy lifting is done by Ebitengine: https://ebitengine.org/en/documents/webassembly.html

Go supports compiling to wasm, and it's as simple as:

  GOOS=js GOARCH=wasm go build -o web/game.wasm
It takes just a few seconds for this project. :)

comment 3y ago · link · parent

It really was! There's something about moving sprites on screen that's super satisfying compared to using a big game engine. I definitely recommend trying out Ebitengine. :)

comment 3y ago · link · parent

It's not a "serious" project. I chose Go specifically because I like the language (and Ebitengine is super fun to work with) and I like the idea behind ECS. I made games with Unity before, which you could consider a "serious" engine, but the fun of development is nowhere near what I experienced here.

Thinking about what would be the most efficient engine for the game would kill all the fun for me and the project wouldn't exist. :)

comment 3y ago · link · parent

There are only two levels at the moment, it's still a prototype. :) And missing a "well done!" screen, obviously.

comment 3y ago · link · parent

Thanks! The game is not really balanced at this point, it definitely could use some play testing and improvements. :)

comment 3y ago · link · parent

Thank you!

Go makes it ridiculously easy:

  GOOS=js GOARCH=wasm go build -o web/game.wasm

15.

Show HN: I made a 2D shoot 'em up game with Go, using Entity Component System(github.com ↗)

108 points · by m110 · 3y ago · 26 comments

comment 5y ago · link · parent

This is what the article mentions. It’s not about the tactical patterns, but the strategic ones.

DDD is absolutely not about factories or dependency injection. It seems like you mix up Java with OOP design patterns and DDD and treat them all like the same thing. They’re not.

comment 5y ago · link · parent

Well, this is bascially what DDD proposes. To write code that reflects the domain, so even your manager understands it. But for some reason, when you call it by a name, people start saying you don’t need those dogmatic patterns. That’s my point.

comment 5y ago · link · parent

So you’re saying because software is a „craft” you can’t write down ideas how to do it better? Your bullet points are exactly this. The only thing that makes them different from „patterns” is you didn’t give them a name.

comment 5y ago · link · parent

Can you share how to reach this understanding? How would you learn it if not from a set of patterns and guidelines?

It’s like saying „write good software” without any advice how to do it.

comment 5y ago · link · parent

DDD is just one way to do it. You can as well call it „Focus on what you’re solving instead of implementation details”. DDD just provides patterns to follow this approach.

It’s easy to say „just write simple code”, but how do you do it? It’s not an advice someone can follow. Complex domains have many challenges where having patterns helps.

comment 5y ago · link · parent

Hey, you should receive links to the ebook in the first email after confirming subscription.

comment 5y ago · link · parent

If you don't want to share your email, you can still read (almost) the same content on our blog. If you sign up, you'll have access to the most recent PDF, as we update the book with each new article.

comment 5y ago · link · parent

> I realized its promoting patterns that aren't useful in most of "business applications built in Go"

I don't really agree with this. I would say most of the patterns are quite useful in majority of business applications. Unless you're dealing with trivial domains, but I believe it's not that common.

Describing the book's content as DDD/CQRS is too specific, as we touch on many different patterns.

comment 5y ago · link · parent

Hey, thanks for the comment. I hope this doesn't seem like we say it's the only valid way to build applications. We mention throughout the book where some patterns make sense, and where they're not needed. We also write about more patterns than just DDD and CQRS, so we don't include these in the book's title.

comment 5y ago · link · parent

I think it's probably closer to the onion architecture, as DDD doesn't concern much about infrastructure. But it's kind of mixed up. You could also call it just SRP or separation of concerns.

I think the advantage of sticking to a specific "architecture" pattern is you don't waste time discussing where to put what, you just agree to one way and do it.

comment 5y ago · link · parent

Ah, I get it now. You meant in in the context of onion/clean/hexagonal architecture. :)

comment 5y ago · link · parent

You can still read the articles on our blog, if you're interested. The book is based on them.

comment 5y ago · link · parent

I think you mix some things up. go-kit is very far away from DDD. It even says on their website: "Focus on your business logic.". It's basically everything but not the domain code.

For CRUD-y apps, you usually wouldn't need the DDD patterns at all, as there's no complex business logic to model.

> the parts where the complexity would be worth it are often already done for you by the libraries/frameworks used.

I'm really confused about this. The most complexity comes from complex business scenarios you need to handle somehow in code. No framework is flexible enough to do it for you. Using DDD, you would keep a "pure" layer of domain code that does just that.

comment 5y ago · link · parent

Thanks for the tip! I think we already use xelatex, as the book is created with pandoc (https://pandoc.org/).
12