Wednesday, January 6, 2021

Engineering: Mechanical Flywheel Batteries

For thirty plus years I've been wishing the USA would invest in mechanical battery technology.  Unlike chemical batteries, flywheel batteries don't wear out and are extremely efficient.  As far as I can tell the only drawback is they take more engineering to build.  Really ?  

So uh duh ?  If that is true then all we need to do is invest in micromachine manufacturing technology and we can have zero emission cars that run for a hundred years.  Seems like an obvious choice to me.  Are you listening China ?

https://en.wikipedia.org/wiki/Flywheel_energy_storage

https://www.youtube.com/results?search_query=mechanical+flywheel+energy+storage


Programming: C verses C++

I don't always agree with Linus Torvalds, but on this topic I do.

http://harmful.cat-v.org/software/c++/linus

In my own words, software should be readable.  Unfortunately C++ encourages completely unreadable code.  Template libraries in particular pretty much guarantee unreadable code.  And unreadable code is unmaintainable code.  And unmaintainable code is doomed to fail in the long run.

Another strike against overly abstract code is performance.  The more abstractions you have in your code the less understanding you have of the performance cost of each line of code.  Using too many levels of class inheritance can obscure giant inefficiencies.  Code performance can quickly blow up if there is no understanding of the cost of an operation.

On the other hand I do agree object oriented programming has value.  No question.  I guess I'm saying there is a balance, and the trick is to find the right level of abstraction for whatever software you are writing.