The Interests of Schoolchildren

LAUSD teacher strikeMore than 30,000 teachers in the Los Angeles Unified School District (LAUSD) went on strike this week. LAUSD serves 640,000 students and is the second biggest school district in the country.

The mean annual wage for LAUSD teachers is $75,000.

In the local reporting I’m seeing on the strike, teachers and union reps are unanimous in saying that they’re striking for the benefit of the schoolchildren.

I’m reminded of something Albert Shanker — former president of the United Federation of Teachers (1964-1984) and the American Federation of Teachers (1974-1997) — used to say:

When schoolchildren start paying union dues, that’s when I’ll start representing the interests of schoolchildren.

I can’t say for certain that the LA union reps are being disingenuous but it does make sense that they’d be representing the interests of the people who are paying them.

EppsNet at the Movies: The Garden of Words

The Garden of Words

The Garden of Words is a beautiful short film about loneliness and love and longing, inspired by verses from the Manyoshu, an anthology of ancient Japanese poems:

A faint clap of thunder
Clouded skies
Perhaps rain will come
If so, will you stay here with me?

A faint clap of thunder
Even if rain comes or not
I will stay here
Together with you.

Rain is a central motif in the film. Like the force of love, it can’t be controlled or stopped.

Highly recommended!

Rating: 5 stars

 

The Garden of Words

A 15-year-old boy and 27-year-old woman find an unlikely friendship one rainy day in the Shinjuku Gyoen National Garden.
 

Director: Makoto Shinkai
Cast: Miyu Irino, Kana Hanazawa, Fumi Hirano, Gou Maeda

IMDb rating: 7.6 (26360 votes)

How the Bezos Divorce Rewrites the World’s Richest People List

Current

  1. Jeff Bezos, $140 billion
  2. Bill Gates, $90 billion
  3. Warren Buffett, $84 billion
  4. Bernard Arnault, $72 billion
  5. Mark Zuckerberg, $71 billion

Future

  1. Bill Gates, $90 billion
  2. Warren Buffett, $84 billion
  3. Bernard Arnault, $72 billion
  4. Mark Zuckerberg, $71 billion
  5. Jeff Bezos, $70 billion
  6. MacKenzie Bezos, $70 billion

Since this is an era when many people are concerned about ‘fairness’ and ‘social justice,’ what is your ‘fair share’ of what someone else has worked for?

— Thomas Sowell

In Defense of Apple Crunching

Dilbert

Commercials That Don’t Fit the NFL Audience

Verizon ad

These Verizon and Sprint commercials I see on NFL telecasts, where beta male milquetoasts dispense advice on cell phones, seem misdirected toward what I imagine to be the pro football-watching demographic.

Also off target: the Dove for Men commercials where metrosexuals meet up to lament the demoisturizing effects of their skin care products.

Profanity in Book Titles

Powell’s Books emailed a list of self-care titles aimed at making readers happier and healthier and saner.

A surprisingly high (to me) percentage of the titles — 3 out of 25 (12 percent) — contain the word “fuck.” One title includes the word “shit” but it’s also one of the titles that uses “fuck” so I’m not going to double-count it.

Is this a new publishing industry strategy to reawaken people’s interest in reading? Personally I don’t care for it . . .

Competitive Programming: TopCoder – Marketing

[Link to problem]

Problem Statement

You work for a very large company that markets many different products. In some cases, one product you market competes with another. To help deal with this situation you have split the intended consumers into two groups, namely Adults and Teenagers. If your company markets 2 products that compete with each other, selling one to Adults and the other to Teenagers will help maximize profits. Given a list of the products that compete with each other, you are going to determine whether all can be marketed such that no pair of competing products are both sold to Teenagers or both sold to Adults. If such an arrangement is not feasible your method will return -1. Otherwise, it should return the number of possible ways of marketing all of the products.

The products will be given in a compete whose kth element describes product k. The kth element will be a single-space delimited list of integers. These integers will refer to the products that the kth product competes with. For example:

compete = {"1 4",
            "2",
            "3",
            "0",
	    ""}

The example above shows product 0 competes with 1 and 4, product 1 competes with 2, product 2 competes with 3, and product 3 competes with 0. Note, competition is symmetric so product 1 competing with product 2 means product 2 competes with product 1 as well.

Ways to market:

  1. 0 to Teenagers, 1 to Adults, 2 to Teenagers, 3 to Adults, and 4 to Adults
  2. 0 to Adults, 1 to Teenagers, 2 to Adults, 3 to Teenagers, and 4 to Teenagers

Your method would return 2.

Definition

Class: Marketing

Method: howMany

Parameters: String[]

Returns: long

Method signature: long howMany(String[] compete)

Constraints

  • compete will contain between 1 and 30 elements, inclusive.
  • Each element of compete will have between 0 and 50 characters, inclusive.
  • Each element of compete will be a single space delimited sequence of integers such that:
    • All of the integers are unique.
    • Each integer contains no extra leading zeros.
    • Each integer is between 0 and k-1 inclusive where k is the number of elements in compete.
  • No element of compete contains leading or trailing whitespace.
  • Element i of compete will not contain the value i.
  • If i occurs in the jth element of competej will not occur in the ith element of compete.

Examples

{"1 4","2","3","0",""}
Returns: 2
The example from above
{"1","2","0"}
Returns: -1
Product 0 cannot be marketed with product 1 or 2. Product 1 cannot be marketed with product 2.
There is no way to achieve a viable marketing scheme.
{"1","2","3","0","0 5","1"}
Returns: 2
{"","","","","","","","","","", "","","","","","","","","","", "","","","","","","","","",""}
Returns: 1073741824
{"1","2","3","0","5","6","4"}
Returns: -1

Solution below . . .

Read more

How to Win Friends and Influence People

Caveat: The book advises against saying things like “That’s the dumbest thing I’ve ever heard.”

So you can be an influential person with lots of friends but you’ll have to put up with a lot of nonsense . . .

2018: The Year in Books

These are the books I read in 2018, roughly in the order listed. The ratings are mine. They don’t represent a consensus of opinion.

Books of the Year: Middlemarch by George Eliot (fiction), Lincoln in the Bardo by George Sanders (contemporary fiction) and Factfulness: Ten Reasons We’re Wrong About the World–and Why Things Are Better Than You Think by Hans Rosling (non-fiction).

How Our Careers Affect Our Children

Mothers spending time on themselves — on relaxation and self-care — and not so much on housework, was associated with positive outcomes for children. It’s not just a matter of mothers being at home versus at work, it’s what they do when they’re at home with their non-work time. If mothers were not with their children so they could take care of themselves, there was no ill effect on their children.  But to the extent that mothers were engaged in housework, children were more likely to be beset by behavior problems.

“How Our Careers Affect Our Children”, Harvard Business Review

We’re studying the effects of working mothers, mothers spending time on themselves, mothers engaged in housework . . . I wonder what is the effect of mothers actually spending time with their children?

Competitive Programming: UVa 612 – DNA Sorting

[Link to problem]

One measure of “unsortedness” in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence DAABEC, this measure is 5, since D is greater than four letters to its right and E is greater than one letter to its right. This measure is called the number of inversions in the sequence. The sequence AACEDGG has only one inversion (E and D) — it is nearly sorted — while the sequence ZWQM has 6 inversions (it is as unsorted as can be — exactly the reverse of sorted).

You are responsible for cataloging a sequence of DNA strings (sequences containing only the four letters A, C, G, and T). However, you want to catalog them, not in alphabetical order, but rather in order of “sortedness,” from “most sorted” to “least sorted.” All the strings are of the same length.

Input

The first line of the input is an integer M, then a blank line followed by M datasets. There is a blank line between datasets.

The first line of each dataset contains two integers: a positive integer n (0 < n <= 50) giving the length of the strings; and a positive integer m (0 < m <= 100) giving the number of strings. These are followed by m lines, each containing a string of length n.

Output

For each dataset, output the list of input strings, arranged from “most sorted” to “least sorted.” If two or more strings are equally sorted, list them in the same order they are in the input file.

Print a blank line between consecutive test cases.

Time limit: 3.000 seconds

Sample Input

1
10 6
AACATGAAGG
TTTTGGCCAA
TTTGGCCAAA
GATCAGATTT
CCCGGGGGGA
ATCGATGCAT

Sample Output

CCCGGGGGGA
AACATGAAGG
GATCAGATTT
ATCGATGCAT
TTTTGGCCAA
TTTGGCCAAA

Solution below . . .

Read more

Heaven’s Door

Did you know Bob Dylan has a line of American whiskeys?

Merry Christmas to me! (From me.)

/

Student Loan Debt Sets Record

U.S. Student Loan Debt Sets Record, Doubling Since RecessionBloomberg

What happened to parents saving up to pay for college? Is that not a thing anymore?

I don’t find it morally defensible to encourage a kid to incorporate academics into his or her life from an early age, to emphasize the importance of education, then when the kid is admitted to college to say “Congratulations, here’s your student loan application. Have fun paying that off till you’re 60.”

More Christmas Songs That Should Be Banned

Perry Como Christmas Album

A pair of hop-a-long boots and a pistol that shoots
Is the wish of Barney and Ben
Dolls that’ll talk and will go for a walk
Is the hope of Janice and Jen

— “It’s Beginning to Look a Lot Like Christmas”

Baby dolls for little girls and guns for little boys?! Continuing to segregate and advertise toys based on gender just works to perpetuate nasty sexist stereotypes, plus it severely limits the development of all young people.

Be sure to engage in a conversation about sexism with your friends and families over the holidays!

Sailing to Byzantium

That is no country for old men. The young
In one another’s arms, birds in the trees
– Those dying generations – at their song,
The salmon?falls, the mackerel?crowded seas,
Fish, flesh, or fowl, commend all summer long
Whatever is begotten, born, and dies.
Caught in that sensual music all neglect
Monuments of unageing intellect.

An aged man is but a paltry thing,
A tattered coat upon a stick, unless
Soul clap its hands and sing, and louder sing
For every tatter in its mortal dress,
Nor is there singing school but studying
Monuments of its own magnificence;
And therefore I have sailed the seas and come
To the holy city of Byzantium.

O sages standing in God’s holy fire
As in the gold mosaic of a wall,
Come from the holy fire, perne in a gyre,
And be the singing?masters of my soul.
Consume my heart away; sick with desire
And fastened to a dying animal
It knows not what it is; and gather me
Into the artifice of eternity.

Once out of nature I shall never take
My bodily form from any natural thing,
But such a form as Grecian goldsmiths make
Of hammered gold and gold enamelling
To keep a drowsy Emperor awake;
Or set upon a golden bough to sing
To lords and ladies of Byzantium
Of what is past, or passing, or to come.

— William Butler Yeats, “Sailing to Byzantium”

The Time for Song and Frivolity is Over!

Carolers

A colleague went to see his son’s Christmas pageant, a day care thing where the kids try to sing “Jingle Bells.” 

He says once his older daughter got to kindergarten, the school didn’t do singing Christmas shows anymore . . .

THIS IS KINDERGARTEN! THE TIME FOR SONG AND FRIVOLITY IS OVER! DO YOU HEAR YOUR PARENTS GOING AROUND SINGING ALL THE TIME? THAT’S WHAT GROWING UP IS ALL ABOUT! ALL JOYOUS ACTIVITIES ARE SURRENDERED OR STRIPPED AWAY FROM YOU!

Activities That No One Does Anymore

Zither

I got an email today from a company wanting to introduce me to their faxing API (Application Programming Interface).

Faxing!? Will they also help me do other activities that no one does anymore, like playing the zither or baking my own bread?

Are You Sure?

Are you sure?

I was closing out of Remote Desktop Connection Manager and got the popup shown here.

Am I sure? To the extent that we can really be sure about anything, then yes I’m sure.

Why is the No option selected as the default? Is there an assumption that I’m flying by the seat of my pants, acting randomly and without certitude? 

That I’m not a confident person? That I lack the courage of my convictions?

It’s All Part of the Plan