Archive for September, 2008

Lewies Random Face Generator

Sunday, September 28th, 2008

This is fun stuff to dig around in old archives. Half the time I feel like I’m looking into the history of someone else. One little project that I found was my random face generator. I created a few different images for heads, a few for eyes, nose, mouse, eye brows, hair, and ears. From there, I was able to use DHTML to layer them all together. What resulted was a quick way to make silly little faces randomly.

lewies-random-face-generator.png

There is room for improvement though. From what I have learned over time, this could have just been made with 7 images (one for each type of layer) using clipping and positioning. In addition, it is done with VB Script. It isn’t hard to convert to JavaScript, but there are also browser compatibility issues to address. I think this was more of a working example of what was possible to eventually allow players to build their own avatar for a web-based RPG. I never did get around to actually making the RPG game, but mostly did a lot of experimentation with different ideas and concepts.

Playing the FLIC video format

Sunday, September 28th, 2008

Digging through some of the old archives that I found in my backups, I stumbled upon a few of my files that I used in the Art Institute of Pittsburgh. Back in 1995, I was using 3D Studio Release 4 (3DSr4), known today as 3DS Max. Some of the files had FLC and FLI extensions (Flic Format). I knew that these were movie formats, and I decided to see if I could find something that plays FLC/FLI files. One of the programs listed that could play the format was shockingly, QuickTime. I opened the file with QuickTime and it played both formats just fine. I wonder if these are similar to the FLV format that is popular with flash videos on the internet.

I am uncertain as to what the differences are between each format. I think it had to do with quality. The FLI format was probably something I ran through to see results quickly, and FLC took longer to make. The school actually had a network setup where four computers would work on making animations for students that were working on their final projects. Back then, it took a long time to render scenes with the small computing power at the time. I think my cell phone runs faster then those things.

I found a Fli2Gif converter that was able to convert some of the files. It complained with other files with “Wrong number of bits in flic. Only 256-color (8-bit) flics are handled. I suppose that this has to do with some of the features that were offered to render pictures quicker by using less colors. I notice that the file sizes of videos that I was able to convert to GIF are actually about 33% smaller then the FLC/FLI images themselves. Here are some test projects that I had made as well as my first animation assignment of a sink. The teacher commented that the light source was pretty good. I guess most of the students didn’t get the concept of light back then.

lewie6.FLI (didn’t convert)
lem.GIF
lem.FLI
Initials L.E.M. cut out of each side of a cube. Learned about union and subtraction.


sink_001.GIF
sink_001.FLC
Rotating sink project with light source.

dsoftwar.GIF
dsoftwar.FLC
– words “Dragon Software” made into a revolving ring. Learned about lofting shapes.

So what happened with my 3D skills? I had made a lot of projects at home while I was not in school or working. Eventually I couldn’t make it own my own with a minimum wage job and ended up going back to my parents house with my tail tucked between my legs. My computer in the back of my moms truck exposed to the elements and without any soft materials to avoid vibrations.

I ended up with a corrupt hard disk losing lots of work – including the 3DSr4 software. The disks that I had at the time to install the program had problem with installing a file. Not only did I lose my ability to make it in the world, but I had lost just about everything I was. I eventually made it back on my own again and found other programs that I could afford with my own money and without a student discount. 3D artwork and animation is more of a hobby now. I can make a few simple things, but I don’t spend months going into detail and perfecting it. I primarily use Second Life as my 3D editor these days.

I only have a small handful of scenes, lofts, objects, textures that I was able to save to floppy disks before the big move.

Restoring windows while retaining user files

Sunday, September 28th, 2008

I’ve been doing so many things at once this weekend. Besides organizing and backing up a ton of computers, writing software, and learning how to get a media server setup, I’ve also been playing PC Doctor.

As my wife was starting to work with her new computer, her old one unexpectedly stopped working. The computer would take a long time to go from the boot menu to the progress bar, and then reboot. I took a look at it myself and noticed that the windows logo startup showed for a brief moment followed by a blip of a blue screen of death (BSD/BSoD). The computer did not have a floppy drive, so I couldn’t run a scandisk through a dos boot disk. I quickly searched for the ultimate boot cd and downloaded a copy. Surprisingly, Microsoft Vista doesn’t have a way to burn ISO images to CD or DVD. I downloaded and installed the ISO Recorder software.

I went through a lengthy check on the hard disk and found a little over 100 bad sectors. A few popped up before the progress bar reached 1%, and I just had that feeling that those were system files. The system files are often at the beginning of the disk for quicker access. They are often the first thing installed on a disk as well, so the chances increase that they would be near the beginning. The diagnostic utility hung at the start after finding four errors. I had to reboot and run it again, and then catch it just after the 4th error and tell it to repair itself. I ran the diagnostic again and it got past the blocks that it was hanging on. None of the other errors had this problem.

After all was said and done, the operating system seemed to boot much quicker. Rather then taking 10 minutes to load up and crash, I was crashing in less than one. This pretty much led me down the path to restoring the system. Fortunately the computer had a restore feature that retained all user documents while reinstalling the operating system. It’s not the OS that my wife is used to. It’s more of a factory default ugly looking thing without personality. However, she may be able to get into it and access her old files again to transfer them to her new PC.

File Tree Copier

Sunday, September 28th, 2008

As I use this little utility that I made on each computer system, I find the need to add more features, handle specific scenarios, or simply fix bugs. The software is actually becoming very stable and flexible. The latest changes to it are:

  • Add the ability to cancel what it is doing.
  • Disable “Copy” button, and make all text fields read-only.
  • Show a list of stats (File total/copied/skipped, folder total/copied/skipped, error count)
  • Add error handling on everything.
  • Remove stack-trace in output since it doesn’t really help with anything.
  • Provide ability to start half-way through the job.
  • Give status messages of what is going on.
  • Only list file name instead of full path with each file.
  • List the folder path above the file.
  • Change the layout to be more friendly with very long file/folder names.
  • Change how files are retrieved/compared from destination to get list all at once rather than individually.

File Tree Copier Screenshot

I’m debating if I should sell this thing for a few bucks. It is a useful utility that has probably saved me hours of head-ache with normal windows copy/paste operations over the network. I admit that I’ve been copying hundred of Gigabytes, but perhaps someone else would find it useful as well.

One interesting thing that I saw is that regardless of connecting through the Wirless or wired LAN, the destination seems a bit slow. Not by much I guess. I’ll need to find a way to measure the transfer speed between each computer and the NAS to be certain.

After everything is copied to the NAS, the next step will be organization. Part of this would involve comparing files to find duplicate information. I am sure that another utility will come about from this adventure as well. I guess I should start looking into making a website of some sort to make these utilities available.

Tic-Tac-Toe

Saturday, September 27th, 2008

In the game of tic-tac-toe, a single row has many different possible states. Each cell can either have X, O, or remain blank. It is a trinary number system. The number of unique states in one row is 3 to the power of 3 (3*3*3), or simply 27.

I am looking into this because I am interested in making a game of tic-tac-toe in an environment where image size and count mean everything. The less data that is needed to be transferred, the better. I could create an image for the entire grid, but that would result in 3 to the power of 9 images (19,683 images). I could dumb it down to just 3 images of an X, O, or empty spot, but the format of what is available would require me to use more resources to display 9 separate images at one time. The optimal method to use limited resources is to display 3 rows as 3 separate images.

I could go ahead and create 27 different images to load up in each row. However, the key idea here is the use less data that is needed to be transferred. My take on it is that I’ll use the same image for each row, but only show part of that image. So if I have an image that says “XXOXOXOXX”, and I want to show “XOX”, then I’ll stretch the image and center it on the “XOX” so that all of the other characters are outside of the visible area.

This is good, but I had one last thing to focus on. 27 different images all streamed together would result in an image with 81 characters. Surely their is a lot of repetitive characters? Take my example: “XXOXOXOXX”. You’ll notice that “XOX” is repeated three times, and “OXO” is repeated twice. I could try eye-balling it to cut it down to size, but we have computers for that sort of thing.

I started generating a random string of ” “, X, and O with 81 characters. As soon as I found a string that suited all possabilities that a row would have, I would generate another random string with 1 less character. It took much longer as I tried to generate less characters. I could only get down to 29 characters “O-OOX-O—X-XXX–OXO-XOXXOOO-”. This was very interesting to me because I was starting to see a significant pattern here. 29 is very close to 27, and as I noted earlier, the total number of possible combinations is … 27.

Doing the same for 2^2 is something I could do in my head. Possible combinations are 00, 01, 10, and 11. I came up with 10011. Only off by one (2^2 = 4), but if I wrap the text to repeat itself, I get “1001″ – 4 characters! Note “11″ is “wrapped” with the two ends. Now, with that knowledge in hand, look at the pattern that I had with 29 characters. Notice that the last 2 characters matches the first 2. From here, I can wrap the text around to reduce 2 additional characters resulting in 27! My final pattern was “O-OOX-O—X-XXX–OXO-XOXXOO”.

This reduces the total size of my image by almost 67%. The “wrapping” effect already happens with images in the environment that I work with and is known as “tiling”. If an image does not cover an entire area, the same image is placed next to itself, essentially causing a tiling effect over the whole area.

The next steps are to actually make the image, detect where a person has touched the game, and map the image to reflect the actual state of the game in each row.

At one point, I did try creating a string of values and incrementing them as a trinary number (—, –O, –X, -O-, -OO, -OX), however this actually took a lot of time to do. After letting it run for a couple hours with no results, I abandoned it all together and went for a randomized “fuzzy” approach. Randomly, I was finding different combinations of 29 characters each in about 2 minutes each. The lack of speed may have been because I was dealing with strings rather then an array of numbers. I’ll look into different possabilities next time.

Memory Transfer

Saturday, September 27th, 2008

Last week, I got a network storage system (NAS200). I have since set it up to be RAID 1 with mirroring. During the setup process, it asked if I wanted to enable journaling as well. I had no idea what journaling is and had to look it up. Apparently, journaling lets you do atomic transactions with file writing. If the power goes out or something happens in the middle of a transfer (or deleting a file), you are safe. The file does not fully transfer/delete. This is good because if you have partial data on a disk and the disk is only … partially aware of it, it could end up being overwritten, or simply not show up and not be available for writing over either. Naturally I turned it on.

Backing Up

I’ve been spending a lot of time organizing files on a lot of computers. I’ve been using DiskPie 2 and Sequoia View. Both are free programs, however DiskPie 3 (Pro) does cost a few dollars if you want to go with the latest program. The programs help me visually identify large files on my file system, as well as large directories and file types. Each has their own strengths allowing me to trim many gigabytes from my HDD’s.

After trimming the fat and organizing files, I then face the long backup process. I use a tool that I created for retrieving files from my old 250 GB HDD. It appears that it comes in handing going the other way too. Any time that the program fails, I simply restart it again. It recognizes files that were already transferred and skips over them. Really handy!

Problems Encountered

So the problems I’ve been running into are few. Wireless networks are also pretty slow. However, I use what I have to get the job done. Wireless networks appear to “forget” they are connected to a network. They seem to drop off every now and then. This results in me having to restart the copy process to ensure that all files are transferred. My little tool tells me when their is a problem such as a network path not being found. One computer kept knocking itself off so often that I had to continuously monitor it and check up on it every 15 to 30 minutes. Another computer wouldn’t stay connected at all and I had to physically migrate the thing near my router to connect over the LAN.

Old computers take a lot of time to use the other utilities (DiskPie/Sequoia). One of the older computers only had a 75 GB drive, and at the time of purchase, that was considered excessive. The majority of the drive is full of MP3’s that I ripped from most of my music collection. The tricky part of this is that collection has migrated over to my other computers that I backed up, so I have a lot of duplicate music. That music is mixed in with “protected” music as well, so I hadn’t tried separating the protected music from the original music. In addition, the original music has since been converted to AAC format to take up less space. On top of that, the newer AAC format has additional information such as ratings, completed information about each track, artist album, and album artwork. It took a lot of time to get all of that setup.

Eventually I’ll have to find the duplicated music and consolidate them into one complete library. For now, I’m making separate folders on the NAS to identify what computer that each backup came from.

Some computers contain backups of other computers. These are not simply just “My Documents” and “Desktop” files. I used software programs (such as Norton Ghost) to do full backups of hard drives. Although the computers are no longer operational, I need to find a file reader for those old backups and see if their is anything worth saving.

I’m only halfway through all of this. I’ve backed up seven computers (3 are virtual/non-existing). I have 3 more computers to backup. I then need to reorganize and consolidate those backups. I’ll also need to wipe out the old computers and set them up for “my master plan”.

Master Plan

I primarily want to setup a development environment. I would like to setup the following services: email, MS SQL, MySQL, Oracle, PHP, ASP.Net + Remoting on a second tier, and SVN. Many of the services could be consolidated to run on the same machine. Perhaps all of them. In addition, I would also like to have a dedicated server for OpenSIM.

School, Marriage, Networking

Monday, September 22nd, 2008

Back to school

After a few weeks of no school, it started up again. My image editing class started two weeks ago, and my algebra class started this past week. Algebra is kicking my butt big time. I had to stair at an example of dividing polynomials with binomials for what seemed to be an hour before things started clicking.

Multiplying polynomials seems to be tricky a few times as well. I feel like I understand how to do it, but the problems in the test were setup like trick questions to fool you. The test is automated as well. It complained a few times that “Although your answer is correct, it is not in the correct format”. What? Half the time I felt like just tossing in the towel. However, these are the last two classes that I need before I can get an associates.

The first algebra class I took last year was easy compared to this, and just needed me to create a word document with both my answers and my work. I don’t like this math lab thing at all. I can’t set it up to worth through problems and verify. At the end, I got 43 out of 48 problems correct after three and a half hours.

Marriage
My sister in-law got married today. I think I figured out why the grooms family sits on one side, and the brides on the other. It’s pretty much so each family can see that the “new addition” is really committed and in love. I couldn’t see my sister in-laws face, but the groom was really joyful, happy, in love, sincere, and just looking forward to the future. It made me remember my wedding and everything we encountered, that they too will run into during their lifetimes.

Networking
I flashed my router (WRT310N) with the latest firmware (v1.00.4). Apparently it is supposed to be just bug fixes including a Vista compatibility issue. I finished recovering all the files from my old USB 250 GB HDD and hooked it back into the slug (NSLU2). I’ll probably bring the drive into work on Tuesday to see if the network admin can help me crack it open and run diagnostics such as spinrite on it.

I have some new HDD’s comming tomorrow for the NAS200, so I’ll be able to transfer the extra data I backed up to my PC over to the new storage once it is hooked up.

Last thing is my wife started setting up her new computer. We had some trouble hooking it up to the network directly through a network cable. I installed the wireless card (WMP300N) that I had originally purchased for it and it hooked up just fine. She’ll be able to download updates and get everything patched up. The trick will be to figure out how we will transfer files between her two computers. I may just make use of one of the old USB external HDD’s that my brother handed off to me last weekend.

NAS200 Arrival

Saturday, September 20th, 2008

Today I got my Linksys Network Attached Storage device (NAS200) in the mail. I got it for just under 99 US$ through mwave.com. This NAS200 will hold a terabyte of data. I have two Seagate 500 GB SATA 3Gb/s HDD’s coming on Monday that I ordered for 72 US$ each through MemoryLabs.com. I will set them up as a redundant array of inexpensive disks (RAID) with mirroring (RAID 1). This will let me mirror one drive onto the other. If one drive fails or becomes corrupt, the other will still permit me to keep on working. I will then be able to purchase a new hard drive and rebuild the array when it arrives without any down time!

Previously, I had a Network Storage Link for USB 2.0 (NSLU2). This is more commonly known as a slug. The NSLU2 is also made by Linksys and is the predecessor to the NAS200. Actually, there was a EFG120, but it was limited to 120 GB of storage (with ability to add an additional 120 GB drive). I had purchased the slug after my brother gave me a 250 GB USB HDD from I/O Magic (I250HD35).

The HDD is pretty much failing. I can read from it for 10 seconds, and then it takes 5 minutes before it continues to let me read from it. The process repeats itself and the times are not always exact. It’s simply very short read, very long pause. I found a EXT Installable File System (IFS) driver that let me read the drive’s EXT3 file format through windows. Again, I had the same problem. Read for a little, wait for a lot.

I tried to copy the entire contents to a folder on my computer. After a few hours, I looked and noticed that the dialog stated it would take two weeks before it completed the copy process. That was a little unreliable. Many things can happen in two weeks, and I wouldn’t know what files were and were not copied if anything interrupted the process.

I created a small program to scan through the USB drive and compare the contents with a folder on my computer. If a file was missing, it copied it. It appears after five days, I have 72 of 95 GB copied. I have had to stop and start the program a few times, and was grateful that the tool was able to skip over files that were already copied. I found that the .Net framework has a flaw in its’ System.IO.File.Copy method. It assumes that the source is a windows file system. I ran into a problem trying to copy a file path that was longer than 247 characters. It is not possible to have such a long path in a windows partition such as FAT or NTFS. EXT3 however does not have this limitation. I assumed I could copy the file and paste it with a truncated length to fit within the 247 character limitation. I was wrong. The source of the Copy operation is also restricted to 247 characters.

The end result is that I am not able to copy these files. After all the data is retrieved, I will go back and manually find these files and copy them through a Linux OS. I’ll also be working on CRC or some kind of data integrity check to verify that the files copied are intact.