Tuesday, October 16, 2018

Lossy Text Compression Project

My motto has long been "steal from the best" at least when it comes to teaching resources. Today I found a good project from Code.org. I'm using their Advanced Placement Computer Science Principles curriculum and we are currently learning about data compression. image

Code has created a Lossy Text Compression app (See image or visit link). that students can try out. The code is also available which is very nice.

The algorithm is to keep the first letter of every word and then remove all the vowels to create a new, compressed message.

Now the app is really nice and because  the code is available several students modified it to try different things out. One of them just changed the message to report 100% compression. No surprise there of course.

I am thinking that I may have some of my coding students (in my classes that are not AP CS P) write their own versions. It is a fairly easy string manipulation exercise which makes it good for beginners. Parsing of text is a good thing to learn anyway. It also lets me bring data compression into the class discussion and I see that as a big plus.

Besides, I just really like string manipulation projects.

1 comment:

Garth said...

I gave this to my kids as an assignment. Two of the three had an answer pretty quickly. The third found it on code.org in Java. He is now trying to rewrite it. Not pretty quickly. Chuckle.