EppsNet Archive: Programming

Teaching Computer Science: The Phones Aren’t Helping You

15 Feb 2018 /

I’m volunteering a couple mornings a week at a local high school, helping out with computer science classes.

The way the classes are taught, via an online curriculum, provides a great temptation to kids to get off-task, which they do, usually by entertaining themselves with their phones.

They get off-task in other ways too — web surfing, doing homework for other classes — but the main distractor is the phones . . .

 

“As I mentioned before, I worked with another CS class a couple years ago. No phones allowed in the classroom.

Students with cell phones

“I remember one day the assistant principal was in class observing . . . a student had a phone out, looking at it . . . he was holding it under the table so no one could see it, but this guy, the assistant principal, he did see it.

“Oh man, did he hit the roof! If a student had pulled out a gun, there couldn’t have been any more excitement in the room.

“I thought that was overkill at the time. But I have to tell you that those kids kicked ass on the AP exam. Can I say that? That was the CS A test. Hard test.

“Most of the students got a 5. Most of the students who didn’t get a 5 got a 4. Nobody got a 3, one student got a 2 and, out of about 35 students, 6 of them got a 1, including the guy who spent 47 hours playing video games instead of studying. What did you expect, right?

“Now you guys may crush it on the AP test too. We don’t know yet.

“A lot of programmers have a phone in view when they’re working . . . a lot of programmers listen to music, sometimes through their phone . . . but nobody has the phone in their hand looking at it every minute, you’d never get anything done.

“So it depends what your goals are. If your goal is to get a top score on an AP exam, I don’t think you’re helping yourself with the phones.”


Teaching Computer Science: When You Need Help, Ask For Help

1 Feb 2018 /

I’m volunteering a couple mornings a week at a local high school, helping out with computer science classes.

It’s a mixed class . . . most of the students are taking AP Computer Science Principles, and about 10 kids just recently started a second-semester Visual Basic class.

Help

The VB kids were pretty inquisitive at first but started to get discouraged . . . in my opinion because of the way the material is presented to them via an online curriculum.

The current approach to teaching computer science in American schools, because of the shortage of (I almost said “lack of”) qualified teachers is to use packaged courses delivered to students online.

My observation is students assume that because they’ve been put in front of a computer full of lessons, they’re expected to be able to read and understand the material and complete the assignments on their own with no help.

This is a fatal misconception. The material is too difficult for most people who are not already programmers, so the kids decide pretty quickly that they just don’t have what it takes to learn the stuff.

“Tragedy” is probably too strong a word for what is happening in computer science education, but programming is what I do, I think programming and computational thinking are important and valuable skills, and it makes me sad to see them taught in a way that crushes students’ enthusiasm.

 

Brief digression: I take piano lessons. My teacher is a musician, a pianist. Music is part of her life, it’s part of who she is, part of how she thinks. How could someone who’s not a musician teach music?

How can someone who’s not a programmer teach computer science?

 

Because of everything I’ve said above, along with offering technical assistance, I try to encourage kids to stay engaged . . .

UC Santa Barbara

“I’m going to tell you a story,” I said this morning. “First I’ll tell you the moral of the story, then I’ll tell you the story. The moral is: When you need help, ask for help.

“That may seem obvious but I feel like some of you are thinking that you should be working through online lessons with a lot of independence.

“I worked with a class a couple years ago at another school. One of the students there was very quiet but she always asked for help when she needed help. She asked quietly, but she asked.

“And when I gave her an answer, she almost always asked ‘why?’ I don’t mean ‘why why why’ like a 5-year-old, but if she didn’t understand why something was important or why you’d want to do something one way and not another way, she asked why.

“It’s a good question because if the only reason for doing something is because I said to do it, what is she going to do if I’m not there?

“What happened to this girl? She’s now a computer science major at UC Santa Barbara. She was able to do that because she didn’t give up on herself when she didn’t understand something and because, even though she wasn’t the most naturally outgoing person she decided to own her own results and use the resources that were available.”

“You’ve got to own it, kids. When you need help, ask for help. Don’t give up on yourself.”

Thus spoke The Programmer.


Teaching Computer Science: Asking for Help

9 Jan 2018 /

I’m volunteering a couple mornings a week at a local high school, helping out with computer science classes.

Cell phone

This morning, in AP Computer Science Principles, the teacher went through an explanation of the hexadecimal number system, then gave an in-class assignment for students to convert their cell phone number to hexadecimal. Not in two parts, 3 digits and 4 digits, but as a 7-digit number.

It seemed pretty obvious from the interaction and the body language and the looks on their faces that a lot of students didn’t get it, but in a class of 25 students, only one student asked for help. Until the teacher finished with that student and asked “Does anyone else need help?” and eight more students immediately raised their hand.

I asked the teacher, “Can I address the class for a minute?”

 

“First off, doing a 7-digit hex conversion is not easy. I know professional programmers who can’t do it. So I’d expect someone trying to do it for the first time to need some help.

“In fact, if you know any professional programmers, ask them to do a hex conversion on their phone number. Let me know what happens. I guarantee you won’t have to ask too many people before you stump someone.

Snap programming

“None of the material in this class is easy. Snap programming? You might look at it and think ‘There’s a cat and a fish and a duck . . . I’m not understanding it but it looks like a program for 5-year-olds. It’s embarrassing as a high school student to have to ask for help with it. Maybe I’m not very smart.’

“No, Snap is a university-level curriculum from Berkeley. Academically rigorous. I worked through the assignments myself and I found them pretty challenging. I’d expect many of you to find them challenging as well. So you should be asking for help.

“If you need help, waiting for someone to ask if you need help is not going to be a winning strategy. In school, in life or in anything. Because if no one asks, then you need help and you don’t get it.

“There’s probably a natural reluctance to ask questions because what if I’m the only person who doesn’t know the answer? Then I ask a question and look foolish.

“It’s going to be unusual in any class that you’re the only person who doesn’t understand something. If you find that happens to you a lot, you may have a problem. But normally it’s going to be pretty unusual.

“I can tell you in this class, there’s definitely more than one person who finds the material pretty challenging. As I said, I find it pretty challenging myself. It’s not so challenging that I need help with it, but it’s definitely challenging enough that I’d expect most people who are not programmers to need help with it.

Hexadecimal

“I’m also hearing some people today saying to themselves or to the person next to them, ‘Why do we need to know this?'” That’s actually a very good question. Binary of course is the fundamental language of computers, but why would you need to know hexadecimal? Anyone?”

No hands go up.

“OK, we’ll talk about that in a minute. If it’s not clear to you, in this class or any class, why you’re being asked to learn something, put your hand up and insist on understanding the relevance.

“One final anecdote:

“I worked with an AP class a couple of years ago at another school. About this same timeframe, late first semester, I was in class on a Monday and before the class started, one of the students asked me, ‘How was your weekend?’

“I said, ‘It was okay. How was yours?’

“‘It was great! I played like 47 straight hours of [some video game I can’t remember the name of].’

“And he was one of the worst students in the class, maybe the worst.

“I know he and his parents had met with the principal and the teacher to figure out why he was doing so poorly in computer science. It had to be the school’s fault, right?

“So I’m trying to wrap my mind around this. You played 47 hours of video games, you have no idea what’s going on in this class, and it’s the teacher’s fault?!

“No, it’s your fault. You put nothing into it so you get nothing out of it, you don’t ask for help, and that’s why you’re failing.

“Moral of the story: Don’t be that guy.

Thus spoke The Programmer.


Teaching Computer Science: It’s Not Easy to Teach a Subject in Which You Have No Training

29 Dec 2017 /
Mr. Rex Manihera, a teacher at the Glendowie South Primary School at Auckland

A recent issue of Science has an article on the pipeline for computer science teachers . . .

The first sentence says, “It’s not easy to teach a subject in which you have no training.”

That could be the whole article, really. That’s about all you need to know about the current state of computer science instruction: It’s not easy to teach a subject in which you have no training.

Cameron Wilson, chief operating officer and president of the Code.org Advocacy Coalition, is quoted as saying, “It’s really hard to convince a computer science professional to give up a job that pays up to three times more to pursue teaching. And I don’t think we should.”

Wilson’s opinion that computer science classes should not be taught by someone who actually knows something about computer science is probably influenced by the fact that Code.org is one of the leading providers of training programs and online curricular resources for in-service teachers tasked with teaching computer science.

How would this “train a neophyte” scheme work in other academic areas?

Assuming you could provide a one- or two-week training workshop to prospective teachers, would you:

  • Hire someone who has never played an instrument to teach a music class?
  • Hire someone who has never picked up a drawing pencil to teach an art class?
  • Hire someone who doesn’t speak Spanish to teach a Spanish class?

These all seem like absurd ideas with a very low ceiling on what you could hope to accomplish pedagogically. Why does anyone think it makes sense for computer science? Someone needs to explain that to me.

Putting non-practitioners in the CS classroom also requires, in addition to the teacher training, a second key component: the prefabricated curriculum.

Teachers are not able to design and teach a year-long class on a subject in which they have themselves only a week or two of experience, so Code.org and others offer packaged courses delivered to students online.

I’ve had an opportunity to see this in action. I volunteer two mornings a week at a local high school, helping out with the first period computer science class. It’s a mixed class, with most of the students taking AP Computer Science Principles, and a handful of kids taking an introductory programming class in Python.

The AP students are using UTeach, supplemented by the Berkeley BJC curriculum. The Python students are using CodeHS.

The teacher, a converted math teacher, does little to no independent instruction during the class period.

The material is too hard in my opinion for most people who are not programmers to read and understand and to figure out the assignments without a lot of help. Keep in mind that the teacher is also not a programmer.

The first two programming classes I took in college had a ~75 percent drop rate. Programming is hard but it can also be fun and beautiful. I don’t think a teacher who is not a programmer is able to convey that. Minus the beauty and fun, there’s nothing left but the difficulty.

I don’t see most students having what it takes to push themselves through difficult material delivered to them via a computer screen with no human interaction.

They give up and they blame themselves. I’m not smart enough for this. I don’t have what it takes.

It’s discouraging to see this because even kids who are not going to be programmers can learn useful ways of thinking about and solving problems from a computer science class . . .

  • How to break down complex problems into manageable parts
  • How to recognize patterns among and within problems
  • How to recognize important information vs. irrelevant detail
  • How to develop step-by-step solutions to a problem, or rules to follow to solve a problem

It’s a way of thinking that can’t be taught by someone who doesn’t genuinely think that way.

Thus spoke The Programmer.


More Words and Phrases I’m Sick Unto Death Of

13 Oct 2017 /

Although I can’t claim never to have said these things myself, if I had a dollar for every time I’ve heard someone say either a) “It was working fine 10 minutes ago,” or b) “It works okay on my machine,” I would be comfortably retired by now.

Thus spoke The Programmer.


What Does a Programmer Do?

8 Oct 2017 /

I was asked to give a talk last week to a high school computer science class on “What Does a Programmer Do?” (I’m indebted to Jim McCarthy for the “lords and ladies of logic” section.)

 

Programming is problem solving.

Programmer

At the highest level, the problem that programmers solve is that people want to be able to do things with computers that they can’t do. And by computers, I don’t mean just the kind of computers you have on the desks here, I mean phones, watches, cars . . . more and more different kinds of devices are running software.

So one good thing about being a programmer is that pretty much every field of endeavor now uses software and data.

You can work at a tech company like Microsoft or Google or Twitter or Facebook, but you can also work in healthcare, finance, education, sports . . . you can work on cancer research, you can write video games . . . everybody uses software and everybody hires programmers.

Programming is a good job if you want to be learning new things all the time, if you don’t want to do the same things over and over.

The dark side of this is that it can be daunting trying to keep up with the pace of technological change. It can be overwhelming.

I was asked once in an interview, “What’s the coolest thing you’ve learned in the last week?” If you haven’t learned anything in the last week, it’s hard to answer that question, let alone if you haven’t learned anything in a month or a year. It’s easy to let your career slip away from you.

Programming has been a good job for me because I’ve been able to make a living doing things I like and things that I’m good at. I’ve always liked solving problems and building things.

To me that’s a good job: you do things you like and things that you’re good at. I don’t think most people can say that. Most people seem to be like “I hate Mondays,” “Thank god it’s Friday,” “Thank god it’s Thursday because it’s almost Friday.” If you spend a lot of time doing things you don’t like and you’re not good at, that’s a bad job.

As a programmer, you’re given problems to solve and a set of tools with which to solve them. You need to be able to figure out “what do i need to do, what do I need to learn, to be able to solve these problems with these tools?”

Self-reliance is good. Persistence is good. Floundering is bad. Know when to ask for help.

Asking for help is a no-lose strategy. Worst case, you ask for help and someone can’t help you or won’t help you, but you’re not any worse off than you were in the first place.

The demand for programmers exceeds the supply and it doesn’t look like that’s going to change anytime soon.

Nearly 30 percent of Americans ages 18 to 24 cannot locate the Pacific Ocean on a map, and 25 percent of Americans think the sun goes around the earth. Those people are not going to be programmers.

In a time of ubiquitous software and intellectual lethargy, programmers are like the priests in the Middle Ages. We are the lords and ladies of logic. We’re in charge of rationality for our era. We’re bringing common sense and sound judgment and aggregated wisdom and glory to everyone.

That’s our job.


I’m a Winner!

23 May 2017 /

I’ve been doing the daily challenges at CodeFights for quite a while and yesterday’s challenge is the first time I got first place! (CodeFights ranks solutions by fewest number of characters, with solution time as the tiebreaker.)

Codefights leader board


AP Computer Science Revisited

6 Feb 2017 /

I got a LinkedIn invitation today from a student I taught in an AP Computer Science class a couple of years ago.

She’s now a computer science major at UCSB. Several of the kids from that class are now in college as computer science majors. Some of them would have been computer science majors anyway, without the class — they came in already having programming interest and experience — but this young lady was not in that group.

She was quiet in class but when I worked with her one on one, she asked a lot of questions. She asked them quietly but she asked. And when I told her to do something a certain way she always asked why.

She only has four connections at this time so I appreciate her thinking of me. 🙂

LinkedIn


Learn to Code

24 Jan 2017 /

I’m a programmer . . .

Job searches for me go like this: I’m old, I have to compete with people half my age, but I’ve worked in Orange County since forever so I know some people, and I can write good code in interviews, which the majority of programmers who show up for interviews can’t.

I was out of work on January 5. It’s now January 24. I have three job offers and picked the one I like best.

Moral of the story: Learn to code, kids . . .

Thus spoke The Programmer.


See You in Hell

15 May 2016 /

Satan

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

Along with pleas for money, almost 100 percent of the cardboard signs I see being held by people on freeway off-ramps and the like include the phrase “God Bless You.”

There seems to be a correlation between belief in God and begging for money on off-ramps. Notice that you never see Satanists begging for money.

Why don’t they pray for the money? Maybe they did pray and God told them to make a cardboard sign?

I tell my acolytes if they need money, learn to code.

See you in Hell . . .


Programmer or Parolee?

15 Mar 2016 /

Our office building is next door to a probation field office . . .

I have a game I play in the parking lot each morning: Programmer or Parolee. I spot someone, guess if he’s here for a programming challenge or a meeting with his parole officer, then wait to see if he shows up in our office.

If a methed-out skinhead comes in for a programming challenge, I lose today’s game.


Teaching Prisoners to Code: What Could Go Wrong?

22 Feb 2016 /

What could go wrong here? Criminal minds + coding skills = ???

One of my favorite Mr. Boffo cartoons shows a gang of robbers in a bank in the Old West . . . one of the robbers says to another, “Someday this will all be done by computer.”

What an inspiring program to solve a big and growing U.S. problem.

Posted by Code.org on Sunday, February 21, 2016


Kidneys for Coders

22 Dec 2015 /

Cartoon


The Ceiling Seems Very Low

10 Sep 2015 /

http://www.usatoday.com/story/tech/2015/09/10/codeorg-hadi-partovi-computer-science-back--school-kids-teachers-women-minorities/71905738/

I don’t know if this is good news or bad news. It would help to know what “trains” means but I read the article and it doesn’t say. Reporters need to be more inquisitive.

Can someone with no knowledge of computer science or programming be “trained” to teach computer science or programming? What would that entail? How long would it take?

Can someone who’s never played an instrument or listened to a piece of music be “trained” to teach a music class?

Can someone who’s never picked up a drawing pencil or visited a museum be “trained” to teach an art class?

Can someone who doesn’t speak Spanish be “trained” to teach a Spanish class?

The ceiling on any of these approaches seems very low compared to hiring actual programmers, musicians, artists and Spanish speakers . . .

Thus spoke The Programmer.


Hey Guys, I Wrote a Book!

27 Jul 2015 /

It’s called Thus Spoke the Programmer: A Fictional Memoir. (Don’t be put off by the title if you’re not a programmer. It’s guaranteed to delight both technical and non-technical readers alike. 🙂 )

If you’re interested in having a look at it, you have a couple of options:

  1. Leanpub, a PWYW (pay what you want) platform, which means if you want to read the book for free, you can download it and read it for free.
  2. Amazon, available in paperback or Kindle format (not free).

Teaching Computer Science: The Last Day

13 Jun 2015 /
Space Invaders

On the last day of class, I gave students the code for a partially working Space Invaders game, along with instructions for adding collision detection and completing the implementation. The instructions didn’t leave too much to the imagination because I wanted to give everyone a chance to finish out the year on a successful note. I estimated it to be about a 30-minute activity. It didn’t occur to me that that students would do anything but finish the program and spend whatever time was left over blasting aliens.

What they actually did was, they finished the program, tweaked the firing interval so they could shoot faster, changed the speed of the sprites, added more aliens, changed the program to shoot two bullets at a time instead of one, changed the program to shoot five bullets at a time, enabled the aliens to drop bombs, had the game recognize that when the alien count gets to zero, it should stop and write You Won or Game Over, switched the image files to cooler looking spaceships and missiles . . . one student changed the alien image to a picture of my dog (available from a previous assignment), pugs from outer space.

So when I say that we couldn’t have had a better group of students, that’s the kind of thing I’m talking about. They exceeded expectations on all metrics. I wish I could have thanked each of them individually for their unique contributions to the class.

Programming is what I do, it’s been a big part of my life for a long time. I’m glad to have had the opportunity to share it and I’m sad that it’s ending . . .


Teaching Computer Science: Extra Credit

15 Apr 2015 /

I wish I got a dollar for every time a student asks, “Can I get extra credit for [insert action for which it makes no sense to give extra credit]?”

Today in class we did a difficult programming exercise. It wasn’t graded but I asked everyone to turn it in so I could evaluate the difficulty of the assignment.

“Can we get extra credit for turning it in?” a student asked me.

“How does it make sense to give extra credit for turning it in? Everyone is turning it in.”

“It raises everyone’s grades,” he said. “Like a rising tide lifts all boats.”


Teaching Computer Science: Combating Procrastination

6 Apr 2015 /

Students had a project due last week and I got a lot of messages and emails asking for help. Of course, when we handed out the assignment two months ago, we advised students not to wait till the last minute to work on it. Teachers and parents saying “Don’t wait till the last minute” is just an understood part of the process. It’s something that gets said but it’s background noise.

A couple of alternatives occur to me:

  1. Reverse psychology. Say “My advice is to start as late as possible. Try to do two months of work in the last week, or better yet, the last night.” This seems too easy to see through and therefore unlikely to work.
  2. Hand out the 20-page spec and tell the students that it’s due tomorrow. WHAT!? YOU CANNOT BE SERIOUS! NOBODY COULD DO THIS IN ONE DAY! “You’re right. It’s actually due in two months. But now that we’ve agreed that it can’t be done in one day, I don’t want to see anyone working on it at the last minute.”

Teaching Computer Science: Pro Tips for Finishing a Project

5 Mar 2015 /

Woman teaching geometry, from Euclid's Elements.

  1. For many (most?) students doing an object-oriented development project for the first time, this assignment is too difficult to do without a lot of guidance. Therefore: ask for help early and often.
  2. If you wait till the night before a checkpoint, you won’t have enough time to finish and we won’t have enough time to help you effectively. Therefore: ask for help early and often.
  3. I’m seeing students struggling to write code that we’ve already given you. That’s not a good use of your time. Know what we’ve given you and use it.
  4. This is what your program needs to do: [Feature list goes here].
  5. Pick a feature and try to implement it (or part of it). If you can’t do it, come to class tomorrow and ask a question.
  6. Repeat Step 5 until done.

Teaching Computer Science: Lessons Learned

1 Mar 2015 /

We did a programming lab in class . . . before we started, I mentioned several times that Java code that would be useful for the lab was posted on the class website.

So it surprised me that several groups got stuck during the lab when they got to the part where the sample code would have been useful because they didn’t go to the website and download the sample code.

Going forward, I will preface important announcements by saying “I cannot emphasize this strongly enough . . .” while pounding my fist on a solid object.


Next Page »