Egon Elbre
egonelbre.bsky.social
Egon Elbre
@egonelbre.bsky.social
Learning and having fun with arts, crafts and science. ^.^
Should be fine in your case.

The main difference is that you don't get the gradual adding/removing of service methods. e.g. you add a service method and now need to gradually implement it in multiple servers and clients.
February 20, 2025 at 8:30 AM
Ah yeah... in that case, maybe, MQTT? And protobuf/msgpack if you need structured messages.
February 20, 2025 at 8:18 AM
DRPC - Storj Labs
storj.github.io
February 18, 2025 at 4:23 PM
Also there are plenty of books to read about good code design. My main recommendation is "A Philosophy of Software Design". For concurrency it's "The Little Book of Semaphores".

Also few additional posts about code-reviews for other tips blog.palantir.com/code-review-... and dev.to/codemouse92/...
January 7, 2025 at 8:10 PM
This approach forces people to write code with much more care and without relying on "I can fix the bugs that come up".

Any beginner coding problem or kata is a good exercise. One year I tried part of advent of code with this approach. 13 successes, 20 failures.
January 7, 2025 at 7:59 PM
A hands approach could be "Cut the Red Wire" exercise (egonelbre.com/learning-cod...)

The basic premise is that your goal is to write fully correct code, without any help from your editor, tests or language server etc. You have a single attempt to run code per coding task.
Learning Code Readability
Tips for developing your code writing skills.
egonelbre.com
January 7, 2025 at 7:51 PM
Ideas for teaching the skill:

* let people read bug-fixes
* let people read lists of common mistakes
* let people read posts about code bugs
* share new interesting, bug finds in a slack channel (or mailing list)
January 7, 2025 at 7:48 PM
Good naming is hard, but it's a good way to avoid mistakes.

Bad naming can easily hide bugs, make design less obvious and code intent less clear.

Also avoid negation in naming, whenever possible. `if !incorrect {` is harder to processs than `if correct {`.
January 7, 2025 at 7:40 PM
Embrace consistency.

Having different variations of the same thing is an easy way to introduce mistakes that can be otherwise obvious

```
for i := 0; i < N; i++ {
for i := 0; N > i; i++ {
for i := 0; N - 1 >= i; i++ {
for i := 0; i <= N - 1; i++ {
```
January 7, 2025 at 7:37 PM
If you find one mistake in code, it's quite likely there's another place that the exact same mistake happened. Hence, search for other instances of a mistakes, that came up in code-review or during debugging.
January 7, 2025 at 7:36 PM
Make a docs of common mistakes or places where issues can easily happen... and re-read occasionally.

e.g. `go func()` and `chan` are a common source of errors, hence take extra time to consider logical races. What if you inserted `time.Sleep(time.Hour)`, would something break?
January 7, 2025 at 7:34 PM
Automate as much as you can by writing linters, checks, tests.

Add checklists for critical things.
January 7, 2025 at 7:32 PM
Review code by reading bottom-to-top. If you read top-to-bottom your brain is more likely to "automatically fix mistakes".

Works for regular text as well. e.g. try on www.sciencealert.com/images/2018-...
January 7, 2025 at 7:30 PM
Get patch sizes below 500LOC. Ignoring maybe tests (if they are comparable in size). Separate trivial patches to separate changes.

Over 500 LOC reviewer fatigue kicks in and review quality drops.

Numbers based on smartbear.com/learn/code-r...
January 7, 2025 at 7:28 PM