Subselect with inline comma delimited query result

I needed to write a query that would output a list of entities, with a subselect containing all of it’s related entities (could be multiple) in a comma separated list. This was for a one time report, so performance was not a concern, just simplicity. This post was had a solution that dominated my task, check it out!

New ROM/Kernel combo (Ava-FroyoV6 & KiNgxKernel #4) for my Evo

So far the combination of Ava-FroyoV6 and KiNgxKernel #4 seems extremely promising. I flashed last night, charged to 100%, turned on GPS, BT, Wifi, and 3G (no 4G), unplugged and went to bed. Five hours later I woke up to 98% battery left. That is pretty incredible even for standby time. We’ll see how it goes as time passes. The scary part is that battery life usually improves after flashing a new ROM with more use.

GC overhead limit exceeded?

If you are experiencing this error while (especially while using ORM in CF9), I recommend taking at look at Ray Camden’s post to resolve the issue. I was absolutely destroying outlook by doing full error dumps and sending emails to myself!

Gmail’s new CheckAll Filter

With their recent update, it appears they have replaced the links that used to be at the top of your inbox (all, none, read, unread, etc) that you could click to check that subset of emails. The new convention is pretty neat. Now, the “check all” box for your inbox has been replaced with a sort of hybrid checkbox/select. You can check it and as you would expect it, would check all emails below it. Otherwise you can click the select arrow to see a list of those same commonly used subsets that used to appear at the top of your inbox. Clicking one of these options will select the corresponding subset of emails, just like the links used to.

I personally think this is a really neat idea for any criteria based list UI that has a subset of criteria that is more commonly used than most. I always liked what they were trying to accomplish by providing a shortcut to commonly used criteria, but I like this implementation better than the last. Looks cleaner.

Another new addition (at least I believe it is new) that I find noteworthy is also somewhat related to the check all functionality. In the past, check all was limited to only the records visible on your page. Any emails beyond that you, would have to click to that page and hit check all for those as well. I think this is a frustrating scenario that many developers have encountered at some point. When someone truly needs to check all, not just what is visible on the page, often times the solution I have went with is to offer a “View All” option in the pagination. Problem here is you are sacrificing the performance benefit of loading up only a single page of records. With some larger result sets, this might literally not even be an option for you.

Google has implemented a UI here that allows the user both options at the same time. Checking the check all box will check the visible results on the page for starters, but you are then also greeted with a linked message asking if you would like to check ALL results, even beyond that of what is on the page. This offers each solution, but with neither do they sacrifice the performance of paginating results.

I’d like to see them do one thing to take it a bit further. Right now, the link appears to only be presented when you check all options. I don’t see any reason why you shouldn’t have a link with the same option for the options available in the select for unread, read, etc. I want to be able to select all unread messages, and have it present me with a link that tells me the count of unread messages throughout the inbox and asks me whether I’d like to select those too.

Overall though, I give a thumbs up to the new enhancements.

Pandora sometimes strange interpretations

Don’t get me wrong, I LOVE Pandora and use it literally 6-8 hours a day while at work. However, today it decided that while listening to Bullet for my Valentine radio, that it would throw out a Sarah Mclachlan track. Makes perfect sense. This is not the first, or the weirdest one it has come up and I am sure it won’t be the last!

FlushAtRequestEnd=false does not stop everything (misinterpretation on my part, not a bug)

DISCLAIMER: This is misinterpretation is probably more attributed to this being one of my first experiences with ORM and my first experience with Hibernate. I imagine those experienced with Hibernate are all very aware of this.

When I started my ColdFusion ORM project, I learned quickly that the recommendation seems to be to set FlushAtRequestEnd to false. For those not familiar with this, it is defaulted to true, and when true, will ensure that each and every change made to an object will be persisted to the database when the request completes. Setting this to false ensures that you have the control to determine when this flush occurs by calling ORMFlush() when you are ready to persist the changes. Or does it?

I had a scenario where there my application used the function below for both adding and updating payer objects.

ColdFusion:
  1. public void function savePayer(Payer payer){
  2.      EntitySave(arguments.payer);
  3. }

Well at first I forgot to place my ORMFlush() call after the EntitySave. No biggie, nothing should be saving though because of this, right? Wrong, updates were not coming through, but I found that inserts were actually working despite the flush never taking place. Long story short, after spending over an hour trying to debug the issue, I went back to dig into the documentation more and low and behold, I found something I must have skipped over before.

"The only exception to this is that objects with nativeId generation are inserted immediately when the object is saved."

My database is using identity insert for the primary key generation, which I believe qualifies as "nativeID generation". Now that I know this is how it works it makes perfect sense, how can it possibly return you an object with a primary key generated by the database without actually saving it to the database? Hopefully this saves someone some time and frustration.

Composite Key Guid & Int

I have been reading up on the pros and cons of INT vs GUID primary keys and have learned quite a bit I wasn't aware of regarding the downsides of GUID when it comes to indexing and performance. One thing I saw a few people suggest was to use an INT as the clustered primary key and then a GUID as a nonclustered key in addition to this. The idea is that you would have the performance benefits of using the INT as the primary key, but still maintain the ability for two way data synchronization across servers.

My question is this. It seems to me that if you one were to use GUID as the primary keys, a tool like SQL Data Compare would be extremely powerful as off the top of my head, I feel like data synchronization would be a breeze. However, if the guid was only a secondary key, and INT was still used for primary keys and foreign key reletionships, then I would think that an automated tool like this would not be effective. My assumption is the GUID would only exist on the original record, not on related records, therefore there would be conflicting primary/foreign keys causing confusion to a data comparison tool. Yes, with stored procedures these secondary GUID keys would make it possible to perform two way synchronization, but don't see it as offering the same level of ease that using the GUID as a primary would.

Anyone have experience with this concept and want to chime in? Maybe I am misinterpreting the way this has been described and someone can steer me in the right direction.

HTC Evo 4G battery life

For everyone worried over the Evo's battery life, here is some screen captures to show what I am getting. I have rooted and am running a custom ROM (Fresh Evo 0.3) as shown in the last image. Also, I am running the overclock widget, and down-clocking my CPU to the minimum when it is not being used. Not entirely sure which of these has had the most impact, since I introduced all of it at the same time, but I am satisfied with the results so far.

Android Development – Getting my feet wet

This weekend I setup my local environment for developing Android applications and did a Hello World tutorial. I'm tired of sitting around complaining that the app I want isn't there. I'm just going to start writing them! Hopefully it doesn't take me too long to get rolling.

Uhh what?

Very informative alert when running the spell checker in the editor for posting in WordPress.

One can only assume this means no spelling errors? Honestly, I have no idea.