Perfect case where to use a nullable type.
If you're not using C# 8.0; then create you own Maybe type and use that.
For an example; here is my implementation of Maybe type in C#; however you can massively simplify that if you don't need all the function programming algebras. However using the...
This would be a good challenge; in Java you could use libGDX for the rendering.
Plus it's offers many options to expand on the idea, for example:
create basic application to add 3D solid objects, adjust lighting, colour, ...
...and then if time permits to enhance it to include the rendering of...
Object Oriented
In OOP; we often hear the phrase "it's best to favour composition over inheritance" -- so let's explore a little what that means and whether it's the only thing we think about when we reference composition.
Inheritance
For examPle:
// Inheritance (composition of classes)...
Introduction
The word composition is a concept that can be lathered like a common sauce on a diverse set of seemingly different topics in programming.... So how can one thing appear to have so many different meanings both in application and across paradigms?
Ultimately it's a concept that's...
@cguy covered this -- should have been kicked out during review,
Sure, opinions on this is going to differ a lot based on the paradigm that you and / or a codebase employs -- e.g. if you follow clean code guidelines your functions would be very small and with SRP / totality they'd do only 1...
Exactly -- I was referring to tools separate from the IDE or editor.
E.g. If I receive code from someone else and prefer spaces instead of tabs; an indentation of 2 instead of 4, it's 1 liner in the terminal to adjust that.
Similarly a linter with a custom rule set can help to alleviate issues...
Do you use a rule based code formatter and linter? Fairly easy to maintain some level of consistency with that.
As for arbitrary abbreviations; I'm always very terse when it comes to building data types -- rather pointless dreaming up names for abstract constructs; whereas the code that employs...
Landmark Computer Science Proof Cascades Through Physics and Math
https://www.quantamagazine.org/landmark-computer-science-proof-cascades-through-physics-and-math-20200304/
How does a smart engineer avoid dumb mistakes?
Quotes from Elon Musk
Simplify your product as much as possible.
Don't optimise something that shouldn't exist
Design for the most part is wrong, and your goal is to make it less wrong over time.
If the schedule is long, your design is wrong; if...
Those that hurl missiles should avoid glass bottles filled with petrol.
Maybe if the religion of "peace" and never-ending wars tried to be a better neighbour then things could be different; but sadly like Africa -- peace and liberty is always wholly absent.
Maybe it's just me; but that kind of sounds a bit binary :rolleyes:
Traditional learning institutions like most things mired in historic dogma have an expiry date.
Composition
The goal of this thread will to explore the general term of composition; more specifically, what we mean when we talk about composition in programming. The topic on its surface is not all that concise to quantify both in the general sense, and in programming.
For example...