Stunt programming. Modern C++ is not about that.

Update: I have expanded “Option 2” with a working solution. And hopefully  explained why is it very likely, still a stunt.

Stunt programming? Here is one definition. From C2 wiki

Stunt Programming

Doing things the hard or risky way because it is more exciting (and exciting is FUN…until you crash).

I could not agree more with this definition. I have also given practical example using C#, on the same subject sometimes ago.

Modern C++ provides a LOT of opportunity to engage and get one self lost in this kind of programming.

(This is one fairly long post with a lot of C++ code inside.  For newcomers to the modern C++, but not for the beginners. )
Continue reading “Stunt programming. Modern C++ is not about that.”

HTML5 is spoiling the assumed balance

HTML5 spoiling the assumed balance? We are in  2017 Q4, XAML is back to the Windows and here to stay.  So what is this HTML5 title all about?

Aim is here to show you a bit of a history regarding XAML in the context of my text bellow written 6 years ago. Ok, let’s rewind to 2011. WinJS is raging beast in the Windows woods. Windows 8 is out. Times are interesting. One must always take the opportunity to learn from history

It is now 2011 June 24-th.

And no, you are not sleeping. Continue reading “HTML5 is spoiling the assumed balance”

Zero time strlen and strnlen. Modern C++

Zero time strlen and strnlen? I am reasonably sure it is not me who first thought of this, but today, I figured writing a “zero time” strlen() and strnlen() in modern C++ is actually possible and obvious. Not for pointers though. For arrays of characters that is.

Update 2017-10-19

A “proper” and tested  modern C++ code is HERE, on GitHub.  dbj::strlen() and dbj::strnlen() to take proper care of char, wchar_t, char16_t and char32_t.

Usage? If you need strlen() or strnlen() just use dbj::strlen() or dbj::strnlen(). In case you are passing arrays of characters the execution time is “zero”. Continue reading “Zero time strlen and strnlen. Modern C++”