I think you got close. Git is a directed acyclic graph (DAG). I'm not up on all the intricate properties of this type of graph. Having worked with graphs is likely why I manipulate git more easily.
I do not think DS and A help decide a singleton is the right choice (it is not).
I've often read that Git uses the directed acyclic graph (DAG) data structure, with each commit as a node, and things like branches and tags as pointers to nodes.
But when I try to visualize my commit history using tools like gitk, it looks more like a tree than a…
Help me with this connection, in my experience singleton is only usable for tooling which lives outside the application. Logging is an example, it has no relation to the execution paths and preferably uniform throughout.
in my experience singleton is only usable for tooling which lives outside the application
Before going too far on the discussion. Let's take a step back a bit.
"Singleton pattern is a software design pattern that restricts the instantiation of a class to one instance"
Do we have an agreement on the definition of singleton pattern?
By the definition, Singleton pattern is a software design pattern. Deducing from OP's sentence, "I meant that knowledge of DSA, Design Patterns, and other CS concepts can collectively help a person being a better Engineer." The decision to use singleton pattern or not is easier if we know DS and A.
Whether singleton is usable only for tooling which lives outside the application is little of relevance.
Design patterns are not algorithms or data structures. Putting design patterns in to your statement then pulling them out does not make evidence DS&A help choose design patterns (specifically singleton)
software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design.
Software design usually involves problem solving and planning a software solution. This includes both a low-level component and algorithm design and a high-level, architecture design.
There you go. The creation of software design patterns are due to tried and tested architectures and algorithms.
Also the design patterns is only prominently apparent in the community using a rigid programming language. I've never heard people using languages like rust and python having long-running discussion about design pattern.
Heck even someone joked that the only design pattern in fp programming language is function, which is somewhat true based on my experience working with fp heavy project.
"More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data."
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think you got close. Git is a directed acyclic graph (DAG). I'm not up on all the intricate properties of this type of graph. Having worked with graphs is likely why I manipulate git more easily.
I do not think DS and A help decide a singleton is the right choice (it is not).
I think a better way describe that is that a repo may contain multiple graphs.
Merkel could be applied to a tree or DAG. Git isn't a tree so...
DAG vs. tree using Git?
I've often read that Git uses the directed acyclic graph (DAG) data structure, with each commit as a node, and things like branches and tags as pointers to nodes.
But when I try to visualize my commit history using tools like gitk, it looks more like a tree than a…
Noo. I meant that knowledge of DSA, Design Patterns and other CS concepts can collectively help a person being a better Engineer.
I agree but do not agree with the example of the singleton pattern.
I understand git is not an example, but also think the extent you know DSA may only need to be very basic to gain value.
Yeah other things are equally important.
DS and A does help. DS and A involves understanding how entities relate and interact in runtime.
To make an architectural decision such as "whether you should use singleton or not", you need DS and A.
Help me with this connection, in my experience singleton is only usable for tooling which lives outside the application. Logging is an example, it has no relation to the execution paths and preferably uniform throughout.
What DS or A makes this the logical choice?
Before going too far on the discussion. Let's take a step back a bit.
"Singleton pattern is a software design pattern that restricts the instantiation of a class to one instance"
Do we have an agreement on the definition of singleton pattern?
By the definition, Singleton pattern is a software design pattern. Deducing from OP's sentence, "I meant that knowledge of DSA, Design Patterns, and other CS concepts can collectively help a person being a better Engineer." The decision to use singleton pattern or not is easier if we know DS and A.
Whether singleton is usable only for tooling which lives outside the application is little of relevance.
We agree on the definition.
Design patterns are not algorithms or data structures. Putting design patterns in to your statement then pulling them out does not make evidence DS&A help choose design patterns (specifically singleton)
There you go. The creation of software design patterns are due to tried and tested architectures and algorithms.
Also the design patterns is only prominently apparent in the community using a rigid programming language. I've never heard people using languages like rust and python having long-running discussion about design pattern.
Heck even someone joked that the only design pattern in fp programming language is function, which is somewhat true based on my experience working with fp heavy project.
So now the question is, is a singleton an algorithm or architectural design?
Which do you think?
Architecture.
"More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data."