Code Renaissance is about building great teams and great software. By exploring best practices, team interactions, design, testing and related skills Code Renaissance strives to help you create the team and codebase that you've always wanted.

ASP.Net Code Blocks: Pound vs Equal (%# vs %=)

I got a runtime error after changing a pound code block(<%#statement%>) to equals code block( <%=statement> ) in some legacy ASP.Net code that I was cleaning up . I'd never seen the pound version before and had assumed it was an old obsolete way of doing things. Since this clearly wasn't the case I decided to do a bit of digging.

Eventually I turned up a post on code blocks by Dan Crevier that shed some light on things.

He summarizes the differences as follows:

  • The <%= (equal) expressions are evaluated at render time.
  • The <%# (pound) expressions are evaluated at DataBind() time and are not evaluated at all if DataBind() is not called.
  • <%# (pound) expressions can be used as properties in server-side controls. <%= (equal) expressions cannot.

This helped explain the error I got; unfortunately the post itself was hard for me to find (Google doesn't support searching for non-alphanumeric characters like less-than, percent, pound and equal) so I'm throwing this out there in hopes that it'll show better in search and help some people. All props to Dan though; he did a lot of work to research this.

Thanks Dan. launches new url shortener to replace, the default url-shortener for twitter, has just launched a new site (saving two whole characters; I know you were counting) which will apparently replace

Moments ago I was automatically redirected from to, then after trying again a few times I received a error message from Firefox saying that the redirect would never resolve. Then the link worked again.

My next test was to try to see if a link would resolve if changed to and it does. and are equivalent. And if you go to and you'll see that other than the logo the pages look the same.

Looks like a permanent replacement is in the works.

Update: has confirmed launch but not a permanant move. Then why test a redirect from to Maybe they're waiting for brand recognition and trust to build up for before flipping the switch? That's my guess anyway.

Why Twitter needs more than 140 characters

I express my thoughts and ideas on my blog so my output stream on twitter is limited to two things:

  • sharing links to content
  • sharing quotes

Often I combine the two: I quote great content and include a link to it. Unfortunately this requires me to slaughter the quote.
Case in point, I recently found a post by Kevin Anderson that compared old media's response to Twitter to their response to the rise of the internet (and how well that faired). The post included some excellent quotes by Douglas Adams on the internet and I found one I wanted to share. Unfortunately the quote was much bigger than 140 characters and there was absolutely no way to shorten it and keep its meaning.

Witness the slaughter:
  • (317 char quote from Adams) What should concern us is not that we can't take what we read on the internet on trust - of course you can't, it's just people talking - but that we ever got into the dangerous habit of believing what we read in the newspapers or saw on the TV - a mistake that no one who has met an actual journalist would ever make.
  • (149 char heavily edited quote; lacking attribution or link) [it's] not that we can't take what we read on the internet on trust [but]… that we ever got into the dangerous habit of believing… newspapers or… TV.
  • (Actual 140 char post) Douglas Adams "[it's] not that we can't take… the internet on trust [but] the dangerous habit of believing… newspapers/TV"

Note that the final, horribly crippled quote lacks any attribution to Kevin Anderson for providing it and is sadly not retweetable since it has maxed out at 140 characters even in it's current, sad state. Also, if you go to the original quote, note that the ellipsis are single characters (not the proper way to do them on the web); so they may not be valid characters for everyone viewing, but it saved space so it's a trade off.

Also note that I changed to, saving 3 characters (both formats are converted to links by twitter). As noted by others, there should really be a way to attach a link as meta-data and not have it count against your character count, but unfortunately twitter's remained unresponsive to that request.

Honestly even just another 50 characters would make a huge difference in the user experience, but multiplied by the number of tweets in a day it would take up a significant amount of bandwidth, so I understand why they'd be reluctant to do so. I think that one way to monetize twitter might be to charge a flat rate for an increase in characters. An extra 50 characters per message could cost 4$ a month, 100 characters for 7$. I'd definitely be willing to pay a modest amount for that bandwidth; unfortunately there may not be a significant number of people out there who would.

Jacksonville Code Camp 2009

Jacksonville Code Camp 2009 was this past Saturday and it was the best, most well organized Jax code camp yet. I gave a talk on "Becoming a Renaissance Developer" and the found the room surprisingly packed... until they found out the IPhone developer talk was next door.

Due to the demise of my Laptop the week before, including the loss of all of my notes and slides, I gave a revised presentation which ran short (just 25 minutes long). Fortunately there were no shortage of questions and the rest of the time was filled up with Q&A (I think we even ran a few minutes over) so over all it went very well.

During the session before my talk I found a large lecture hall and spent the time practicing in front of an empty room. Despite the lack of audience it felt very official and helped me feel a lot more prepared when I actually did it in front of people; definitely something I'll do next time.

Thanks to UNF for hosting the event and to all the sponsors. A special thanks to all of the Jacksonville Code Camp organizers and volunteers for putting on a great event.