Rik's Ramblings

Tuesday, March 21, 2017

Why blue states get bluer, while red states get shittier

Rich New Yorkers Ask State to Raise Their Taxes
- http://nbcnews.to/2nH5Uua

When "fiscally responsible" Republicans reduce taxes, they do it at the cost of education, research and the arts.

Those tax cuts, in reality, make practically no difference to the poor.  Maybe the reduction in taxes gets them an extra six-pack of Coors each month.

On the flip side, due to the magic of percentages, the wealthy find themselves with thousands of extra cash in their pockets.  Of course, the elitist liberals in the blue states, the ones with higher salaries, see value in education, the arts, and their environment.  So we gladly donate some of our extra money to support our local schools, state parks, and local TV stations.

And so, the very people who voted for Trump, as a reaction to being neglected by the political establishment, find themselves falling even further behind.

For example, I know I'll be making donations to the California State Parks and the California Sea Otter protection fund.

Friday, March 10, 2017

French Concrete

This has to be a very delicate story for Breitbart to cover.

On the one hand, they really love to stick it to the communist French government.  On the other hand: Where is their "Made in America, By Americans, For Americans" outrage? 

There's no way they can allow Turmp to use imported French Concrete on his signature #MAGA project.

French Government Warns Construction Firm Against Building Trump’s Wall



Thursday, March 09, 2017

ACV Inheritance

People who can't figure out <em>class inheritance</em> (java/C++) or <em>prototypal inheritance</em> (javascript) use the <b>ACV</b> inheritance pattern.  More accurately the ^A^C^V pattern.

Here's how it works:
 - You find a class you like, and want to extend. 
 - You hold down the "Control" button on your keyboard. 
 - While doing so, you press 'A' key, then release, then press the 'C' key, and release.
 - Now you open a new text file.
 - Name the file according to the new class you're making
 - In the new (empty) text file you again press down the "Control" key
 - Now you press the 'V' key.

Hey presto!  You now have a "derived class".  You can "override" some, or all of the methods, or properties - public AND private!

It seems to be a very common pattern amongst embedded developers, not sure why.

POWER USER TIP: If you want to override a method in the base class, but want to still call it from your derived class.  Simply type 'parent' directly in front of the method name.  Here's an example:

int Foo(char *x){
   int y;
   // do work
   // ...
   return y;

int parentFoo(char *x){
   int y;
   // do work
   // ...
   return y;
int Foo(char *x){
   // modify x
   // ...
   return parentFoo(x);

Wednesday, March 01, 2017

3D printed prosthesis


3D printing is awesome.

Form a company, learn how to design and build things with 3D modeling software, research infant development, file a patent then make a prosthetic arm.  And still quicker than relying on traditional manufacturing (and the NHS)!