Archive for the ‘Computers’ Category

My Daughter’s First Program

My daughter has been expressing interest in learning “how to program” for a couple of weeks now. I’ve attempted to narrow down a little bit what that means to her: Windows programs? Web Programs? Web Pages? Flash games? The computer technology world seems endless at this point–and that’s coming from someone who earns his living in the industry. Perhaps that’s a little bit of my problem–I see too much possibility in the request to learn “how to program”. She really wasn’t able to narrow it down much at all because she is at that age where she is interested in a great many things. And she’s bright enough to grasp real programming concepts, and as a result, the technology world really is wide open to her.

A couple of weeks ago, I went looking for resources to help teach a kid about real programming. I decided to start where I started–BASIC. I learned to program in basica back in the early 80s. I figured VisualBasic would be a good place for her to start. Fortunately, Microsoft makes VisualBasic Express available for free and even has an e-book VB for Very Bright Kids.

Today we started working through the first couple of chapters. The look on my daughter’s face when she ran her first program–the modern equivalent to “Hello World”, “PleaseSayYo”–was priceless. Here, for posterity, is her first program:

Imports System

Class PleaseSayYo
Shared Sub Main()
Console.WriteLine(”Yo!”)
Console.ReadLine()
Console.WriteLine(”Barack Obama is Prezident!”)
Console.ReadLine()
Console.WriteLine(”I didn’t Like McCain.”)
Console.ReadLine()
Console.WriteLine(”Got to go. Bye!”)
Console.ReadLine()
End Sub
End Class

We’re continuing to work through the topics, covering classes, objects, properties, methods, and even subroutines. To help explain subroutines and parameters, I helped her re-write the above using a subroutine:

Module Module1
Sub Writeandread(ByVal message As String)
Console.WriteLine(message)
Console.ReadLine()
End Sub
Sub Main()
Writeandread(”Yo!”)
Writeandread(”Barack is President!”)
Writeandread(”I didn’t like McCain.”)
Writeandread(”Got to go. Bye!”)
End Sub
End Module

She’s very excited–much more so than I would have thought she would be. I thought she would get frustrated at not writing a new Club Penguin in 1 hour or less. But she is, for now at least, completely immersed.

 

Using winscp to back up my mom’s files

My mom has a computer, but it has been years since I encouraged her to have any sort of data backup plan. I have two low-cost, low pain (for her) options for attempting to secure her data.

  1. Plug a USB drive into the back of her PC, and script an xcopy command (or something similar) so that every hour or so, it copies her important files to the drive. This would be cheap (she doesn’t have that much data), and pretty easy. The solution would protect against drive failure, but not against robbery, fire, or flood.
  2. Use winscp to securely copy her files over her internet connection to my NSLU2 network storage. This is more complicated, costs nothing but a bit of time to figure it out, and protects against all possible forms of data loss (unless our whole city is consumed with a fire or flood).

Since I’m already sharing my NSLU2 with Skippy, and I’ve got way more space than she’ll ever need, and I like a bit of a challenge, I’ll go with winscp.
Some pre-requisites that I’ve already got set up:

  • NSLU2 running Unslung.
  • Use OpenSSH for remote access.
  • Forward a port on my router to the OpenSSH port on my NSLU2.
  • Establish an account with a Dynamic DNS host, such as DynDNS.com, and set up my router to check in with DynDNS to update my IP address periodically.

Now, on to using winscp for this application.

  1. Download the “portable” version of winscp and  save it to a new directory. I renamed it from winscp416.exe to just winscp.exe.
  2. Create a new user on my NSLU2 for my mom, and give the account ssh access.
  3. Establish the first winscp session to my NSLU2 to save the security keys: winscp sftp://user:password@host:port
  4. Save that session in winscp by choosing Save Session… from the Session menu. The default name was user@host, and I chose to keep the password.
  5. Create a list of winscp commands, and store them in winscp-commands.txt. The following commands will copy everything from the current directory structure to the home directory on the NSLU2.

    option batch on
    option confirm off
    option transfer binary
    synchronize remote -delete
    close
    exit

  6. Create a batch file, named backup-files.cmd with the following command
    winscp user@host /console /script=winscp-commands.txt
  7. Set backup-files.cmd to run as a scheduled task.

The “synchronize remote -delete” command will put all files from the local directory into the remote directory, deleting any files on the remote that have been removed from the local.

It is also possible to add multiple synchronize commands to this file, but be careful, because the remote directory must exist for the sync to work. For example:

synchronize remote -delete “c:\documents and settings\me” /user/my_stuff

will only work if the directory /user/my_stuff already exists.

 

Installing ReactOS on VirtualBox

Installing ReactOS on VirtualBox couldn’t be easier, and really couldn’t be much faster.

  1. Grab a copy of the ReactOS Install CD ISO. Unzip it to your favorite location.
  2. Launch VirtualBox, and create a new virtual machine. The name of the new vm is up to you. Set the OS Type to Windows XP.
  3. I used 256MB for base memory.
  4. Create a new Boot Hard Disk, dynamically expanding, with as much space as you want. The final install size for ReactOS v 0.3.4 is only 94MB. I chose 2GB.
  5. Add the Install CD ISO to the vm.
  6. Start your new vm and begin the ReactOS install process.
  7. Choose your language.
  8. Choose your hardware settings (PC or multi-processor PC, display, keyboard, keyboard layout).
  9. Partition your disk (or just use the whole disk, since its virtual, after all!)
  10. Choose to format your disk FAT (not quick)
  11. Choose your install directory, or just leave the default \ReactOS.
  12. Since you’re doing a virtual machine, install the bootloader on the hard disk.
  13. Reboot the machine.
  14. When the machine boots, it will automatically run the ReactOS Setup Wizard.
  15. Acknowledge the license and “shoulders”.
  16. Give it your name and organization
  17. Specify the computer name, and administrator password. The password, at this point, is optional.
  18. Change the system locale settings if you want. Change the keyboard layout if you want.
  19. Change the date and time if you need to, as well as the timezone.
  20. One more reboot, and your ReactOS VirtualBox is DONE!
  21. When mine first came up, it wanted to install a driver for “System Device”. When I chose to install it automatically, it failed to find the driver. It didn’t seem to be a big deal.

Clearly, this is still a very early release. It is “still under heavy development”. But I must say that it is promising so far. I could see this going a long way to capture much of the hobbyist and embedded device market.

 

Stranger Photos

I love this idea: tie a camera to a public bench, with a note instructing people to take pictures. Retrieve the pictures to see what people did.

http://theplug.net/28/strangerphotos.htm

It would be a fun project at Chautauqua, especially if the sign had a URL where people could go see their and others’ photos. Chautauqua is such a trusting place, I could almost do it with a digital camera.