dkrikun | 6 years ago | on: Recursive Make Considered Harmful (1997) [pdf]
dkrikun's comments
dkrikun | 7 years ago | on: Why OO Sucks by Joe Armstrong (2000)
1. You can send any message to any object. In case the object does not have a suitable handler, you will get an exception: <object> does not understand <message>. The whole thing is very dynamic.
2. There is no `static` BS like in c# or java. This is because each method has to be a method of an object. For each class there is a metaclass which is an object too, see: https://en.m.wikipedia.org/wiki/Metaclass#/media/File%3ASmal...
dkrikun | 7 years ago | on: NirSoft, a collection of small and useful freeware utilities
dkrikun | 7 years ago | on: Quake II RTX: Re-Engineering a Classic with Ray Tracing Effects on Vulkan
dkrikun | 7 years ago | on: Designing Resilient Systems: Circuit Breakers or Retries?
dkrikun | 7 years ago | on: Write Everything Twice
1. the author says "premature optmization", and it has the right context, however I prefer to use "premature abstraction" or even "speculative generalization".
2. YAGNI and DRY can be counter-principles because at times "you aint gonna need that level of abstraction/genericity".
3. Inadequately abstract and generic code hurts simplicity and readability.
dkrikun | 7 years ago | on: The Best Programming Advice I Ever Got (2012)
dkrikun | 7 years ago | on: The Best Programming Advice I Ever Got (2012)
In general, staying out of other people code is a bad idea. It promotes lack of transparency and agenda proliferation. This is because the owners of the code start being a "monopoly", can work less hard, provide exaggerated estimates etc. When people know that others can read there code, maybe hack on it, make something faster or simpler -- well they work harder and tend to be more transparent.
dkrikun | 7 years ago | on: The Best Programming Advice I Ever Got (2012)
This
dkrikun | 7 years ago | on: The True Cost of Rewrites
dkrikun | 7 years ago | on: Why should I have written ZeroMQ in C, not C++ (2012)
dkrikun | 7 years ago | on: Why should I have written ZeroMQ in C, not C++ (2012)
dkrikun | 7 years ago | on: How TDD Can Prevent Over-Engineering
dkrikun | 7 years ago | on: The True Cost of Rewrites
Undoubtfuly it is all mature and correct advise. However, I feel it is all one-sided and I ought to provide some counter points:
1. The codebase in question may be well beyond the line where any sane person would touch it, seriously.
2. Individuals experienced with the codebase, its structure, implementation, technology stack might be not available (think cobol).
3. Refactoring or incremental rewrite is a process that has to be planned and managed s.t. current product/codebase structure. Oftencase it is this very structure, which demands the full rewrite -- because of it being too convoluted to allow refactoring to take place.
4. You might want to do a rewrite to refresh the tech. stack -- language, design, frameworks -- it is ok to do so.
5. You do not necessarily need to come with the same feature set. Both you and your customers might want to cut down unnecessary cruft. Technical debt usually starts to show its signs with losing flexibility w.r.t user request to change features.
6. Occasionaly you might come up with a separate, different product, with a different name and brand -- which might turn out to be even better!
7. You learn a lot in the process.
dkrikun | 7 years ago | on: The True Cost of Rewrites
dkrikun | 7 years ago | on: String tokenization in C
dkrikun | 7 years ago | on: How TDD Can Prevent Over-Engineering
dkrikun | 7 years ago | on: Why Use F#?
dkrikun | 7 years ago | on: Why should I have written ZeroMQ in C, not C++ (2012)
dkrikun | 7 years ago | on: Why should I have written ZeroMQ in C, not C++ (2012)
Regarding 1.: a. C99 and C++11 have diverged. For example, `struct xx x = {0}` has different meaning in those languages. b. Lack of certain "features" is an advantage. See, C++ is a huge and complex language (r-values, x-values, exception safety, templates, sfinae and so on and so forth). Yes, you can restrain yourself from using them. But can you restrain others working on your codebase, now and in the future effectively? Good luck writing and maintaining code style guidelines..
2. Well, yes, by using smart pointers, STL, RAII, C++ is safer than C for small, fresh codebases. But remember: C++ was designed for backward compatibility with C. It's full of undefined behaviour and pointer arithmetics. Be careless once and all the safety is gone, and then it will be harder to debug than plain old C.