Showing posts with label humor. Show all posts
Showing posts with label humor. Show all posts

Saturday, June 13, 2026

What is wrong with this button?

Recently I was going through my memory box and I cameA button displaying the message The Spirit of 100110 across this button. It was given out by the hundreds at a conference in the 1970s. . What is the spirit of 100110 you ask? That represents the number 38 which doesn’t seem to mean much. And it really doesn’t because that is not the number that was supposed to be there.

Who ever was in charge of printing the buttons left off a zero where the period is located. That dropped the value in half to 38 when it was supposed to represent 76. Yes, this button was intended to honor the 200th anniversary of the signing of the US Declaration of Independence.

My guess is that the Binary number was meaningless to the person who proofread the button. Clearly, not a computer person.

This brings me back to my regular comments about the need for teaching computing foundational concepts. Sure, this button thing is fairly trivial but Binary concepts and indeed number concepts are pretty important for many things beyond programming.

Boolean algebra is another concept that is foundational to computer science that shows up in many areas. Foundational computing concepts are essential knowledge for people to understand the world around them as it exists today and how it will develop in the future.

I’m probably preaching to the choir here but I feel like somethings need repeating. The button is a fun story too!

Thursday, February 24, 2022

Fun With Rounding Errors

I love xkcd cartoons. I came across this one thing morning that shows the benefits(?) or rounding up.

My immediate idea was “what a great programming project!”  One of the first “hello world” type of exercises I often assign is simple conversations. Fahrenheit to centigrade, miles to kilometers, etc. This is a step beyond that but with a difference. The difference is rounding up and its effect on accuracy.

This is a good program to use to introduce rounding in general but to also talk about how rounding errors can have a large impact when they occur over and over again.

This example uses velocity but I can imaging there are interesting results with weights, simple distances, and almost anything else that normally requires better than integer accuracy. Currency anyone? I’m thinking about trying that one because it involves money.

It might be interesting and educational to try the difference between rounding normally, always rounding up, and always rounding down.

What do you think? Anyone doing something like this? Would it be useful?

Sunday, October 04, 2020

Artificial Intelligence, Humor, and Appreciation of Beauty

Last night I started re-reading Heinlein’s The Moon Is A Harsh Mistress.  It’s an old book, written in the mid 1960s, so there are some old ideas about computers and computing in it for sure. There is some hand waving about how AI is done and how the computer, Mike or Mycroft Holmes, becomes self aware. It is fiction after all. The computer is trying to understand humor and a human friend is trying to help. One way he is helping is to get lists of jokes and report back on which jokes are funny, which are funny once, and which ones are always funny. That sounds a bit like machine learning we see today I think.

In any case, even is the computer does understand humor at some level and is able to create jokes that people find funny does that mean it has a real sense of humor? Will it be able to laugh at jokes that are not in its system? I wonder.

This makes me wonder about other things. We know that AI has been able to write music that people enjoy and create art that looks like it was done by master artists. Is creating art or music the same as enjoying art and music? Maybe not. Now human artists “hear” music in their heads before they write it down or play it. Beethoven write music while he was deaf and so could not hear it being played.

I’ve been to a number of wine tastings. I don’t like wine. No matter how many times I taste it I just don’t enjoy the taste. Listening to wine experts talk about wine and tasting it myself I think (could be wrong) I could learn to identify the wines that wine lovers like. I don’t see me enjoying the process very much though. Understanding is not the same as enjoying. Is it the same for computers and AI? I think so.Recognizing beauty or humor or music is not the same as enjoying it.

The difference between humans and AI is that humans enjoy their creations. And they enjoy the creations of others. If we think about creating beauty as enough to  being human-like  I think we have a narrow view of humans. What do you think?

Monday, April 09, 2018

Why Programmers Need To Ask Questions

I keep seeing suggestions that people don’t need to learn programming because computers will do it better. I am skeptical. In part I am a skeptic because I have been hearing this sot of thing for scores of years and I don’t think we’re getting close to this that quickly. But more importantly I worry that it will take language processing a long time to get good enough at understanding people and language.

For example you may have seen this old joke:

A wife asks her husband, a software engineer "Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6!" A short time later the husband comes back with 6 cartons of milk. The wife asks him, "Why the hell did you buy 6 cartons of milk?" He replied, "They had eggs."

I like to share that with my students to help them understand ambiguity in language. Today I saw this somewhat macabre version.

write letters

I’m still not 100% sure I want to use this one in class but it does highlight the risks of unclear speech.

One of the things I learned developing applications early in my career was that users use language that works for them and for people in their field but which may not be clear to others. It is important to understand their vocabulary, their understanding of the tasks, and how they work. Without a common set of assumptions trouble is an unavoidable result.

In the first joke above there is no clear connection between eggs and milk and bad assumptions are made. I’ve learned to question my wife closely about the shopping lists she gives me. Things that are totally clear in her head may be totally opaque to me.

Will computers be able to know how to ask the right questions? Or will they make assumptions of their own? I’m guessing this will take a while to work out. In the mean time we, people, are going to have to be very careful about how we instruct computers.

Thursday, February 22, 2018

Modeling Good Coding Practice

Facebook showed me this cartoon this morning.

Programming alone

Teaching computer science means you are often programming while someone watches. I confess that I have been known to write something “quick and dirty” but that is not really an option for anything that students might ever see. Or really anyone else might see. “Do as I say not as I do” really doesn’t work for anything.

Generally I’m pretty careful about how I write code while I am doing a demo or creating a scaffold project for students. It requires a few extra minutes but I think it is important to model good practices. I think I have to make a point of explaining why I am taking those extra steps as they are not obvious to beginners.

Sure it seems unnecessary to rename a label box when there is only one label box on the form. Or to change the text property of the form. Or any one of a number of things that appear to be cosmetic and that don’t keep the program from working. But habits are important.

I remember once asking my father why we had to have perfect table manners at home where no one could see us. My father explained that by developing the good habits at home we would be less likely to mess up in public. It’s a lesson that stayed with me. It is why,even in the small simple code, using good coding practice is important. That way you don’t have to think about it when the coding gets public.

Tuesday, February 13, 2018

Quotes About Programming and Computer Science

While looking for a quote that was mostly remembered except for who to credit with it I found a couple of fun sites with quote collections in them. Some of these I already share with students. I think I may print out some more of these quotes for my bulletin board.

This first site is a single (longish) page with some of the best. One of my favorites is:

When debugging, novices insert corrective code; experts remove defective code. ~Richard Pattis

image

This next list is collected by Rich Pattis who is very quotable himself as you can see above. His list covers more than just programming. I love this one:

Those who know, do. Those who understand, teach. - Aristotle

image

This next one shows you a quote of the day and has a long list of sources in a menu on the side of the page. Lots of great people to check out. I like this quote by Bill Gates:

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight."
- Bill Gates
Read more: http://www.softwarequotes.com/showquotes.aspx?id=579&name=Bill Gates#ixzz570txjSqE

image

This one has two pages of quotes. Some are more interesting than others to me but I did like this one:

“That's the thing about people who think they hate computers. What they really hate is lousy programmers.”
Larry Niven

image

Do you have a favorite source for computer science quotes? Or a favorite quote that you don’t find on one of these lists?

Tuesday, September 12, 2017

Yet Another Example of the Importance of Good Names

A little Tuesday humor. I think I may use this to help students understand the importance of good variable names and other identifiers.

groundhog

Thursday, June 22, 2017

Student Programmer Fix This Code

Recently I came across this cartoon and shared it on Facebook.

robotskilling

Responses were interesting. The newer one was to programming the more likely people seemed to be to explain why the if statement wasn’t working correctly. The more experienced one was the more likely they were to point out that you probably shouldn’t have written that code (an option to kill humans) in the first place. There is some validity in both responses of course.

In teaching we often create code that is less than ideal to force a particular observation of a concept if less code. How often do we explain that to students? And how well does it take? I’m not sure but it does concern me.

Returning to asking students to debug code. I like the idea and it is something I want to do more of in the future. The problem comes when students don’t have enough experience yet to find the less obvious errors. On the other hand how will they get experience if we don’t let (make?) them practice debugging? Most debugging practice students get is on their own code. Often they are too close to it to see what is wrong.

Last semester I gave students code written by other students and asked them to test it. Most of the code worked as advertised and what students reported out was missing functionality rather than “broken” code. Maybe I need to write some broken code of my own and have students look at it?

How are you helping students learn to debug code? Any ideas to share please leave them in the comments.

BTW there is some discussion if asking students to debug code is better than asking them to write code on the new CS Educators Stack Exchange. You may want to join in there as well.