Introduction ("Lucky Seven" Project #1)

For my digital story, I’ll be teaching you how to make a number guessing game using a programming language called Javascript. Even if you don’t consider yourself the type of person who would be interested in coding, I hope you’ll follow along and create a fun game that you can put on your web site. I think that it’ll be challenging for non-programmers, but hopefully not overly frustrating.
I wrote the game, which I call “Lucky Seven,” last summer. It’s not a difficult program to understand, nor is it a long one. The language I used to write it is called Javascript, which is an interesting language that I taught myself in junior high and then studied in my first computer science class at UMW. It works in a browser alongside HTML and CSS to make awesome web pages, but it’s much different than either HTML or CSS. What’s the difference? Javascript is a programming language, a language used to write algorithms that a computer can “understand” and execute, while HTML and CSS merely make things look nicer. Javascript doesn’t require some of the “extras” that other languages would, which is why I think it’s a good first programming language. The biggest bonus to using Javascript for this project in this class is that you put it in an HTML file and you can put it on your site. Hopefully I’ll put a sample of the game on my own site soon so that you can see it. One downside to Javascript is that it doesn’t get compiled; I also consider that a bonus because you don’t have to go out and download a compiler, but… Compilation is basically converting a programming language into something the computer really “understands,” and if you’ve done something wrong… Well, the computer isn’t so polite about it. You don’t get cryptic error messages and core dumps with Javascript, but instead it will mess up and leave you with nothing to work from. If you intend to follow through with this project and build your own “Lucky Seven” game, I have to warn you that you’re probably going to run into a few errors. To remedy this, I suggest using Firefox (at least when you’re working on this project, if you don’t want to/already use it full time) and downloading an add-on called Firebug by clicking here. (I swear I’m not rick-rolling you guys again.)
Firebug is a debugger for Firefox that will help you find errors in your Javascript code. I personally hated using it back in 110 because it can be very confusing and I like to solve problems by myself. (Yes, I am stubborn.) I’m still very willing to help if you need clarification on anything and I’d love to help you debug, but I still suggest using Firebug for those simple “oops, forgot a semicolon, my bad,” laugh-it-off types of errors. I code almost every single day, including weekends, and sometimes I’m too frustrated, too tired, too busy, or too something to give prompt help. That doesn’t mean that you shouldn’t leave me a comment that I didn’t explain something very well or that you have some crazy bug that you can’t figure out. I absolutely LOVE to help people and don’t mind explaining something in multiple ways if it’ll help someone understand, but I also believe that making mistakes, finding them, and correcting them is one of the best ways to learn (and the only way for a person to learn how to program).
I was going to write something awesome about what computer programming really is, but I honestly don’t think it’s necessary. Computer programming is all about writing algorithms. Computer programming is the art of bossing computers around. Computer programming is fun, challenging, and something everyone should try.
And if you follow this project and like what you see, consider taking CPSC 110. I can’t guarantee you’ll learn Javascript, but you’ll learn some of the same basic information in another language. It’s good for a math gen ed and great for a budding CompSci major 🙂

2 Responses to “Introduction ("Lucky Seven" Project #1)”

  1. Jim Groom says:

    I love this project and I will be following along, I’m also a hardcore user of Firebug, and I think it is a very, very good recommendation. I’m ready to learn some javascript, professor, something I know next to nothing about!

  2. […] Stuff for Starving Students « Top 4 Zombie Movies Since 2000 Check out Rachael Dawne Writes » […]