Teaching Computer Science: Next Year’s Teacher

 
Boy doing math problems

I’m volunteering a couple mornings a week in an AP Computer Science Principles class for the upcoming school year . . .

Schools are adding more CS classes and, almost without exception, retraining in-service teachers to teach them, rather than hiring people with knowledge and experience in the field.

I met with the teacher today to do some upfront planning. At one point, he was calculating how many printouts we’d need for 6 groups of 4 students each . . .

“Let’s see,” he said, “6 times 4 is 20 . . .”

If you think that’s funny, guess what class he normally teaches: accounting.

“Are you going to write that?” someone asks me. “Does he know you have a website?”

“I don’t know what he knows or doesn’t know. Except he doesn’t know what 6 times 4 is.”

How to Not Get a Job Teaching Computer Science

 

1962 Ad, American School, Free Booklet

She was a software engineer interviewing for a job teaching high school computer science.

One of the interviewers read a question:

XYZ School District is committed to effective learning for all students. Key in this work is improving the success of historically underrepresented, low-income and/or students of color. What are your experiences implementing instructional strategies shown to be most effective in increasing the success of these populations?

She knew what the “right” answer looked like but after a momentary hesitation decided to answer honestly.

“I think it’s probably counterproductive to single out groups of students as needing special handling to be up to the standards of the other students.”

“We’re not saying that they’re not up to the standards of the other students,” the interviewer said.

“Okay, let me say it another way. We have four labels available: ‘historically underrepresented,’ ‘low-income,’ ‘students of color’ and ‘none of the above.’

“From a practical point of view, it seems like a very effective system. Each student is given whichever labels seem appropriate. Instead of having to assess every student in detail and then decide how to teach them, we just have to decide which labels to give them.

“It doesn’t matter that students with a certain label are completely different from one another in every other respect. The ‘low-income’ students get the ‘low-income’ instructional strategy, the ‘students of color’ get the ‘students of color’ instructional strategy, and so on.”

“So my answer is that I’m not going to implement special strategies based on assigning students to categories. I’m going to teach everyone as individuals.”

She didn’t get the job.

Thus spoke The Programmer.

EppsNet Book Reviews; The Emigrants by W.G. Sebald

 

I can’t come up with a better synopsis than this article from the Boston Review:

Each of these men suffers from memory and from the compulsion to obliterate it; from a mourning and melancholia so deep that it is almost unnamable; from the knowledge that he has survived while those he loved have not; from problems distinguishing dream and reality; from a profound sense of displacement.

Highly recommended!

Rating: 5 stars

And That’s the Truth: Held Back by History

 

Sojourner Truth

[And That’s the Truth is a feature by our guest blogger, Sojourner Truth– PE]

Black folks been treated very poorly over the years. Jews been killed and run out of almost every country on earth. Asians been slave labor, ostracized, put into prison camps.

Now Jews and Asians are doing all right for theirselves. Why are black folks held back by history and other folks aren’t?

Never been a Jewish president, never been an Asian president, maybe never will be. Politicians never helped nobody. They promise to give you this or that, or such and such a privilege, if you will give ’em your vote and your money, and when the time comes, they recollect nothing of the kind.

Don’t wait for people to do things for you. Keep your families together and make sure your kids get a good education in school.

And that’s the Truth!

Passing for Normal

 

The onset of the state of mind consisted in a loyalty to objects. She apologized to one egg for having boiled it, to another for not having selected it to boil. Since it was impossible to know with much precision whether an egg prefers to be boiled or not to, she was always in a state of indecision, followed, as soon as she had taken any action, by extreme remorse. Since this is not far from the predicament of most people of any sensitivity or conscience, she passed for normal.

— Renata Adler, Speedboat

See You in Hell: Fake News Edition

 
Satan
Satan

[See You in Hell is a feature by our guest blogger, Satan — PE]

Greetings from the Underworld, my friends and foes!

I’m reading about a hostage situation, including a fatal shooting of one of the hostages, at a Trader Joe’s in Los Angeles over the weekend. It was covered nationally and even internationally.

Here’s a photo from a British news site of the suspect being taken away:

Suspect taken into custody

I looked at the major US news sites — CNN, NBC, CBS, ABC — and about a dozen smaller sites . . . no one mentioned the race of the suspect, no one gave the suspect’s name, and no one ran a photo.

I could understand a media policy where, in reporting shootings, we consider race to always be relevant, or we consider race to never be relevant, but not a policy where race is only considered relevant when the victim is black and unarmed.

Headlines like this are common: Police Shoot Unarmed Black Man.

But not this: Police Shoot Unarmed White Man.

Or this: Police Shoot Armed Black Man During Commission of Crime.

Or this: Black Man Shoots Unarmed Woman at Trader Joe’s.

See you in Hell!

Only So Big a House You Can Have?

 

In other news, the former president and his wife bought an 8,200-square-foot house with 9 bedrooms and 8-1/2 bathrooms in Washington, D.C. for $8.1 million.

In fairness, he did say there’s only so big a house YOU can have. He didn’t say there’s only so big a house HE can have.

Obama's house

Animal House Tax Policy

 

ALBANY, N.Y. (AP) — New York, New Jersey, Connecticut and Maryland sued the federal government over the Republican-led tax overhaul Tuesday, alleging the new law championed by President Donald Trump unfairly singles out high-tax blue states. — wsaz.com

I thought this was noteworthy in that I can’t remember ever in my life hearing a Democrat say anything about people in high tax brackets other than they are not paying their “fair share.” If a Democrat has ever before said that people in high tax brackets are being singled out unfairly, I can’t remember it.

The new federal tax law passed last year caps the deduction for state and local taxes at $10,000, meaning that residents of high-tax states like New York, New Jersey, Connecticut and Maryland — and California, where I currently live — will see big increases in their federal tax bill.

It reminds me of a scene from Animal House:

“He can’t do that to our pledges!”

“Only we can do that to our pledges!”

He can’t impose high taxes on our residents! Only we can impose high taxes on our residents!

See You in Hell, Champions of Diversity

 
Satan

[See You in Hell is a feature by our guest blogger, Satan — PE]

I love diversity and inclusion and equity. Why do I love diversity and inclusion and equity? Because they make everyone hate each other even more than they already do.

On one side, you have the people thinking “Look, life’s not a fucking fairy tale for anybody. I’ve been eating a shit sandwich every day of my adult life to stay alive in this profession and these narcissistic pricks want to coattail their way in on a ‘diversity’ exemption.”

And on the other side: “The numbers prove that these privileged cocksuckers aren’t giving us a fair shake. Fuck ’em. Their time is over.”

In fact, “love” is too weak a word for what I feel. I luuurve it! I loave it! I luff it, two F’s, yes I have to invent!

Hell is open borders. Heaven has a wall and extreme vetting. Families are separated! Racist!

See you in Hell!

Be Thankful That You’re Miserable

 

I feel that life is divided into the horrible and the miserable. That’s the two categories. The horrible are like, I don’t know, terminal cases, you know, and blind people, crippled. I don’t know how they get through life. It’s amazing to me. And the miserable is everyone else. So you should be thankful that you’re miserable, because that’s very lucky, to be miserable.

Competitive Programming: CodeSignal – footballGroupStatictics (A World Cup SQL Challenge)

 

Description

You are creating a website that will help you and your friends keep track of the results of soccer games from all around the world. You store all results of one group in a table, results. You want to sort the teams in a complex way – first by points, then by total goal differences, and then by total goals. If all of these parameters are equal, sort the teams alphabetically.

The results table contains the following columns:

  • first_team – the name of the first team;
  • second_team – the name of the second team;
  • first_team_score – the number of goals scored by the first team;
  • second_team_score – the number of goals scored by the second team.

Here the primary key is the pair (first_team, second_team). Return the list of team names sorted in the way described above.

Note: see three points for a win to understand how points are calculated.

Example

For given table results

first_team second_team first_team_score second_team_score
Preachers Blackflies 2 1
Preachers Razorbacks 3 2
Blackflies Razorbacks 1 1

the output should be

team_name
Preachers
Razorbacks
Blackflies
  • Preachers have 6 points (from winning two games), 2 is the total goal difference (2 - 1 = 1 from the first game, and 3 - 2 = 1 from the second game), and the total goal count is 5 (2 from the first game, plus 3 from the second game).
  • Razorbacks have 1 point (from their draw game with the Blackflies), a goal difference of -1 (2 - 3 = -1 from their first game, and 1 - 1 = 0 from their second game), and a total goal count of 3.
  • Blackflies also have 1 point and -1 goal difference, but their total goal count is 2.

Solution below . . .

Read more

11,000 New Computer Science Teachers Considered Harmful?

 

Here’s the start of an email I got from Code.org:

We’re kicking off our summer workshops to prepare 11,000 new CS teachers. Last month we welcomed over 600 teachers, facilitators, and Regional Partners to Atlanta, GA for our largest TeacherCon ever.

On top of TeacherCon, we also have 350 K-5 workshops and 167 workshops for middle and high school teachers planned this summer, where we expect an additional 10,000 teachers who plan to begin teaching computer science for the first time this fall!

This is heralded with an exclamation point, like it’s exciting news, but as a computer science person, I can’t get excited about it. Why do we want kids to be taught computer science by 11,000 teachers who know little or nothing about computer science?

How can someone teach something that they themselves don’t do?

See if you can get excited about any of the following possibilities:

  • 11,000 math teachers who know little or nothing about math!
  • 11,000 music teachers who have never listened to a piece of music!
  • 11,000 French teachers who don’t speak French!
  • 11,000 journalism teachers who have never written for publication!

What is it about computer science that we accept teachers who have never created an original piece of software, know nothing of the history and philosophy of the subject (e.g., don’t get “considered harmful” jokes), nothing about recent developments?

When I teach computer science, I’m not relying on committees of educators and elected officials to know if what I’m teaching is valuable and how well I’m teaching it. I’m teaching something that is part of my life. I’m passing on my own insights and experience and trying to convey a way of thinking that seems valuable to me.

Can a teacher convey a way of thinking if he or she doesn’t genuinely think that way?

Thus spoke The Programmer.

Competitive Programming: CodeSignal – canScore (A World Cup Challenge)

 

Description

Your friend is a soccer fan and you were watching some World Cup matches with him. You liked this game, but the rules are very complicated for you, so you decided just to try to guess whether the given attack will end with a goal or not.

In the beginning, the ball is in the attacking team’s goalkeeper’s hands. On the attacking team, there’s a very talented goalscorer, who is waiting for his chance at the other end of the field. His teammates want to give him the ball so he can score. They can move the ball by passing it one to another along a straight line, but the defender can steal the pass if he is closer than d to the ball at any point throughout the pass. Now you want to know if the attacking team can score or not.

Formally, you are given the coordinates of all attacking players in an array attackingPlayers (where the player at index 0 is the goalkeeper and the player at the final index is the goalscorer), the coordinates of all defending players in an array defendingPlayers, and an integer d (representing how far each defending player can reach in order to intercept a pass). You need to find out whether it is possible to score a goal by passing the ball to the best scorer without any passes being intercepted.

Example

For attackingPlayers = [[0, 0], [1, 2], [3, 1]], defendingPlayers = [[2, 1]] and d = 1, the output should be canScore(attackingPlayers, defendingPlayers, d) = false.

Example 1

Attacking player 0 can pass to attacking player 1 without the pass being intercepted, but neither attacking player 0 nor attacking player 1 can pass to attacking player 2 (the goal scorer), so the goal cannot be completed.

For attackingPlayers = [[0, 0], [1, 2], [3, 3], [3, 1]], defendingPlayers = [[2, 1]] and d = 1, the output should be canScore(attackingPlayers, defendingPlayers, d) = true.

Example 2

The goal can be scored if the ball is passed from attacking players 0 to 1 to 2 to 3.

For attackingPlayers = [[1, 2], [5, 3], [4, -2], [8, 0], [8, 6]], defendingPlayers = [[4, 4], [1, -1], [9, 2]] and d = 2, the output should be canScore(attackingPlayers, defendingPlayers, d) = true.

Example 3

The goal can be scored if the ball is passed from attacking players 0 to 3 to 2 to 4.

Input/Output

  • [execution time limit] 3 seconds (java)
  • [input] array.array.integer attackingPlayers

    An array of coordinates of all players from the attacking team. The first one is the goalkeeper’s coordinates and the last one is the best goalscorer’s coordinates.

    Guaranteed constraints:
    2 <= attackingPlayers.length <= 100
    attackingPlayers[i].length = 2
    104 <= attackingPlayers[i][j] <= 104

  • [input] array.array.integer defendingPlayers

    An array of coordinates of all players from the defending team.

    Guaranteed constraints:
    1 <= defendingPlayers.length <= 100
    defendingPlayers[i].length = 2
    -104 <= defendingPlayers[i][j] <= 104

  • [input] integer d

    The distance that each defending player can reach in intercepting a pass.

    Guaranteed constraints:
    0 <= d <= 104

  • [output] boolean

    True if attacking team can score a goal, False otherwise.

Solution below . . .

Read more

Thomas Jefferson: Why I Don’t Wear a MAGA Hat

 
Thomas Jefferson

My fellow Americans —

This is why we fought a war to get away from the goddamn Brits.

I would personally not wear a MAGA hat in public for the reason cited, i.e., Trump opponents seem to be violent and easily triggered.

That said, if your idea of a good time is to steal a kid’s hat and throw a soda in his face, you should probably shut up about the tolerance and mental stability of others until you get your own shit together.

As for lessons in personal responsibility, the drink thrower is now in jail. He who laughs last, etc.

Thomas Jefferson

Doesn’t Tell Me What I Need to Know

 

A co-worker is telling another co-worker that you have to make sure day care providers are insured and bonded.

Actually, being insured and bonded is no guarantee that I want you taking care of my child . . .

“Mr. So-and-so, your son wouldn’t stop crying so we taped his mouth shut. The bad news is: he died. The good news is we’re insured and bonded!”

Competitive Programming: POJ 3281- Dining

 

Description

Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.

Farmer John has cooked fabulous meals for his cows, but he forgot to check his menu against their preferences. Although he might not be able to stuff everybody, he wants to give a complete meal of both food and drink to as many cows as possible.

Farmer John has cooked F (1 <= F <= 100) types of foods and prepared D (1 <= D <= 100) types of drinks. Each of his N (1 <= N <= 100) cows has decided whether she is willing to eat a particular food or drink a particular drink. Farmer John must assign a food type and a drink type to each cow to maximize the number of cows who get both.

Each dish or drink can only be consumed by one cow (i.e., once food type 2 is assigned to a cow, no other cow can be assigned food type 2).

Input

Line 1: Three space-separated integers: N, F, and D

Lines 2..N+1: Each line i starts with a two integers Fi and Di, the number of dishes that cow i likes and the number of drinks that cow i likes. The next Fi integers denote the dishes that cow i will eat, and the Di integers following that denote the drinks that cow i will drink.

Output

Line 1: A single integer that is the maximum number of cows that can be fed both food and drink that conform to their wishes.

Sample Input

4 3 3
2 2 1 2 3 1
2 2 2 3 1 2
2 2 1 3 1 2
2 1 1 3 3

Sample Output

3

Hint

One way to satisfy three cows is:

Cow 1: no meal
Cow 2: Food #2, Drink #2
Cow 3: Food #1, Drink #1
Cow 4: Food #3, Drink #3

The pigeon-hole principle tells us we can do no better since there are only three kinds of food or drink. Other test data sets are more challenging, of course.

Link to problem

Solution below . . .

Read more