philm

joined 1 year ago
[–] philm@programming.dev 1 points 11 months ago (3 children)

Yeah, but unironic...

If your code needs comments, it's either because it's unnecessarily complex/convoluted, or because there's more thought in it (e.g. complex mathematic operations, or edge-cases etc.). Comments just often don't age well IME, and when people are "forced" to read the (hopefully readable) code, they will more likely understand what is really happening, and the relevant design decisions.

Good video I really recommend: https://www.youtube.com/watch?v=Bf7vDBBOBUA

[–] philm@programming.dev 0 points 11 months ago (13 children)

SUUUUUUUUURE!!!11 I"M oN ITTTTTTTT

[–] philm@programming.dev 0 points 11 months ago (15 children)

We're at 22.8̅2̅8̅7̅8̅4̅1̅1̅9̅1̅0̅6̅6̅9̅9̅7̅5̅1̅8̅6̅1̅0̅4̅2̅1̅8̅3̅6̅2̅2̅% slowly gaining rainbow ground

[–] philm@programming.dev 0 points 11 months ago (19 children)

I just calculated exact subpixel accuracy, for me it's exactly 20.5̅9̅5̅5̅3̅3̅4̅9̅8̅7̅5̅9̅3̅0̅5̅2̅1̅0̅9̅1̅8̅1̅1̅4̅1̅4̅3̅9̅2̅0̅ % that is still missing to fill the whole comment body with rainbows, way to go!

[–] philm@programming.dev 0 points 11 months ago* (last edited 11 months ago) (22 children)

Let's start the sixth rainbow!

[–] philm@programming.dev 0 points 11 months ago (24 children)

Plenty of space for me still (browser version on desktop)

[–] philm@programming.dev 0 points 11 months ago (30 children)

Rookie numbers, it's probably 15% on my screen, There's space for a lot more rainbows

[–] philm@programming.dev 0 points 11 months ago (37 children)

And we're about to enter the fourth rainbow dimension in the next comment...

[–] philm@programming.dev 0 points 11 months ago (39 children)

We're in the third rainbow, keep building more stripes lol

[–] philm@programming.dev 0 points 1 year ago (1 children)

I'm totally aware of the benefits of encapsulation, but the way java does it seems so unnecessarily boilerplatey (C# is better, functional programming makes encapsulation even simpler, but that's a different paradigm...)

I like how Rust approaches this via the module system and crates (you have pub for the public interface, pub(crate) for crate/lib wide access and no modifier for being only allowed to access in the current module and submodules of that module)

[–] philm@programming.dev 0 points 1 year ago (3 children)

Yeah but why do I have to use an IDE to generate getters and setters in the first place? It just adds up to more mental overhead, because my brain has to process this boilerplate somehow, even if my IDE can generate it (I know it's simple code, but it's even simpler to not have that boilerplate code at all).

[–] philm@programming.dev 0 points 1 year ago (5 children)

The curse of OOP (java style...).

I mean why do you need to write getter and setter methods. I have wondered at the beginning of university 10 years ago, and am still wondering why you would need something like that...

view more: next ›