Unix – Get large files by size

du -a /var | sort -n -r | head -n 10

Posted in Uncategorized | Tagged | Leave a comment

Quick hit recipes

  1. Show hidden files in Mac file open dialog
    ** Command+Option+.
  2. Delete 0 size files in *nix systems
    ** find . -name ‘file*’ -size 0 -print0 | xargs -0 rm
Posted in recipes, Uncategorized | Leave a comment

Simple static web server

Using Node.js & Express.js

var express = require("express");
app = express();
app.use(express.static("."));
var server = app.listen(80, function () {
console.log("Example app listening at http://%s:%s", server.address().address, server.address.port);
});

Posted in node.js, recipes | Leave a comment

On kids & expectations

Received an interesting insight today over a coffee meeting.    Something I hadn’t explicitly thought about or realized.

It is important to explain to your kids that you have expectations for them and tell them explicitly what those expectations are.

There seems to be a lot to this.   I’ll have to chew on this and come back.  So parking the thought here for later exposition.

Posted in Uncategorized | Leave a comment

On attributing the anti-vaccine movement to stupidity

Best I can tell, the benefits of vaccination far outweigh the risks.   I am pro-vaccination.

That said, I have often felt that, accusing people who are against vaccination of stupidity or scientific illiteracy, is too simplistic and intellectually lazy.

Science as an activity involves proffering hypothesis and running experiments or studies to determine the validity of the hypothesis.  Unless one has access to research in the specific area of study and has taken the time to understand and weigh the evidence for and against their position (whatever it may be), it is dishonest for them to claim that their position is scientifically correct.

Most people do not have the access or the time to undertake such research.   Nor is it practical or reasonable, for everybody to take such an approach, to the vast number of choices that confronts them during their lifespan.     Instead, people often look up to trusted proxies for answers – be it Neil DeGrasse TysonFDA Dr Oz or Dr.Phil.   Sometimes these trusted proxies can be wrong.   More often, as science progresses evidence mounts to disprove the current scientific consensus.   What is believed to be true today may indeed turn out to be wrong.

In such a context, it shouldn’t be unexpected that some percentage of the population is unwilling to accept what is otherwise the current consensus on some specific topic.

I recently stumbled upon two articles that expressed a similar viewpoint.

Posted in Uncategorized | 1 Comment

On Kids & money

Ever since our older daughter turned 8, we have been fending off her pleas for an allowance or a points/rewards system. We didn’t think she was ready yet. More importantly we weren’t ready for the challenges that would surely ensue.

After 6 months of reading several books, articles and reflecting deeply on the core values we wish to instill in her, we settled on a system.

  1. No allowance. She can earn money by helping with household chores that my wife or I would have to do otherwise. We put up a list of chores that she can help with and the rates.
  2. Chores are considered done, only if done well. Sloppy work must be redone.
  3. Pay her in $1 bills as soon as the earnings cross the $1 mark. No point system, thus avoiding the negotiation over the conversion rate of points to $.

To make sure she has the right mindset we have explained a few things. First, that our primary motive is to teach her how to earn money and how to handle it. Second, that we want to teach her how to do things well. In addition, this doesn’t mean she is expected to pay for her necessities. Equally important, this doesn’t mean she can buy whatever she wants just because she has accumulated the money to buy it.

We learned something important in the first two weeks. Expecting her to do the chores well & remain motivated is asking too much of a child. Now we spend time helping her do the chores. It is an opportunity to coach her to do things well. Turns out, it is also a good opportunity to linger and talk about school and the day’s events. We are hoping that if we keep the experience positive she will keep doing it consistently. With time the habit will take over and motivation won’t matter.

So far this has provided us with basic blocks to build practical life skills

  • Math, tracking & forecasting – She now hand draws a calendar every month & uses abbreviations to mark which chores she does each day. We choose non-round numbers for rates. She has to add funky numbers like 35, 15, 65 etc in her head. She has started to project forward to the number of chores she has to do & how many days it will take to save up and buy something she wants.
  • Good work ethic – She is learning what it takes to repeatedly & consistently do things well. The chores we offer – we think/hope – will build essential life skills. Over time – we hope – this should give her the confidence to be self-reliant.
  • Understanding of value creation – We tell her that we only pay for chores that we feel reduces our workload. We hope this conversation will evolve further. We – hope – will can help her understand that money comes from creating value that others are willing to pay for. Not from withdrawals to Dad/Mom’s bank account.In keeping with this spirit we have turned down pleas to include everyday activities like clearing the dinner table or fetching the mail by explaining that there are things she should do because she is part of the family.
  • Context for money conversations – We now have a framework for talking about money. Money is no longer abstract. $x can now be understood in terms of a specific number of chores to be done over a specific number of days. We are starting to have conversations about the best use of $x. And that spending money is about choices & tradeoff. This will of course remain work in progress.

We hope to continue and build on this. Some things we think are important for her to learn

  • Basics of budgeting, and balancing the checkbook.
  • Choose what to spend money on.
  • Understand that there are only 3 things to do with money & help her figure out how to balance them
    1. Pay for things you need/want now.
    2. Invest, so the money can grow to meet future wants/needs.
    3. Help others.
  • Gain a deeper understanding of value creation. Find things she enjoys doing. Derive satisfaction from work that is done well.

Special thanks

Posted in Uncategorized | Tagged , | Leave a comment

On convincing people

Often we use facts to convince people we are arguing people. But, truly we disagree not because we differ on the facts, but because we differ on unstated assumption.

So, to really convince somebody, it is necessary to determine and address their underlying assumptions.

This takes patient listening, empathy and compassion.

Special thanks to Cheryl Smith for teach me this.

Posted in Uncategorized | 1 Comment