My ‘Shakespeare Insult Generator’ Project

Since my boyfriend is a Computer Science major, he recommended that I take an introduction class in his field of study. Thus, I registered for CSE 110 this semester as a related elective to my Health Science major. At first, I thought it was the most useless course I have ever taken. But as the months went on, I found myself actually gaining useful knowledge about computers and basic programming.

As an extra credit project for this course, I had to write a program in Java (with the free program Eclipse) that randomly generated insults, using words from the infamous Shakespeare Insult Kit. In order to accomplish this, I had to utilize several types of code that I learned over the course of this semester. My final draft is as follows:

Here’s an example of what the program will look like when you run it, the green text being the user’s input. I basically put the majority of my code inside a While Loop, instructing the computer to run the program from the beginning as long as x=0 (which is terminated by typing “y”).

Writing this project was actually really enjoyable. It’s a shame that I can’t take any more computer science classes – it’s not required for my major. :'( Despite getting frustrated (often) when programming in Java, seeing the finished product of my hard work is so satisfying. :D


14 responses to “My ‘Shakespeare Insult Generator’ Project

  1. improperintegirl

    I love those Shakespearean insult generators!!! I should probably take more CS classes if I ever hope to be a mathematician… but I think its more likely Scott and I will form a Marie/Pierre pair if I need anything math related programmed XD

    • What kind of CS classes have you taken? :o What I hate is that computers are never 100% randomized. No matter how many times I tested out the program, it would suspiciously repeat certain words. =/

      • improperintegirl

        I took an intro class in C++, the randomization thing is weird.. but it works better if your lists are longer.

  2. Haha yes now you know why I found it fun learning on my own for a while. The higher level classes WILL make you tear your hair out though…programming is a test of patience, and eventually realizing that even though everything should work 100% correct, it never does the first time.

    That being said, it is fun once you do finish a program and you see your own unique program running. It’s a feeling of “yay I created this and I can run it.” I may still decide to eventually try for game design in the future, but I have a feeling it would be more of a hobby of mine than a job. I’m just not that obsessed with programming to have the fortitude to put myself through a game >>. Used to be, but then realized that “game design” probably doesn’t have the greatest job offerings straight out of college.

    • Haha, I see what you mean. There would be times where I would get so frustrated because I couldn’t find my syntax errors! I could only imagine how difficult the higher level courses are. Honestly, I think you could it – just persevere! I hear CS is an in-demand job. :P Having programming as just a hobby, though, is understandable. : )

    • PS: So that is why I think IT would be a slightly better option :O, I do find it fun putting computers together, and trying to solve problems with computers. The internship I have at this public school nearby is actually kind of fun for the time being. It’s one where each of the 1400 Jr. Highschoolers gets their own mac laptop, and each classroom has a smartboard x_x.

  3. Yeah it’s a green-magnet school, one of the handful of those selected as part of a test where kids get their own laptops to use only during the school day (not to take home). However the program is over now, and as such they are not being funded to replace broken laptops by the govt anymore. So that’s why I’m also needed as extra help to deal with all the problems aside from cracked screens along with the computer teacher.

  4. I’m proud of you as long as you did this yourself :). I’m sure Mike helped a little though.

  5. Oh hey! Nice program. If there’s one thing I’m sure you have learned from this class, it’s to remember your parentheses and semicolons!

  6. Looks similar to C++. I guess a lot of the languages nowadays share similar qualities. Like the random selection string variables.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s