All posts by Prof

About Prof

A 50-something computer science college professor occasionally blogging about technology and related issues.

My Home Computer History

My Home Computer History

  • 1983 – Radio Shack Color Computer II, .89 MHz CPU, 16 K memory, no floppy, no hard disk, used cassette tapes to store data, Color Computer BASIC
  • 1989 – NCR PC, 8 MHz 286 CPU, 640 K memory, 720K floppy, no hard disk, DOS 3.2
  • 1996 – Gateway PC, 166 MHz Pentium CPU, 32 MB memory, 1.44 MB floppy, 1.5 GB hard disk, Windows 95
  • 2003 – Home-built PC, 1.7 GHz Pentium IV Celeron CPU, 512 MB memory, 1.44 MB floppy, 16 GB hard disk, Windows XP
  • 2010 – Gateway PC, 2.93 GHz i3 CPU, 6 GB memory, no floppy, 1TB hard disk, Windows 7
  • 2017 – ?

Color Computer II Emulator (Mocha)

Mocha CoCo II emulator

Color Computer II Emulator (Mocha) … check-out early 1980’s computing

The first computer our family owned was a Color Computer II by Radio Shack.  It used the TV for a monitor, had 16K of memory, and could save and load programs from cassette tape.  It also had cartridge games.  We had Popcorn and Stellar Lifeline.  I spent many hours typing programs from Rainbow magazine.  The computer only used UPPER CASE letters.  Programs were written in BASIC using line numbers.  You had to type “RUN” to execute a program.  You typed “LIST” to see your programming statements.

There is a great on-line emulator called Mocha.  It even  includes many of the games that were available.

parallel processing with CUDA #1

This summer I am working on a small research project on parallel processing using nvidia CUDA. I purchased a nvidia CUDA enabled GTS 250 graphics card. While I anticipated the need for a larger 600 watt power supply, I did not expect the card to hit against my CPU heat sink. I have ordered a new motherboard which should eliminate the problem, but it is on back-order from Tigerdirect. Paul has suggested that I use a Dremel tool to solve the problem … I think I will wait.

In the mean time I have spent the past few days listening to lectures from a spring 2009 University of Illinois course exe496 Programming Massively Parallel Processors. Audio of the lectures as well as slides are posted.

I have also run several sample programs using the emulator under Visual Studio 2008.

As always I find myself learning more than I first intended including a quick review of matrix multiplication and the bitonic sort.

Stream music to your desktop with Pandora

One of my favorite new sites (Thanks Paul!) for 2008 was Pandora (see www.pandora.com).  Pandora will stream customized music to your computer (or iPhone).  Enter the name of your favorite music artist or song and it will create a music station  that matches this style of music using data from the Music Genome Project.  You can add multiple artists or songs to “fine tune” your station(s).

More on-line storage options

A student reported this week that his “back-up” drive had died causing significant data loss. My first thought was that it was not a “back-up”, rather a “main drive”. Either way it is unfortunate, but something we will all have to deal with at some point. It may be time to consider backing up your data on-line. I still use Box.net which offers 1 GB of free on-line storage (see earlier post).

Jungle Disk http://www.jungledisk.com/ from Amazon. Current prices are .15 per GB per month, .10 per GB to upload, .17 per GB to download. A one time fee of$20 applies for the software. All data is encrypted which should address some security concerns.

Oosah http://www.oosah.com/ promises 1TB (yes 1TB) of free online storage.

I have not tried either service.

-Prof. Lehman

Java Memory Size

This summer I was running Java programs that were running out of memory.  By default the maximum heap size for Java programs is 64MB.  You can specify the maximum heap size when running your programs from the command line.  The following runs the class file “classfile” with a maxium of 1024 MB.

java -Xmx1024m classfile

You can also specify the starting heap size.

java -Xms512MB -Xmx1024m classfile

Virtual Desktops for Vista (or XP)

Virtual desktops provide multiple screens for working with applications.  Rather than minimizing and maximizing applications you can keep applications open on separate “virtual” desktops.  This approach may eliminate the need to reposition windows.
An icon is provided in the task bar to allow users to see which virtual desktop they are using and to switch desktops.  Users can also switch desktops using keyboard commands such as <windows key> & <up arrow>.

Most Linux systems provide virtual desktops.  Virtuawin is an opensource tool that provides this functionality for Windows Vista (or XP).  See http://virtuawin.sourceforge.net/

On-Line File Storage

If you have access to the Internet on-line file storage may be an easier solution than carrying an USB drive. Companies like http://www.box.net offer 1GB of free on-line storage space for files. You can pay a monthly fee for more storage. You can make your files available to other users. On the positive side you have access to your files wherever you have an Internet connection. On the down side there are always security/privacy risks when you store your files on-line.

Learning Java …

How do you learn something new? … especially something that seems rather confusing and complicated? Learning how to learn is essential when working with computers and technology. Rarely is there a book, web site, course, or person that can explain everything that you want to know. Really learning something takes a lot of effort on your part, reading books, asking questions, and trying it. You almost always have to learn more than you may have wanted to.

I am currently teaching an introductory programming course that uses the Java programming language. So how can a student begin to learn Java (or any new concept)?

A good first step is to read a book. You may need to read a chapter two (or even three) times until you begin to comprehend the material. In reading the text you need to try the examples. Most authors will provide the source code to their textbooks so that you do not need Once the example is working (it may take a while just to “run” the example) you should modify the examples to verify your understanding of the material.

There are hundreds of Java books in print today. Finding a second book (or third or fourth) is also helpful. Take “field trip” to your local bookstore and browse the selection of books on Java. You should quickly find that some books “speak your language” better than others. You may also find on-line textbooks helpful such as Bruce Eckels “Thinking in Java, 3rd Edition” or David Eck’s “Introduction to Programming Using Java”. The bottom line is “Don’t be afraid to look at more that one book”. Most libraries also have Java books. When I am learning a new programming language I try to read as many books as possible on the subject.

Taking a course can help to structure your learning. In addition to reading the recommended text, make sure that you try the examples given during class. Instructor’s will generally cover examples that they think will help you learn the material. These examples may not be part of the textbook. Make sure that you take notes during class and ask questions. Don’t be afraid to ask questions when you do not fully understand something.

When writing programs work incrementally. Start with a program shell, in other words the bare minimum amount of code needed for the program to compile and run. Then begin adding features to your program. Compile and test your program as you go. I often see students type their entire programs and then try to compile and debug their code. This rarely works well or takes an incredibly long amount of time. If you find that your program will not compile, start commenting out code until it will compile.

Add comments to your program as you type your code. Rarely will you want to go back and add them. Labeling bracket can be useful to new programmers to prevent errors. Format your source code with proper line spacing and indentation. Many IDE’s (such as eclipse) will have this feature built-in.

Make sure you understand what you trying to accomplish. Many programs can be understood in terms of Input, Processing, and Output. Input happens first, then Processing, and finally Output. Know what you are trying to accomplish. A little bit of planning will go a long way. The worst possible way to complete a programming assignment is to “start typing”. Spend some time understanding the problem and designing your solution. Define the steps you will use to solve the problem. Define the variables and structures you will need.

The more books you read and examples you work with the better your understanding will be. It takes time. Tiger Woods has spent hours and hours on the golf course perfecting his game. He didn’t just sink one put and say “I got it”. He keeps practicing …

Learning how to program can be very frustrating at times. I remember spending an hour and a half on a True BASIC program where I had used the word “imput” rather than “input”. The more you program, the better you will get at finding errors. Think like a detective. Try to narrow down where the error might be. Verify the value of variables as you go with print statements or by using a debugger. Marathon programming sessions are usually not as productive as working a little bit at a time.