Wednesday, July 18, 2018

Best practice is the enemy of common sense

I hear this "best practice" term so much that I can't resist to ask "says who?" LOL.

When we look at any great discovery of human kind, the common denominator was actually "common sense" and in fact the so considered "best practice" at the time was actually holding further discoveries from being achieved.

With "best practice" you are guaranteed to become one more, to integrate more. With "common sense" you are guaranteed to become a different one, to differentiate more. And it is precisely there, in differentiation, where you get a competitive edge.

"Common practice" leads to a a perfect competition, stagnant, rigid and dogmatic environment. But "common sense" leads us to constant adaptation and survival that are key to achieve competitive advantage (even though such advantage is really ephemeral, unless of course everybody looks at such advantage as a "common practice" ;-)

Decimus Iunius Iuvenalis (Juvenal) apparently wrote more than 2100 years ago that "Rarus enim ferme sensus communis", meaning "Common sense is generally rare". This is the bad news for business because it is only "common sense" to expect that in the modern world of instant gratification, thinking is a hard thing to do. It is easier to go after "best practices", unfortunately.

I would go forever but I think Albert Einstein puts it in short, beautifully with "common sense": "Don't stop questioning"

Tuesday, June 05, 2018

Calendar can’t save the attachment '' to the Exchange Server - OWA, MAC Calendar and Iphone Calendar could be failing

Delete the calendar entry and start from scratch.

This has happened to me twice and in both instances it was the prelude of a bigger issue, the Exchange/Domain password expires but the error is not shown because Microsoft products cache credentials in a way that some services might still work with old passwords (caching).

In fact I have seen that the Calendar stops working even from the Outlook Web Access (OWA): I was able to interact perfectly fine with emails but my Calendar was unable to show my events.

Unfortunately this time my OWA, iPhone and MAC calendars all failed to me for three days until I realized this. Even though it was the second time it happened to me, the first time I did not realize the root cause of the problem but now I recalled this was exactly the case.

Monday, May 28, 2018

NodeJS static code security analysis

Use the ESLint security plugin to find out potential vulnerabilities in your nodejs code and the node security package (nsp) to find vulnerabilities in your dependencies. Here is a quickest way to get an idea where you are: Install eslint and the security plugin: Have a minimal eslint-sec.json file somewhere locally. Note that there is an issue I reported with one of the rules: Without messing with your project details use the plugin to get a report of where your code is in terms of common possible vulnerabilities:
eslint --no-eslintrc -c /path/to/eslint-sec.json /path/to/project/source/code/dir/
Here is a quick intro to nsp: Up to you to automate this and include it in your pipeline. No kidding, do it!

Saturday, May 05, 2018

Run kubernetes on specific cluster or context

First get credentials
gcloud container clusters get-credentials ${CLUSTER_NAME} --zone ${ZONE_NAME} --project ${PROJECT_NAME}
Then list the context:
kubectl config get-contexts
Then either switch to a context:
kubectl config use-context $CONTEXT_NAME
Or simply run each command using the --context flag. For example to list the pods in a specific cluster run:
kubectl --context $CONTEXT_NAME get pods
To avoid verbosity, create functions in ~/.profile:
kubetest() {
    kubectl --context=$TEST_CONTEXT_NAME "$@"
}

kubeprod() {
    kubectl --context=$PROD_CONTEXT_NAME "$@"
}

Followers