Skip to main content

New answers tagged

4 votes

Taming the ArrowHead antipattern

This is tricky code indeed. You can return early (surely there is a name for that pattern) eg: ...
Kate's user avatar
  • 7,123
0 votes

Taming the ArrowHead antipattern

I tried refactoring to the Rules pattern, as suggested here, but after time even that solution became overwhelmingly complex. I ended up settling on the Railway pattern, which worked out very nicely ...
InteXX's user avatar
  • 231
6 votes

Buffered source of HTMLElement(s)

First of all, I'd advise you to format your code using Prettier to make it more readable, and then to add comments to describe the actions of your various methods. I'd avoid using ...
enzoaicardi's user avatar
2 votes

Bird struct and other type of birds

This, to my eye, really isn't enough code to actually review as being a piece of go code. It's more a design review, of a hypothetical/learning exercise. In that sense, it's not really code one would ...
Elias Van Ootegem's user avatar
3 votes
Accepted

A Simple BlockingQueue implementation in C++

This is quite a decent implementation, you did the locking part correctly, have already thought a bit about efficiency by moving tasks in take(), you used C++20's <...
G. Sliepen's user avatar
  • 58.7k
6 votes

Event sourcing javascript implementation

Just some quick points: You really should format the code according to common practices. Your unusual formatting makes the code very difficult to read, which will limit the number of people willing to ...
RoToRa's user avatar
  • 11.3k

Top 50 recent answers are included