Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
trekhleb2192y@Kampouse yes it is similar to Excalidraw and Tldraw. However, one distinguishing feature is the ability to have nested drawings. The example in this rant illustrates it. You can click on S.O.L.I.D. letters and go deeper into other nested drwaings.
-
Hazarth95102yIt's pretty nice. I'm just not sure I agree with the Dependency inversion principle illustration. I don't feel like a socket is in any way comparable to a wire
I feel like the high-level module "Plug" should depend on the abstraction of "wire" rather than the concretion of "copper wire" or "aluminium wire"
It obviously also depends on the abstraction of "Socket" and not on the concrete "American Socket" or "European Socket". But it feels like those are completely unrelated in this case
Am I reading this wrong? And if so, am I the only one or did anyone else disagree here? -
hack64562yLooks neat! One question: what does "closed for modification" actually means? Modification of its state (values) or attributes (data model)?
-
Lasoloz5072yOh, I see you redid the controls, and the undo/redo functions are more accessible. Nice :D
Also, I think there is a typo in the last sentence for the dependency inversion principle. -
trekhleb2192y@Hazarth as you've mentioned "I feel like the high-level module Plug should depend on the abstraction of wire" - that was exactly what I wanted to show by using the Socket as an abstraction of wires. The user doesn't care what wire types are there behind those two socket holes. But maybe semantically the word "Socket" was a bit misused. Those may be replaced with "Aluminium Wires", "Coper Wires", and just "Wires" (which is the "Socket" on the sketch)
-
trekhleb2192y@electrineer let doctors decide if that "Sportsman <-- Powerlifter " inheritance is valid :D
-
trekhleb2192y@hack I believe the internal implementation and the data model can't be changed, but the state can.
With the example of a mixer and its attachments, we can say that the mixer "can rotate any attachment that you give to it". Different attachments may be treated as a state change, however, the "rotation engine" stays hidden and not changed. -
trekhleb2192y@Lasoloz thanks for pointing that out! The typo should be fixed after the Showcase cache is reset.
-
j0n4s54342yDon't know if you are aware of it but you got some attention on hacker news.
Data Structures Sketches - https://news.ycombinator.com/item/...
Related Rants
I've played around a bit with illustrating the SOLID principles (Single Responsibility, Open/Closed, etc., you know).
You may check it out here: https://okso.app/showcase/solid
Let's see if it will be helpful or more confusing :D
devrant
tutorial
programming
coding