Get wordy with our free resources
Here at the Raspberry Pi Foundation, we take great pride in the wonderful free resources we produce for you to use in classes, at home and in coding clubs. We publish them under a Creative Commons licence, and they’re an excellent way to develop your digital-making skills.
With yesterday being World Poetry Day (I’m a day late to the party. Shhh), I thought I’d share some wordy-themed [wordy-themed? Are you sure? – Ed] resources for you all to have a play with.
Shakespearean Insult Generator
Have you ever found yourself lost for words just when the moment calls for your best comeback? With the Shakespearean Insult Generator, your mumbled retorts to life’s awkward situations will have the lyrical flow of our nation’s most beloved bard.
Thou sodden-witted lord! Thou hast no more brain than I have in mine elbows!
Not only will the generator provide you with hours of potty-mouthed fun, it’ll also teach you how to read and write data in CSV format using Python, how to manipulate lists, and how to choose a random item from a list.
Talk like a Pirate
Ye’ll never be forced t’walk the plank once ye learn how to talk like a scurvy ol’ pirate… yaaaarrrgh!
The Talk like a Pirate speech generator teaches you how to use jQuery to cause live updates on a web page, how to write regular expressions to match patterns and words, and how to create a web page to input text and output results.
Once you’ve mastered those skills, you can use them to create other speech generators. How about a speech generator that turns certain words into their slang counterparts? Or one that changes words into txt speak – laugh into LOL, and see you into CU?
Secret Agent Chat
So you’ve already mastered insults via list manipulation and random choice, and you’ve converted words into hilarious variations through matching word patterns and input/output. What’s next?
The Secret Agent Chat resource shows you how random numbers can be used to encrypt messages, how iteration can be used to encrypt individual characters, and, to make sure nobody cracks your codes, the importance of keeping your keys secret. And with these new skills under your belt, you can write and encrypt messages between you and your friends, ensuring that nobody will be able to read your secrets.
Unlocking your transferable skill set
One of the great things about building projects like these is the way it expands your transferable skill set. When you complete a project using one of our resources, you gain abilities that can be transferred to other projects and situations. You might never need to use a ‘Talk like a Pirate’ speech generator, but you might need to create a way to detect and alter certain word patterns in a document. And while you might be able to coin your own colourful insults, making the Shakespearean Insult Generator gives you the ability to select words from lists at random, allowing you to write a program that picks names to create sports or quiz teams without bias.
All of our resources are available for free on our website, and we continually update them to offer you more opportunities to work on your skills, whatever your age and experience.
Have you built anything from our resources? Let us know in the comments.
10 comments
Justin Brennan
No I have not built anything from your resources, but I am very interested in everything Raspberry PI has to offer and want to learn as much as I can from the ground up. Please let me know how I can start learning how to utilize and create resources from a beginner level.
James Hughes
All the links are in the blog post above – follow them, do them!
AndrewS
There’s also https://www.raspberrypi.org/learning/hardware-guide/ and https://www.raspberrypi.org/learning/software-guide/
Jason Kibbe
See also https://www.raspberrypi.org/magpi/issues/
Lots of free PDF magazines plus special issues on various topics and project books.
Richard
I just worked through the Shakespearian insult generator. This is really an EXCELLENT learning resource for people trying to learn about using Python! This was all the time I had for tonight, hope to get back to the web page one and encryption one in the next couple of nights.
For example, I can now use the skills I learned about parsing the columns when I collect data from say an Arduino in multiple columns when I want to plot the results that have been stored in a csv data file.
2 short questions I have for you.
1.) How do I move the button box down a line or two? A quick glance at the Guizero documentation you linked to did not make that obvious to me. I am sure it is simple, but no time to hunt or figure it out.
2.) Hoping I can get you to answer this one, so I am sneeking it in here. Need to be able to read files from USB thumb drives and main hard drive(s) using the X86 Pixel Raspian image. I REALLY like this and hope that you will continue the development of this. It really speeds up a bunch of my older PC’s that had become unusable with higher versions of Windows, and it has the same environment as my multiple RPi3’s. Very nice.
3.) PLEASE, PLEASE, PLEASE get SOMEONE SOON to update the Arduino IDE repository with the newest Arduino IDE now available for the Linux(ARM). The Arduino.cc website now has the latest version of the Arduino IDE for linux(ARM) processors. The extremely old v 1.0.5 in the RPi respository (even though it has a 2 before it for the ARM version from the repository, it is the old 1.05) is really/extremely dated, and does not support the Arduino DUE board for example. It also has error in the PulseIn timing function when one uploads the same code from newer PC versions of the Arduino IDE. I discovered this problem when making ultrasonic rangers, and running the same code uploaded from a PC IDE, vs. uploaded from the repository IDE. When the code is uploaded from the PC IDE, the serial monitor gives correct results when read from either the PC or RPi3. When the code to the Arduino is uploaded from the RPi repository Arduino IDE, it gives the wrong results (off by about 30% as I recall), when read on the serial monitor of both PC and Rpi IDE’s. Thus it is clearly a problem with the function from the (very old) Arduino IDE that is in the repository. Please get this updated ASAP. We need to be able to use the most recent Arduino IDE on the RPI’s, and I don’t want to do an install without using the repository, for fear of screwing up some dependencies.
Many thanks, keep up all the good work you are doing!!
Pete Chown
I know the one time pad is just a learning exercise, but I think there is an inaccuracy in the description. The lesson claims that a OTP offers perfect secrecy, which is correct, but only if it is generated from a truly random source.
The lesson suggests using random.randint, which is bound to be insecure. The suggested alternative, os.urandom, reads cryptographically secure pseudo-random bytes. This is likely to be secure in practice but it won’t give the perfect secrecy mentioned in the description. Someone wanting that would need to read /dev/random.
By the way, I think it’s really good that these learning resources are easily available. People occasionally ask me how they can get started with programming (though no one has ever asked me about hardware or digital making). Is there a complete programming course I could point people to, or would I have to pick out individual lessons that would be appropriate to the their level of expertise?
AndrewS
I’ve not read them myself, but there’s https://www.raspberrypi.org/learning/sonic-pi-lessons/
Pete Chown
Thanks.
Jason Kibbe
“Is a rand from /dev/urandom secure for a login key?”
http://stackoverflow.com/questions/31356466/is-pythons-random-number-generation-easily-reproducible
The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting “better” randomness than what /dev/urandom provides is meaningless, unless you are using one of the few “information theoretic” cryptographic algorithm, which is not your case (you would know it).
The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may “run out of entropy” and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a fresh, automated OS install; if the machine booted up to a point where it has begun having some network activity then it has gathered enough physical randomness to provide randomness of high enough quality for all practical usages (I am talking about Linux here; on FreeBSD, that momentary instant of slight weakness does not occur at all). On the other hand, /dev/random has a tendency of blocking at inopportune times, leading to very real and irksome usability issues. Or, to say it in less words: use /dev/urandom and be happy; use /dev/random and be sorry.
(Edit: this Web page explains the differences between /dev/random and /dev/urandom quite clearly.)
http://www.2uo.de/myths-about-urandom/
See also
https://docs.python.org/2/library/random.html#random.SystemRandom
Warning The pseudo-random generators of this module should not be used for security purposes. Use os.urandom() or SystemRandom if you require a cryptographically secure pseudo-random number generator.
Silo
Here’s a twist on the Shakespearian insult generator. There are Shakespearian complement generator list too. These ought to satisfy any child’s desire for silliness with out the negativity. My guys seem to come up with plenty of insults on their own. Your resources always bring out the kid in me!