Monday, January 22, 2018

Unix Cut Command Omit Specified Fields

Nice work by the desi gang here - and they're actually pulling in ad revenue from AMZN!

https://www.geeksforgeeks.org/cut-command-linux-examples/

https://www.thegeekstuff.com/2013/06/cut-command-examples

$ cut --complement -d':' -f2,2

will omit column 2 in the output..

Saturday, January 20, 2018

Pretty Print a urllib urlopen Response

So, you did

data = urllib2.urlopen( full_url )

Now you want to look at the web page you got back. You try

print( data ) and that doesn't help.

Do :

print( data.read() )

https://pythonprogramming.net/urllib-tutorial-python-3/

Sunday, January 14, 2018

Blinded by the Prize : Dan Goleman

Struck a chord with me - I've had to work with such a$$h's unfortunately...

She was a partner at a huge law firm who drove her team crazy. She micromanaged, constantly second guessing them, re-writing reports that didn't meet her standards even though they were perfectly fine. She could always find something to criticize but nothing to praise. Her steadfast focus on the negative demoralized her team. A star member quit and others were looking to move laterally in the firm.

Those who, like that high-achieving lawyer have this high-achieving super-focused style are called pace-setters - meaning they like to lead by example, setting a fast pace they assume others will imitate. Pace-setters tend to rely on a command and coerce leadership strategy where they simply give orders and expect obedience. Leaders who display just the pace-setting or commanding style or both, but not any others, create a toxic climate that dispirits those they lead. They may get short term results through personal heroics like going out and getting a deal themselves, but do so at the expense of building their organizations. "Leadership run amok" was Harvard Biz Review's title for an article about the dark side of pace-setting written by Scott Spire and his colleagues at Hay Group. Spire told me, "They are so focused on the prize, they are blinded to their impact on the people around them in the room." Spire's article offered up that hard-driving law partner as a prime example of pace-setting at its worst. Such leaders don't listen, let alone make decisions by consensus. They don't spend time getting to know the people they work with day in and out, but relate to them in their one-dimensional roles. They don't help people develop new strengths and refine their abilities but simply dismiss their need to learn as a failing. They come off as arrogant and impatient. And, they're spreading. One tracking study finds that the number of people in organizations of all kinds who are over achievers has been climbing steadily among those who are in leadership positions since the 1990's. That was a period when economic growth created an atmosphere when raise the bar at any cost heroics were lionized. The downside to this style, for example, lapses in ethics, etc were too often winked at - sound familiar Uber?

How come Google doesn't have such issues?

Wednesday, January 10, 2018

The Kiczales HtDF Way

To design Functions :

1. Signature, purpose, stub.
2. Define examples, wrap each in check-expect.
3. Template and inventory.
4. Code function and body.
5. Test and debug till done.

signature : type of each arg, separated by spaces, followed by -> type of result.
purpose - a meaningful one line statement.
stub : syntactically complete function definition that produces a value of the right ype. This makes it possible to run examples even before the function design is complete..

You ain't got UBC under your thumbnail for nothin bro.

Unix : Print a Specific Line from a File (sed)

you want to print line number N, where N may be 31 (say)

> sed -n '31p'

When you have time :

https://zwischenzugs.com/2018/01/21/ten-more-things-i-wish-id-known-about-bash/
Sure to be some nuggest you can ues somedya.

Ian also has a book on bash : ($8 max - you could pay less if you want) https://leanpub.com/learnbashthehardway

Wednesday, January 03, 2018

Amazon Insights : Remote Teams Should NOT Communicate

From the big man himself, after junior execs suggested ways to improve communication :

"I understand what you are saying, but you are totally wrong. Communication is a sign of dysfunction. It means people aren't working together in a close, organic way. We should be trying to figure out a way for teams to communicate less with each other, not more."

"A hierarchy isn't responsive enough to change. I'm still trying to get people to do occasionally what I ask. And if I was successful, maybe we wouldn't have right kind of company."