JPA Experience

It started with Hibernate, but really did not stay there long. Moving to persistence frameworks was really a no-brainer: our method of instantiating objects from the database was bulky, inefficient, and prone to problems. Plus, everybody and their brother wrote the data loading in a completely different manner, and let me tell you, the way that some of those methods were written would make your eyes explode.

Hibernate offered at least some relief in that regard. Plus it allowed us to migrate to a connection pool, even though that never made its way into production. Since my team abhors all things easy, we have to provide specific credentialing in order to log in and perform business logic. Generic connection pools need not apply, but after some patching, I at least got Hibernate to the point where it could use statically-instantiated connections.

Fast forward in time to JPA and EclipseLink.

Much of the same restrictions were there, but there was a new catch that nearly brought my team to its knees.

EntityManager.clear();

Don’t use it. I know it looks all innocent and such. What possible harm could it cause? I mean come on, if you’re looking to use the most recent data, then what better way is there to ensure it’s shown than to clear out the Entity Manager’s persistence cache and re-fetch live data?

It shocked me to find out this single statement was responsible for bringing down the entire application. It was used after several action methods to clear the cache and display updated data. I had advised my team to use parental refreshes that then filter down to the child objects, but because this statement was far easier than actually fetching/instantiating the parent object, well, it spread like wildfire.

I could pull an “I told you so”, but after 3 weeks of hell at the office, I couldn’t care less anymore.

So lesson learned.

Google Maps

Maybe it’s lazy. Maybe it’s a cheap way of using technology to substitute for actual experience and knowledge. I can’t deny any of those arguments for a second, but the fact of the matter remains:

Google Maps rocks.

And not just for getting directions (amusingly enough). What I am pouring love out to Google for relates to my writing efforts.

I make no secret of the fact that I do not travel much. Most of my vacations are taken to well-established ground, and normally while flocking in a group. Until I got married, I had never even been off the East Coast except for one quick trip to Chicago (when I worked for Verizon. Man that’s a story and a half). When we got married, my wife and I took our honeymoon on a cruise to the sandy pink beaches of Bermuda (though we never actually made it to those beaches. Was way too windy to don the swim suits).

As a result, though, my experience of other cities and locations is extremely limited. Most writers will insist that you only write what you know. I’ve tended to go by that philosophy in my time, writing quite a bit about the tri-state area around which I live. Many of my stories orient around the DC metro area, since it’s popular enough to be interesting and local enough that I might know what the heck I’m talking about.

I’m trying to branch out, though. There are two ways I can do that.

The first I tried in Wayward Thread, my most recent completed novel manuscript. In this fashion, I am intentionally vague. The story takes place in the Boston area. I even go so far as to specifically mention Boston College. However, much of the story takes place in unnamed locations along unnamed streets. The finale of the story takes place in a cabin in “the middle of nowhere”. While I believe this method was effective, to me it became clearly transparent that I was writing about a location I knew nothing about.

The second method I’ve tried in Taming Pandora and Nobody of Importance. This, as mentioned in this article, features Google Maps to the rescue. Both of these stories feature some level of law enforcement, including the FBI in Nobody of Importance. It would be really, really hard to write a whole novel without mentioning where in the world the story takes place, and without referencing some actual, living locations.

I picked Chicago in this story because I’ve actually been there, even if I did not get the chance to scour around. It’s also a high-focused city insofar as satellite imagery goes. The Google Street van has been through a big chunk of the city, offering real-life perspectives of the area.

I’m not saying this is a permanent practice. If I am still writing by the seat of my pants in ten years by asking Google what I should believe as opposed to seeing it for myself, I’ll be very disappointed. But for now, for a starting writer with a very limited budget, it’s a tool. It’s a very valid tool that makes it seem like I know what I’m writing about.

And that is always a plus.

Time Travel – what do you do first?

I posed a question to a few people recently:

Imagine that you woke up one morning and you discovered you were back in 10th grade. You still had all of your memories of growing up, of your adult life, but you’re once again a youth. What would you do?

I suppose I am not too terribly surprised by the resulting answers. Most people that I asked responded by saying they would either terminate a crappy relationship or try to initiate a successful one earlier than they had the first time around. One of my friends even mentioned that she would go across the state to her current almost-fiancee’s school and cause a disruption during his football practice. When I asked her why, she just commented:

“To see if he notices me! He always said that if he knew me he would have liked me, and I want to try and prove him wrong.”

Time travel is powerful stuff. When i was in tenth grade, it was 1997. That was before the bombing to the USS Cole in 2000. It was obviously well before the WTC attack in 2001. If I was better acquainted with 90′s history, such future knowledge could be well used.

Yet, I will say this…

The question was originally borne from an idea I have for a short story series. Essentially the main character wakes up back at his parents home in the past, when he was in high school. His first gut instinct is to call his wife, who no longer remembers him. Grief-stricken, he blindly fumbles his way through school, only to encounter an ex-girlfriend there that he seems to have a poor history with.

So obviously, my first reaction to writing this series is the emotional angle as well. Granted, this story angle has some pertinence to the series, but that’s still a curious aspect of the human mind. We are relationship-oriented creatures; that’s an obvious fact. I just find it curious how far we’re willing to take that orientation, and how much of the “better good” we would allow to slip to see it happen.

Call to New Members

I’ve been getting some spam to my in-box lately about a steady influx of new members on this site. Thus far, I’ve heard nothing from anyone. In that regard, I encourage anyone new here to leave a comment in this thread and introduce themselves. I’d be especially interested in how you discovered this website.

I hope to hear from you soon.

On Zombies and Things

Given the vast number of zombie-related games, movies, and other media available lately, it’s obviously no secret that there is a vast interest in the undead. Wikipedia blames George Romero, and rightly so. He certainly popularized the zombie in modern media and gave it many of the connotations presently attributed. I would say this interest ties into the post-modern expression of the Doomsday scenario. If you branch out to that level, there are even more end-of-the-world movies, games, boardgames, whatever available to fill any need. One only needs to look at the mid-90′s to see a slew of movies that fit into that genre nicely.

And yes, I enjoyed Independence Day. I still enjoy that movie. So whatever.

Most of these movies, games, and other paraphernalia center around mankind’s survival, its ability to overcome these kinds of tragic, seemingly-inevitable extinction events. Undoubtedly this stems from the human fear of death, and what happens afterward. If we feel we have a fighting chance to delay it, most people will be able to accept a situation and push forward to try and prevent it. I think that’s the appeal for such end-of-the-world plot lines. It’s certainly a reason, I believe, why Armageddon fared better in theaters than Deep Impact (though don’t be disallusioned: Deep Impact still raked it in with a lower budget than its competition).

End-War Chronicles is not an “end-of-the-world” scenario, per se. It certainly holds that level of threat, but the idea of the story series is to expand upon what man would do in the aftermath of an undead uprising. I’ve enjoyed crafting a world together from the remains far more so than describing the actual war (of which I’ve written very little). My wife has very little interest in the actual “zombie stories”, but she has been intrigued when I tell her about the situations and circumstances some of my characters have gone through. She’s interested in the survival conflicts, the same as she was when she watched Independence Day or Day After Tomorrow.

My main focus with this series, as a result, has been to aim my story lines at that very aspect: survival. Sure, I have the requisite combat and creepiness associated with such stories, and I’m certainly not trying to imply that I don’t enjoy those aspects. Quite the contrary: I had plenty of fun recently describing the battle one of the 13th Rangers encountered prior to his infection.

However, the real enjoyment came later on when I described what he encountered prior to his turning. It’s these mental aspects that keep any undead series original. Think back to recent films: what was more enjoyable? 28 Days Later or the new Dawn of the Dead? If you’re like me, the latter film bored you to tears. There was nothing original. Sure, the zombies ran. Big deal. We’ve seen this already.

That’s been the big challenge of the End-War Chronicles: what can I do to keep it new? I can create scene after scene of zombie encounters, but let’s face it – it gets boring after a while. There are aspects I can do to change it up, but in the end if it’s just “undead invade again”, then nothing new has been gleaned. The story essentially chases its own tail.

I’m about 12 stories or so into the End-War series (despite the wiki on this website being broken and unattended for some time). The stories I enjoy the most bring something new to the table. They show the walkers and similar undead evolving, and what’s more, how humanity reacts to such evolutions. Most of them are fairly simple. For example, one recent story featured walkers who did not fall down dead when a bullet pierced their brain pans. It’s a simple change, and certainly not that much of a stretch with creatures that can take inhuman amounts of damage anyway.

What was intriguing about it was how humanity saw that. It introduced the concept of undead growth and response. It hinted at the walker’s ability to adapt, something unknown and frankly terrifying. These creatures already ransacked the world, and now they are showing the ability to make themselves even more resilient. It opens the question of what comes next? Is it permanent? Will all walkers now require three bullets in the head to put them on the ground? What kind of evolution will they undertake next?

Better yet, how can a dead creature evolve?

These kinds of exploratory concepts make these stories so interesting to me, as a writer. I’ve gotten the opportunity to bounce ideas off of what I would consider my target audience: a friend of mine that loves Resident Evil and enjoyed watching 28 Days Later. These concepts intrigue him the most. They don’t wander too far from the normal concept of a zombie, yet introduce elements that can be truly terrifying (assuming I don’t screw it up in the telling).

I’ve enjoyed crafting the walker undead, and further enjoy evolving them in some fashion. The grief-stricken aspect was only the beginning. It made them different. It made them creepy. Now I need to find ways to make them terrifying without crossing the line that Resident Evil made. I don’t want biological terrors. I want human ones.