4 ms·
Isn't this forgetting another important part of programming, that is algorithms? You can have correctly modeled your data, but if you then use bubble sort, you
by teo_zero 3y ago
Isn't this forgetting another important part of programming, that is algorithms?
You can have correctly modeled your data, but if you then use bubble sort, your program will suck anyway!
- frogulis 3y agoGenerally easier and safer to switch away from bubble sort once you realised you've got it wrong though
- galaxyLogic 3y agoMany programmers don't need to think about algorithms because what you get from a library is often good enough, say a simple sort-function. But it is true that while most programming can be seen as trasnforming one data to another, it is the algorithms that do that transformation, such as when transforming a list to a sorted list. But an algorithm can be packaged into a function so that you only need to know what the function does, not how it does it. Data can not similarly be "encapsulated". Except you could say that getter-methods are a way of encapsulating data.