07 Jul 2009 @ 8:42 PM 

I don’t know why, but the Enum class’ usefulness has always eluded me. Early attempts just didn’t work out, and I just found ways around using it. Recently, I am writing a program that needs to have a certain status be toggled between a known, fixed list of values-with a default value if nothing else matches. This real world project accelerated my learning how to use Enum effectively-much more so that the urgency to simply learn more about the language (i.e. no practical application of said knowledge).

I also wanted this magical class to determine for itself which value from the aforementioned list the thing that had the Enum in the first place should be. In other words, I wanted the method to do the determination to be inside the Enum class itself. I didn’t know if this was possible, but as I went over all the other ways to accomplish this, any other solution was too costly and inelegant.

To give you an idea of what I am trying to accomplish, consider this Test.java:

public class Test {
    public static void main(String[] args) {
        EventType etX = EventType.Default;
        EventType etY = EventType.Default;

        String sEvent = "this is just a test!";
        System.out.println("etX.getEventType: " + etX.getEventType(sEvent));
        etY = etX.getEventType(sEvent);
        System.out.println("print etX: " + etX);
        System.out.println("print etY: " + etY);
        System.out.println("All EventType(s):");
        EventType allEventTypes[] = EventType.values();
        for (EventType x: allEventTypes){
            System.out.println(x);
        }
    }
}

More »

Posted By: Pat Trainor
Last Edit: 13 Jul 2009 @ 01:04 AM

EmailPermalinkComments (0)
Tags
 28 Apr 2009 @ 5:53 PM 

I bought a Slingbox Pro on August 24th, 2007, at Best Buy. I have used it with my PDA (long since gone), which amazed everyone I showed it to, as well as on the road in hotel rooms and even from different parts of the house. Neat idea, and way ahead of Hava at the time. Still no support for my Dish Network VIP 612 DVR (HD) yet, but good enough.

I did a firmware update the other day, long after the 1 year warranty was up. It bricked my box, along with hundreds or even thousands of others.

My initial email:

More »

 14 Nov 2008 @ 2:45 PM 

Fidelity Logo
I just fired off a little stress relief to my primary 401k company, Fidelity:

“[At Fidelity] I currently own/invest in:

Fidelity Dividend Growth FDGFX
Fidelity Magellan FMAGX
Fidelity Select Software & Comp FSCSX

I owned 10 funds at one time, but when I saw them all falling through the roof I converted most to cash, so I could ride this out.

The problem is, YOU DIDN’T!
More »

 27 Oct 2008 @ 10:49 AM 


I recently replied to a post on Google’s Gmail Help forums regarding phishing, and it touched on an issue I’ve been confused about for years:

[...]

This is the result of a common translator (Google’s , Babelfish, etc.) being used on perfect grammar-from
another country.

Now for years the question has remained as to why an Asian, or other, company wouldn’t just spend a few quick dollars and have their text proof read? I’m not talking (necessarily) about the phishing expeditions, but in all matters foreign where they know an English audience will be reading their material? I’ve been to Asia, and it is crazy how proud they are of their own country and culture. They would rather spend their energy and time making a knock-off of [insert virtually any product type here] than to use that ingenuity to make
their own brand, and establish their countries as those known for making good _original_ goods, instead of really good knock-offs.

Trust me on this, as I have purchased a LOT of Asian knock-offs, and they are a terrific value-as long as you realize what they actually are.

There is no translator that converts perfect to perfect… but this next one is probably even better than the first.

The top part of the sign is in English, but when they emailed someone to translate that English into Welsh, the response actually said “I am not in the office at the moment. Please send any work to be translated.” That’s right, it’s an out of office message, which subsequently made it onto the road sign undetected. We hope those residents are getting used to Welsh truck drivers carrying heavy goods. from here.

Translation, although it would cost just a few dollars, is something I believe is outside their comfort zone with regard to national (cultural) pride.

So. Attention all Asian, Welsh and other companies wanting to get into the US markets by translating your manuals, instructions, and yes-even banners-into English: Send me your broken English and I will make it perfect. I will charge only $5 USD per document, up to 500 characters. How can you miss with that? Email me for my PayPal account!

please_leave_your_valuables_11989

So who is sitting in front, again?

So who is sitting in front, again?

Yes, they do!

Yes, they do!

I don't see it! Do you?

I don't see it! Do you?

Lord knows, I've tried!

Lord knows, I've tried!

Need some spare change when abroad?

Need some spare change when abroad?

Just like at the casino!

Just like at the casino!

Nobody dries crack lik ethe Asians!

Nobody dries crack lik ethe Asians!

I'm calling No.8, just in case!

I'm calling No.8, just in case!

Nobody would be dumb enough to put something in STONE without checking with me first, would they?

Nobody would be dumb enough to put something in STONE without checking with me first, would they?

You want creative? You got it!

You want creative? You got it!

Would this work over here?

Would this work over here?

You might as well take one more step!

You might as well take one more step!

Lets see if I can help clean up the masses of virtually unintelligible translations out there! :)

 08 Oct 2008 @ 6:47 PM 

Part of being a Sales Engineer is knowing how to display a product/service in any setting-even trade shows. The best Sales Engineers have no boundaries on their imagination, and use all their tools in ways that were not thought of previously. This is why it is important to own all your own software. If you are waiting for your next appointment (or worse yet consulting), you will get rusty fast.

In this article I discussed easy glass with V-Ray. In the article above, only one image from this project was included. Since I get so many hits to that article (where the tutorial is), I thought it might be nice to include all the renders I did for that client.

I’ll just post all the pictures here, with links to the larger versions by just clicking the thumbnails below. But first I should set this up.

The client asked for a modern trade show component (not the whole booth) that would allow prospects to play with the futuristic controls. These controls and displays are for super-yachts, so it had to look good. You’ll see the PC driving everything underneath, as these exhibits need to be designed completely, with all aspects of their operation taken into consideration.

As an aside, this type of glass (with the reflective falloff) is my absolute favorite! It effectively conveys not just futurism, but realism.



More »

Change Theme...
  • Users » 18
  • Posts/Pages » 134
  • Comments » 59
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

News

  • No categories

Photo

  • No categories

Sales Engineering

  • No categories