Week 1
Installing Ruby on Ubuntu 11.10
The assignment for week one is to install Ruby on a computer. I don't have a MAC book, nor a linux box, so I decided to create a virtual machine on my Windows 7 laptop to run Ubuntu 11.10.
1) Once Ubuntu booted up, I searched for the Terminal
2) To install Ruby, I entered the following command:
sudo apt-get install ruby1.9.1
3) Finally, to check which version I currently have (to verify the installation), I performed the following command:
ruby -v
Comments on Code by Charles Petzold
Chapters 1-3
It’s fascinating to read about how Morse code and Braille came about. Sure as kids we grow up hearing about these languages in History class, but never to the extent about how the language developed and the thought process that was going on while creating the language.
Being an IT major, you learn about binary numbers during the first class. It was nice to review it again and to also learn that the dots in Braille are also considered binary.
Chapter 4
Although I’m sure most of us have learned how a flash light works in previous Science, Physics, or Electronics class, I believe it is important in understanding the circuitry within computer hardware. This chapter covered the anatomy of an atom, how atoms form molecules, positive and negative charges of an atom, then relating it to electricity and the movement of electricity starting out in the batteries of a flashlight, the terms parallel and series, resistance, amps, Ohm’s law, short circuit, the invention of the light bulb by Edison, the calculation for WATTS, and the terms on/off closed/open when talking about wiring diagrams. All of which, like I had mentioned before, are topics we’ve learned in the past, but are most likely good to review to get the juices flowing, no pun intended.
Chapter 5
This chapter went more in depth with the language of Morse Code and its development. In the story, we went from two children talking to each other via flashlights from a distance where they can see each other to laying down wires since their bedrooms are not facing each other. (at this point the children have created a telegraph system).
Chapter 6
This chapter related the story about the two children creating their own telegraph system to the real telegraph system used by Samuel Morse and described how a relay was created. Relating the stories was a great way to better understand how the telegraph system worked.
Chapter 7-8
I was wondering where this chapter was going when it started talking about base 10, base 8 , and base 4. But it made complete sense because it allowed the reader to understand how base 2 works. This was a different approach to learning binary as compared to when I learned in my freshman year of college. We started off learning base 2 without learning about other numbering systems.
Chapter 9
This chapter was very interesting to me as I have wondered how bar codes work. You see it everywhere, at the grocery store, at Best Buy, at clothing stores, etc. To see it everywhere, you must think that it is an almost perfect system. I had no idea the UPCs had a validity checker, it is a very well thought out system.
Comments on 7 Languages in 7 Weeks by Tate
The author of the book took a survey to see what the top ten languages are. I’m interested to know why Ruby was not as popular, yet the author felt it was necessary to include it.
I don’t have much programing experience. I’m currently taking C++, I’ve taken Java this past semester and I’ve also taken an introduction to object oriented programming two years ago. It will be interesting to see, if any, similarities among the languages that will be presented in this book.
I’m excited to broaden my knowledge on different programming languages.
Ruby:
Ruby will always talk back, it will always have a response to a typed command.
As with all programming languages, a missing quotation mark, or special character will cause the programming language to spit out an error. At one point I could not figure out why my output did not match the output from the book, but that was because I used a single quote, instead of double quotes.
The use of if, then, while, etc. is the same in other programming languages I’ve seen, but the layout is different. It is interesting to see how different languages are written to accomplish the same task.
Ruby is object oriented, strongly typed, dynamically typed
Duck typing (example from book – first element was a string, the second was a float, but it was then calculated as int)

