iBrasten

My methods of calculating time are far superior to yours, in every way.

 

This is the blog of Brasten Sager, a software engineer, Mariners fan, guitarist, haphazard philosopher.

It is done.

August 30, 2005 @ 06:45 AM

Good afternoon, everyone! That was possibly the longest I’ve gone without posting since starting my blog. I appreciate all your patience! As was guessed, I was undertaking something very important to my life and didn’t feel I’d be able to blog about inconsequential things while that was underway. But now, I can announce it:

Major Life-Changing Event I am now Senior Java Developer for the MindPlay Product Group of Bally Gaming + Systems! I officially accepted the offer today and will begin the week of September 12th. This position is a fantastic opportunity working with some very interesting technologies, but more importantly the company showed a large amount of confidence and excitement over me and my abilities. Furthermore, anyone who’s read my blog for a long period of time knows that my lack of a completed college degree has bugged me to no end. As someone who highly values intelligence and knowledge, not having that little piece of paper has been a huge ego bruise. However, Bally will be giving me to opportunity to pursue the completion of my degree through evening courses by providing generous educational tuition re-embursements, and strongly preferring I work as quickly as humanly possible to get it done.

The position itself is also very interesting. My understanding is I’ll be responsible largely for a web-based administration application. This is the primary customer-facing portion of the MindPlay product package.

As far as what Bally Gaming + Systems does, they do a lot of things. The division I’ll be at primarily builds player-tracking blackjack tables. See links below for further information.

So while the next phase of my life will be very busy, I’m very excited for the opportunities it brings. AND, I think it’ll make for some GREAT blogging! :D

Speaking of Blogging… A couple of things on this topic. Firstly, thanks to DG for the email on some of the risks to corporations when they allow their employees to blog. Up until now a lot of press has been devoted to the risks that employees run for blogging about their companies, so this was an interesting article. See As Blogging Grows below.

Also on the subject of blogging, one blogger who I link to often - Justin Foster - has posted about 4 or 5 very interesting posts in a row on the subject of marketing through corporate blogs, RSS, email marketing and how that all relates. Anyone interesting in the topic to go read up on a few of those.

Without re-reading through all of them right now, I remember Justin talking about the ability to blog what is going out in email newsletters to have a publicly available archive of the content. I think the idea is there, but implementation wise I was thinking it would be better to do the reverse. If a product powers both the email newletter and the corporation’s blogs, one should be able to quickly pick and choose recent blog postings from the corporate blogroll and place them into email newsletters. The blogs become basically a content repository at that point. It would seem to me that that would be a better way to go about it, but reality is probably somewhere in the middle. Either way, it would provide the ability to blend email newsletters and blogs into just “content”, and distribute that same content via many different “channels”. (“Content” and “Channels” is terminology borrowed from Justin’s posts).

Relevant Links I recently read a general complaint about blogs that criticized the use of links in the post body. Something about drawing attention away from your content mid-sentence. So I’m going to try putting relevant links at the bottom of the posts for a little while. Let me know what you think.

---

August 22, 2005 @ 07:30 AM

I’ve been abnormally silent here for the last few days, but there’s a reason for that. I hope to inform you all as to why by tomorrow evening. Stick with me.

Simplifying Web Interfaces

August 19, 2005 @ 04:58 AM

Company B Update Got feedback on the “test”, or mini programming project, that I did for Company B. The wording that was used was “extremely well done.” The next step is to meet their VP next week, at which point it sounds like they’ll make an offer. I’m still contemplating my acceptance parameters (pay, do I like the company, do I believe in the product, etc…). It’s sounding like I have to come up with a decision soon.

Web Interfaces If you’re a developer, you’ve likely heard of AJAX. I don’t have anything drastic to add on the matter here, but I think it’s got some great potential for simplifying the way web sites work. It can also add complexity for programmers (which in turn can add stability issues for users), but all-in-all I think it’ll become a great way to build intuitive web-based user interfaces that don’t require constant page refreshing. For an example, here’s a little thing I came up with sitting at a coffee shop for a few hours, Web IM. (To use, enter a username and start chatting away. You’ll have to use Firefox, Safari and IE are not supported at the moment. Also, it’s kind of boring unless a few of your friends join you!)

I’m not the first person to some up with web-based instant messaging using this idea, of course, but the fact that it can be done is quite amazing. I DID have an idea that I think would be unique to my particular project, though the coffee shop closed before I could implement it. Instead of pinging the server every second – which works but can suck server resources – why not allow the client to “listen” for incoming messages? This can be accomplished pretty easily, it turns out. Instead of pinging for data then closing the request, simply have the server hold the connection open if there isn’t any data to send. As soon as data is available, send it down the wire and terminate the connection. The client simply has to respond to two possible results: The connection returned data, or the connection timed out. Both results require immediately opening another connection to the server and starting the process over again.

Very easy, actually.

Podcast to text follow-up.

August 19, 2005 @ 01:33 AM

Well, there are actually programs it seems that will take MP3s and run text recognition on them. For the Mac, there’s IBM’s ViaVoice. So hypothetically one could set up a few Xserve machines, come up with a slick little AppleScript and let that thing translate Podcasts all day long. The resulting text file would then need to be put into a database with a bunch of information (Which Podcast is it, what’s the URL, etc), and viola: Searchable Podcasts.

And for this product, I shall charge one MILLION DOLLARS… mwahahaa!

Updates!

August 18, 2005 @ 08:05 AM

Interview Interview with Company B this morning. How’d it go you ask? Could have been better, could have been worse.

The “test” I was taking turned out to be a mini programming project, which I personally think is a great idea. You get to actually SEE someone’s code then, instead of just questions to random questions. I don’t do interview questions all that well anyway. I’ve often felt like if I could just show you my work, you’d understand. Anyway, I actually FLEW through a very large section of the project, but I got hung up on ONE stupid little thing for like an hour and a half. I developed three different ways to do what I was trying to accomplish, but each one took a ton of code and I just knew it was “wrong.” I finally figured out the 2-line way of doing what I was trying to do, but by then it had taken me longer than expected. Still, I think I did well otherwise.

I should know shortly if they’ll be giving me an offer!

Million Dollar Idea #67 So, during my lunch with David, Ethan, and Wilson from WhatCounts, I made a comment that I filed away in my head right after saying it to think about later. We were discussing Podcasting, and I mentioned it would be interesting if Podcasts could be searched. As usually happens, this ‘filed-comment’ random popped back into my head the next day, so I sat and thought about it for a while. And I think it’s totally doable. There are Java libraries that do speech recognition, as well as libraries for decoding MP3 streams and such. It would just be a matter of running the stream from an MP3 into a voice-to-text processor and archiving the results for later searching.

If I jump on this, it could be the million-dollar idea that actually works! Unlike CellFlow, which never attracted any users. Or CuteTogether.com (for rating random “couples”) which I stopped working on before it actually worked. Or the collaborative story writing website idea I had that I never started. Or the condo association website stuff that I haven’t started… no, THIS idea… THIS could work! ;)

Preparing for Tomorrow.

August 17, 2005 @ 12:41 PM

So, as I stated earlier, I have a second interview tomorrow at company B. The way I understand it, I’ll be taking tests for two hours. Two of the topics I’ll be tested on are topics I’m a little weak in. Sooo, I bought myself three books at Barnes and Noble, and I have from now until the morning to become an expert in them.

Wish me luck!

No Fluff Just Stuff

August 17, 2005 @ 03:11 AM

The “No Fluff, Just Stuff”Software Symposium will be in town October 14-16th (Friday-Sunday). Check the link for more details. It looks to be pretty good, and relatively well prices (~$700). There’s a 250 person limit, so register soon if you plan on attending.

I’m fairly certain I’ll be there (though I haven’t yet put money on that). The lectures I plan on attending (tentatively): Introduction to JavaServer Faces, Creating Polished Swing Applications, Introduction to Spring, Introduction to Hibernate, Advanced Hibernate, Creating Web Applications with AJAX, Power Regular Expressions in Java, EJB 3.0 and Java Persistence API, and Programming with Mock Objects.

There are a few time slots I haven’t decided on yet… A couple dilemmas: Killer Web UIs OR A Pragmatic Look at Agile Architecture Pragmatic Extreme Programming OR New Features in Java 5

Anyway, hope to see some of you there. If you’re currently in other parts of the country, check their city listings to see if the symposium will be in your city soon!

My Week At a Glance:

August 16, 2005 @ 06:43 AM

Because I never know who all is reading my blog, I try to post a on a vast array of topics. This is always a good standby… Week-at-a-Glance.

So, let’s see… on Monday I had lunch with a few of the WhatCounts guys. Great guys! Along with that I was able to quickly say hi to Justin Foster whom I’ve linked to several times in the last couple weeks. So you all have to continue visiting Justin’s blog, it’s very interesting, I promise!

Today I’ve got racquetball later. I didn’t do very well last week, so I hope to kick ass tonight. I’ve realized that I tend to suck when I go for a killer shot every hit. I tend to win more rallies when I just make a decent return and wait for my moment. Sometimes my opponents beat themselves, sometimes they make a good shot I can’t return, and sometimes a really great shot opens up, but I just have to keep the rally going until one of those three happen.

Wednesday we have a demo for a customer. That’s always good, but as always I will have to be here early to make sure everything is ready to go and doesn’t break.

Thursday I have a second/technical interview at Company B. Psuedo-name, of course. 3 hours long. UGH. I don’t like interviews… But, they are a necessary evil. My interview last friday with Company C apparently did not go too well, as I haven’t heard back. Odd, since I thought I ‘did better’ at that one than Company B’s. But that’s the way the game goes. I wouldn’t have accepted a position at C anyway, nobody seemed to enjoy working there.

Friday I’ll be hanging out with Jessica. I know we have plans, but of course I can’t remember what specifically we’re going to be doing. I usually rely on her memory for those things. :)

That’s the Brasten Sager Week-at-a-Glance.

Okay, Java developers. Check me on this.

The Problem Web Services do not really handle the concept of checked exceptions. At least, WebLogic 7’s implementation of them don’t. A web service throws a SOAP Fault which gets translated into a SOAPFaultException which is THEN wrapped inside of a java.rmi.RemoteException. (Using an RMI exception I guess makes sense if you accept RMI as a concept package instead of a specific technology, since Web Services are Remote Method Invocations, but have nothing to do with Java RMI, specifically.)

So, follow me here… On our server if you have an exception condition, you can create a java.rmi.RemoteException and throw it (and ONLY a RemoteException, though RuntimeExceptions may automatically get caught/wrapped/thrown?) On your client, you will be thrown a RemoteException. RemoteException.getCause() will be a SOAPFaultException, which will contain a getFaultString() that contains a bunch of information you likely don’t care about, as well as the original server-side exception’s message.

Server --> Throws RemoteException wrapping CustomException
Client --> Catches RemoteException wrapping SOAPFaultException.

So, on the client side you are not able to catch checked exceptions based on conditions thrown from the server.

Applicable Pattern/Framework? I could not find a Java-based framework for handling exceptions thrown across the wire. If anyone is aware of one, please let me know.

The “Compromise.” I just finished this last night and I’m making a refactoring pass right now, so things could change slightly. However…

Ideally I wanted to create a framework that would let you catch checked exceptions. However, in the end I determined that was probably not the best option. I can’t think of any way that you can specify types of exceptions that a web service could throw - that’s the whole problem to begin with - and you’d need to be able to do that in order have checked exceptions. (Using the solution I provided below, you COULD create a Proxy that throws checked exceptions, therefore seemingly you would have that capability, however you’d still have to know at the Proxy what you expect a web service to throw. No compile-time safety.)

I did however manage to come up with what I believe(hope) is a great design utilizing RuntimeExceptions. I realize Runtime vs. Checked exceptions is a touchy debate, and do not intend to tackle that issue at this point. I do come down on the side of checked exceptions, with some caveats I will explain at a later date. If you are a Runtime exception guy/gal, you will enjoy my solution immensely.

The Solution So I basically built a serializable abstract exception. This exception knows how to marshal itself and subclasses to/from RemoteExceptions (unmarshalling could be done here, but I’ve moved it to a handler). Any exception you want to throw, create it via subclassing StarRemoteException. Then you end up with code similar to this (this is pseudo-code):

Server

@WebService
public Order getOrderById(int id) throws RemoteException {
     RemoteException exception = new OrderNotFoundException().marshal();

     throw exception;
}

Proxy

public Order getOrderById(int id) {
    try {
        webservicePort.getOrderById(id);   // make your webservice call
    } catch (RemoteException ex) {
        /* unmarshal and throw StarRemoteException */
        throw StarRemoteExceptionHandler.getInstance().unmarshal(ex);
    }
}

Client(s)

 ...

    try {
        Order order = serviceProxy.getOrderById(-1);
    } catch (OrderNotFoundException ex) {
        // notify user.
    }

...

Anyway, that’s my web services exception handling “framework.” Has anyone done anything similar? Or anything completely different that addresses the same issues?

Update: Added some rudimentary UML

Great iPod commercial

August 10, 2005 @ 06:23 AM

This is one of the best amateur iPod commercials I’ve seen: Tiny Machine

Work and Play

August 08, 2005 @ 01:50 PM

Work. So we apparently had a very good meeting today with a potential client! I’m told that the part of the demonstration that really gets people’s attention is a part of the application that I developed. NICE! Even though I occasionally - on bad days - bitch about work, I DO care about making the company successful. My complaining usually stems from the fact that I think we could be doing things a lot better. But either way, when good things happen for the company, I’m happy. My job ultimately is to help them succeed.

Play Blogs, specifically. A couple blogs to mention: My girlfriend has started blogging: The Musing Post. Check it out.

Also, Justin Foster posts another great entry related to using blogs almost as a research tool, measuring reader feedback to various ideas. Read Up!.

Lobbying the Public, I guess.

August 04, 2005 @ 06:53 AM

Pro-abortion groups in Seattle held a fund-raiser a couple of weeks ago, calling the event “Screw Abstinence.”

Cute. Makes sense though. Abstinence might lower unwanted pregnancy rates, which would affect the abortion industry, which provides money to the pro-abortion groups.

For what it’s worth, the group putting on the event says they’re against “abstinence-only” sex-education. That’s fine. While I’m a firm believer in teaching abstinence as a preferred lifestyle, safer-sex education should also be taught, no?

Hernandized.

August 04, 2005 @ 05:00 AM

Felix Hernandez’ debut went well, going 5 innings (with a pitch-count restriction of 80), giving up 1 earned run, 3 hits. Our offense was horrible though, given Hernandez his first major league loss.

After checking my logs, it appears as though my latest DellRumors.com post is attracting a lot of laughs on various internet forums. Check it out.

Can you Felix?

August 04, 2005 @ 01:59 AM

Firstly, Justin Foster from WhatCounts took the time to find my little blog here and post some comments! Go take a read!

Now, on to the Mariners… Felix Hernandez will be making his pitching debut for the Seattle Mariners today, making the start against the Detroit Tigers. Actually, the game starts in about 7 minutes, and I have my headphones on and ready. While there’s absolutely no reason to believe he’s going to throw a perfect game or anything, he IS the top rated pitching prospect in baseball. Whatever the result, today marks the beginning of the Felix era for the Mariners.

WhatCounts adds a new corporate blogger.

August 01, 2005 @ 08:30 AM

Some of you will remember that not too long ago I was talking about a company called WhatCounts. I may have mentioned that they’re CEO blogs on their website. Anyway, they’ve recently added a second blogger to their company blog. Justin Foster jumps into the mix, talking about email marketing and other various topics. Sadly, I couldn’t tell you WHO Justin Foster IS, but he’s obviously someone very knowledgeable about WhatCounts and their industry.

All that said, I was making mention of that because he talks a little bit about something they do that I’ve been pushing to do here for a while… namely, selling your product as an “appliance.” I’m sure their appliance is nothing more than a rebranded rack-mount machine running Linux, or something along those lines. But it allows them to sell things pre-installed, keep things updated, and generally take a lot of the technical hassle away from the user. (This is a good thing, as the more confused a user is, the more clogged your support department gets.)

It’s been decided that selling our services on an appliance is not something we should bother pursuing here, as evidenced by our overworked support staff. I’ll keep pushing for it though.

In other news…

Serenity in T minus 60 days.