Measuring Airline Efficiency

May 31st, 2008

I snapped this shot at an airport I was passing through recently.  I could write a lot about my experiences with the airline industry during travel, and I’m sure most of you could, too.  This picture gives a very good general description, though, so I’ll save my words.

Oh, that terminal was still like that when I went back, so I know it took at least two weeks for Windows 98 to shut down on that beast!  hehe

Chaos on the WWW

April 25th, 2008

So I was recently wondering why we’re getting all these strange comments spam that don’t seem to have any point.  One of my fellow technology enthusiasts pointed out that simply causing chaos on the Internet is purpose enough for some.  Personally, I found it hilarious!  He’s probably right, but after seeing this one….

SlotMachines

I suddenly have the overpowering urge to buy a cheap ticket to Vegas and try out my luck!!!

My Adapter Needs….an Ad-ap-ter…

March 25th, 2008

I feel like this is the sort of thing that happens to Austin Powers, not me.  They better not make them any smaller.  Seriously, this is getting ridiculous.adapters1.jpg

Hackers are so Bitter

March 19th, 2008

While reading up on the dd command at a post on linuxquestions.org

I came across the following tutorial advice:

Ok, say you want to find out if your girlfriend or wife is cheating on you, having cyber sex, or just basically misbehaving with her computer. Even if the computer is secured with a password, you can boot with the:

http://www.efense.com/helix

CD and search the entire drive partition for text strings:

dd if=/dev/sda2 bs=16065 | hexdump -C | grep 'I really don't love him anymore.'

haha, nice try you bitter bag of linux, but you should have used double quotes around the single-quote-containing-string…

This rivals the time I was browsing the online commit log for some software and found buried in one of the commits the comment: “I hate that fucking bitch

How to Find Your IP Address When Drinking

March 15th, 2008

All this was done on the prompt while I was chatting away in a browser…


bkdm@imp:/tmp> wget whatismyip.com
bkdm@imp:/tmp> vi index.html

I also recommend using tab completion to assist.

Phase-Listener Solution to JSF DataScroller Pagination Problem

March 11th, 2008

I recently ran into a problem in JSF with the rich:dataScroller component. Basically, the dataScroller sets an attribute in its associated dataTable component to define which record it should start with. This allows for a simple pagination mechanism. If the dataTable is set to display 10 rows at a time, and it is supposed to start at index 0, then it shows the first page. When the page is advanced, the dataScroller tells the dataTable to start at index 10.

The problem arises when the dataTable is set to start at record n, and the model that it represents changes so that there are less than n records to display. In this situation, you’re suddenly seeing a page for which there are no records to see. You have to page back until you get to the “real” last page. As you can guess, this would probably be quite confusing to the end user.

A bug is logged for this defect here, and a workaround using Seam is described in a link from that URL. Unfortunately, I’m not using Seam and that solution doesn’t work for me. Another user proposed a workaround using a Phase-Listener. That solution did work for me, and I’ll post the details below. Hopefully, this will be useful to someone. If anyone has suggestions for improvements, please comment!

public class RenderResponsePhaseListener implements PhaseListener {
  private PhaseId phase = PhaseId.RENDER_RESPONSE;         

  public void beforePhase(PhaseEvent e)
  {
    //This is where we want to handle the pagination issue
    refreshUIDataFirstIndex();
  }         

  public void afterPhase(PhaseEvent e) {
  }         

  public void setPhase(PhaseId phase) {
    this.phase = phase;
  }         

  public PhaseId getPhaseId() {
    return phase;
  }         

  /**
  * Handles the pagination issue
  */
  private void refreshUIDataFirstIndex() {     

    ArrayList<UIData> allUIDataComponents = Util.getAllRenderedUIDataComponents();     

    for(UIData current : allUIDataComponents) {
      if(current.getFirst() > current.getRowCount()) {
        current.setFirst(0);
      }
    }     

  }         

}

public class Util {        

  /**
  * Gets the UIViewRoot
  * @return
  */
  public static UIViewRoot getUIViewRoot() {
    return FacesContext.getCurrentInstance().getViewRoot();
  }        

  /**
  * Gets all rendered UIData components in the UIViewRoot
  * @return
  */
  public static ArrayList<UIData> getAllRenderedUIDataComponents() {
    return getRenderedUIDataComponents(getUIViewRoot());
  }        

  /**
  * Gets all rendered UIData components in the UIComponent
  */
  private static ArrayList<UIData> getRenderedUIDataComponents(UIComponent currentComponent) {     

    ArrayList<UIData> allRenderedUIDataComponents = new ArrayList<UIData>();     

    if(currentComponent instanceof UIData) {     

      allRenderedUIDataComponents.add((UIData)currentComponent);     

    } else {     

      Iterator componentIterator = currentComponent.getFacetsAndChildren();
      while(componentIterator.hasNext()) {     

        UIComponent nextComponent = (UIComponent)componentIterator.next();
        if(nextComponent.isRendered()){     

          allRenderedUIDataComponents.addAll(getRenderedUIDataComponents(nextComponent));     

        }
      }
    }
    return allRenderedUIDataComponents;
  }       

}

Potential of java2D realized

March 8th, 2008

It’s official, the TUFDefender project is open-sourced! Enjoy the eye-feast here, and look forward to the source code later. (Make sure you click on it and check it out up close… personal)

java2d tufdefender screenshot

File systems, partitions, and raids - lessons learned

February 29th, 2008

Here are a few basic rules I’ve learned about file systems, partitions, and raid devices:

  1. grub error with xfs
  1. It is unusual to boot off of a raid device, and most systems will not do it
  2. Never use reiserfs - he murdered his wife!
  3. Don’t use ext3 for large filesystems with large files (for example, 500gb partition dedicated to a/v media)
  4. There are way more raid levels than necessary. Either go fast, redundant, or spend the $$ for both. That’s three.
  5. Don’t ever try to boot off of xfs with grub
  6. Don’t even try to use jfs, whose support has been dropped by many a distro now
  7. Installations happen faster if you are also watching dragonLance
  8. Always make two swap partitions
  9. Make sure you know how to optimize and properly initialize whatever you do use. For example, make sure it is formatted with a high number of inodes if you expect many files. Or, if using raid, align the stripe sizes to proper block sizes (like 64).
  10. Switch off filesystem’s logging of access times during mount. The main function of access time logging is to make your filesystem slower. Seriously. Nobody ever uses that feature. ‘mount -o noatime,nodiratime’
  11. I know there should only be ten rules, but seriously, practice safety and use truecrypt

If this doesn’t make you cream in your pants….

February 28th, 2008

I apologize in advance for this post being so long, but some things must be blogged.

Ulalume, case open

First, the specs:

Full tower ATX Chassi with specialized cooling system (Xclio twin 25cm cooling fan side panel), blue lighting in the paneling, VR fan speed control with on/off, built-in thermal sensor and LED temperature display on external casing. By far, the coolest thing about this case is that it is a tool-less style case, meaning that all components are “snap-in”. No screws, or other shit. Total price $129.99

Rosewill sli-ready power supply with 2 x Silent 80mm Ball-bearing Blue LED Fan (that’s right, fans on power supply, chassi, and CPU!!!), fan speed control switch, also blue led paneling, and a special SLI mode that I don’t know I’ll have a chance to use. Biggest concern about this fan is the 550v max power. Total price $59.99.

Standard lightscribe dvd-rw with 2MB cache operating at 8x DVDW. Total price $32.99.

4GB Corsair DDR2 module with excellent timing. 2×2GB DDR2 800 (PC2 6400) with 4-4-4-12 timing and custom heat sinks. All I can say about this RAM is FAST FAST FAST. Total price $134.99.

1TB of 7200 RPM drives split as 2×250GB drives and 1 500GB drive. Don’t worry, there won’t be as much left when I RAID it. Total cost ~$600.00.

ASUS motherboard equipped with an AMD dual socket suitable for Athlon FX processors, and using the Nvidia nForce 680a SLI chipset (Quad SLI!!!!). Other hotness includes dual gigabit ethernet, onboard 7.1 surround sound, 12 SATA ports, IDE RAID controllers, tons of slots (pci, etc.), support for 8GB of RAM, and even an external SATA port. Interestingly, this motherboard doesn’t even try to perform on-board graphics. No vga, dvi, or other port. Also interesting, why do boards like this insist on shipping with traditional ps/2 mouse/keyboard ports?! Total price $319.99.

AMD Athlon 64 dual-core 3.0 ghz processor what can I say this chip is fucking badass. Total price $149.99.

Other components include a graphics card not worth mentioning and a front-side card reader with about 6 card types supported.

Total investment: $1,427.94 US

sideview of Ulalume

No computer is complete without a name. This one is named Ulalume.
back view of Ulalume

I have dual-booted the machine with OpenSUSE 10.3 and Kubuntu 7.10 (the Gusty Gibbon), and using the XFS file system. Of course, my data drive will be protected using TrueCrypt. Right now display/input is running through a kvm hooked into my normal computer and one of its monitors.

Unresolved issues and unanswered questions:

- How can I get the IDE raid to be a bootable partition? Linux doesn’t seem to want to cooperate on this one…

- Surge protection and battery backup solution

- External room fans/cooling solution

- Monitor/graphics card

- Overclocking (availabile in the BIOS, but seriously, why would I want to?)

- Offsite backup solution

- blu-ray dvd-rw

- tv tuner card / MythTV

- faster ethernet switch/hub for network serving files faster

What will I use it for?

I don’t know, computing the largest prime number to date? Optimizing TSP problems? Foreasting the weather? Solving the Netflix challenge? Or maybe just gaming….

BlueStone Blog Has Arrived

February 22nd, 2008

The long anticipated BlueStone Blog has finally arrived! We here at the BlueStone Laboratories are excited to begin sharing with the world whatever we have the mind to blog about. Stay tuned for a wealth of upcoming posts in any number of categories. There’s really no telling what you should expect….