Java and Eclipse and Linux… Oh, my!

I have been flipping between Windows and Linux for quite some time now and I’ve finally decided to stick to Linux for the remainder of my “vacation”. I’ve been looking into object oriented programming for a while. I think it’s time I either get serious about technology or get out of the sector.

Java offers a unique opportunity. Sun has announced plans to open source java and it is beginning to take shape. I think this will help guarantee it will be around a while. On top of that, Java and C# share a lot of similarities so it won’t lock me in to one language for life. I find I actually use more Java based programs than C# based. So, I began looking into learning Java and found that it is a real pain trying to get any software in this part of the world. I plugged in my linux hard drive and found that I already had Eclipse installed (an open source IDE (Integrated Development Environment)). Next thing I knew, I had everything in front of me to begin coding away. The best part is, it is all free. Free as in beer. Free as in speech.

A little searching on the web found a plethora of Computer Science courses related to OOP and Java. And people wonder why I love the internet and open source so much.

Software for CTARNG

The other day I was contacted by a Cpt Miller with the Connecticut Army National Guard (CTARNG). It turns out that the entire CTARNG uses the program I wrote called Active Directory UserMod Assistant. Cpt Miller needed some modifications made to make it work in his environment. I was able to help him out with his mods. It was a bit odd getting a request like that in Iraq. He didn’t know I was here but it was nice knowing that the program I wrote is helping out the Military.

The tricky part was coding without Active Directory and without any of my reference materials. The changes he was looking for were fairly trivial. I was just excited to do some actual work on a computer besides another roster in excel.

DevCon: Rescan for Hardware automatically

I’ve been having a strange issue with a PCMCIA card on my wife’s computer. Every time the machine is rebooted, you are required to “Scan for Hardware Changes” in device manager. It does not automatically detect that the PCMCIA card is still plugged in. After searching google high and low for a solution, I thought about seeing if I could write a script that would automatically run a hardware scan at logon. Here is what I came up with:

  1. Download DevCon.exe from Microsoft: DevCon.exe
  2. Extract either the 32-bit or 64-bit executable to C:WindowsSystem32
  3. Create a file called: “devcon_rescan.cmd”
  4. Put the following text in it:
    @echo off
    devcon.exe /rescan
  5. Copy the file to C:WindowsSystem32
  6. Open the registry editor: Start –> Run –> regedit
  7. Go To: HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun
  8. Create a new string value called: DevCon
  9. Right click the new value and select Modify. Type in the path to the batch file you made (i.e. “C:WINDOWSSYSTEM32devcon_scan.cmd”)

Hope this helps somebody.

AD UserMod Assistant 9.0

I finally got around to the latest version of adumass. This was a major release as it fixed some pretty serious bugs and also greatly improved the UI and backend code. I also added a few functions for data validation. Thanks to all those that have helped and submitted support requests. The next version should have a translation pack for those users that don’t habla englais.

Another Fedora Post

So, I am pleasantly surprised with Fedora 8. This has to be the best release yet. So far, the only thing I am missing is Cinelerra. I’m having some dependency issues with the freshrpms repository so I guess I just need to compile from source. The only other issue I have had is with NetworkManager-vpnc. Removing NetworkManager and reinstalling it form the development tree fixed the issues. I check the changelog and it looks like the fixes should make their way into the tree.

Other than those little things, everything works like a top. I am constantly amazed at the quality of software put out by the community. It’s too bad more people don’t see what OSS does and can do for them. I can’t thank the community enough. With their help, I’m able to do everything I could ever imagine on my pc (and more). They are the ones who have and will be helping me keep in contact with my family while I am deployed to Iraq. Thank you!

Finding Anonymous Proxies

I just ran across a great cgi:perl script for running anonymous proxies. Its called CGIProxy. An easy way to find it around the net is to google: nph-proxy. Also, here is a link to the home page for the beta version: CGIProxy Beta.

Fedora 8

So, I can finally start getting my systems ready for my upcoming deployment. Today, Fedora 8 was released to the masses. It took me a good 15 minutes to find an FTP server that had actually sync’d (ftp.fi.muni.cz). I was actually surprised to find it still had bandwidth. As the morning has progressed, the mirrors have progressively become bogged down. Sucks for them! I got my copy! I hate to leech but I can’t use bittorrent at work so I guess that is my only option.

My goal is to get a steamlined Fedora 8 install setup with all the perf tweaks I can. This is going to be my home away from home while I am gone so I want to get it setup as nice as I can. I am going to try putting a lot of software on it so I can evaluate the many applications I have never had the chance to.

It’s time to burn a DVD. I’ll be writing about Fedora 8 a lot so stay tuned if you are interested. BTW, the hardware I am running it on is a Dell D610 w/ 1.5GB RAM and a 200GB 7200RPM disk. Nothin’ too out of the ordinary.

Wikipedia in Schools

I was on my daily (actually, more like hourly) visit to slashdot and was amazed when I came across a story mentioning a school I had attended. The story was on the use of Wikipedia as a means for students to submit their research papers. This is one of those things that seems so obvious. Yet, this is the first time I have heard of it. What happens to normal term papers? They get graded, returned to the student and thrown in the recycle bin. If only more educators would embrace open sharing of knowledge and ideas, these type of ideas would be mainstream. There is a real hatred in academia of wikipedia, especially as a source. It always stuck me as odd. The whole premise of what wikipedia is and why it has become a staple in internet society seems to be much of what educators preach. Yet, they seem to scowl at the mention of wikipedia.

A lot of the comments left on Slashdot had some great ideas for educators.

  • Have students update wikipedia articles with citations and corrections
  • Have students submit articles for peer review by thousands instead of just classmates
  • Have students expand on stubs or missing information in articles

The interesting piece of this all is that academia is already required to publish much of their students work in journals. However, journals do not offer the freedoms that wikipedia does. Wikipedia separates rich from poor, haves from have nots. It allows anybody with internet access a portal for finding solid, general information about a subject. It cites references for further research.

My personal belief is that the distaste for wikipedia in academia is not because the information is not factual or inaccurate. It is because students (and people in general) have a hard time deciphering fact from fiction. It takes a certain amount of effort to actually look at something and decide whether the information can be taken for fact or should be looked into further. This is just the same for journals though.

Teachers should spend more time teaching common sense… If that is possible.

VBScript: Delete Files Older Than One Hour

So, I am constantly looking for ways of automating tasks. Too many admins do not take advantage of scripting and scheduled tasks/cron. Just this last week, I was implementing a new print server. Besides just building up the new server, I wanted to actually offer the users something new and useful.

I’ve been wanting to setup a network pdf printer for quite some time. I have played around with setting up a network PDF printer using cups. However, we seem to be so MS centric these days that I decided to use PDFCreator‘s print server. It was really a piece of cake. Just install the server portion, setup the service, create a share and watch the PDF’s spool.

I quickly found that the folder where PDF’s were written to, was quickly filling with PDF’s as users were not removing them. So, the solution was to write a little vbscript to purge any files older than an hour. There were two things I wanted:

  1. I have a file named “!FILES ARE PURGED AFTER ONE HOUR!”. I did not want this file removed. It serves as a warning for uses.
  2. I did not want to purge the folder every hour. I wanted to remove any files that were one hour old or greater. That way, if a user creates a PDF at 2:59pm, the 3:00pm run won’t delete it. It will be deleted on or after 3:59pm.

Here is the script I came up with:

strFolder = "C:Folder"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")

For Each strFileName in objFolder.Items
    If len(objFSO.GetExtensionName(strFileName)) > 0 Then
        Set objFile = objFSO.GetFile(strFolder & strFileName.Name)
        If DateDiff("N",objFile.DateLastModified,Now()) > 59 Then
            objFSO.DeleteFile(strFolder & strFileName.Name),True
        End If
    End If
Next

The great thing about this is that you get a free network PDF printer that can be left alone. Your boss thinks you are a genius and there is no sweat on your brow.

Cheers!