Monday, March 21, 2011

TVness and PA

In catching up on shows...
Enjoyed the fun zombie Halloween episode of Community, s02e06 Epidemiology, recently.
Also enjoyed seeing Sam Oliver from Reaper on V s02e01. I really liked Reaper, and to me he brought a needed fresh feeling to V.

Watched the emotional Penny Arcade: The Series episode 107, Child's Play Part 2, recently and I loved the song at the end. In the credits I found it was hullamzoret two by failotron.

Also related to PA, I'm now listening to the series 2 DnD podcasts (Jim Darkmagic and Jim's magic missle FTW!)
I enjoy the occasional faint background noise of the store door open/close ding-dong.
And I enjoy listening to Chris Perkins from Wizards of the Coast, he should make audiobooks.

Saturday, March 19, 2011

Goodbye Laptop

Said goodbye to my gaming rig, aka work laptop and headset, today.

It was a Dell Latitude E6500 with Core 2 Duo P8400 2.26 GHz, 4GB ram, 232GB hd, Nvidia Quadro NVS 160M. I think the headset was a Logitech Clearchat Comfort USB.
It handled Battlefield Bad Company 2 surprisingly well and I enjoyed using the wireless and webcam, especially on trips.
Last night I started wiping it with Darik's Boot and Nuke and 11 hours later it was gone.
Spent today setting the OS and dev environment back up for the next person.

Friday, March 18, 2011

PAX East 2011 and DnD



Went to PAX East 2011 in Boston last weekend.
I expected it would be about gaming and comics, but really it ended up being about entertainment (lots of laughs) and community.

Friday 3/11
We arrived a little late at PAX and spent a lot of the initial time waiting in lines and trying to catch up to our schedule.
We got in to see the Blamimation panel with Scott Kurtz and Kris Straub. Loved it, very funny.
Later that night, we saw MC Frontalot at the concert. I think one of my favorite songs was "First World Problem". Only downside was that it was harder to hear the lyrics live, but still fun. He actually sounded more like MC Chris (who I'd love to see at PAX).
For Games: we played a game of Munchkin. During the game I was given a card that says "you are handsome" (with handsome written below a strikethough beautiful) with a link to this project on the back. We also played Zombie Dice on IPhone and ButtonMen both on IPhone and real dice. Also played Mario Kart on Nintendo DS. I got to see some of the DS culture, including Pokemon trading, and I doodled on Pictochat.
For Food: crappy Macro Vegetarian shanghai dumplings ($9 at convention). Later went to My Thai Vegan Cafe and had yummy coconut sweet potato soup, pineapple fried rice, and golden triangles (like samosas).

Saturday 3/12
We went to the Penny Arcade strip drawing where Mike and Jerry created the Ballin comic (about the Nintendo 3DS)
Went to geek parenting and game pitch panels. The pitch your game panel included Kris and was so funny (video on G4TV).
Saw Kris and Scott again at their late night panel with more laughs (straight dougin and #bottomlessfriendship)
For Games: played more Nintendo DS with download play Tetris, played Bulletstorm (Pic1, Pic2, Pic3) and BlackOps on the expo floor
For Food: Picked up 3 muffins (flat but thick like scones) at the Flour Bakery Cafe. Later went to a punk/hipster bar, Other Side Cafe, and had vegan BLT, guacamole and chips, and a strawberry/banana,OJ smoothie. Also picked up veggie udon noodles at the convention center ($10) and watched the rockband stage.

Sunday 3/13
We watched the Omegathon operation competition (players even had gloves and masks on).
Waited in more lines of course and saw the X-Play live show.
Stayed for the Penny Arcade Q&A with Mike and Jerry, leaving early to hop in the signing line. I had my badge and my "you are handsome" card (from Friday) signed.



We left a little early during the Omegathon finale.
For Games: Played centipede (Pic), burgertime, and chopper rescue at the classic arcade.
For Food: Had breakfast from the Flour Cafe again, fresh hot chocolate muffins with coffee+soymilk. Also had more from My Thai Vegan Cafe dinner right before we left including wontons, pad thai, and chocolate cake.

So it was a busy fun weekend with a few negatives. We had too many possible things on our schedule and spent a lot of time waiting in line for the events. There is so much to do there and I can imagine every person going to PAX would have a different story. Had about 4 hours sleep at nite. Hotel didn't have free internet. IPhone directions were aweful and ended up taking wrong turns. Parking was a pain but worked out in the end ($40 for weekend at convention, and we could have left the car there if the hotel shuttle was more available). There are classic/culture games at PAX that I have little/no experience in including DnD and Pokemon (I'm sure there are others, you could add Nintendo DS in general to the list). I never got to play the Last Night on Earth zombie board game I brought, hopefully next year will be more gaming.

Related to DnD, I recently watched the Wizards of the Coast PAX 2010 Dungeons & Dragons videos and also listened to almost all of series 1 podcasts (i'm hooked and was LOLing to it).

Thursday, March 10, 2011

Content Backlog

I've had plenty of material sitting around to catch up on and I've finally started digging in.
At the moment, I've caught up on Fringe (a favorite) and The Cape.
I was caught up on The Event until new episodes just came out.
Starting to catch up on V and No Ordinary Family.

Other TV shows we have in rotation for new episodes:
Castle
The Big Bang Theory
How I Met Your Mother
The Mentalist
House
CSI
Grey's Anatomy
The Office

Smallville and Supernatural are on hold at the moment.

Newest TV shows we are catching up on:
White Collar
Parenthood
Community
Modern Family

And in prep for PAX East (this weekend!), I'm catching up on Penny Arcade: The Series.

In comics, I finally read The Walking Dead #81 and also read #82 released today.
I also caught up on Penny Arcade and I can only hope I don't feel like this during PAX

I see a lot of comic based movies coming up this summer.
None I'm super excited about, maybe X-Men: First Class (imagine X-Men as friends again!) and Green Lantern.
But next year is a different story.
New Batman along with reboots for Spiderman and Superman.

Thursday, March 3, 2011

Missing Method Exception

Having a project in Maven central appears to help in getting quick feedback.
Two days ago I released a new version of the formatter plugin and today an issue was reported with it.

In the recent release, I switched to using plexus-io to provide wildcard includes/excludes for selecting files.
I used PlexusIoFileResourceCollection.getResources() which throws IOException.
This method uses DirectoryScanner.scan() which throws IllegalStateException if basedir is null, not exist, or not a directory
This exception is a RuntimeException, not an IOException.
So although the basedir is set on the collection and passed to the scanner, the collection does not list a throws for the IllegalStateException nor does it handle it.
Now even if I was already handling this exception, it wouldn't have been the desired behavior, which is to continue the build and ignore for projects that don't have files to format (instead of failing).
So I fixed checking the basedirs and pushed out a maintenance release today.

This is my fault for not having enough test cases, easily found using null values for the basedirs.
Or I could have just tested the maven site multimodule example from the checkstyle plugin.
Lessons learned. Evaluate the source of libraries used more thoroughly. And always more tests.

Wednesday, March 2, 2011

Java String Encoding

I think intro Java courses should discuss coding for an international community - specifically encoding/charset, locale (language/country), and timezone. Since creating Strings, reading and writing Files, and creating Dates are fundamental.
And its become increasingly apparent to me how common it is to assume that the default OS/system values are fine.

When working on the Maven Java formatter plugin, I began considering system dependent properties of Java source files, such as line endings and then encoding.
I found an encoding convention for Maven plugins to follow, reading and writing the source files using a defined encoding.

When looking to build the OpenMRS project, I found the build was failing, apparently only on my local (Windows) machine.
A test source file was recently added with UTF-8 encoding, including "foreign text".
The first failure was the compiler plugin, since its version needed to be updated to support the encoding property.
The second failure was an assertion in this test failing. The "foreign text" was being handled using the default charset of the platform, using String(byte[]) and String.getBytes(). This is a case where the CI server (Linux) didn't help to keep the build stable. I ended up submitting a patch to use String methods/constructor supporting encoding.

In the Java Internationalization FAQ it lists examples where the UTF-8 encoding cannot be used including:
"When writing plain text files that will be interpreted in the host OS's default encoding, if that encoding is not UTF-8."
This is exactly the case I was seeing. The UTF-8 file and text was being read and compared using the default encoding for Windows, Cp1252.

This is just a recent example but there are numerous others, and I think CS students should know about these types of problems early on.

Sunday, February 27, 2011

Econut: TV Reference of the Day

Today I was Marshall from How I Met Your Mother s06e17 Garbage Island.
But instead of searching through a dumpster for O-rings, I was looking for cardboard.

I was making a run dropping off trash and recycles. When I went to put the trash bag in the dumpster but I couldn't.
The dumpster was filled with boxes that hadn't been broken down.
I instead walked to the next dumpster and threw my trash in.
Now at this point I could have walked away, but of course I didn't.
I reached in the first dumpster and started hauling out the boxes. These were large Home Depot moving boxes.
I took out as many as I could without climbing in, broke them down, and filled the car. I was planning to drop off recycles next anyway.
I ended up with 7 of these large boxes to add to my 4-5 bags worth of other recycles.

I also saw that one of the Silk soymilk containers had a green cap. I entered the UPC code on my phone so I could submit it online (for things like wind power). Sadly I see the green caps website isn't available at the moment (apparently ended last year).

Saturday, February 26, 2011

Comic Ts

I hardly ever buy new clothes, so I guess it's worth noting when I do.
Especially when I pickup some fun DC comic t-shirts.
Including the Superman shield and the zombie Black Lantern Batman from Blackest Night

J2ME Phone Number as Integer

In my current project, we used a mobile application based on Openxdata/Epihandy (forked earlier), which is an xForms J2ME app.

One of the problems encountered was entering phone numbers in a form field.
The closest type supported was a numeric type, using the MIDP Textfield NUMERIC contraint.
As the doc states, this value should be parseable by CLDC Integer,parseInt()
The Nokia series 40 phones we were using, Nokia 1680s, presented various issues during the project including editing a numeric Textfield used for a phone number.
The original phone number value entered could be larger than (or equal to) the max Integer value (2147483647), but the value would be lost when trying to edit the field.
On editing, the value would fail to parse as an Integer, throwing a NumberFormatException, and default to an empty Textfield.
As a workaround, we added validation to only allow values less than the max integer value.

This solution worked fine for our testing using Maine area code 207 phone numbers, and in production entering local phone numbers (9 digits) on the phone with the country code added on the server.
But this approach fails for almost all other US area codes (most greater than 214-748-3647) including the one I needed to support for a demo.

The MIDP Textfield supports a phone number constraint, which I added in our mobile app as a fix/feature. I reviewed the existing code and found there were just a few case codings needed. For the xForm, the type is actually string, but includes a format attribute with the value phonenumber, similar to how other added types are handled.

This has been a lingering limitation and I'm happy to see it being resolved. We've used phone number fields on almost all forms, especially since we've sent text messages to numbers entered. Obviously the numeric Textfield was insufficient for phone numbers.
Now the server side just needs to account for the possible + prefix instead of numeric only validation. To provide a consistent US phone number format, I used the regular expression \\+?1?([0-9]{10}) and selected the matching group.

Saturday, February 19, 2011

Superman! Reading, Comics, Shows

Mixed on latest reading from the library.
Breakpoint by Richard Clark was okay. I especially liked the first half or so where the US internet infrastructure is attacked and largely cutoff from the rest of the world. That felt believable, but I'm less inclined to believe the genetic/biologic advancements which dominated the second half.
The Fahrenheit 451 graphic novel was also just okay.
The All Star Superman #1 graphic novel was okay, I especially liked the older version of Lex.

So on the same topic of Superman, I've seen videos of DC Universe Online and it sounds fun to create your own hero/villain, although I don't play subscription games.

So also on the topic of Superman, apparently Lex will be returning for the finale of Smallville!
Also In TV shows, I've been catching up on Fringe on Hulu and still enjoying it.
I hope the new Battlestar is good and makes up for Caprica (still haven't finished, lost interest).

I still haven't read Walking Dead #81 yet, but I glanced at the letter hacks and was surprised.
The earlier mentioned letter hack I wrote in was actually printed!