Author Archives: alwold

The tangled web of JSF

Despite the fact that all of the web apps at my current job are .NET, I have spent a lot of time working with web apps in the Java world. I have experimented a bit with some of the web frameworks and never really found anything I really like that much. My preferred method has been to just generate XML in the app and use XSL to transform it, but there is still not an ideal separation of logic and presentation. Since JSF is (was) kind of a new thing and seems to try to copy some of the neat things about ASP.NET, I decided to do a little side project in it at work. This really would have been an ideal candidate for Ruby on Rails, but I think Ruby is a little out there in terms of having other people maintain it.

Anyway, I spent a few hours reading up on JSF in my idle time. It seemed really complicated, and nobody really explained it very well. I eventually just dived in, and ran into a bunch of problems. Eventually, I got a page to list a bunch of entries out of a database. The problem is, the DAO needs to be pretty much a pure Java Bean which means you can’t really manage connections very well. I used Hibernate to do the data access, so you need to handle creation and closing of the session object. Listing rows is simple enough to just open, list, close, but updating will get hairy. Apparently, “the way” to solve this is by using Spring Framework. I’m not really sure how it works, but apparently spring handles all the session management for you. I have been interested in Spring since first hearing about it a couple years ago, so I guess this is an opportunity to learn that as well. In any case, I am now about 3 days into the project with no real results. Way to go Java, always overcomplicating things. I hope it is worth it.

Java 1.6 sucks

Today I got to work and discovered that my ant build for our J2ME app is failing randomly. After a long debugging sequence, I discovered that some Java 1.6 update has installed java.exe in c:\windows\system32. This particular version of java.exe is for the JRE and sets java.home to the JRE home directory. Since that path is high in priority in my system path, eclipse took it as its runtime environment, resulting in me having a neutered JRE (no JDK tools). Thus, jar.exe was missing from my java home and nothing would build.

Sun, if you are reading this, please don’t try to succumb to the crappy Windows way of doing things.

BREW Logger on Sprint

So, for a while I have lamented about the lack of a way to read System.out.println() output on Sprint CDMA phones. Today I had a random idea and it turned out to work well. For BREW, Qualcomm has a function called DBGPRINTF that prints stuff out. In the simulator, it just shows up in a little windows. On real phones, you can connect to the phone with a tool called BREW Logger and view the output. Since Sprint CDMA phones are based on BREW under the hood, I decided to give it a try. Samson was having some problems with a hang, so he brough in his KRZR K1m and we hooked it up. It spits out a lot of garbage, but the println() output is indeed there when you use the BREW Logger. So, for all of you Sprint CDMA developers out there, this is an awesome resource. It might not work on all phones, but it does work on the KRZR, and probably related phones like RAZR and SLVR. The only problem is, you need to be an “authenticated” BREW developer to download the tool, which costs quite a bit. Perhaps someone at Sprint can find an arrangement for us to get this tool for free.

Cell phones

This week I went to a secret Sprint developer conference in Florida. Unless you are “in” with Sprint, you probably have never heard of it. Even if you are in, there are a lot of things you will still not be able to do in your programs that run on their phones. In the end, of course, this results in you being unable to provide what you think your customers want to be able to do on their cell phones.

The wireless carrier industry is notorious for this kind of behavior. The CDMA side is particularly bad, it seems. Perhaps they learn this behavior from Qualcomm, the inventors of CDMA. Qualcomm is particularly nasty, having decided to go a step further and invent their own platform (BREW) instead of using the standard J2ME for cell phones.

On my flight back from Florida, I read an article in Wired about the Silicon Valley Homebrew Mobile Phone Club. This is the second time I’ve heard about the group, and I find it really fascinating. Their vision is to create a phone from scratch that is based on an open platform (Linux) that anyone is free to program. This is very similar to the PC in its current incarnation. If you imagine a world in which you have to get approval from Microsoft to write an application for the PC, you have something similar to the wireless industry today. I don’t think we’d be anywhere near where we are if that had happened.

In any case, the idea of creating an open platform GSM phone is cool, but the hardware part seems pretty difficult. If you visit their web site, you can see pictures of the phones they’ve created, and they aren’t too pretty. What I would like to see is something cool that can work in the forseeable future. Then I remembered seeing that someone got Linux to run on the Treo 650. I happen to have one, and it seems like it would be a good platform for the “open phone”. It looks like the Linux project is decently far along. I’d love to try it out and sort of build a platform that is easy for developers to use. I really like the Blackberry model where nearly everything is written in Java. It makes things easier for people to jump in and write programs.

So lazy

So, I’ve been really lazy and haven’t updated in forever. My card reader on my computer is freaking out so I can’t upload any pictures, besides, I don’t think I’ll post any more so that y’all will have to come to my housewarming party to see how my place looks. Anyway, I’m thinking about throwing the party on the weekend of 12/15.

Also, I have been looking for this awesome video clip and finally found it, so I thought I’d share it…

http://www.metacafe.com/watch/95543/will_ferrell_voice_imodulation/

I remember that SNL skit from back in the day, and this guy I work with totally sounds exactly like Will Ferrell in that skit, and it cracks me up every time I watch it.

“and a little bit softer now, and a little bit softer now”

Moved in

So, I have really been slacking on posts lately, but this is my first post after having moved in. I think Tuesday was the first night I slept in the condo. There are still a bunch of finishing touches to be done, plus I need to get some furniture and stuff, but it is cool to be moved in. The kitchen is still a mess with junk and tools, so I’ll need to clean that up before I can use it. I’m also still waiting on the refrigerator. They’ve attempted to deliver it twice, but keep bringing one that opens the wrong way. I’m starting to think they aren’t going to be able to get it right, and I’m going to have to cancel. Ikea has a rebranded Whirpool refrigerator that can definitely have the door reversed for about $100 more than the one I ordered, so I might just do that if they can’t get it right. I have some more pics, but I need to get to sleep, so perhaps I will add them tomorrow.

Update

This weekend was pretty productive. Friday night was booked for watching the Borat movie, which was hilarious, but a little out of hand. The naked fight scene was a little over the top. Anyway, on Saturday afternoon I started the project of doing the moldings (those little things that go between your walls and floors). I had originally planned on holding off on them until I moved in, then doing them leisurely, but I figured it would be a pain to move furniture to install them, and I’m still waiting on carpet. They were pretty nasty, covered with old caulk, pieces of linoleum and carpet fibers. I used a scraper to get all the pieces of stuff off, then sanded them to smooth them out and prep for painting. By 2 am on Saturday night, they were all cleaned off, and half of them were painted. I had to do the painting in two batches, because there were so many, and I only had so much space to lay them on the dropcloth to dry. My hands were extremely sore from all of the scraping and sanding. I got a call on Saturday night telling me my appliances would come the next morning between 8:15-10:15, so I had to get up early and go wait for them. I painted the rest of the moldings by 9:30, then the guys showed up right at 10:15. The stove looks nice in the kitchen, but they screwed up the refrigerator, and will have to re-deliver on Tuesday. The dishwasher was left in the box, because they charge extra to install them. I went home right after the delivery and took a nap. Mike and I went back over there in the evening, and laid out a bunch of the moldings. About half of them aren’t labeled, but it looks like it won’t be too bad to figure out where they go. We also got the dishwasher mostly hooked up, but the adjustable feet don’t go up high enough, so I think I’m going to buy a board to put under it to boost it up to the right height. I also called up Home Depot today and they have the carpet in, so hopefully they can install it this week. It seems like things should be in pretty good order by the end of the week.

Friday words

  • altura – height
  • olor – scent
  • esquina – corner
  • crecer – to grow
  • sanidad – health
  • baloncesto – basketball
  • mirador – viewpoint
  • rango – rank
  • rascacielos – skyscraper
  • dirección – address

Motorola HT820 review

So, a couple months ago, I decided my headphones at work were too uncomfortable, and I figured I’d venture into some high tech gadgetry. My laptop at work has a built in bluetooth card, so I started looking into bluetooth headphones. The Dell bluetooth stack is horrible and hasn’t been able to do anything I’ve attempted with bluetooth. It couldn’t talk to my Treo 650 to get Internet access, and I easily determined it didn’t support A2DP for headphones. To fix the problem getting to my Treo, I just uninstalled the stack and used the built-in Windows XP one, which worked ok, but it wasn’t going to cut it for A2DP. I then discovered BlueSoleil, which is a third-party stack and supports quite a few profiles. Anyway, I ordered these Motorola HT-820 headphones, and got them working with BlueSoleil. It isn’t perfect, but it works pretty smoothly and the audio quality is great. I think the most significant problems are that it seems to fail to pair automatically if I turn on the headphones after booting the computer, and iTunes won’t play on the headphones if I pair after starting it. Also, the headphones work with the Treo, and can automatically switch between music on the computer and phone calls with the push of a button, which is pretty cool. So, here’s a summary of my pros and cons for the Motorola/BlueSoleil combination…

Pros:

  • Good audio quality
  • Ability to switch between phone/music
  • BlueSoleil supports A2DP + Dialup networking well

Cons:

  • Weird problems pairing
  • BlueSoleil doesn’t seem to support AVRC, so the track switch buttons on the headphones don’t work
  • Headphones are a little uncomfortable with glasses

Overall, I think they were a good purchase. The freedom from wires is cool, and they are no less comfortable than other headphones I’ve had.

Today’s words

  • taller – workshop (seen on a sign at a mechanic, and at home depot)
  • alineacion – alignment (like for your car)
  • llanta – tire
  • freno – brake
  • vidrio – glass (like a window)
  • anteojos – glasses
  • polvo – dust
  • alcanzar – reach
  • nivel – level
  • fijar – to fix