Saturday, December 10, 2011

Backlog 3: DB, JS, Bad Code

I'm not a DB admin or DB anything, I'm just a dev
So it's no shock I have tons to learn about databases, especially Oracle
And so I was surprised to hear when Oracle would ignore indexes
Based on stats/sampling of data to determine if the index would be useful. But the sample picked might not be representative, leading to a bad plan and a SLOW query.

Recent converting of Richfaces to JQuery, attempting to use a newer JQuery than the version packaged with Richfaces. Found it needed to be loaded before Prototype but couldn't change the JS load ordering with older Richfaces version. So solution was to just remove Richfaces components which removed dependency on Prototype (so it wasn't loaded anymore).
Then multiple JQuery versions could be loaded properly using no conflict.
And the Richfaces components, like a modal, could be replaced by JQuery plugins.
In the end it worked out, but after many attempts to fix the script load order.

Another pain point that has persisted is rounded corners and being restricted to CSS2 (using flying saucer and meeting older browsers). Also annoying are browser optional display of background images on printing (seen in IE/Firefox and needed to be configured in page setup).
A nice feature I was able to use with Flying saucer for PDF rendering was image caching by url. Instead of fetching images remotely, load them from a cache by url. Especially useful for generated images (not stored to file - my use case).

I've mentioned it before, but the lone developer is dangerous,
especially without unit tests or code reviews or good sample data for testing.
How bad can it be? How about killing a production server with an endless loop?
Not just a slowdown, I mean dead and out of use.
How about causing an all day investigation taking up tons of resources?
And what is the cause? A simple condition not checked for.
It just took the right set of data to break the algorithm.
But I guess the lesson is to expect the edge cases/bad input since people are messy and defensive coding is important. And unit tests!

Backlog 2: PAX, TV

Finally catching up on some PATV and DnD.
Watched the PATV s03e01 on PAX.
Also watched the DnD videos on youtube from PAX prime 2011 with the always great Chris Perkins from Wizards of the coast. It was entertaining, but overall not as great as previous. Lots of talking with less action and the music was distracting.

Also finally signed up for PAX East in Boston and booked a hotel room.

Enjoying Fringe and the Fringe podcast.
With only 1 episode left before the 2 month break.

Also watched Supernatural (on Hulu!)
and what? no more Castiel?!
The Leviathan and black ooze reminded me of Venom or XFiles (both alien references).
Also the body duplicates / dopplegangers reminded me of earlier episodes (covered in this wiki)

Backlog 1: Computer Bug

Another bug on the computer referenced in this older blog post

To review,
It caused ping.exe traffic on port 18504, repeating sometimes every 20 seconds, and requests random IPs with the browser sometimes opening random pages as well.

Anti-virus was dead for many tried. Existing was AVG but also failed for Symantec. Sophos and MSE found nothing. Malware bytes found some leftover/trace malware (defender.exe/svchost.exe). Super anti-spyware found a rogue dll.
None of these helped, the problem persisted, with the ping exe running whenever the network was connected.

I researched and found some references that sounded familiar related to Java.blacole. And although there was an older Java JDK/JRE on the system, the browser plugins were up to date.

In the end, I just formatted and reinstalled. It was long overdue anyway from the last rebuild.
And now it is back, cleaner, up to date, and working (using MSE now).

Tuesday, November 1, 2011

Timelines and alternative universes

Another theme, especially with the latest season of Fringe.
What verse are we in again? blue, red, amber/yellow/gold? This show really likes to show different sides of the same characters.
I've been watching on Hulu, despite the week delay before episodes are available.
This has put me behind on the show and the podcasts.
At the moment, I'm loading up the last 3 podcasts, getting prepared to listen along with watching the last episode s04e04.
Being behind worked out well, I've avoided waiting during this 2 week break between episodes.

In a related note is the recent Community episode s03e04, Remedial Chaos Theory.
I really enjoyed this one, where the 6 different outcomes of a die roll are shown (and the 7th outcome of the original timeline).
And where the evil study group is created in the worst outcome, which I hope does make a return later (fake goatees and all). Which reminded me of Bizarro Sealab 2021 somehow.


Seems to be one theme I've been into lately.

I was gifted Darksiders on steam for my birthday and became obsessed with it until I finally finished it.
Horseman against demons and angels. I enjoyed the story.
The Portal-ness was okay (yes portals and puzzles) as were the Dune/Tremors worms.
But I mostly enjoyed the atmosphere, and taking out a ton of zombies.

I've also been reading a book from the library called Good Omens on the similar end of the world topic.
It's good, I'm about half way through. I don't quite get all the England references, but the humor makes me think Dogma (or what little I remember).
Actually the beginning of the book made me think it should be called "A Hitchhiker's Guide to the End Times".
Angel, demon, witch, son of satan, horsemen. All with a nice modern twist, not unlike...

Supernatural, if only I was still watching it as well (to complete this trifecta), but it's on hold at the moment. I still haven't had a change to finish the last season.

Saturday, October 8, 2011

JavaOne Day 7

Traveling back home.

Checked out of the hotel.
Took the cable car at 7:15am to head back downtown with my luggage.

Hopped on the BART train that was about to leave.
Rode it for a while but had to switch to continue.
Really had to pee.
Finally was able to after I arrived at the airport.

Walked around looking at the long lines for international flights before realizing I was in the wrong area (and glad, since I didn't want to wait in that line).

Quick ride on the airport air train, walk to the domestic flights check-in.
Found also long lines, probably even longer than international.
I was also to get into a shorter line for only checking baggage by using my mobile boarding pass.
Then I was thankfully moved to a shorter security line, after a bit of a walk.
The security line was moving along and I went through the screening super fast.

Walked and found my terminal.
Picked up 2 bagels (sadly no jelly this time) and an OJ at the nearby cafe. Kept the bag to eat later.
Then sat and waited for my flight.

Flight from California is of course long just like before (5-6 hours).
I watched two movies (Green Lantern and the Prestige) with no audio on someone else's screen ahead of me (in between falling asleep). Also ate my food and read a little of my book.
Prestige made no sense to me, mostly confusing. I'll have to rewatch Green Lantern sometime, I missed chunks of that.

Arrived in New Jersey. Walked to my terminal.
Found my flight was delayed 1 hour.
Coded on laptop listening to music for a bit.
Moved after terminal was changed.
Then the flight was delayed even more, almost 2 hours.
Walked around looking for food, found a pizzaria. Picked up penne marinara and apple juice.
Went back to the terminal, played some Terraria listening to Enter Shikari until the laptop battery was empty.

Finally flew back to Portland.
Listened to the Cutting the Cable Podcast.
Got a ginger ale to drink even though I said "I'm good"

Arrived at the Portland Jetport. Waited for baggage.
Called a taxi (the same company from my travel out).
Directed the way back home (no GPS?).
Had to pay with credit card over the phone (driver didn't like this, strange since the other driver on my way out was fine with it).

Finally I was home just before 1 AM.
I had a package arrive in the mail. I opened it and found a free GSOC 2011 tshirt to add to my JavaOne collection.

Friday, October 7, 2011

JavaOne Day 6

Final day. Another full one of sessions.

Took the cable car in to OracleWorld/JavaOne.

Walked around trying to find breakfast.
Ran into a guy on a corner suggesting breakfast/dinner places for me, after telling me about his attempts to find a job and get his resume out. Eventually he got to the point, that he wanted to get some food. I asked if he'd come with me, he said no, he just wanted the money. I said I don't have money. He said there is an ATM nearby. I said I just have the credit card. And so that was it, we went our separate ways.
So anyways, I didn't find a place to get breakfast.

Time for the Java community keynote. Here it is filling up while we find a seat:

First part was basically an IBM ad for cloud products. (did I mention how I hate the word "cloud" now).
Next was lots of pushes to use/improve OpenJDK and attend local JUGs (java user groups). I did enjoy the online voting here during the discussions (no we are not using OpenJDK, no I am not attending JUGs since I don't have time at nite).

I got a glass of OJ to drink at one of the breakfast areas. Yay, something. I didn't see anything else vegan. But thankfully I had a bar on me to eat.

Session on HTML5, JavaScript, and Java. Very disappointing. Basically definitions, update on Nashorn, and a demo of running JavaScript on JVM. I wanted the current state of HTML5, browser support, using HTML5 on Java like JSF. I wanted something relevant to me.

Session on enterprise REST. Apparently meant for architects, which is not currently me.
Thankfully there was some code (SSL using Jersey client and basic HTTP auth) but that's it.
Discuss on OAuth, versioning in URI, state in links using HATEOAS, ActiveMQ.
Didn't feel super useful.

Picked up some lunch at Golden Era nearby.
Ordered from the same girl as Loving Hut (both are apparently all vegan!)
Gourmet rice. potstickers. blueberry cheesecake.
Carried the food with me to go, next sessions coming up soon.

Session comparing the speed/performance of web frameworks (world wide wait) supporting an increasing number of users.
Fancy presentation, created demo application to review results, had hundreds of millions of records, over 16 gigs of data.
Most of the discussion was on the methodology to compare the frameworks based on cpu, memory, load time, etc. It was easy to tell that the crowd just wanted the results.
In the end for resource usage, JSF was worst, GWT was best, Spring with jQuery and JSP was right after GWT.
JSF (mojarra) was the only one that had a bad outlier result, error stuck in loop for Map access.
Cost to scale these frameworks for more users was also discussed for the memory/CPU and of course JSF was worst.
For initial browser rendering, Spring/jQuery/JSP was best and flat, JSF grew worse with more users, GWT was worst and flat (for initial load, would be better on following page loads).
Overall, GWT came out on top but is also more complex to develop. The Spring combination was second.

Ate the first half of my Golden Era food. finally!

Last session on Spring 3.1 vs Java EE 6 shootout.
Spring lost (of course) for the amount of configuration XML and code.
But it was also mentioned how Spring is more flexible and allows more configuration and freedom from container (easier to upgrade Spring library version).
And mentioned how these two can coexist.
It was a fair assessment of Spring, but I look forward to seeing where Spring goes in later versions with the CDI standard.

Finally ate the second half of my food (mostly leftover rice).

Took the cable car back to the hotel as usual.

Thursday, October 6, 2011

JavaOne Day 5

Another full day of JavaOne sessions.

And tons of rain.

Went to a session on moving from Java EE 5 to EE 6.
Discussion on what EE 6 includes (CDI, newer EJB/JPA, JAXRS), creating a war instead of an ear, removing EJB interfaces and less layers, JSF metadata and flash, Servlet 3 security authentication managed by container, JPA annotation for removing orphan from collection, cron scheduling annotation, Stateless annotation for REST JAXRS, and criteria API instead of JPA QL.

Session on API paradoxes by Netbeans architect. Dicussion on sustaining V1 of API to not break clients or use cases, process to change API, space in API for changes, handling incompatible changes for bug fix, handling versioning, behavior dependent on API consumer, moving deprecated code to optional module.

For lunch, had the same free meal from JavaOne / Mason Street. Potatoes, grapes, strawberry, wraps, soda. Again slow to get and waiting.

Played Frogger game on one of the glass top tables at the cafe. Got a new high score.

Session on Spring and WebLogic.
Touched on the WebLogic admin/monitoring web interfaces, especially those related to Spring. Used a demo parcel application using JMS with Java EE 5 and spring implementations.

EE6 best practices session! Remove 80% of legacy code!
Discussed how to cleanup code in switching to EE6. Remove interfaces unless needed. Remove DAO, less layers. Remove configuration if is default convention, not needed.
One of the best sessions, fun and entertaining.

CDI best practices session.
Review of CDI (in EE 6) based on Spring/Seam. Extended persistence context, begin and end conversation, EJB only for transaction manager and overhead.

Session on performance and scaling. Discussions on synchronization and locking (focus on path most used), volatile, thread local, concurrency version, data resizing, tools for memory and stack monitoring (mention of VisualVM, but mostly selling other tools), cache misses, more threads/CPU, false sharing. Not all that great.

Again, Loving Hut for dinner. This time with a different selection from the buffet and piece of chocolate cake for dessert.

And again the cable car back to the hotel.

Wednesday, October 5, 2011

JavaOne Day 4

The second real day full of JavaOne sessions.

Overslept till almost 8am.
Both my work and personal phones were on silent or vibrate.
Missed the Java strategy keynote.
Picked at squished, leftover carrot/nut muffin from yesterday's loving hut visit.
Hopped on the bus about 9:45am.
It followed the scenic route and I passed by huge sapphire princess boat in the harbor.
Bus dropped me off at the OracleWorld moscone buildings:

Went to a Twitter session on memory. It was interesting. Lots on JVM and code tuning. Garbage collection, eden size, primitive types instead of objects, factoring out common data, string interning

Had lunch at the JavaOne makeshift Mason Street cafe using one of my lunch cards.
Waited about 15 minutes for the food (special request I guess to get a vegan one).
Picked up an orange soda as well, even though I don't usually drink soda.
I ate and skipped my WebLogic session.

Played some pinball, game called Getaway. Walked around the exhibition room. Picked up a Spring thumbdrive and Jfrog tshirt and pen.

Went to a session on event processing (instead of my balancing performance/quality session). It was on Apache camel, I was bored and walked out.
Went next door to the balancing performance/quality session. It was discussing using the IBM jvm and tracing data. Also boring.

Back to playing pinball, tried 3 different ones.

Walked down to the Marriot for an OracleWorld session on Java EE6, WebLogic and Eclipse.
This was a lecture instead of a hands on lab. There was also no speaker. I left after waiting 15 minutes as did others.

Went to session on JAXB. It was okay, a little dry and not super useful.

Dinner at Loving Hut in mall. Got some food off the buffet this time. Potato curry, sweet and sour stuffs, brown rice. Reminded me a lot of Green Elephant. Especially with the pumpkin pie cheese cake for dessert (not quite as good).

Caught the second half of a session on security. Mostly discussing extreme password restrictions (no surprise there). Also the bads of default logins for containers and returning stack trace info on errors. Followed up by a Q&A (security dicussions are always heated/touchy).

Session on web service security. Only stayed for first half. No code samples, mostly definitions on WS-Sec, SSL, OAuth, and LOTS on OSI.

Caught the second half of the heavy loaded REST session. Not super impressed. Showed code examples of replacing a massive amount of code with a single method call in a REST service. I assume all or most of that complex code still existed behind that one method call.

I think the most useful sessions include real code samples and a good Q&A at the end.

Went to catch the bus back to the hotel.
But there was no bus (well there was, the guy said service had stopped already).
Which begged the question: Why was there sessions so late then?
I was not alone (others from OracleWorld), there was now a group of us that needed to travel back to the same Fisherman's wharf area.
So we banded together.
First idea was to get a taxi. There happened to be a line for taxis at the Intercontinental hotel.
This line was super slow and there were no normal taxis coming back (hardly any traffic on that road).
So next idea, walk around to the busier streets to get a taxi. But there were lots of others trying to get taxis.
And we kept walking until we were so close to the cable car that we decided to take that.
The group went to stand in line to get tickets.
There happened to be a cable car about to leave and since I already had my pass I hopped on.
One of the guys, a bit confused, was going to follow me on, I had to point him back to the booth to get a ticket.
It was a slow ride back around town. I was glad to finally get back. It was a long nite.

Tuesday, October 4, 2011

JavaOne Day 3

The first real day of JavaOne will all day presentations/session.
Up at 6am and out to catch but at 7am to get down to moscone and walk up to the javaone keynote.
Best and most interesting part of keynote was Mark Reinhold's with code snippets for new Java 7 features.

After this I skipped the Spring to Java EE session at 11am (and apparently didn't miss much) to get some breakfast finally.
Walked back down to the little bird coffeehouse and got another breakfast sandwich and oj. good as usual.

Then another great presentation by Adam Bien for the Java EE cool parts session. Fun, actually got me laughing. A lot of the EE features discussed sounded like Spring to me, so the shootout later this week should be good.

Next we walk down to oracle world for a weblogic applications session. This was a super fast run through using Maven to build and the Maven weblogic plugin to deploy, doing these same steps in Eclipse, and setting up this Maven build in Hudson (deployed on weblogic) using Subversion.
Most people in the session had not used and did not even know what Maven was (ugg).
We went through the PDF steps on our own, which was the only way to get through it all during the session.

On my way back, stopped at Loving Hut downstairs at a mall foodcourt. Was so excited to get to an all vegan place. I ordered the sandwich, tenders and fries, and a cupcake to go. Threw it in my bag to eat a little later.

Next was JAX-RS 2.0 session. I was mixed on it, some good new features that I found use but nothing surprising or too exciting. For example, I would use the bean validation integration to replace my custom validation, and possibly also async.

I finally sat down and ate my loving hut food for dinner.

Then I caught the end of the NFL performance session. Interesting things, I enjoyed it. Talked about use of Spring LazyDataSource to avoid checks for available database connection, using specific type in hql query when using inheritance to avoid many joins (like 12), adding indexes in the database for often used functions on columns (upper).

I went up to one of the ballrooms where I expected the Jersey session to be. Caught the end of the Jigsaw presentation when it was on Q&A. This was a bit rough with comparisons to OSGI. A lot of the talk reminded me of Maven (repos, dependencies, version ranges). I am interested to see this added if only for OpenMRS to be using a standard module system (jmod).

Finally the last session of the day at 7pm was for Jersey new features. Again nothing too exciting. Disappointed by avoiding to talk about the async server side and just plugged going to another presentation later to hear about it, and also that most of the talk was on WADL. The JAX-RS and Jersey talks were almost stepping on each others toes with the talk of async.

Back on the bus and back to the hotel.

Sunday, October 2, 2011

JavaOne Day 2

Woke up and tried to skype call home.
Found webcam on laptop (dell precision m6400) not working, could see and hear video but not send. I also didn't being my headset, so all around bad news for video chats.
Tried to resolve the webcam but haven't fixed yet.

Around 9am we left our hotel (hilton at fisherman's wharf)

Walked around looking for breakfast, no real luck in area for me.
Decided to go downtown, i read a review for a place there.
Took the shuttle bus from holiday inn to moscone west, oracle world (much easier on the feet, mine are sore from yesterday).

Walked longer than expected to but finally arrived at little bird coffeehouse.
It's a small place with a hippy style (cash only) that got much busier while we were there.
I ordered oj and vegan breakfast sandwich (although forgot to mention vegan at first) with tofu scramble, daiya cheese, avocado and hummus on english muffins.
Looked like a whole avocado went in it. yummy.

Also picked up two glazed vegan donuts to go, one with sprinkles, one with brown sugar.

Walked back down to oracle world at moscone, passing the javaone area which looks all blocked off.
Stopped in the apple store, super busy.
I said I could only see getting an ipad for a comic reader, but doesn't justify the price.
Much busier at moscone today than yesterday. Lots of oracle world people, few javaone in comparison.
Checked out the oracle world book store. Exhibition hall closed off till tomorrow.

Back on the shuttle bus and back to the hotel to rest for a bit.
This is much more scenic route by the piers.

Back at the hotel about 1pm.

I found out that the internet connection period ended up being 24 hours (so $10 per day).
Attempted to setup the laptop usb connection which wasn't working so far.
Finally, luckily I was able to get it working after I unmounted the usb drive so it detected the device as a modem.
Then I made the mistake of updating the ATT connection manager software for it. Ended up needing to uninstall and reinstall.
So having internet here has been a pain so far.

Left later, walked up, and grabbed a vegan burger and fries to go from burger meister.
Walked back down and hopped on bus to moscone.
Ate my burger and fries outside on a bench, it was good but dry, would have been better if i'd had ketchup.

We went inside to the packed oracle keynote. Stood out back for about 10 minutes listening about the awesomeness of Exadata/Exalogic before we left.

Walked up to the java open house. Nice comfortable atmosphere with food and drinks, atleast until the wind picked up and it got cooler outside, my shorts and tshirt weren't so comfortable.
We even found a cool arcade table with the defenders arcade game built into it.
Played a few 2 person games (for free, could just keep adding credits).

And finally we walked back down to the bus and headed back to the hotel for the nite.
Definitely store on my feet from walking.

JavaOne Day 1

Up at 4:00am, shower, taxi is on time at 4:30am.
Throw together english muffin with jelly to eat on way.
Travel in the dark and rain.
Arrive at portland jetport.
Total cost is $16 for taxi ride (versus $84 to park at airport).
Busy this morning, lots of flights.
Meet up with my coworker traveling with me.
Fly to new jersey on smaller plane.
Arrive in new jersey and remember being there last time.
Pick up OJ and bagel with jelly.
Flight is already boarding my seat, down the OJ and bring bagel in bag.

Fly to san francisco on larger 757 plane, more cramped than smaller plane, baby loud for half of flight.
Mostly sleep but also attempt to read my book "being geek" (quite good so far, will need rereads) and listen to some music/podcast. Also watched most of the captain america move without sound.
Snap a few pictures about midflight. Saw lots of mountains and even two planes that flew by below fast (small jet and larger)

Eat my bagel finally with some apple juice.
Plane descends to land, my right ear as always hurts and doesn't pop for a while.
Plane has a somewhat bumpy descent right before landing, baby crying loudly at same time not helping my nerves, got my heart pounding.
Finally on ground in san francisco early at 11:25 pst.

We take the air train to BART train/subway and then share a taxi to the hotel.
The taxi ride is insane, lots of horn honking, going through red lights/stop signs, up and down big hills.
I check into my room at the hotel since it is ready.
We go out and walk around.
It's warmer than expected, no real breeze, lots of sun, few clouds. i expected cooler.
After exploring a little, back to the room for a break.
Try to setup the internet, found i apparently need to pay for it at the hotel ($10 per connection period?).
We went back out.
Stopped at mood thai (i found online) and had dinner. i had samosa and veg pad thai. both ok, not the best.
We walked down to moscone south to register for the conference and pickup our badge.
Then up to moscone west to pickup our swag (bag, tshirt, water bottle, notepad):

More walking back to the hotel, sweaty and tired walking the hills, we stopped and picked up a drink.
Finally back to rest and shower. The room is pretty standard:

Now to sleep.

Monday, September 26, 2011

Coder at sea. Arg.

In the near recent (last few months) exploration of code and bugs,
I've run into many lessons to learn.

The lone coder.
It seems to happen more often than not.
A single coder is put in charge of a project.
Maybe even a large, long, daunting one.
And because of other priorities, maybe the testing is lax.
So when it is finally released out into the world, CHAOS ensues.
Everyone is then brought on to save the ship.
Scramble, late hours, quick fixes, fixes for the quick fixes, daily redeploys, defensive restarts.
And stability is still off in the distance, another week, two, a month.
So the more eyes, code reviews, the better.

Losing commits.
Having developers on different coding branches can cause this serious issue.
With the different streams of coding, there ends up being a lot of coding, especially if this includes production maintenance, an upcoming release, and new development.
And with those separate spaces (and especially with coders leaving), commits can get lost. The worst example: issues are broken again when fixes are lost, such as when a side branch (based off older code) is pushed to production.

In summary: JAXBContext. A memory hog.
This came up from explicit use and also from JAXWS. Recreating the JAXBContext is expensive and will block threads. I found this by wadding through thread dumps and finding half the threads blocked waiting to read a zip file for the JAXBContext creation. Both from explicit new instance creation (instead of just the marhaller) and from recreating the JAXWS service (instead of just the port).
This can grind the system down, cause constant garbage collections, and require hours of profiling (visualvm) and monitoring.

Error handling.
One example on a small but important project from a former coworker was fun to investigate. Well I thought it was fun, but it was time consuming.
On failing to copy a file, no errors were logged.
The user saw no error message in the UI, the log file was silent, the database had no mention of it.
After searching I found exceptions were being swallowed and the stacktrace message was too large for the database column it was being stuffed into (the database failure was at least returned in the REST call).
And later I found that database values are misconfigured (untested) and resources could have been deployed to production instead of QA (bad bad).
So these are some of the cleanups I've worked on periodically.

Sunday, September 25, 2011

Minecraft blocks

One of my birthday gifts was a set of magnetic Minecraft blocks.
But sadly the whiteboard at my work was not magnetic.

Finally after almost a month, I picked up a new magnetic whiteboard and here it is:

Put it up in my cubicle today. Nice to see one of my coworkers moving the TNT around under the animals.

Tuesday, September 13, 2011

Podcasts Update

I finally finished the last Cutting the Cable Firefly podcast (about the Serenity movie) on my way home from work and it included by feedback!
I actually wasn't expecting to hear it read over the show, so it was a nice surprise.
Mon, Aug 15, 2011 at 10:25 PM
Summer's almost over!

Hey guys,

Just writing in to say thanks.
I started listening to the Fringe podcasts last season and it really made me appreciate the show more.
It felt like I was getting more than just one episode per week of Fringe.

And so this summer I've been listening to the Cutting the Cable podcasts, enjoying them just as much.
I've seen Firefly in the past and loved it.
Although I'm not watching the shows/movies along with the podcasts, I still enjoy listening.
To/from work and just traveling in general, on my second hand old mp3 player.
As I type, I'm loading up the last few to get caught up.

So thanks!
And soon the summer will be over, Fringe will be back, and I can watch Nathan on Castle.
Oh and I'm super jealous of you going to Comic Con.
I hope to go some day. I did go to the last PAX East in Boston which was fun.


Thursday, September 8, 2011

Reading about Aliens?

I fairly recently finished a Dean Koontz novel, The Taking.
I found it at a bookstore (yes a real one with a real musty old paper/glue smell) for $3. After arriving home I thought about the purchase and expected I could find the book cheaper online. I was surprised to find it more expensive by $1 at Amazon, mainly for the shipping cost.
This was a crazy wild ride to read, keeping me wondering.
Basically there are some weird events happening that appear to be aliens invading, or demons, or both.
It all begins with hard rain falling constantly (apparently sucked up from the ocean) with various strange tastes/scents in the rain water.
I enjoyed reading descriptions of the rain when it was actually raining outside.
But then there is a strange feeling of something moving in the sky, a pressure coming down.
And more weird events. A dense fog ceiling. People disappearing or being attacked and killed, gruesome. Corpses reanimating. People floating through floors/ceilings.
And even weirder. UFOs flying overhead. Strange mushrooms with tentacles / people's faces inside, some moving around. Houses acting alive with creatures in their walls. Alien beings stealing people's faces in their hands. Characters/children being safe from the aliens.
I think the first half made some sense. A couple trying to survive. End of the world. Crazy weather. Spirits or zombies, aliens or demons.
But the second half seemed cluttered with all these different ideas that somehow evaporated at the end, literally.
So I enjoyed that it's an end of the world story with action and mystery, but not so much how it mixes in the grand question I think it's asking in the end. Is it possible that our ideas of aliens and demons, other universes and hell, could be one in the same? I'm sure after knowing this, it's probably better on the second read.

Birthday Gaming

Late night gaming on my birthday, played Battlefield 2 Bad Company.
Got kicked out of the second game we were doing well in. Ended up needing to update PunkBuster apparently. And later it randomly froze and I had to restart.
Otherwise, it was good to hop back on there for a few games.

Got some awesome Minecraft block magnets for my birthday (apparently from Etsy).
I tried to put them up on the whiteboard (I inherited from a former coworker) in the cubicle at my work, but apparently it cares not for the magnets. sad. i found a similar looking whiteboard on the Walmart site and it's made out of melamine (non-magnetic).

Thursday, September 1, 2011

More DnD Podcasts

No sadly not more Penny Arcade DnD, but I was alerted to a Robot Chicken DnD game.
I found them as videos on Youtube but I used a nice free service to convert them to mp3s and listen as podcasts,
I started to watch, but I realized I prefer listening. It's easier since I can listen on my commute. But mainly I enjoy imagining, which is harder when I'm staring at the players and reactions.
I think I'd probably listen to any DnD game hosted by Chris Perkins from Wizards of the Coast.

Bulk Work Tools

Recently a bunch of files needed to be fixed. Specifically a group of xml files needed to be generated online (on a logged in site) and then have text replaced in the files.
The plan was to divide the work among three of us, but I thought I could get it done faster/easier by automating it. And I was just curious to see how I could.
Sure, a simple script is one way, but I wondered what tools could do this. And so here is what I ended up doing.

I queried to get data needed to build the urls needed to generate each of the files. I put the urls in hrefs in an html file, simple regex replace to make the urls/links. I used a Firefox plugin, Download Them All, to auto download the files from all the links in the html file, and also rename them. Then I used Notepad++ to find and replace text in all files in the directory, Find in files. And that's it.
I do a lot of editing in a simple text editor, though it's usually been in Notepad2 instead of Notepad++, for source code highlighting (xml, etc), but that may change now.

Monday, August 15, 2011


My time playing games comes and goes.
Days playing Bad Company 2, Left 4 Dead, Wii have been few and far between.
Although the last few days I've been getting into Terraria a lot, it gifted to me.

At first, I only thought of it as a 2d version of Minecraft.
And it sort of is, but then again it's not.
A lot of time spent with a pickaxe collecting blocks or wood. Crafting.
But that's about all I did in Minecraft, explore and building stuff. Except for the random zombie multiplayers early on.
And I'm doing those in Terraria, but it also feels like more.
I do appreciate the 2d view and being able to see farther around me, especially handy with the many monsters I have to fight.

Lately played multiplayer, fighting Cthulhu and Eater of Worlds. I got a grappling hook, silver armor, demonite helmet/axe/sword/pick, green light saber, mana, magic mirror, quick boots, miner helmet. Lots of super helpful items.
I like that I can bring these between the single and multiplayer.
Then on the single player I fought a goblin army, found the old man, found two meteorite sites after him, mined most of one using some bombs, fought lots of meteor heads, lost my money from dying so many times (mostly falling), saw a star fall and destroy a zombie, had two more meteors fall (somewhere). Picked up a harpoon, vilethorn, bands of health/mana.

Tonite, as advised, I got the MoreTerra map viewer to create a map image of the my Terraria world. I found an island right above me, about 150 blocks up. There I got to watch zombies jump off, collect a little gold, and find a balloon to jump higher.

Anyway, in summary, it's better than I originally expected. I was hooked easily after some multiplayer and getting better items.

Friday, July 29, 2011

Podcasts and Music

For a while, I was only listening to NIN's Downward Spiral
To and from work, on the cassette tape in the car
(Yes just a cassette player in the 14 year old car)

But I finally started listening to the Cutting the Cable podcasts, especially those on Firefly.
Listening on the old 1G SanDisk mp3 player I inherited (looks like only $23 for one new)
This is apparently a summer project from Fringe podcasts guys (how I heard about it)
I'm not watching the Firefly episodes, but I do appreciate them more.
And I'm looking forward to watching them again at some point.
Probably on Netflix streaming, unless their pricing changes again.

JavaOne in October

As of yesterday, I am signed up to attend JavaOne 2011.
It will be from October 2-6 in San Francisco, California!
This will be my second time on the west coast and first time in California.

Normally I wouldn't attend such an expensive ($2k to register) conference but work is paying.
And yesterday was still during the early bird pricing.
I'm registered but still need to book flights and a hotel.

I can't really be excited about it. I don't like flying and I'm not sure what I'll be doing there.
These talks do sound interesting.
And at least the registration info said it could cater food for vegans.

Coincidentally Java7 became available yesterday.

I don't really care. I mean it is nice to see movement on Java. But I'll be more interested after the updates come out and it becomes stable.
Not that i'm even working on the latest Java6, so who knows when I'll try out the new features.

Sunday, July 10, 2011

Coding Cave

Finally after a month and half, I have emerged from my coding cave.
I was completely immersed a the project up until its inevitable release into the world.
And late in the process, there was lots of scrambling and solving issues/blocks as always.
I was up late nights, spent little to no time gaming.
Maybe I should call it coding tunnel vision.
Thought about renaming this blog to 'coding by candlelight' but I see it was already used.

At the end of this long process, of course the deployment wasn't smooth.
One of the big lessons was more TESTing.
That one area that wasn't fully tested, that was ignored, it will come back to bite you for the smallest mistake, and it did.
There were atleast 3 bugs/problems in a section of untested code that delayed a fully working deployment. Despite being small and simple to fix, it took time.
So next time, put the time/emphasis needed on testing.

It's definitely a scary feeling having your creation, grown in a sterile and safe environment, unleashed into the open where chaos will reign and attempt to break it.
But at the moment, so far so good.
And although I am happy to move onto new work, I do look forward to going back and improving it soon.

Sunday, May 15, 2011

New HD and Gaming

The new internal harddrive from Newegg arrived, a Western Digital 500GB caviar blue.
I installed the hardware and rewired, cleaning a little in the process.
Then I initiated, partitioned, formatted, waited over an hour or so for it to complete.
And finally the empty 465GB of space was available.

I moved the Steam install to the new drive and began downloading Bad Company 2 and Left 4 Dead 2.
In the end these took up about 20GB of space.
I could only hope that BC2 would run on the other machine (new drive was needed as no space available) since it won't run on this single core old machine.
And it has been about 2 months since I last played it on my now relinquished work laptop.
Thankfully it appears to run fine so far when I tested the single player.
Besides the new HD, I picked up a new headset, Logitech H530, which is the same model my old coworker had and a slight upgrade to my relinquished work headset.
So hopefully I am now set for some gaming again.

TV Catchup and HD

Finally, I watched the Fringe finale, and wow it was action packed.
The future! Death of Olivia! Disappearance of Peter!
Leaving so many questions!
I haven't listened to the Fringe Podcasts about the finale yet, but am looking forward to it.

Also finally watched The Cape finale.
I had hoped it would try to end the show well, but it didn't.
It only left on a mostly sad and unfinished note.
In the end it was a comic-hero show that had potential for a but didn't live up to it, and sadly another cancelled show for Summer Glau (Firefly, 4400).

Watched a couple new shows lately.
Including the US version of Being Human. So far it has been better than expected given the reviews I read (either loving or hating). I'm of course a fan of supernatural themed shows with vampires, werewolves, ghosts (Supernatural, True Blood, The Gates, Angel). And yes the werewolf always makes me feel bad for him and his sad face.
Also a show called Moonlight off Netflix about a vampire detective that is cheesy (green screen background in car) but I like made-for-Scifi-looking shows.

I found a lonely Western Digital 1TB USB external harddrive lately.
I tried it out with some TV content since the 80GB and 40GB drives on this machine are mostly used up.
It was seamless to add another video source in XBMC for TV shows and have them appear in the same list. Videos played fine from it as well. Ended up loading about 12GB of content on it.
But it wasn't all smooth. Getting the data on the drive could be slower at times, apparently from being overloaded.

JSONP, Proxy, Valve

I'm not a JSONP fan.
But overcoming the cross-domain REST calls is important.
I don't like that it is restricted to GET requests.
I don't like that it doesn't return any error information from the server.
Yes, I could make GET versions of my POST calls. Yes, I could return error messages in a custom json error object.
But I'd rather not if possible, and there are other options.
I've read countless examples of writing up some PHP proxy code, to make the request to a different domain but allow a local request for it.
But I much prefer setting up Apache with mod proxy and a rewrite/proxy rule to handle it.

Recently I wrote my first Tomcat/Catalina valve, although to be used in JBoss.
This was also my first time coding using Apache Commons HttpClient.
It worked surprisingly well to accomplish the same goal to proxy the request without using Apache.

Wednesday, May 11, 2011


Although I really don't have time to devote to it, I am acting as a mentor on a Google Summer of Code project (Maven related) for OpenMRS.

Tonight we finally were able to connect on Skype and have a productive session going through the bumps of getting started.
I was able to get my dev VM environment up (despite its protests) and we could walk through using the existing code together, tackling errors and exceptions as the appeared.

Sadly this is really the only window of time I have available, in the hour before sleep.

Monday, May 2, 2011

jQuery Plugins

I've been trying out a few jQuery plugins lately: templates and globalization
Although the documentation for them is somewhat lacking
I made a few examples using them and I was impressed with the results

I originally started looking at the templates plugin as an alternative to the datatables plugin
Not to replace datatables, but just as a simpler solution for filling in tables rows without needs like paging and sorting
I originally found the jQote plugin and then the templates plugin. Very different syntax between the two, and I chose the later.
It was as simple as creating a template for a row (in script tag, mixing html and javascript) and passing in a JSON array of data.
Works well with REST services passing json data back.
Also with JSON mappings for descriptions, like supporting multiple languages (re-render template with new JSON data).
One thing I didn't use from any of the template plugin examples was the use of appendTo(), instead just setting the html() value.

For globalization, I just wanted to be able to format dates, format numbers, and parse dates.
But also have the flexibility to easily change this formatting (like month name in the date or currency) based on the locale.

These two plugins are in a beta version, and I look forward to them being released and official jQuery plugins (as mentioned in news stores from last year).

Maven, New Comic

I had an old Java project lying around, a simple class to parse a Wikipedia page and send an email when text changed.
I used it to notify myself when a new issue of a comic, the Walking Dead, was available.
Finally I took some time and converted it over to Maven.
Surprising as it is, I didn't have it installed on here, so I had to set it up.
I created a basic pom and ended up changing to using commons-email instead of just the mail api and smtp.
Finally I ran the class using the maven exec plugin.
I also configured the main class and classpath in the jar plugin, incase I decide to run it as a jar instead.

I like Maven, I am an enthusiast, but migrating to Maven is not smooth, especially with ongoing development.
Usually a branch gets created, porting and testing the project in Maven, while trunk dev continues.
And since merging can be ugly and lose information, it can be better to just redo the changes on trunk when ready to move over.
I've done this in the past by creating a bash script to run on the trunk when ready, moving the files to the standard layout and adding the poms.

So the comic issue notifier code works well as long as someone else is updating the wiki page,
which didn't happen this time, so updated the page myself.

Read through the new Walking Dead issue #84.
Glad to see the possibility of Carl surviving, the group working together, and Rick finding himself.
I was disgusted with Rick in the last issue, running away and leaving people he cared about to die.
This issue restored some of my faith in him.
Though if Carl died, I can just imagine him spiraling out of control.
I really hope this doesn't happen, Carl is badass, like the gunslinger, and I hope he continues on.
Waiting time, another month to find out.

Sunday, May 1, 2011

TV, Fringe

Although I like XBMC, it is not without its issues.
Sometimes new shows are not picked up when trying to update the library.
I've seen this happen a few times.
But recently I found that exiting library mode, navigating to the show, and looking up the show information solved the problem.

I've gotten into Fringe more lately. I'm caught up with all episodes on Hulu.
There is s03e19 LSD in Olivia's mind with Inception-like creepy moments where everyone on the street stops and looks, and animation with zombies! Thankfully this episode ended Olivia's annoying Bell voice.
Then s03e20 6:02 AM with Peter and Olivia finally together, the surprise of the machine rejecting Peter, and the start of the machine's destructiveness.
And just finished s03e21 Sam Weiss explaining a little about Sam, and having the very dramatic moment of Peter and the machine with his life building up to that moment.
These episodes have been exciting and pulling the pieces together.
But now only one episode is left for the season! I have no idea where it is going, apparently the future?

Since I ran out of Penny Arcade DND podcasts, I went looking for a new podcast.
I stumbled across the Fringe podcast and I have enjoyed it so far.

Wore my superman shirt recently and finally watched an episode of Smallville after a long break.
Like Fringe, s10e12 titled Collateral took place inside the minds of the characters, in a virtual reality reminding me of the Matrix.
Over halfway through the final season!


I found myself staring into an empty breadbowl
and it reminded me of Minecraft
digging or exploding a cavern underground
and I haven't played it in a while
but it is still fresh in my mind

I always find myself excited by SVG images
usually through my viewing of Wikipedia
to be a scalable image and XML data
like HTML5, too bad browser support is still lacking for it

Sunday, April 24, 2011

REST and Bugs

Sometimes the need to code out ideas just infects the mind or becomes an obsession enough that you have to get it out. Maybe that's the normal mode of operation when you are actually interested in the work.

Lately I've been working with Jersey, the JAX-RS (JSR 311) REST library.
I've worked with servlets, I've worked with JAX-WS annotations, and this seems to merge the two nicely.
My initial reaction was that it was super easy to create simple GET methods and return XML or JSON using JAXB annotated classes.

My second reaction was that I couldn't organize the services the way I wanted. For example, Jersey doesn't allow the resources to share the same path. This is exactly what I wanted. First to be able to put it only on the interface and share it in both the real and test resources. Then to be able to use a path annotation for the package and have path annotations only on the resource methods to differentiate them. And I'm guessing this would be possible if the path namespace was by method (or package/class/method) and not by class.
But although it works, path annotating interfaces is annoying because of the ugly logged warning messages.

My third reaction was that inputting data wasn't as simple as returning data. While the GET return handled the conversion to JSON/XML well, it proved more difficult for the incoming parameters. I was attempting to pass in both simple string parameters and complex JSON or XML data together with the later being automatically converted to the JAXB entities like the method return values. I eventually found that I could accomplish what I wanted using a POST with query params, where the body contained the structured data and the Consumes annotation (like the Produces) determined how to interpret it.

In other news, I've tried out the PMD (again) and FindBugs maven plugins, both helping to point out and prevent bugs in code.
In testing I saw results pointing out string concatenation in a loop, not closing resources for certain conditions, bad null check logic, unused fields and imports, empty catch blocks.
Finding faulty null logic with findbugs has been very useful to point out where these assumptions are different in code (passing null in one location and assuming it is not null in another).
My only complaint with findbugs is not being able to generate the html report outside the site goal like the pmd plugin.

I'm not sure if it exists, but what would be useful is a tool to point out classic test lines in code. I mean where two adjacent lines of code both define a value for the same field, but one is commented out and the other is not. This is especially true where one of the lines defines a hardcoded value.
But I guess the answer is to have a proper unit test that says "hey, you left this crap line here". And to use version control and review your commits thoroughly.

Tuesday, April 19, 2011

Last PA DnD Podcast

I didn't realize that I was mostly through the last episode of series 4 in the Penny Arcade DnD podcasts, but I finished it and the bonus on the way into work this morning.

Now I am sad to say that I have run out of these podcasts (until more are made). These were fun to listen to and I flew through them. I eagerly await more to devour.

TV Sidenote

Enjoyed the s02e14 episode of Community with its DnD game, especially the evil Pierce. It was a much more free form game than I expected, but fun.

In a related note, haven't finished the latest DnD podcasts yet, but still watching lots of PATV, going through the latest season.

Still enjoying White Collar, now on season 2. But one thing I despise are the green screen clips for Elizabeth. They should have setup the plot to have her away, maybe only on phone calls, but instead there are these aweful looking and obviously staged clips. ugh.

After finally watching an episode of Supernatural after a long break, watching other shows, I really had missed it.

Saw some of the Social network the other day and remembered how much I like the soundtrack (of course since I'm a NIN fan), that I have it, and now I am listening to it again.

Monday, April 11, 2011


I spent most of the weekend trying to setup a new dev environment.
This machine is already filled up enough and I'd rather not clutter it up more.
So the answer of course is... virtual machine!

But it wasn't a simple or short process.
I had VirtualBox installed previously, Innotek version.
And I found a ready Fedora image, since I've usually worked with Linux under RedHat/Fedora/CentOS.
But I decided to upgrade to a newer VirtualBox version.
I tried the latest Oracle 4.0.4 version but it failed to start.
So then I tried a Sun 1.6.6 version, this installed and started fine.
It did warn about upgrading my previous Innotek settings, apparently the reason the Oracle version failed to start. Only a warning, it then updated the settings and continued on.
But after several attempts at trying to add the guest additions, I found I couldn't use this version.
So I removed the old settings and went back to the Oracle version.
Success. I was also able to add the guest additions (despite the mixed/lack of great documentation).
I found this newer version (unlike the two Sun/Innotek previous) already had mouse integration, so I mainly needed the additions for the video support (larger view).
To add the additions I roughly did the following: yum update, yum install dkms gcc kernel-headers kernel-devel, reboot, mount additions iso, run linux additions.
The kernel-headers and kernel-devel will be for the latest kernel version, hence the reason for the update (especially the kernel to match).
Having the original OS image came in very handy, being easy to start the process over and over and over.

Now I continued on to install the minimal pieces I needed: Java, Maven, SVN.
For Java it was the Sun rpm download and install, for Maven it was just the download and env vars (java_home, m2_home, path in .bashrc), for SVN it was the package installer.
All different paths but all the same end, I could run from the command line.
But for another reason I wanted to use the Java plugin in Firefox, but luckily I was able to find reference to link the Sun in jre lib to in mozilla plugins.
In the end the original VM image grew by almost 2G with all these updates and installs.

Friday, April 8, 2011

Words, DND, Dead

I've gotten addicted to Words With Friends recently on iPod
I had a run with some good points, including wandS + joustS (52) - could have played gnawS (73), loving (30), Oracle + gO (48)
Those were in the same game, giving a 150+ lead. Also played hand (42) in another game.
I played best when I planned my next moves right after playing a word, so I had options and their points.

Finished Series 3 of the PA DND podcasts with the fall of Aeofel.
Just started Series 4, switching out Chris Perkins for Jerry as DM and adding Kris Straub. Definitely a different feeling, but a nice change. I do hope to see/hear more DND adventures with the previous characters and Chris.
I've also been catching up on older PATV, including the DND episode.

On the topic of DND, although I'm interested in it, I've never played.
I've mostly grown up playing video games:
Atari with Star Wars, Combat, Dig Dug, Off the Wall, Jungle Hunt, Frogger
Gameboy with Tetris, Super Mario, Metroid,...
Any arcade games like Centipede, Pac Man, Mortal Kombat, Street Fighter, Tekken, especially liked Spy Hunter,...
PC with Wolfenstein, Doom, Diablo, lots of free games on CDs including Descent,...
A friend's Nintendo with Super Mario, Double Dragon,...
A friend's Sega with Sonic
Tons of Super Nintendo with Donkey Kong Country, Ninja Turtles, Super Mario, Shaq Fu, Smart Ball, Super Ghouls & Goblins, F-Zero, Super Punchout,...
Other friend's consoles including Playstation like Tony Hawk and Guitar Hero,...
Wii with Sports and Super Smash Bros
More PC like GTA, Max Payne, Battlefield 2, Combat Arms, Half Life, Counter Strike, Left 4 Dead, Minecraft, Portal,.....
Ok, I'll stop, there are just too many to attempt to list and no way I will remember them all
But the point is, I've been a video game guy
And yes, I've played card and board games but definitely not as much, so DND is completely new for me

Read through the latest Walking Dead comic #83 and wow, it finally hit the fan in a big way. It came out a week early but I didn't get to finding out or reading it till this week.

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:
The Big Bang Theory
How I Met Your Mother
The Mentalist
Grey's Anatomy
The Office

Smallville and Supernatural are on hold at the moment.

Newest TV shows we are catching up on:
White Collar
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