February 28, 2009

Applet ProgressBar Flickering Issue

I had recently taken the the time to convert my EpicGame Code from VB to java, so I could make an applet that could be played online. (I was lazy and did not want to make it flash based) However after finishing it and testing on the mac side I though I was finished. Yet, later I started hearing complaints of the game flickering, I was confused as it worked fine for me and as usual I had double buffering setup, which in theory would prevent any flickering. Still, for some reason Window's version Java would flicker uncontrollably. I spent several hours trying different graphics buffering setups and also drawing to separate panels, but with no success.

Luckily I randomly stumbled onto the problem, it was the JProgressBars that I was using. When you update a value in the progress bar it calls the update method that then calls paint, which would happen concurrently mid screen refresh and draw a blank white screen, which was the rouge flickering.

So on Windows do not use JProgressBars with animation as it messes it up, or you need to extend the class and override the setValue method so it does not update the UI. Oh, and of course on the Mac side it all works flawlessly from the start.

February 11, 2009

Samsung CLP 500 Network Driver

One really annoying issue I have run into while working at CADY is that older Samsung printers do not have much... or any support, namely the CLP 500 series that is in the office. As it was my first job to get it up and running it took me a while to even find a driver for it.

For my own convince and others I now have it saved here -> CLP-500Series_1.84.exe.
Please click my ads if you find this useful, as it was a huge pain to find!!!

The next issue is that it does not have any network support, well not documented at least. The printer does have a network card in it, so it must work on a network. I have just been spoiled by HP as their network printers do the network settings at setup. So,to get the CLP 500 printer working on a network you have to do a few extra steps.

1. Install the driver, this will put a generic printer in your list, however it is set up on the wrong port.

2. Open the printers/faxes window then right click on the printer and select properties.

3. Click on the ports tab and hit "Add Port", then select Standard TCP/IP port and hit "New Port".

4. Follow the wizard and enter your printers IP, found by printing the printer config page in the printer information menu, and a name if you desire. Hit next...

5. On the next page leave it as Standard and Generic Network Card, then hit next and hit finish.

6. Check to see the printer is now selected to use your new port, which it should be. Apply and/or close the window. You should now be all set.

I highly recommend setting a static IP for your printer, otherwise you will need to update the port every time the printer gets a new IP.  (CADY Printer is 192.168.1.47)

UPDATE:
Win 7 steps...

1.  Use the add a printer option.

2.  Select Samsung instead of TCP/IP

3.  Update Printer Drivers from Microsoft

4.  Use the CLP 510 Driver

February 10, 2009

KavaTunes

Matt clued me into an interesting piece of software called KavaTunes last night. He found it on the Mac Heist website as one of their free software titles when you solve puzzles in one of their yearly heists. I was not interested at first, however after watching him for a bit, I quickly wanted a copy as well. What KavaTunes is, is a piece of software that builds a php page of your iTunes library, but to take it a step further, it even looks like your iTunes library! This may be the simplest way to get access to your music on a local network, and on the campus network it is a perfect solution.

Oh course my g4 server is my test bed for playing with things and has a custom apache and php setups, so unlike Matt I had quite a bit of extra trouble with the setup. (With Matt laughing at the issues I was having the whole time ^_^) First off was that KavaTunes always builds in ~/Library/Webserver/Documents/ however I have a custom webserv folder instead, so it took a while to figure out why it was not building in the right place, but a symbolic link fixed that. Then do not call your iTunes music folder iTunes as KavaTunes adds a another separate folder under this name with its required php files. And lastly do not mess up your symbolic links, as it just causes a general mess. After about 30 minutes of bug fixing, which would have been nice if it gave you some warning about these things, I was up and running. It even streams my movies and tv shows I have on iTunes.

If you are interested grab a copy from Mac Heist

February 7, 2009

Smallest CRT ever!


I was taking apart a Hi8 camera to start my next project of better night vision goggles. However after taking apart I was very amused to find that the small viewer was not an LCD, instead it was a tiny CRT! See picture above, with a quarter for size comparison. Yes that does mean that this has a flyback transformer that runs on 5v.

February 1, 2009

Behavioral engineering

It is always fascination to see how people will react to certain changes. In my case, it was people walking through the covered doorway to the apartment. Normally I would not be bothered, however there is a window there as well, so it is a huge loss of privacy. So my first attempt was to forge a side path, sadly it was nowhere near as convenient as the straight shot that was already there, so almost no one used it. Quite frankly I would not have either, so it was no surprise.

Thus, next was to cover the path to force them away. However I had to plan it carefully as if not done correctly it would simply be removed, or even worse get a large number of student angry. So step one was to change with out anyone noticing. This would leave the least impact and the confusion with the change would drive people away instead of taking action. Next was to make the pile just big enough that it would not be easy destroyed, but not large enough to show it was put there on purpose, physical plant was shoveling off roofs, and this would nicely blend in with that reality. So an early saturday morning shoveling some of the snow off the roof accomplished this nicely. Plus I made the side path the most visible choice to limit remembering that the other path was there.

All that was working against my carefully set changes was force of habit, which would be a big factor, people do not like change and depending on how I set this up, could get annoyed enough to remove the change, luckily I have laziness on my side, and with the side path available, I suspected that it would win out in the majority of people.

So my experiment was let to these possible and expected results...
1. People go the long way instead to avoid
2. People go the shot but not as convent side path I made.
3. People destroy the wall and go through anyways.

I expected 2 most of the time and eventually 3 to happen, however the worst that happened was simply a person climbing over it. I was quite surprised my wall survived, however it makes sense, as people are prone to laziness, so instead of taking time to destroy a large pile of snow and putting the effort in making the path again, resulting in the cost of wet and cold, people simple gave up and walked around. I was happy with the results and no one wrecked my wall, plus I rarely get a chance to test out social behavioral theories on so may people so I was excited either way.

It funny how with a little observing, planing and research you can easy change the way people will make decisions and shape how people interact around you.

UPDATE
Scratch that... two drunk girls destroyed my predictions, but lost a shoe! Argh.. outliers, that was not expected, I figured it would be guys.