Mathias Hasselmann · @taschenorakel
575 followers · 2828 posts · Server mastodon.green

Which of these two in code? Is there a better variant?

#almostalwaysauto #cxx #programming #codestyle

Last updated 1 year ago

Serge Matveenko ♻️☮️Ⓐ · @lig
244 followers · 2818 posts · Server fosstodon.org
Andy Scott · @ascott
320 followers · 77 posts · Server fosstodon.org

I was always a "One True Brace Style" person. I got kind of used to Allman using C# with OmniSharp so much this quarter and I don't hate it. Obviously it uses more lines, but sometimes it's a lot easier to read... My world no longer makes sense.

#csharp #codestyle

Last updated 1 year ago

Serge Matveenko ♻️☮️Ⓐ · @lig
235 followers · 2790 posts · Server fosstodon.org
· @artfulrobot
63 followers · 293 posts · Server fosstodon.org

I love but, at the risk of starting a flame war!, I am giggling at the use of tabs not spaces.

I've seen so much incorrectly indented code in third party modules because someone's used a mix of tabs and spaces where they presumably forgot, or couldn't see because in their editor n spaces looks the same as 1 tab etc.

#processwire #developer #codestyle

Last updated 1 year ago

david.wtf · @flashmasterdash
73 followers · 291 posts · Server mastodon.gamedev.place

I like the good Rust style 🤗 Feeling at home with it.

#rust #codestyle #bevyecs

Last updated 2 years ago

Michael T Babcock · @mikebabcock
209 followers · 1409 posts · Server floss.social

If you're a programmer and you haven't seen it yet, go watch this talk on effective habits:
youtu.be/ZsHMHukIlJY

#programming #codestyle

Last updated 2 years ago

Carlos A. · @gerbosan
13 followers · 21 posts · Server ruby.social

This is interesting: 🤔 reddit.com/r/rails/comments/11
well, not just the topic but the content too.

#ruby #rubocop #codestyle

Last updated 2 years ago

Richard Darst · @rkdarst
58 followers · 51 posts · Server fosstodon.org

who use to enforce all formatting, what do you think of this ? There are many ways I use non-"standard" formatting to help make code readable, and this is a good example.

My thoughts: when a project is large, you can't expect all contributors to be consistent: auto-formatting is worth it even for this code. Small projects that mainly mine, I avoid it and write like this.

#python #developers #pythonBlack #code #codestyle

Last updated 2 years ago

gaby_wald · @gaby_wald
70 followers · 16249 posts · Server framapiaf.org
gaby_wald · @gaby_wald
74 followers · 16277 posts · Server framapiaf.org
Serge Matveenko ♻️☮️Ⓐ · @lig
198 followers · 2464 posts · Server fosstodon.org

Second, there is no place in any code style for the same expression to be written differently in different circumstances.
Third, the language provides you with a way to express your exact intent in this exact situation. Just use the tools you've been given, no need to invent some complicated rules.

It's just nonsense. Sorry, for expressing myself this way but I have no regrets.

#flutter #dart #codestyle

Last updated 4 years ago

Serge Matveenko ♻️☮️Ⓐ · @lig
198 followers · 2464 posts · Server fosstodon.org

"I would prefer `==true` for condition while `?? false` for assignment" -- github.com/flutter/flutter/pul -- man, are you for real?

It sounds to me like "let's not only do it the wrong way but let's do it deferent in different cases to make it also inconsistent".

This frustrates me on several levels actually.
First, there is no place for comparing a boolean expression to a boolean constant in any language under any circumstances even if the expression is nullable. ▶️

#flutter #dart #codestyle

Last updated 4 years ago