Aug 1 2008

I want CFGoto!

Sometimes when I'm working in ColdFusion, I get a little fed up with trying to do things that aren't quite functions, aren't quite objects, and aren't even justifiable custom tags. Things like rendering a specific pod in a stack, or programatically choosing which pods to render.

I'd really like a solution from a much older form of thought to show up in ColdFusion: I'd like to be able to have a given .cfm template jump to any line within itself, run some code, then jump back. This'd include any template it <cfinclude>'d, allowing me to use variables in my <cfinclude /> to do some really dynamic stuff.

I think I'd call it <cfgoto />, and it could jump to any <cfmarker />. Seriously, it's in many high-level languages, why can't we do it in ColdFusion?

This'd be so nice:

<cfloop from="1" to="#arrayLen(pods)#" index="i">
<!--- Forks to the block of code that renders a pod --->
<cfgoto marker="renderPod_#pods.getName()#

<!--- Pod rendering code <cfgoto />'s back to here --->
<cfmarker name="podRenderLoop" />
</cfloop>

20 comments - Posted by Joe Rinehart at 11:09 AM - Categories: ColdFusion MX

Aug 1 2008

iPhone 3G vs My Old Palm Treo

Last Friday, I stood in line for a few hours to pick up an iPhone 3G out in Durham.  I've had it a week now, and I figured I'd write up a short review comparing it to what it replaced - I'm afraid I don't have as much to say as Ben Nadel, so if you're looking for an in-depth iPhone 1.0 vs. iPhone 3G review, I'd check out his review.

First, some background:  for the past year and a half, I've been lugging around a Palm Treo 6-something.  About the only cool thing about it was that it was red, which continually made Adam Lehman jealous.  I'd picked it up because I was travelling a good deal more than I had been prior to its purchase, and I wanted a phone that'd let me do four things:

  1. Sync my iCal
  2. Sync my Address Book
  3. Get e-mail
  4. Instant Message (via GTalk or SMS)

When I bought it, I was assured that this phone handled all of it in spades, being even more compatible with my Mac than its Treo 7-series brethren, which ran some portable version of Windows.  It did perform all of the above, but with the following caveats:

  1. An iCal event spanning multiple days would result in one event per day on my phone.  When it sync'd back up, it'd create all of these events in iCal.  Considering that I'd keep 90-day consulting engagements as events on a calendar, this made iCal syncing absolutely useless.
  2. Address book sync'd fine.
  3. E-mail....worked like 1 in 10 times.  Normally connections would just fail.
  4. SMS worked great, but the IM software I used would crash randomly and reboot the phone.  I don't really blame the software, though, because of the largest problem I had with the Treo

At least once a day, I'd be doing something with the Treo, and it'd freeze then show me its boot screen.  About one in three of these times, it wouldn't even make it to reboot, and I'd have to remove / reinstall its battery.

Ok, now on the iPhone 3G side of the fence:

  1. iCal just works.  It's their own software, kind of a no-brainer.  I'm impressed by the UI and by it automatically picking up alert settings.
  2. Address book works, sometimes a little too well:  I changed the photo associated with the "Joe Rinehart" contact that I use to call home to a picture of my house.  It's also associated with the joe@firemoss.com e-mail account.  It unexpectedly reverse-synced the photo change to Address Book, so I now see my house whenever I read an e-mail I sent.  Works exactly as it should, but that's not something we're used to in the IT world (things working in the most logical and seamless manner).
  3. E-mail works nicely.  I was out working from a coffee shop yesterday, my phone shook, and it was a grocery list arriving from my wife Dale.  I could zoom in and keep it legible while in the store.
  4. SMS works great, giving an iChat-like interface.  I wish there was a mini iChat client on the thing, though, for GTalk - using Google's Safari based mobile app for the iPhone works, but it's not my favorite thing.

All in all, the iPhone has exceeded my expectations when it comes to business purposes.  Its wi-fi paired up great with the 4-5 local networks I use regularly, so if I'm not in a car and I'm in my hometown, I'm likely to be wi-fi.  3g is acceptable, but burns batteries - I've got it turned off unless I need IP connectivity and I'm not in a hotspot.  The UI, of course, blows away any phone I've ever used.  I'm a happy iPhone 3G customer.

  • 8 comments - Posted by Joe Rinehart at 7:45 AM - Categories: Off Topic

    Jul 30 2008

    Sean Corfield is Frustrated

    Last night, Sean Corfield indicated that he's a little frustrated because he's not blogging as frequently as he'd like.  That's largely because we're working on a few projects at Broadchoice that we really can't talk about, but I can say that I've been working a little bit of overtime because the subject matter is just so darn cool.

    So, while Sean's frustrated, we've got a triad of SaaS products under development that are chock full of interesting technologies keeping us busy.  Hopefully we'll be able to blog about the technology soon, maybe even on a new official Broadchoice Engineering blog.

    5 comments - Posted by Joe Rinehart at 11:54 AM - Categories: Broadchoice

    Jul 29 2008

    Broadchoice is a meme!

    John Whish has posted a blog entry entitled "How to get a job at Broadchoice" - apparantly we're a meme now! His blog entry is both insightful and nakedly honest, talking about some of the hurdles to be overcome when you're a lone developer without a development team or mentor.

    Apparantly I work with a bunch of trendsetters...

     

    2 comments - Posted by Joe Rinehart at 11:59 AM - Categories: Broadchoice

    Jul 29 2008

    Want Spring and Hibernate? Buy these books.

    I've been messing around with Hibernate for the past year or so, and have used Spring to manage it whenever possible.  Last Summer, I spent a full weekend Googling and piecing together information from blogs to learn how to "properly" integrate the two (along with ColdFusion) - there's a ton of information out there (some wrong, much outdated).  Spring 2.x, in particular, simplified a good deal of stuff when you move beyond simple wiring up of beans and into concepts like transaction management.  Many of the blog entries and articles I could find contained pretty stale information.

    Luckily, there's a book that I've recently read that shows you the "right" way with a minimum of fussing about:  Spring in Action.  Its second edition covers Spring 2.x and the many simplifications (esp. for AOP) it's introduced into the Spring framework.  It begins as a great introduction to Dependency Injection (DI / IoC) and Aspect-Oriented Programming (AOP) then covers the major spring modules (DAO / ORM, remoting, security, MVC, and so on...) in order.  I'm likely to skip some sections, such as AOP or SOAP-based remoting, but they're there if I need them.

    If you're shopping for Java books, I'd also recommend Java Persistence with Hibernate if you've any interest in Hibernate.  It covers (sometime in a more academic depth than necessary) just about every imaginable case for using Hibernate.  What I really enjoy with this book is that it often talks about the theory and underpinnings of ORM, showing you why things are the way they are in Hibernate, even if sometimes counterintuitive.

    Last but not least, make sure you check out Amazon's used book prices - I picked up Spring in Action along with O'Reilly's Java Message Service for a combined total of $31.49.

    2 comments - Posted by Joe Rinehart at 8:12 AM - Categories: Joe Drinks Java

    Jul 28 2008

    Remembering my Grandmother's Roto-Edger

    My neighbors think I'm crazy because I use an ancient tool to edge our lawn where it meets our driveway and sidewalk.  It's a manual edger called a "Roto-Edger" that's hard to use in our thick, tangled Bermuda grass.  It works great, but it's a very manual process that's a lot harder to use than a gas or electric edger.  It's a weirdly sentimental tool for me - it's the only "thing" owned by my paternal grandmother I've ever seen.  (She passed away years before I was born, but I'd like to think that her hard-working spirit has been passed down.)

    At work, as we move more and more into using tools that automate our development lives (ORMs in particular), I have to remind myself constantly to think in terms of the Roto-Edger from time to time.  This morning I was working with a bunch of the transactional and TDD support classes in Spring for Hibernate and TestNG (respectively), and realized I getting to the point where things were so automated I had lost track of what was happening at a lower level, and it was this loss of perspective that was causing a problem that took me a little while to figure out (specifically transactional conflicts between AbstractTransactionalTestNGSpringContextTests and annotations-based transaction demarcation in a DAO).  When I set aside all the automation and remembered what each piece of the puzzle was doing, the problem became very clear, and resolved itself quickly.  Even though all the cool tools definitely speed up my development life, the problem never would've existed if I was working manually.

    Moral of the story:  I need to remember what all the tools are doing under the hood, and even though I'm not doing the work manually, it can help to think manually.

     

    8 comments - Posted by Joe Rinehart at 12:55 PM - Categories:

    Jul 25 2008

    North Carolina: pwning East Coast ColdFusion

    When I moved to North Carolina two and a half years ago, I wasn't really aware of its ColdFusion community. Being used to DC, where ColdFusion has a strong federal presence, I'd grown used to a large quantity of ColdFusion developers.

    While us North Carolinians may lack in quantity, I think we're making up for it in quality. If you're looking for a concentration of ColdFusion brain power, it's hard to find a small area that packs a larger punch than the Raleigh / Durham ("Triangle") region (go TACFUG!).

    Here's who we've got, in a randomish order (please comment if I missed you!)

    1. Dan Wilson - Fearless TACFUG leader and contributor to Model-Glue.
    2. Brian Kotek - ColdSpring contributor, MVC framework master (he can speak Fusebox, Model-Glue, and Mach-ii fluently, knowing the ins and outs of each)
    3. Doug Hughes - Alagad founder and owner of Reactor
    4. Qasim Rasheed - The quiet Java-focused voice of reason in Tacfug
    5. Myself - Model-Glue author
    6. Beth Bowden - SQL guru responsible for helping to bring Reactor to Oracle
    7. Jim Priest - Process and tooling expert

    4 comments - Posted by Joe Rinehart at 2:30 PM - Categories: ColdFusion MX