<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10193025</id><updated>2011-04-21T20:44:58.042-07:00</updated><title type='text'>Blog Obligation Monkey</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10193025.post-112630021185571393</id><published>2005-09-09T14:08:00.000-07:00</published><updated>2005-09-09T14:10:11.873-07:00</updated><title type='text'>This site has moved...</title><content type='html'>I have officially setup a Typo Blog at &lt;a href="http://www.substantiality.net"&gt;http://www.substantiality.net&lt;/a&gt;. RedCloth/Textile is enabled, Comments are open to the public, and... well, pretty basic install for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112630021185571393?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112630021185571393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112630021185571393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112630021185571393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112630021185571393'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/09/this-site-has-moved.html' title='This site has moved...'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112615069968068195</id><published>2005-09-07T20:36:00.000-07:00</published><updated>2005-09-07T20:40:35.533-07:00</updated><title type='text'>I've finally done it...</title><content type='html'>I broke down and ordered a domain through GoDaddy.com (read about 'em through the awesome slash7.com blog), and a TextDrive account.&lt;br /&gt;&lt;br /&gt;Since the money's spent, hopefully that'll motivate me to setup my own blog there. I'll probably discontinue posting here for now hopefully.&lt;br /&gt;&lt;br /&gt;My new domain names are substantiality.net and substantiality.org (substantiality.com was taken by a squatter). As in: "I'm poor. When am I gonna get mo' substantiality at work?" :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112615069968068195?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112615069968068195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112615069968068195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112615069968068195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112615069968068195'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/09/ive-finally-done-it.html' title='I&apos;ve finally done it...'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112614979844062498</id><published>2005-09-07T20:09:00.000-07:00</published><updated>2005-09-07T20:34:40.086-07:00</updated><title type='text'>Javascript is cooler than you thought</title><content type='html'>We'll write a helper to prove it.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace; background-color: ivory; border: dotted 1px #444; padding: 10px; color: black;"&gt;&lt;pre&gt;&lt;br /&gt;String.prototype.format = function() {&lt;br /&gt; content = this;&lt;br /&gt; &lt;br /&gt; if(arguments) {&lt;br /&gt;  args = arguments[0] instanceof Array ? arguments[0] : arguments;&lt;br /&gt;  &lt;br /&gt;  for(i = 0; i &lt; args.length; i++) {&lt;br /&gt;   regex = new RegExp('\{' + i.toString() + '\}', 'ig');&lt;br /&gt;   &lt;br /&gt;   content = content.replace(regex, args[i].toString());&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; return content; &lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;alert('{0} is {1}. Yes, I said {0}.'.format('Javascript', 'cool'));&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I whipped this up in a couple minutes. It's had no real testing. I wrote something similiar at work, so I don't expect you'll have any problems with this, but no promises. ;)&lt;br /&gt;&lt;br /&gt;Also, this should be at least IE6 and Firefox compatible. Been meaning to try it on Safari... The only real concern is that the browser supports the instanceof keyword. If not, there are workarounds online that should do the trick.&lt;br /&gt;&lt;br /&gt;Why does the code also accept an Array? So you can write other things like an Array.append(content) method that optionally accepts arguments after the content parameter, sticks them in a new Array like so: for(i = 0; args[i] = arguments[i + 1]; i++);, and then pass the new array to content.format(args).&lt;br /&gt;&lt;br /&gt;Tada! Now you not only have a useful Array.append method (this[this.length] to get the next new element), but you also have the equivilent of an Array.append_format in the same method. Now is that slick or what?&lt;br /&gt;&lt;br /&gt;Told ya Javascript is cooler than you thought. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112614979844062498?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112614979844062498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112614979844062498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112614979844062498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112614979844062498'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/09/javascript-is-cooler-than-you-thought.html' title='Javascript is cooler than you thought'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112614566236573473</id><published>2005-09-07T19:06:00.000-07:00</published><updated>2005-09-07T19:14:22.373-07:00</updated><title type='text'>Hand me down tools?</title><content type='html'>Jeremy D. Miller has a &lt;a href="http://codebetter.com/blogs/jeremy.miller/comments/131741.aspx"&gt;great post&lt;/a&gt; at CodeBetter.&lt;br /&gt;&lt;br /&gt;Here's my mini-response:&lt;br /&gt;&lt;br /&gt;I think it's important to keep the "competition" in mind. Ruby and Java both bring something very important to the table .NET only has a poor approximation of (despite many talented developers working on the problem): AOP&lt;br /&gt;&lt;br /&gt;This is what makes a truly robust O/R Mapper like Hibernate possible. It's what makes an entire framework like Ruby on Rails take less time to develop than tools like NVelocity, NHibernate, WilsonORMapper, etc.&lt;br /&gt;&lt;br /&gt;Not that they don't all have very talented people behind them doing great jobs, but c# is frankly crippling compared to the flexibility of Ruby's mixins, or Java's default virtual methods.&lt;br /&gt;&lt;br /&gt;And yet Microsoft spins their wheels coming up with solutions to problems that are already solved with things like Comega. Does anyone with experience with both honestly think ASP.NET + Comega will be able to hold a candle to Ruby On Rails? Will any of it result in less or cleaner code? Will I be able to extend it through metaprogramming?&lt;br /&gt;&lt;br /&gt;So what's the point?&lt;br /&gt;&lt;br /&gt;It seems a shame that Microsoft made such a really beautiful versioning system, and then crippled their flagship language for versioning concerns. When I can run multiple versions of the .NET runtime side-by-side transparently, why should versioning have been such a problem? Target the assemblies to a version, and be done with it.&lt;br /&gt;&lt;br /&gt;But instead of fixing the problem, they put out flashy PR like Comega that really brings little new to the table and misses the boat completely. We need flexibility. Until we get it, c# will always play second fiddle to Java IMO.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112614566236573473?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112614566236573473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112614566236573473' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112614566236573473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112614566236573473'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/09/hand-me-down-tools.html' title='Hand me down tools?'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112555004590242561</id><published>2005-08-31T21:20:00.000-07:00</published><updated>2005-08-31T21:47:25.906-07:00</updated><title type='text'>So you wanna be a coder?</title><content type='html'>Read these books:&lt;br /&gt;&lt;br /&gt;"Introduction to c# using .NET" by Robert J. Oberg&lt;br /&gt;"Head First Design Patterns"&lt;br /&gt;"Patterns of Enterprise Application Architechture"&lt;br /&gt;"Anti-Patterns"&lt;br /&gt;"The Pragmatic Programmer"&lt;br /&gt;"HTML for the World Wide Web with XHTML and CSS: Visual QuickStart Guide"&lt;br /&gt;"JavaScript &amp; DHTML Cookbook"&lt;br /&gt;"Programming Ruby"&lt;br /&gt;"Agile Web Development with Rails"&lt;br /&gt;&lt;br /&gt;Also:&lt;br /&gt;&lt;br /&gt;Anything that has "Cookbook" in the title is generally about showing you reams of well-written, working code covering a wide range of problems. They're a great way to learn by example.&lt;br /&gt;&lt;br /&gt;For any given subject you'll probably want 3 books: An Introduction, an Advanced book, and a Reference or Cookbook. The last is actually optional since there's just so much to be found on the web these days and online documentation is better than the books sometimes.&lt;br /&gt;&lt;br /&gt;In a few months you'll be programming on a new level (if you aren't already familiar with the subject matter of course).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112555004590242561?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112555004590242561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112555004590242561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112555004590242561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112555004590242561'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/so-you-wanna-be-coder.html' title='So you wanna be a coder?'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112515457944982160</id><published>2005-08-27T07:48:00.000-07:00</published><updated>2005-08-27T07:56:19.466-07:00</updated><title type='text'>Ruby DBI</title><content type='html'>Google for Ruby DBI, what do you get? A sourceforge homepage is the top result. That's not maintained though. What you actually want is the sixth link down. The current release of DBI is on RubyForge. I only just learned yesterday that the sourceforge version I was using is two minor revisions out of date.&lt;br /&gt;&lt;br /&gt;No SQL Server specific fixes as far as I can tell, but a number of small fixes to do mostly with statement parsing and preparation, so probably good to have.&lt;br /&gt;&lt;br /&gt;Plus there's fewer file overwriting installation failures, which is certainly convenient not to have to rename/delete existing files in your one-click installation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112515457944982160?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112515457944982160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112515457944982160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112515457944982160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112515457944982160'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/ruby-dbi.html' title='Ruby DBI'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112494357623500767</id><published>2005-08-24T20:53:00.000-07:00</published><updated>2005-08-24T21:19:36.243-07:00</updated><title type='text'>Home PVR</title><content type='html'>A couple weeks ago I started building a Home Threater PC, here's a quick blurb on the experience:&lt;br /&gt;&lt;br /&gt;KnoppMyth: Wasn't stable with my Plextor M402U (USB2 Divx capture device)&lt;br /&gt;&lt;br /&gt;Fedora Core 4: Worked fine with my stand-in Athlon64 box, after about 20 hours of hacking that is, and never did get it working right with my DirecTV D10-100 satellite reciever (wouldn't change to channels under 100, even with the directv.pl script). When it came time to swap the Athlon64 out for my new media-center box (Intel 945G, Celeron D, etc), FC4 would hard-lock when detecing the Intel HDA soundcard. You'd think Intel on Intel would be a sure bet, but oh well.&lt;br /&gt;&lt;br /&gt;While trying to download Knoppix, Unbuntu, and Gentoo, my Fedora Core 4 based laptop crashed. Despite popular opinion it actually seems pretty easy to crash a Linux box if you spend much time in a GUI (KDE &amp; Gnome also seem laggy compared to WinXP).&lt;br /&gt;&lt;br /&gt;After all this I made the decision that Linux has a long way to go for the desktop. The shell is great, running a Lighttpd server is great, but as a workstation? Unless you've got hardware that's a couple steps behind the cutting edge, and unless you're willing to put up with some "quirks", you should probably stay away from Linux as your main workstation in my experience. Until you know all the ins and outs anyways.&lt;br /&gt;&lt;br /&gt;WinXP: Downloaded SageTV and BeyondTV. Stuck with SageTV after a few minutes since it had much better picture quality by default. Maybe BeyondTV can be tweaked to be the equal of SageTV, I dunno, but I gave up on MythTV precisely because I was tired of tweaking. Shot off an email to SageTV support and by the end of the next day they had me an update that allowed it to change to channels below 100 on my satellite reciever controlled by a serial cable. We're pretty sure we're gonna stick with SageTV. The picture isn't quite what you might expect for a PC plugged up to a ceiling mounted projector over regular DB15 VGA cable, but it's at least the equal of our old ReplayTV, so that's good enough for now I suppose.&lt;br /&gt;&lt;br /&gt;If you're thinking about an HTPC, and don't have a lot of Linux experience, I'd probably suggest you go with SageTV unless you're planning on running older (non VIA) hardware, with a Hauppage PVRx50 capture card, and analog cable. If that's the case you could probably be up and running with KnoppMyth in 15 minutes. If it's not, you should probably get a handle on Linux in general before you attempt a MythTV setup.&lt;br /&gt;&lt;br /&gt;My overall impression is that there's a lot to love about Linux, and there's a great community out there supporting it, but a lot of it seems to suffer from the "gee-whiz" factor. ie: Developers creating something really cool, but loosing interest when all the fun bits are there, and leaving something that doesn't always work too well. Cream(VIM) is a perfect example. One of the best editors I've ever used, with simple touches that make all the difference like color themes in dark tones you can stare at forever and never a hint of eye-strain. It also looses syntax highlighting for seemingly no reason sometimes though, or crashes, or fails to load without a graceful error, etc...&lt;br /&gt;&lt;br /&gt;I realize that's not completely fair, as considering how many packages are involved in your average setup, it's only a small fraction that suffer any instability. Just the same, they spoil the party.&lt;br /&gt;&lt;br /&gt;It really seems a shame that it seems the vast majority of Linux and the apps that run on it are written in C++. You'd think Java would be a much bigger player in the Linux world. It'd certainly result in simpler, more stable code I'd imagine.&lt;br /&gt;&lt;br /&gt;Oh well, this post isn't a knock on Linux. Linux is great. Just a knock on Linux as an HTPC on new hardware, or hardware outside of the 90% adoption realm.&lt;br /&gt;&lt;br /&gt;WinXP + SageTV is where it's at for HTPC in my opinion. Atleast currently.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112494357623500767?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112494357623500767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112494357623500767' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112494357623500767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112494357623500767'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/home-pvr.html' title='Home PVR'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112493197962628141</id><published>2005-08-24T17:50:00.000-07:00</published><updated>2005-08-24T18:06:19.633-07:00</updated><title type='text'>Ruby Everywhere!</title><content type='html'>Hey, drop me a line if you know how to do a Word Mail-Merge through OA.&lt;br /&gt;&lt;br /&gt;Anyways, another win for Ruby. Excel automation is a piece of cake, and it doesn't have the interop funkyness of c#. Yup, converted another coworker to Ruby today. It's infecteous. :)&lt;br /&gt;&lt;br /&gt;Oh, btw, if you're using Ruby and DBI's dbd_ado driver, MAKE SURE TO USE SQLOLEDB database connection strings! That's the one that looks like Provider;DataSource;InitialCatalog instead of Driver;Server;Database. Update and Insert statements will magically fail to work with no warning if you don't. It can be very frustrating.&lt;br /&gt;&lt;br /&gt;A buddy at work finished parsing a 1.3GB file in Ruby today. Parsed and written out to Yaml for archiving takes around 20 minutes. Having done a fair amount of c# processing I'm fairly impressed at Ruby's performance, and this is without StringBuilders or custom Buffers or Arrays or anything. He tried 'em of course, but the performance benefit was so slight as to not be worth the extra lines. I had some serious gut-feeling doubts that Ruby would be up to the task, but I'm pleased to say I couldn't have been more wrong... EXCEPT: Ruby really needs OS threading. It's not such a huge impact on this file, but there's definitely times where the resources could be better utilized, and it takes more thought to build a smooth process than should really be necessary. (Though still, not much code)&lt;br /&gt;&lt;br /&gt;I'm convinced that Kernel::eval() could play a role in creating a "Smart Parser" if I got a chance to sit down and have at it for a few days. Something that could use a data-dictionary to derive what it could, and actively ask questions to fill in it's knowledge gap when it came across areas of files it couldn't. Might sound a little Sci-Fi, but I'm convinced it's feasible with the right coders behind it (and hey, that might not be me ;) ).&lt;br /&gt;&lt;br /&gt;Ruby's certainly spreading like wild-fire at work it seems. Most of my and a collegue's (sp?) current work is now in Ruby.&lt;br /&gt;&lt;br /&gt;Now I just have to figure out how to automate a mail-merge... ugh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112493197962628141?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112493197962628141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112493197962628141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112493197962628141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112493197962628141'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/ruby-everywhere.html' title='Ruby Everywhere!'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112442383144831645</id><published>2005-08-18T20:56:00.000-07:00</published><updated>2005-08-18T20:57:11.456-07:00</updated><title type='text'>454 Lines</title><content type='html'>454 Lines of code in the new final final version of the Javascript Calendar.&lt;br /&gt;&lt;br /&gt;That's a lot.&lt;br /&gt;&lt;br /&gt;But it's cross-browser, bug free, fast, sweet.&lt;br /&gt;&lt;br /&gt;I have a new appreciation for how truly crappy IE is btw. The latest is that under certain times of year and cycles of the moon, you can't use .innerHTML, even on DIVs. So I had to create my year, month, and day containers with the DOM, and then, BEFORE I appended them to the document, I could fill in their content with .innerHTML. If I appended them first I'd get a runtime error. If I tried the += operator on an existing element, I'd get a runtime error.&lt;br /&gt;&lt;br /&gt;Another special specialness that IE has brought us: You can't assign strings to events when creating DOM elements. In other words:&lt;br /&gt;&lt;br /&gt;myelement.onmouseover = "alert('boo!');";&lt;br /&gt;&lt;br /&gt;Doesn't work. No, you have to define functions:&lt;br /&gt;&lt;br /&gt;myelement.onmouseover = function() { alert("boo!"); };&lt;br /&gt;&lt;br /&gt;This isn't always bad of course. It can make longer strings a bit more readable. Say you wanted to pass in a value though, aka:&lt;br /&gt;&lt;br /&gt;myelement.onmouseover = "MyArray[TWENTY_EIGHT].doSomething();";&lt;br /&gt;&lt;br /&gt;Now what? TWENTY_EIGHT is out of scope when the function is fired, so you can't just blindly replace that with a function like the following:&lt;br /&gt;&lt;br /&gt;myelement.onmouseover = function() { MyArray[TWENTY_EIGHT].doSomething(); };&lt;br /&gt;&lt;br /&gt;So what do you do? Well... I got around it with attributes:&lt;br /&gt;&lt;br /&gt;myelement.setAttribute("myIndex", 28);&lt;br /&gt;myelement.onmouseover = function() {&lt;br /&gt;    MyArray[this.getAttribute("myIndex")].doSomething();&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Yes, it's true. IE sucks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112442383144831645?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112442383144831645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112442383144831645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112442383144831645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112442383144831645'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/454-lines.html' title='454 Lines'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112433819702948965</id><published>2005-08-17T21:05:00.000-07:00</published><updated>2005-08-17T21:09:57.036-07:00</updated><title type='text'>JAAJAX and the state of Ajax on .Net</title><content type='html'>To flame or be civil? That is the question. :)&lt;br /&gt;&lt;br /&gt;Ok, I'm going to try to be nice here. Jay Kimble (CodeBetter member) has posted an Ajax library. He calls it "JAAJAX" aka: Just Another AJAX.&lt;br /&gt;&lt;br /&gt;His intentions are good enough: He hopes to start setting some best practices for Ajax usage.&lt;br /&gt;&lt;br /&gt;Or are they?&lt;br /&gt;&lt;br /&gt;My position is we don't need 'em ("best practices" that is). The rules of good use of Ajax are no different than anything else. He mentions Ajax Security concerns later... but the overall message is, don't deviate from what you should be doing now with regular pages. Is this really something that needs repeating? Good coders will seek out ways to improve. Bad coders can't be force-fed. Nothing new here.&lt;br /&gt;&lt;br /&gt;Let's get down to the real problem though: His library leaves a lot to be desired. I know, harsh. I don't mean for it to reflect on anyone as a coder. In fact, JAAJAX is rather similar to Ajax.Net, which I myself thought was decent enough. So similar in fact, that you end up wondering what the point is. Beyond that though, Ajax.Net itself is a poor example of how to implement Ajax.&lt;br /&gt;&lt;br /&gt;Why should you listen to me? Well, for one, the style of JAAJAX and Ajax.Net breaks Seperation Of Concerns. ASP.NET's half-assed idea of a "Controller" now has to discern between Ajax, and regular requests. Why should it? Plus you just end up having to write a lot more code than should really be necessary for the task.&lt;br /&gt;&lt;br /&gt;So what's a decent Ajax Library?&lt;br /&gt;&lt;br /&gt;*THE* Ajax Library is Prototype. SoC is maintained (well ok, you might need to add shell Actions to deliver full page layouts for non-Ajax requests, but that's a minor compromise compared to the alternatives), and the only code to write is a Javascript one-liner in your View. It makes all other libraries I've seen (especially on .Net), look like bloated, needlessly complex crap.&lt;br /&gt;&lt;br /&gt;Plus it also provides handy Javascript classes to toy with, and it's as cross-browser friendly as they come.&lt;br /&gt;&lt;br /&gt;When Ajax is as simple as a one-liner, what's the prob? That people have the power to write crap code? Crap code is crap code... wether it's Javascript, VBScript, c#, etc.&lt;br /&gt;&lt;br /&gt;So what's the conclusion? If you're stuck in .Net land, what should you be using if you want to get your hands dirty with Ajax? The answer is easy: MonoRail, whose Ajax support is based on Prototype. Once you write an application in MonoRail you'll never want to go back to regular ASP.NET. Just don't look at Ruby On Rails. As I read on another blog: If you haven't by this point, then don't. It may lead to depression, despair, etc when you realize you've been writing two or three times as much code as you needed to get the job done, and Rails makes anything else look like spaghetti code no matter how clean it is. :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112433819702948965?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112433819702948965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112433819702948965' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112433819702948965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112433819702948965'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/jaajax-and-state-of-ajax-on-net.html' title='JAAJAX and the state of Ajax on .Net'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112345561866466884</id><published>2005-08-07T15:50:00.000-07:00</published><updated>2005-08-07T16:00:18.673-07:00</updated><title type='text'>Know thy Javascript.</title><content type='html'>Ok, Javascript &amp; Ajax seem to be taking a beating lately. Lets kick out a couple pointers so people feel more comfortable with it:&lt;br /&gt;&lt;br /&gt;element.setAttribute("attr_name", attr_value);&lt;br /&gt;elemenet.getAttribute("attr_name");&lt;br /&gt;&lt;br /&gt;The above works in Safari, Firefox, Konquerer, IE, you name it. Don't be tempted by element indexers, named attributes, etc. setAttribute() &amp; getAttribute() are the only ones you should use.&lt;br /&gt;&lt;br /&gt;timeout = window.setTimeout(function() { alert("Test!"); }, 5000, "javascript");&lt;br /&gt;window.setTimeout(function() { window.clearTimeout(timeout); }, 2500, "javascript");&lt;br /&gt;&lt;br /&gt;This is how you cancel something. If you're going to popup a window with a timer for example on an element mouseover, make sure you cancel it appropriately. Don't let events just chain so your popup's contents flash through 5 different elements before getting to the current one. Cancel the previous timer when mousing over a different element.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112345561866466884?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112345561866466884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112345561866466884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112345561866466884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112345561866466884'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/know-thy-javascript.html' title='Know thy Javascript.'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112338569569508959</id><published>2005-08-06T20:23:00.000-07:00</published><updated>2005-08-06T20:34:55.703-07:00</updated><title type='text'>Fedora</title><content type='html'>So I've got this site written in Rails, and my manager seems pretty excited about setting an Apache server up under Linux (Fedora Core 4). Unfortunately I've never really used Linux. Just a few failed attempts at installation. :)&lt;br /&gt;&lt;br /&gt;So Friday I fought all day trying to get the site setup on a machine at work. They had already installed Linux on it, including Apache, but the docs on the Rails site assumed I would be installing Apache myself. By the end of the day I hated Linux.&lt;br /&gt;&lt;br /&gt;Or rather I hated that it made me feel stupid. So today I give it another go. Last night I downloaded the FC4 DVD. Today I installed it, including the option to include Apache so I would hopefully duplicate near enough the configuration at work. Since I've installed it on my Compaq Presario X1000 laptop, it took me awhile to figure out how to get the wireless working. (I have a Broadcom 4306 based WirelessG MiniPCI card I upgraded to from the stock Intel 2100 or whatever) Eventually I bit the bullet and surfed over to Linuxant (which I was avoiding since I'd read it's not free). The setup couldn't have been smoother though, so I think they earned the $20 they're asking for. Well, actually, there was a hiccup when I couldn't figure out what to do with the R74092us.EXE file I downloaded from their Windows drivers page, but some googling quickly turned up that I could just execute "unzip R74092us.EXE" at the Terminal to open it up.&lt;br /&gt;&lt;br /&gt;So now I'm up &amp; running, and posting this with my wireless connection in Linux. Spiffy.&lt;br /&gt;&lt;br /&gt;It's like Longhorn aka WindowsVista or something, but today. :)&lt;br /&gt;&lt;br /&gt;Anyways, I think I'll hold off on banging my head into the FastCGI/Apache setup again until tommarow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112338569569508959?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112338569569508959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112338569569508959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112338569569508959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112338569569508959'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/08/fedora.html' title='Fedora'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112277415795402859</id><published>2005-07-30T18:24:00.000-07:00</published><updated>2005-07-30T18:42:37.960-07:00</updated><title type='text'>Ruby On Rails, the Week in Review</title><content type='html'>Does the title sound pompous enough? ;)&lt;br /&gt;&lt;br /&gt;Anyways, I'm going to try and pretend that I'm not just a kid in a candy store with RoR, and that I can be objective. :D&lt;br /&gt;&lt;br /&gt;RoR makes developing fun. I think that's the best thing I can say about it. When you're having fun programming, you're more productive. At least that's the way it works with me. It takes so much busy work out of your hands, so much worry about design, it's so easy to pull off impressive demos that yeah, I'd believe the 10X faster development boasts, at least for the coding bits.&lt;br /&gt;&lt;br /&gt;So what are the downsides? Well, as far as I can tell it's not going to work under IIS6. That means the administrators have to sink time into learning how to setup and use Apache. Maybe that will be a good thing in the long run, who knows? The simple truth is that they wouldn't have to do that if I'd have stuck with MonoRail though.&lt;br /&gt;&lt;br /&gt;What else can I come up with? Well, I haven't found a good, documented RubyIDE for Windows, that includes RubyDoc. I'm not saying FreeRide is bad, because it's not, but it's lacking in some polish, including .RHTML highlighting, and support for Projects. I end up using UltraEdit more often than not, which isn't necessarily a bad thing. I really like not having to have something as piggish as VS.NET open to get my work done. It's like I have a whole new computer without VS.NET slowing it down. :)&lt;br /&gt;&lt;br /&gt;ActiveRecord doesn't have great support for legacy databases. No composite keys, and your model will look nasty if your casing/naming strategy in the database isn't laid out "The Ruby Way". Thankfully that's not a concern right now, but it's unfortunately a deal-breaker for most projects I'd imagine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112277415795402859?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112277415795402859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112277415795402859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112277415795402859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112277415795402859'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/ruby-on-rails-week-in-review.html' title='Ruby On Rails, the Week in Review'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112260355255163788</id><published>2005-07-28T19:14:00.000-07:00</published><updated>2005-07-28T19:19:12.556-07:00</updated><title type='text'>SQL Lattice Structures?</title><content type='html'>Just a quicky, but if anyone can point me to a good resource on creating lattices in SQL Server I'd appreciate it. I'm familiar with Nested Sets, but I'm looking for something that doesn't seem so update intensive, but even more, I need to create lattice like structures, not just trees.&lt;br /&gt;&lt;br /&gt;I could do it with parallel trees, but then I have to choose between reporting sacrifices, or n*depth row explosion depending on how parallel I want to get. This one really has me stumped.&lt;br /&gt;&lt;br /&gt;I could always go with an adjacency model, but the intensive nature of walking the trees makes that unappealing...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112260355255163788?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112260355255163788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112260355255163788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112260355255163788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112260355255163788'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/sql-lattice-structures.html' title='SQL Lattice Structures?'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112243532506847320</id><published>2005-07-26T20:22:00.000-07:00</published><updated>2005-07-26T20:35:25.076-07:00</updated><title type='text'>Ruby on Rails: Day 1</title><content type='html'>So we're working on another prototype/demo application at work, and we're at the point we need to have it all start coming together with the database.&lt;br /&gt;&lt;br /&gt;As an experiment of sorts I took what we had today and started porting it to RoR. By the end of the day I had most of it converted, and some of the pages were also now wired up to the database.&lt;br /&gt;&lt;br /&gt;As much as I like MonoRail, and even though it's probably the platform we eventually deploy with, there was no question in my mind that I was much more productive with RoR.&lt;br /&gt;&lt;br /&gt;First off, the templates use a real programming language, which beats NVelocity anyday (though MonoRail will be getting Rook done soon, and has a Boo implementation). Wait a sec, let me frame this better. This isn't a RoR is better than MonoRail post. MonoRail is younger, and has to work within the confines of a much less flexible language. One without transparent AOP, dynamic Types, etc etc. What MonoRail is is really really great.&lt;br /&gt;&lt;br /&gt;But what RoR is is simply better than anything .Net has to offer (as far as Website development goes; not everything's a nail after all). It's simple, it's fast, it's fun. What's the hardest thing for most .Net developers to grasp?&lt;br /&gt;&lt;br /&gt;Good design.&lt;br /&gt;&lt;br /&gt;At least it has been for me. At least it seems to be for most people on the ASP.NET forums asking for help.&lt;br /&gt;&lt;br /&gt;One of RoR's biggest advantages is that it presents you with a prepackaged great design structure, and you just need to fill in some implementation details. There's the Views, Models, Controllers, Helpers, Components, Partials... It might not be everything to everyone, but it's a lot more than ASP.NET has to offer, and a lot more than some O/R Mapper vendors try to push which amounts to the same ol' same ol' sphaghetti code, but spread over two pages (an aspx and codebehind) instead of one (asp).&lt;br /&gt;&lt;br /&gt;Yes, any good design involves writing helpers, business objects, server controls, perhaps a service layer, and there's nothing about .Net that holds you back there, but it's not the same thing as getting a great design right out of the box either.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112243532506847320?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112243532506847320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112243532506847320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112243532506847320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112243532506847320'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/ruby-on-rails-day-1.html' title='Ruby on Rails: Day 1'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112207290076811553</id><published>2005-07-22T15:54:00.000-07:00</published><updated>2005-07-22T15:55:00.773-07:00</updated><title type='text'>Ruby love</title><content type='html'>Yes, today was a good day. Got to do make some more reports with Ruby, and it's just such a gratifying feeling reusing some helpers, adding 3 new lines of code, doing some WYSIWYG in Excel, and generating an entirely different report. Take this for example:&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: ghostwhite; border: dashed 1px gray;"&gt;&lt;br /&gt;% queries.execute_query('ListInactiveUsers') { |row|&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt; &amp;lt;td&amp;gt;&amp;lt;%=row['Name']%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;td&amp;gt;&amp;lt;%=row['ExpiredOn']%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;% }&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I mean, that's purty sweet. Anyways, time to boogie...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112207290076811553?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112207290076811553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112207290076811553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112207290076811553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112207290076811553'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/ruby-love.html' title='Ruby love'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112191739126222313</id><published>2005-07-20T20:34:00.000-07:00</published><updated>2005-07-20T20:43:11.266-07:00</updated><title type='text'>ERB (Ruby)</title><content type='html'>So I have this templating program that provides support for queries and the like to product MHTML files (for Word, Excel, etc, just so I don't have to mess with Office Interop).&lt;br /&gt;&lt;br /&gt;I rewrote it in Ruby today, using the built-in templating engine ERB over the c# version's NVelocity. Cut the amount of code in half, and ERB is a lot more flexible.&lt;br /&gt;&lt;br /&gt;Ruby is good stuff. You might hear it called "hype", but there's a reason so many very smart people are excited about it. It's just damn cool, it's elegant in a way few languages are, it's support libraries are amazingly mature for such a "young" language (a lot more complete than .Net's when it comes to templating for just one example), and it just helps you keep what should be simple tasks simple. Why should I worry about great design with this templating program for example? In Ruby I just whip up a couple helpers, instantiate them in the current context, and toss in a couple lines to open and execute the template.&lt;br /&gt;&lt;br /&gt;$stdout &lt;&lt; %Q{Ruby is fun!}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112191739126222313?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112191739126222313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112191739126222313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112191739126222313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112191739126222313'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/erb-ruby.html' title='ERB (Ruby)'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112180017417926434</id><published>2005-07-19T12:09:00.000-07:00</published><updated>2005-07-19T12:09:34.186-07:00</updated><title type='text'>Resharper 2.0!</title><content type='html'>Resharper 2.0 EAP has started! Go get it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112180017417926434?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112180017417926434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112180017417926434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112180017417926434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112180017417926434'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/resharper-20.html' title='Resharper 2.0!'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112139663512115055</id><published>2005-07-14T20:02:00.000-07:00</published><updated>2005-07-14T20:03:55.126-07:00</updated><title type='text'>Quickie: Calendar.js</title><content type='html'>The positioning doesn't work in XHTML. You need to add "px" to the units since XHTML (at least in Firefox) doesn't assume pixels as a default unit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112139663512115055?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112139663512115055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112139663512115055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112139663512115055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112139663512115055'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/quickie-calendarjs.html' title='Quickie: Calendar.js'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112114688847582355</id><published>2005-07-11T22:20:00.000-07:00</published><updated>2005-07-11T22:41:28.480-07:00</updated><title type='text'>Calendar.js followup</title><content type='html'>Well, I polished off most of it today at work. Naturally I can't share the code, but here's a few tips to get you on your way:&lt;br /&gt;&lt;br /&gt;Logging helps. Even if it's just say, a class you write that manages the dirty work of adding spans to a div for messages, log feedback can be invaluable if you're like me and can't figure out how to use Firefox's Javascript Debugger (though the Javascript Console is priceless!), or you need to test in IE or other browsers.&lt;br /&gt;&lt;br /&gt;You can dynamically create a new member field anytime, anywhere. When you need to temporarily store some data or event scoped to a calendar, creating a new member, even from functions that aren't members of the calendar itself, can be helpful. Defining your own attributes is a real nifty way to pass values (though I don't know if it would validated under the XHTML strict DTD).&lt;br /&gt;&lt;br /&gt;Don't be afraid of doing too much about performance. When the calendar is active, that means the user has given it focus. So as long as you don't chew up all 5GHz on that quad processor development box you have, you'll be fine as long as it looks fine to you. As a general rule, I'd say that 30% usage on my P4 2.6HT at work is acceptable (since it's HT, 50% would be close to effectively maxing out CPU).&lt;br /&gt;&lt;br /&gt;What about date-ranges? Instead of setting the inputBox and hiding everything onclick of a day, couldn't we maybe have a property that tells the "control" it's in Range mode and to stay open for another click? That way instead of the typical two-calendar setup to represent date-ranges, and who knows how many clicks if you need a range outside of the current month (say 8+ as a guess), you could cut the whole thing down to two clicks. Mouse over the year, the month, click the day, mouse over the next year, month, and click the day for the end of the range, and the input box could be set to "1/1/2003 - 7/11/2005" for example. Nifty huh?&lt;br /&gt;&lt;br /&gt;Absolutely positioning an element (placeHolder), absolutely positioning a child element of the first (dayBox), and then sticking a table in the second element (dayTable) results in really funky rendering in Firefox. The solution is to not set position = "absolute" on the child element, and instead set position = "relative" on the table. This way we can line up the table with a given month's offsetLeft.&lt;br /&gt;&lt;br /&gt;Figuring out how to apply a different style to the table cell containing today's date can be a minor nuiscance. Figuring out how to apply a different style to the currently selected date was a real pain for some reason.&lt;br /&gt;&lt;br /&gt;If you need the calendar to overlay select boxes, you can use an iframe and stick the placeholder in that. Just make sure you whip up a blank.html page, and set the src on the iframe to it so you don't get security warnings when running under SSL. Also, you'll need some browser specific shenanigans since IE doesn't support .appendChild() for iframes and both IE and Firefox access the document element of an iframe differently. (I think it's .documentContent or something for Firefox if I remember correctly.)&lt;br /&gt;&lt;br /&gt;I know, probably sounds like more work than you want to do, and hey, I wouldn't blame ya. I hate trying to extend other people's code generally. But if you can spare the budget (it took me the better part of the day to finish it), then all bragging aside, this is easily the nicest calendar control I've used personally, and the best part is, it doesn't matter what language you're using. ASP.NET, ASP Classic, RubyOnRails, PHP, JSP, etc... nothing language/platform specific here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112114688847582355?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112114688847582355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112114688847582355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112114688847582355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112114688847582355'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/calendarjs-followup.html' title='Calendar.js followup'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112105681339046807</id><published>2005-07-10T21:32:00.000-07:00</published><updated>2005-07-10T21:41:22.446-07:00</updated><title type='text'>Code Dump: Calendar.js</title><content type='html'>This is something a friend and I whipped up in our abundance of spare time. :)&lt;br /&gt;&lt;br /&gt;The intent is to use it at work (after much more tweaking of course) for our own "1-click" calendar "control".&lt;br /&gt;&lt;br /&gt;This requires the &lt;a href="http://prototype.conio.net/"&gt;Prototype Library&lt;/a&gt;. You can use the calendar like so:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Lucida Console, monospace; font-size: 0.8em; border: grey 1px dotted; background-color: whitesmoke; overflow: auto; color: black;"&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt; &amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Calendar Test&amp;lt;/title&amp;gt; &lt;br /&gt;  &amp;lt;script type="text/javascript" language="javascript" src="prototype.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;br /&gt;  &amp;lt;script type="text/javascript" language="javascript" src="calendar.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;/head&amp;gt;&lt;br /&gt; &amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;p&amp;gt;A calendar control should render here:&lt;br /&gt;    &amp;lt;span id="placeholder1" style="background-color: blue;"&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;  &amp;lt;/p&amp;gt;&lt;br /&gt; &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" language="javascript"&amp;gt;&lt;br /&gt; new Calendar("placeholder1", "calendar1");&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And here's the code:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Lucida Console, monospace; font-size: 0.8em; border: grey 1px dotted; background-color: whitesmoke; overflow: auto; color: black;"&gt;&lt;br /&gt;var _calendars = new Array();&lt;br /&gt;&lt;br /&gt;var Calendar = Class.create();&lt;br /&gt;Calendar.prototype = {&lt;br /&gt; initialize: function(placeholderId, inputId) {&lt;br /&gt;  this.id = inputId;&lt;br /&gt;  this.timeout = 0;&lt;br /&gt;  this.isIE = (document.all)? true: false;&lt;br /&gt;  &lt;br /&gt;  _calendars[this.id] = this;&lt;br /&gt;&lt;br /&gt;  this._createInputbox(placeholderId);&lt;br /&gt;  this._createPlaceholder(placeholderId);&lt;br /&gt;  &lt;br /&gt;  this.years = new Array(2003, 2004, 2005);&lt;br /&gt;  this.months = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _getNumberOfDays: function(year, month) {&lt;br /&gt;  var oneHour = 1000 * 60 * 60;&lt;br /&gt;  var oneDay = oneHour * 24;&lt;br /&gt;  var thisMonth = new Date(year, month, 1);&lt;br /&gt;  var nextMonth = new Date(year, month + 1, 1);&lt;br /&gt;  return Math.ceil( (nextMonth.getTime() - thisMonth.getTime() - oneHour) / oneDay);&lt;br /&gt; },&lt;br /&gt;&lt;br /&gt; _setInnerText: function(element, text) {&lt;br /&gt;  if(this.isIE) {&lt;br /&gt;   element.innerText = text;&lt;br /&gt;  } else {&lt;br /&gt;   element.innerHTML = text; &lt;br /&gt;  }&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _getInnerText: function(element) {&lt;br /&gt;  if(this.isIE) {&lt;br /&gt;   return element.innerText;&lt;br /&gt;  } else {&lt;br /&gt;   return element.innerHTML; &lt;br /&gt;  } &lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _removeChild: function(id) {&lt;br /&gt;  for(var i = 0; i &lt; this.placeholder.childNodes.length; i++) {&lt;br /&gt;   var child = this.placeholder.childNodes[i];&lt;br /&gt;   &lt;br /&gt;   if(child.id == id) {&lt;br /&gt;    this.placeholder.removeChild(child); &lt;br /&gt;   }&lt;br /&gt;  }  &lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _displayItems: function(immediate) {&lt;br /&gt;  window.clearTimeout(this.timeout);&lt;br /&gt;  &lt;br /&gt;  if(immediate) {&lt;br /&gt;   if(this.yearbox) {&lt;br /&gt;    this.yearbox.style.display = this.yearbox.attributes["over"].value == "true"? "block": "none";&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   if(this.monthbox) {&lt;br /&gt;    this.monthbox.style.display = this.monthbox.attributes["over"].value == "true"? "block": "none";&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   if(this.daybox) {&lt;br /&gt;    this.daybox.style.display = this.daybox.attributes["over"].value == "true"? "block": "none";&lt;br /&gt;   }&lt;br /&gt;  } else {&lt;br /&gt;   this.timeout = window.setTimeout("_calendars[\"" + this.id + "\"]._displayItems(true);", 500, "javascript");&lt;br /&gt;  }  &lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; hideItems: function(immediate) {&lt;br /&gt;  if(this.yearbox) {&lt;br /&gt;   this.yearbox.setAttribute("over", false);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  if(this.monthbox) {&lt;br /&gt;   this.monthbox.setAttribute("over", false);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  if(this.daybox) {&lt;br /&gt;   this.daybox.setAttribute("over", false);   &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  if(immediate) {&lt;br /&gt;   this._displayItems(true);&lt;br /&gt;  } else {&lt;br /&gt;   this._displayItems();&lt;br /&gt;  }&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; show: function(element) {&lt;br /&gt;  var items = new Array(this.yearbox, this.monthbox, this.daybox);&lt;br /&gt;  var showLevel = true;&lt;br /&gt;  &lt;br /&gt;  for(i = 0; i &lt; items.length; i++) {&lt;br /&gt;   var item = items[i];&lt;br /&gt;   &lt;br /&gt;   if(!item) break;&lt;br /&gt;   &lt;br /&gt;   item.setAttribute("over", showLevel);&lt;br /&gt;   &lt;br /&gt;   if(element.id == item.id) {&lt;br /&gt;    showLevel = false;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  this._displayItems(true);&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; showYears: function() { &lt;br /&gt;  var element = document.createElement("div");&lt;br /&gt;  element.style.display = "none";&lt;br /&gt;  element.style.margin = "4px 0px";&lt;br /&gt;  element.id = this.id + "_yearbox";&lt;br /&gt;  element.setAttribute("calendarId", this.id);&lt;br /&gt; &lt;br /&gt;  element.onmouseout = function() {&lt;br /&gt;   _calendars[this.attributes["calendarId"].value].hideItems();  &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  element.onmouseover = function() {&lt;br /&gt;   window.clearTimeout(_calendars[this.attributes["calendarId"].value].timeout);&lt;br /&gt;  }  &lt;br /&gt;  &lt;br /&gt;  this._removeChild(element.id);&lt;br /&gt;  this.placeholder.appendChild(element);&lt;br /&gt;  this.yearbox = element;&lt;br /&gt;  &lt;br /&gt;  for(i = 0; i &lt; this.years.length; i++) {&lt;br /&gt;   this._addYear(this.years[i]); &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  this.show(element);&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; showMonths: function(year) {&lt;br /&gt;  this.selectedYear = this._getInnerText(year);&lt;br /&gt;  &lt;br /&gt;  var element = document.createElement("div");&lt;br /&gt;  element.style.display = "none";&lt;br /&gt;  element.style.margin = "4px 0px";&lt;br /&gt;  //element.style.width = "20em";&lt;br /&gt;  element.style.backgroundColor = "lime";&lt;br /&gt;  element.id = this.id + "_monthbox";&lt;br /&gt;  element.setAttribute("calendarId", this.id);&lt;br /&gt;  &lt;br /&gt;  element.onmouseout = function() {&lt;br /&gt;   _calendars[this.attributes["calendarId"].value].hideItems(); &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  element.onmouseover = function() {&lt;br /&gt;   window.clearTimeout(_calendars[this.attributes["calendarId"].value].timeout);&lt;br /&gt;  }  &lt;br /&gt;  &lt;br /&gt;  this._removeChild(element.id);&lt;br /&gt;  this.placeholder.appendChild(element);&lt;br /&gt;  this.monthbox = element;&lt;br /&gt;&lt;br /&gt;  for(i = 0; i &lt; this.months.length; i++) {&lt;br /&gt;   this._addMonth(this.months[i], i); &lt;br /&gt;  }&lt;br /&gt;    &lt;br /&gt;  this.show(element);&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; showDays: function(month) {&lt;br /&gt;  this.selectedMonth = parseInt(month.attributes["number"].value);&lt;br /&gt;  &lt;br /&gt;  var element = document.createElement("span");&lt;br /&gt;  element.style.display = "none";&lt;br /&gt;  element.style.backgroundColor = "red";&lt;br /&gt;  element.id = this.id + "_daybox";&lt;br /&gt;  element.setAttribute("calendarId", this.id);&lt;br /&gt;  &lt;br /&gt;  element.onmouseout = function() {&lt;br /&gt;   _calendars[this.attributes["calendarId"].value].hideItems();&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  element.onmouseover = function() {&lt;br /&gt;   window.clearTimeout(_calendars[this.attributes["calendarId"].value].timeout);&lt;br /&gt;  }  &lt;br /&gt;  &lt;br /&gt;  this._removeChild(element.id);&lt;br /&gt;  this.placeholder.appendChild(element);&lt;br /&gt;  this.daybox = element;&lt;br /&gt;  &lt;br /&gt;  var table = this._buildCalendar(this.selectedYear, this.selectedMonth);&lt;br /&gt;  &lt;br /&gt;  // element.style.width = table.offsetWidth;&lt;br /&gt;&lt;br /&gt;  this.show(element);&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _createPlaceholder: function(id) {&lt;br /&gt;  var element = document.createElement("div");&lt;br /&gt;  element.style.position = "absolute";&lt;br /&gt;  element.style.left = $(id).offsetLeft;&lt;br /&gt;  element.style.top = $(id).offsetTop + $(id).offsetHeight;&lt;br /&gt;&lt;br /&gt;  element.id = this.id + "_placeHolder";&lt;br /&gt;  element.setAttribute("calendarId", this.id);&lt;br /&gt;  &lt;br /&gt;  $(id).appendChild(element);&lt;br /&gt;  this.placeholder = element;&lt;br /&gt;  &lt;br /&gt;  return element; &lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _createInputbox: function(id) {&lt;br /&gt;  var element = document.createElement("input");&lt;br /&gt;  element.type = "text";&lt;br /&gt;  element.style.border = "solid 1px black";&lt;br /&gt;  //element.style.clear = "right";&lt;br /&gt;  element.id = this.id;&lt;br /&gt;  element.setAttribute("calendarId", this.id);&lt;br /&gt;  &lt;br /&gt;  element.onmouseover = function() {&lt;br /&gt;   _calendars[this.attributes["calendarId"].value].showYears();   &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  element.onmouseout = function() {&lt;br /&gt;   _calendars[this.attributes["calendarId"].value].hideItems();&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  $(id).appendChild(element);&lt;br /&gt;  this.inputbox = element;&lt;br /&gt;  &lt;br /&gt;  return element;&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _addYear: function(year) {&lt;br /&gt;  var span = document.createElement("span");&lt;br /&gt;  span.style.border = "solid 1px black";&lt;br /&gt;  span.style.margin = "0px 2px";&lt;br /&gt;  span.style.padding = "1px 2px";&lt;br /&gt;  &lt;br /&gt;  span.onmouseover = function() {&lt;br /&gt;   _calendars[this.parentNode.attributes["calendarId"].value].showMonths(this);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  this._setInnerText(span, year);&lt;br /&gt;  this.yearbox.appendChild(span);&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _addMonth: function(month, number) {&lt;br /&gt;  var span = document.createElement("span");&lt;br /&gt;  span.style.border = "solid 1px black";&lt;br /&gt;  span.style.margin = "0px 2px";&lt;br /&gt;  span.style.padding = "1px 2px";&lt;br /&gt;  span.setAttribute("number", number);&lt;br /&gt;  &lt;br /&gt;  span.onmouseover = function() {&lt;br /&gt;   this.style.backgroundColor = "blue";&lt;br /&gt;   var calendar = _calendars[this.parentNode.attributes["calendarId"].value];&lt;br /&gt;   calendar.showDays(this);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  span.onmouseout = function() {&lt;br /&gt;   this.style.backgroundColor = "transparent"; &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  this._setInnerText(span, month);&lt;br /&gt;  this.monthbox.appendChild(span);&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt; _buildCalendar: function(year, month) {&lt;br /&gt;  &lt;br /&gt;  var table = document.createElement("table");&lt;br /&gt;  &lt;br /&gt;  var daysRow = document.createElement("tr");&lt;br /&gt;  var daysOfWeek = new Array("S", "M", "T", "W", "T", "F", "S");&lt;br /&gt;  &lt;br /&gt;  for(i = 0; i &lt; daysOfWeek.length; i++) {&lt;br /&gt;   var cell = document.createElement("td");&lt;br /&gt;   cell.style.textAlign = "center";&lt;br /&gt;   this._setInnerText(cell, daysOfWeek[i]);   &lt;br /&gt;   daysRow.appendChild(cell); &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  table.appendChild(daysRow);&lt;br /&gt;  &lt;br /&gt;  var firstDay = new Date(year, month, 1);&lt;br /&gt;  var dayOfWeek = firstDay.getDay();&lt;br /&gt;  &lt;br /&gt;  var previousMonth = month == 0? new Array(year - 1, 11): new Array(year, month - 1);&lt;br /&gt;  &lt;br /&gt;  var previousNumberOfDays = this._getNumberOfDays(previousMonth[0], previousMonth[1]);&lt;br /&gt;  var currentNumberOfDays = this._getNumberOfDays(year, month);&lt;br /&gt;  &lt;br /&gt;  var counter = previousNumberOfDays - dayOfWeek + 1;&lt;br /&gt;  do {&lt;br /&gt;   var row = document.createElement("tr");&lt;br /&gt;   table.appendChild(row);&lt;br /&gt;   &lt;br /&gt;   for(x = 0; x &lt; 7; x++) {&lt;br /&gt;    var cell = document.createElement("td");&lt;br /&gt;    cell.style.textAlign = "right";&lt;br /&gt;    cell.onclick = function() {&lt;br /&gt;     var calendarId = this.parentNode.parentNode.parentNode.attributes["calendarId"].value;&lt;br /&gt;     var calendar = _calendars[calendarId];&lt;br /&gt;     &lt;br /&gt;     var selectedDay = parseInt(calendar._getInnerText(this));&lt;br /&gt;     var selectedDate = new Date(calendar.selectedYear, calendar.selectedMonth, selectedDay);&lt;br /&gt;     &lt;br /&gt;     calendar.inputbox.value = selectedDate.getMonth() + 1 + "/"&lt;br /&gt;      + selectedDate.getDate() + "/"&lt;br /&gt;      + selectedDate.getFullYear();&lt;br /&gt;     &lt;br /&gt;     calendar.hideItems(true);&lt;br /&gt;    };&lt;br /&gt;    &lt;br /&gt;    row.appendChild(cell);&lt;br /&gt;    &lt;br /&gt;    if(counter &gt; previousNumberOfDays + currentNumberOfDays) {&lt;br /&gt;     // trailing month...&lt;br /&gt;     this._setInnerText(cell, counter - (previousNumberOfDays + currentNumberOfDays) );&lt;br /&gt;    } else if(counter &gt; previousNumberOfDays) {&lt;br /&gt;     // current month...&lt;br /&gt;     this._setInnerText(cell, counter - previousNumberOfDays);&lt;br /&gt;    } else {&lt;br /&gt;     // leading month...&lt;br /&gt;     this._setInnerText(cell, counter);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    counter++;&lt;br /&gt;   }   &lt;br /&gt;  } while(counter &lt;= previousNumberOfDays + currentNumberOfDays);&lt;br /&gt;  &lt;br /&gt;  this.daybox.appendChild(table);&lt;br /&gt;  &lt;br /&gt;  return table;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;A bit sloppy sure, but should be easy enough to follow hopefully. Of course it'll need some styling tweaks, localization, etc, and I didn't check the latest version in IE (though you'll notice a isIE member to accomodate if it doesn't work).&lt;br /&gt;&lt;br /&gt;Still, should get you pretty close to a working javascript calendar control.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112105681339046807?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112105681339046807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112105681339046807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112105681339046807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112105681339046807'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/07/code-dump-calendarjs.html' title='Code Dump: Calendar.js'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112017433299193920</id><published>2005-06-30T16:13:00.000-07:00</published><updated>2005-06-30T20:33:56.040-07:00</updated><title type='text'>MonoRail, it's just good fun!</title><content type='html'>You know how some days can just drag on ya, and by the end of the day you just don't feel that you've been real productive? Yeah well, today wasn't one of those. :)&lt;br /&gt;&lt;br /&gt;I started digging more into MonoRail &amp; Ajax for this new website I'm working on at work, and it was really a blast.&lt;br /&gt;&lt;br /&gt;For example, following the MindDump (at CodeProject) example's lead, I've been creating DataAccessObjects and Services. This is a Reporting site with some Administration sections. As we added more features it started to become clear that we could develop the entire application without a Database at all.&lt;br /&gt;&lt;br /&gt;Think about that for a minute. Think you could do that in ASP Classic? How about ASP.NET, the code-behind model, using the code-behind as if it were a Controller, and embedding some O/R Mapper queries in it directly (as &lt;a href="http://www.thona-consulting.com/"&gt;Thomas Tomiczek&lt;/a&gt; suggests)?&lt;br /&gt;&lt;br /&gt;With MonoRail it's easy.&lt;br /&gt;&lt;br /&gt;What makes MonoRail special though? DAO's are nothing new. Heck, you could write a VB6 COM component to use in an ASP Classic site as a DAO. So what then? The deal is that with Castle's WindsorContainer you can just whip up interfaces for your Services, and then some stub classes to implement them and serve up dummy data. So you don't need to worry about Database integration until the last possible minute. When you do have your real implementations ready, you can just make a few configuration changes and away you go!&lt;br /&gt;&lt;br /&gt;Sounds like a lot of extra work though, all those Services, DAOs, etc... Actually, not at all. What is a DAO? It's just data access implementation details that you'd have to write anyways. The only difference is that you're wrapping it up in a class with a method signature for each task. Are a few class and method declarations really all that bad? Of course not.&lt;br /&gt;&lt;br /&gt;So anyways, all this was a lot of fun. Even more so was getting the &lt;a href="http://www.castleproject.org/index.php/MonoRail:Table_with_pagination"&gt;Table with Pagination&lt;/a&gt; example working though. It's just a great feeling writing something as slick as GMail. :) And MonoRail makes it easy. Then just for kicks, I surrounded the report in a div, and made it fade in from light-blue with the EffectsFatHelper. This is a new one to me, but apparently it's been around. Anyways, cyas, it's dinner time. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112017433299193920?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112017433299193920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112017433299193920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112017433299193920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112017433299193920'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/monorail-its-just-good-fun.html' title='MonoRail, it&apos;s just good fun!'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112010650765450189</id><published>2005-06-29T21:41:00.000-07:00</published><updated>2005-06-29T21:41:47.660-07:00</updated><title type='text'>DataSets vs O/R Mappers (aka: Apples vs Oranges)</title><content type='html'>I was in the middle of writing a reply to &lt;a href="http://forums.asp.net/971921/ShowPost.aspx"&gt;a topic at the ASP.NET forums&lt;/a&gt; when I decided, hey, why not be greedy and post it on my blog? ;)&lt;br /&gt;&lt;br /&gt;The topic is about "Defending the DataSet".&lt;br /&gt;&lt;br /&gt;SeanSmith makes some good points. Some of the same points I've seen other smart developers make in defense of the DataSet. In my opinion he's missing the boat though. The post comes off as if he's presenting the DataSet as an alternative to O/R Mappers.&lt;br /&gt;&lt;br /&gt;In reality you can't compare the two though. An O/R Mapper is incredibly complex. A DataSet, lets face it, is not. Even with all it's features it's really just a relatively simple bag o' data. They aren't interchangeable. I can easily refactor an application to switch between different O/R Mappers, say for example between LLBLGenPro and NHibernate. It's really not all that difficult of a task if I haven't let O/R Mapper specific code seep throughout my application. I can't on the other hand refactor to a DataSet. A DataSet doesn't do anywhere near the same thing. I'd also need to pickup some code-generation templates, tweak 'em, wire up my objects, and even then I'd probably still need to write a good bit of ADO.NET.&lt;br /&gt;&lt;br /&gt;The reverse is equally true though. I can't take an application written around ADO.NET and DataSets and refactor it to an O/R Mapper easily. I'd be cutting out huge swaths of code, and unless I had very robust tests, there's a pretty strong bet that there's a good deal of logic going on in Queries or StoredProcedures that might not be immediately apparent in the context of trying to migrate to a Domain Model.&lt;br /&gt;&lt;br /&gt;So overall I agree that it can seem like all you hear is "use an O/R Mapper", but there's a good reason for that. Using a DataSet for an Application, one that could be modelled, can easily result in a few "bad" things: Spaghetti Code, Database Driven Design, and Obscured Intent in Code. All of these are generally maintenance issues in my experience.&lt;br /&gt;&lt;br /&gt;Is arguing this going to convince anyone who'se not willing to at least try Domain Driven Design though? Probably not. So I'll just take it as a given that you agree that there are definite benefits to the practice, and you'd like to learn how to gain them easily. The answer is, in the vast majority of projects, an O/R Mapper. Yes, there are exceptions, and yes, everyone thinks their project is it, but unless you're very experienced with such designs the truth is, it probably isn't and you should be using an O/R Mapper.&lt;br /&gt;&lt;br /&gt;What's the flip-side though? Can O/R Mappers replace DataSets? No. They can't. Think back to what a DataSet is: Just as simple container for data. So why would an O/R Mapper even need to replace them? Simply put, most don't even try. Some choose to implement their own ITypedLists or maybe even return the most basic of data structures, an array of arrays, but many will just use DataTables and/or DataSets if they even have any reporting features at all. And that's where a DataSet shines. As a data container. For reporting, for communication, for migration, whatever the case, a DataSet is wonderfully suited to these tasks.&lt;br /&gt;&lt;br /&gt;This is why I find such posts annoying to be honest. I know Sean had the best intentions, and he seems like a sharp guy, but so many people aren't on his level yet. Is there really any more need to validate the opinion that a decent O/R Mapper and Domain Model is unnecessary in all but the simplest applications? Isn't there enough of that going around? A DataSet is a nail, a Business Object is a screw. Sure, there's some bit of overlap, but by and large they should be filling completely different roles in your average Domain Driven Design, and ne'er the twain shall meet!&lt;br /&gt;&lt;br /&gt;So the real argument doesn't seem to be so much DataSet vs O/R Mapper to me. If you're using business objects extensively, you better have a damn good reason for not using an O/R Mapper if you're using a relational database for persistence in my opinion or you're just burning money.&lt;br /&gt;&lt;br /&gt;If you aren't using business objects though, if you're a former or current ASP Classic developer, then there's a good chance you're dealing with Database Driven Design and you may have never even seen a good Domain Model (or probably didn't understand it if you did since it's not something most people pickup after a quick looksey the first time). If that's the case, then the real argument is about the benefits of Domain Driven Design and Object Oriented Programming I think. That's a topic for another post though. It's almost midnight. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112010650765450189?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112010650765450189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112010650765450189' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112010650765450189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112010650765450189'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/datasets-vs-or-mappers-aka-apples-vs.html' title='DataSets vs O/R Mappers (aka: Apples vs Oranges)'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-112001933396628557</id><published>2005-06-28T21:04:00.000-07:00</published><updated>2005-06-28T21:32:52.810-07:00</updated><title type='text'>MonoRail &amp; WebControls</title><content type='html'>So there's a small problem with MonoRail. No WebControls. No really, it is relatively speaking not much of a problem. Since it mostly doesn't use PostBacks, there's not much point in ViewState, so a TextBox is just a input. So why not just write the markup for the input in the View?&lt;br /&gt;&lt;br /&gt;The problem comes in when you start talking about rendering "Grids", charts, etc. More complex controls.&lt;br /&gt;&lt;br /&gt;So what do you do? Well, one way is to basically go back to an ASP Classic style for Views. Not real pretty though. Another way is to write Helpers. You can only have so many overloads for a method though in a practical sense though or it starts to look ugly. So what then? You can pass a single path or name that tells the Helper where to go to look up the specifics on how to render a control. Then you could end up with lots of extra little "Viewlets" though.&lt;br /&gt;&lt;br /&gt;Or we can take a cue from ASP.NET and implement our own tags. The namespace alias could refer to a helper, and the element name could refer to a specific control... or perhaps we could use "rails" as the namespace alias, and the element name would then refer to the Helper. That seems a bit cleaner. So you'd end up with something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Lucida Console, monospace; font-size: 0.8em; border: grey 1px dotted; background-color: whitesmoke; overflow: auto; color: black;"&gt;public class GridHelper: AbstractHelper, IControlHelper {&lt;br /&gt; public string Render(XmlElement node) {  &lt;br /&gt;  IList results = this.Controller.PropertyBag[node.Attributes["results"]] as IList;&lt;br /&gt;  &lt;br /&gt;  // do stuff with the "rails" element passed in, and the matching&lt;br /&gt;  // data pulled from the Context.&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then you'd use it like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Lucida Console, monospace; font-size: 0.8em; border: grey 1px dotted; background-color: whitesmoke; overflow: auto; color: black;"&gt;&amp;lt;rails:Grid id="blah" style="borders: none;" results="results"&amp;gt;&lt;br /&gt; &amp;lt;columns&amp;gt;&lt;br /&gt;  &amp;lt;column name="Meh" /&amp;gt;&lt;br /&gt;  &amp;lt;column name="Moo" /&amp;gt;&lt;br /&gt; &amp;lt;/columns&amp;gt;&lt;br /&gt;&amp;lt;/rails:Grid&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I think that'd be cool... I have no idea what changes this would require in MonoRail or NVelocity right now though. I'll try to find the time to do so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-112001933396628557?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/112001933396628557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=112001933396628557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112001933396628557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/112001933396628557'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/monorail-webcontrols.html' title='MonoRail &amp; WebControls'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111975774290970454</id><published>2005-06-25T20:48:00.000-07:00</published><updated>2005-06-25T20:49:02.920-07:00</updated><title type='text'>My Influences</title><content type='html'>&lt;a href="http://martinfowler.com/"&gt;Martin Fowler&lt;/a&gt;: Is an introduction really necessary? Love it or hate it, but this is the name on everyone's lips. You can't read a modern book programming book on design that doesn't mention him at least once. He certainly didn't invent the topic, but for many, he made it accessable. Here's a career tip: If Martin Fowler says something you disagree with, you're wrong. End of story. I know, I know, idolatry bad, but seriously, it's like the old phrase "nobody ever got fired for choosing IBM".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi"&gt;Dave Thomas&lt;/a&gt;: Let me start off by saying, I only buy half of what he says. :) I'm probably wrong about the half I disagree with, but just the same. Why Mr. Thomas? While Mr. Fowler dishes out the goods when it comes to principles, patterns, and career lessons, Dave Thomas keys you into what's important, and what's not. You'll find out how to get stuff done by reading his books, and how not to loose sight of the goal. He's taught me new languages, tools, and every day there's more and more I find he was right about.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.geekswithblogs.com/sbellware/"&gt;Scott Bellware&lt;/a&gt;: I'll be satisfied if I can "just" be on his level eventually. I dunno what it is exactly, maybe it's the rants. :) This guy is just the sort you want to have on your team. He seems like a normal guy, passionate about his work, and he helps to clue the rest of us in. He needs to post more though. :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/fbouma/"&gt;Frans Bouma&lt;/a&gt;: This guy is it for DataAccess. If you have to listen to one person on the subject, this is the person IMO. Why? Because he knows his stuff. Don't think this is because I'm a fan of his product (LLBLGenPro) either. I'm not so much. What I appreciate in LLBLGenPro is it's level of polish. It is without a doubt the most stable O/R Mapper in .Net land with the best documentation. I don't personally care for it's query interface though. Hopefully v2 makes some changes. :) Anyways, Frans is just a smart, patient guy who posts some great articles. He's always entertaining, and I've never seen him wrong. Of course he freely admits that he's been wrong before, and that he learned from it, and that's why you should listen to him, because he's been there, done that, seen it from both sides, and had the sense to swallow his pride and re-evaluate his position. This is why when Frans open's his mouth, you had better listen very carefully.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jroller.com/page/hammett"&gt;Hammet&lt;/a&gt;: What can you say? The community needs more guys like this. While I'm here making some little post on my little blog, he's out there banging out code &lt;i&gt;for free&lt;/i&gt; that thousands of developers are using. I can think of few people who've made contributions as great as his to the .Net community (Charlie Poole &amp; Michael C. Two, Jamie Cansdale, Paul Wilson, Darren Neimke, Mike Doerfler to name a few on the short-list), and yet he's very accessable and friendly. Start pushing the boundries of the .Net framework when it comes to AOP, Reflection, application frameworks, Inversion Of Control, etc, and you'll quickly find that all roads seem to inexplicably lead back to hammett. Wether you're currently all that interested in these topics or not, you'd be hard-pressed to find a better resource for "thinking outside the box" when it comes to programming applied to the .Net Framework IMO.&lt;br /&gt;&lt;br /&gt;There's lots of people that aren't on this list that deserve to be, but these are my main influences. Hopefully somebody finds these links helpful. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111975774290970454?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111975774290970454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111975774290970454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111975774290970454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111975774290970454'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/my-influences.html' title='My Influences'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111967437741527275</id><published>2005-06-24T21:02:00.000-07:00</published><updated>2005-06-24T21:39:37.420-07:00</updated><title type='text'>A real issue-tracker at last!</title><content type='html'>&lt;a href="http://www.edgewall.com"&gt;Trac&lt;/a&gt; is evil.&lt;br /&gt;&lt;br /&gt;Don't get me wrong, it's cool to use an all, and hey, it's free, but it took a friend of mine the better part of two days to get it running right, and that's just for a "generic" environment for our multi-project Subversion repository.&lt;br /&gt;&lt;br /&gt;Granted, when it comes to Apache and Python on Windows we're apparently idiots, and we didn't see the guide on getting it running on Windows (despite much googling and reading of manual pages) until late in the game, but seriously. It was without a doubt the most difficult, hackish install I've ever been through.&lt;br /&gt;&lt;br /&gt;In the end I suppose it's worth it if it lives up to it's promises, and it really is a very sweet tool to have around if you don't have a real tracker yet, so I'd still have to endorse it I suppose. Just be prepared to go bald and have all your teeth pulled out by rusty pliers during setup of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111967437741527275?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111967437741527275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111967437741527275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111967437741527275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111967437741527275'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/real-issue-tracker-at-last.html' title='A real issue-tracker at last!'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111967039676316513</id><published>2005-06-24T20:30:00.000-07:00</published><updated>2005-06-24T20:33:16.763-07:00</updated><title type='text'>UIBroker</title><content type='html'>The UIBroker is officially dead. :)&lt;br /&gt;&lt;br /&gt;Why? Well, after working with &lt;a href="http://www.castleproject.org"&gt;MonoRail&lt;/a&gt; for awhile now there's really no point. The auto-mapping to method parameters makes it a mute (moot?) point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111967039676316513?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111967039676316513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111967039676316513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111967039676316513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111967039676316513'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/uibroker.html' title='UIBroker'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111950167935354905</id><published>2005-06-22T21:38:00.000-07:00</published><updated>2005-06-22T21:41:19.360-07:00</updated><title type='text'>c# tip:</title><content type='html'>Did you know you can escape reserved keywords with the @ sign so you can use them as variable names? I had no idea. Just ran across a post on the NHibernate forums describing it.&lt;br /&gt;&lt;br /&gt;Where NHibernate uses "clazz" as a variable name now to refer to a variable holding a Type (I always use type myself, but I realize they probably want to stay more or less CLS compliant), they could be using "@class".&lt;br /&gt;&lt;br /&gt;Just thought that was nifty.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111950167935354905?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111950167935354905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111950167935354905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111950167935354905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111950167935354905'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/c-tip.html' title='c# tip:'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111947382815068325</id><published>2005-06-22T13:56:00.000-07:00</published><updated>2005-06-24T20:24:26.120-07:00</updated><title type='text'>Knee-jerking</title><content type='html'>First off, I owe Jay an apology. I posted a knee-jerk reaction here earlier to his censoring a comment of mine. It's his blog, he can do what he wants, and I need to take away the lesson from this whole little episode that you can lure more flies with honey than vinegar. :)&lt;br /&gt;&lt;br /&gt;So Jay, if you're reading, I apologize, and if I do choose to take part in a discussion of yours again, I'll try to follow your example and be a bit more civil.&lt;br /&gt;&lt;br /&gt;On with my (friendlier hopefully) comments on the topic:&lt;br /&gt;&lt;br /&gt;Jay Kimble says: &lt;a href="http://codebetter.com/blogs/jay.kimble/comments/64955.aspx"&gt;That there's a problem with Ajax (or the discussion about it)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What he doesn't talk much about is his implication that 5000+ lines of Javascript is inferior to a server-side (VBScript) solution.&lt;br /&gt;&lt;br /&gt;My take is that 5000+ lines of anything for a single View is probably a problem, and if the code is hard to work with, then the real problem lies in refactoring it. That may indeed include moving more of the functionality server-side, but not necessarily. It might be easier for example to use a server-side template for return results, so that instead of a lot of .appendChild() calls in javascript, you can just set the value of an element. It's true that if you're not careful, client-side javascript can definitely be a performance problem after all.&lt;br /&gt;&lt;br /&gt;In the end, it's still hard to comment with any authority not having actually seen the code in question though, so that's my best shot. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111947382815068325?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111947382815068325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111947382815068325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111947382815068325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111947382815068325'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/knee-jerking.html' title='Knee-jerking'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111941017925237561</id><published>2005-06-21T20:09:00.000-07:00</published><updated>2005-06-21T20:16:19.260-07:00</updated><title type='text'>Subversion is king!</title><content type='html'>It's hard to describe just how sweet &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; is. At first, I thought I might miss VS.NET integration, being a former VSS/SGV user, but actually, it's so much nicer without it. I don't have to worry about readonly files, I just load up a solution, and do whatever I want to it, then commit my changes when everything works. Nothing's ever locked, I don't have to ask anyone to check something in. Downloading or Uploading is seriously at least 10 times faster than VSS. My folder structure on the drive is my folder structure in the repository, I don't have funkiness going on where the source control decides to start nesting project folders six deep for no reason (that I can tell).&lt;br /&gt;&lt;br /&gt;It's just a thing of beauty. If you're a VSS user, you owe it to yourself to download TortoiseSVN, and force yourself to work with it for a week. If you're not convinced after a few days, then no loss, at least then you'll know why every open source project you download uses CVS or SVN. It's not (just) because it's free; it's because it really is just soooo much better.&lt;br /&gt;&lt;br /&gt;I wish I'd had the motivation to give it a shot a long time ago. Oh well :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111941017925237561?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111941017925237561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111941017925237561' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111941017925237561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111941017925237561'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/subversion-is-king.html' title='Subversion is king!'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111922224877259718</id><published>2005-06-19T15:38:00.000-07:00</published><updated>2005-06-19T20:04:22.896-07:00</updated><title type='text'>Choices choices choices...</title><content type='html'>So work is great. I got transfered into my own department (R&amp;D) and have a lot more influence on future development so far. The "D" in R&amp;D is apparently going to be pretty heavily emphasized since it looks like I'll be writing much of the code for the new stuff myself (along with a friend working in another department). Maybe I can convince 'em to bring in a contractor too to help out.&lt;br /&gt;&lt;br /&gt;So basically I'm going to be in charge of rewriting our existing product. Big, scary task. So what do I do? Where do I start?&lt;br /&gt;&lt;br /&gt;Well, first things first, Visual Source Safe sucks. I was actually pretty shocked to hear the server the shared repository is on is on the local network. It's so slow I had just previously assumed it was in our backup off-site location. :) I tried Source Gear Vault, but if anything it seems a bit slower, if a lot more stable. Still, the VSS "feel" isn't doin' it for me, and I don't like the lock model particularly. I recently had to install TortoiseSVN to get at the Castle repository, and was blown away by the speed. Since our SGV trial license is about to expire this week, we're going to make the switch to Subversion and see how that goes. I really like the idea that I won't have to check out a project or solution exclusively just to add or remove a file.&lt;br /&gt;&lt;br /&gt;Next we need to make a big decision: Beta2 or .Net1.1? I'm thinkin' Beta2. The available memory increase to 90% from 40% alone should be pretty sweet though there's just a ton of advantages obviously. I'll definitely miss Resharper, but I've held off as long as I could. JetBrains, please hurry!&lt;br /&gt;&lt;br /&gt;On the other hand, Beta2 doesn't buy this project a whole lot from a pragmatic stand-point. We could easily live without it, and Resharper would definitely help out a lot. I'm conflicted. :) Actually I'm 51/49% leaning towards sticking with 1.1 just to keep R#. Very on the line about it though.&lt;br /&gt;&lt;br /&gt;Then we have to decide: CastleProject's MonoRail or WebForms? Definitely leaning towards MonoRail. Not only is it easier to test, and results in much cleaner looking code, but we can also very quickly mock up some HTML pages for review by the clients (the upper management in this case), and once we've got the look and feel nailed down, we'll be well on our way to having written the View(s) involved.&lt;br /&gt;&lt;br /&gt;We definitely need a Wiki goin' on, and a better issue tracker than our sad in-house one, so looks like we'll be using Trac to integrate with Subversion for those duties. I like Jira's feel better, but Trac is simpler off the bat (since management will be reviewing this, that's a concern), and it's free, so if it doesn't work out, no harm, no foul.&lt;br /&gt;&lt;br /&gt;What else? Well... we were thinking about CruiseControl.Net for scheduled builds/tests, but we're not real firm yet. CC.NET is a little ugly, but it does apparently support MSBuild. Not really sure what we'll do on that front yet.&lt;br /&gt;&lt;br /&gt;Definitely need to switch to Cassinni. Messing with permissions with IIS5.1 can be a pain sometimes.&lt;br /&gt;&lt;br /&gt;I need a new mouse. My Logitech MX900 never did charge well, and now one of the terminals has cracked plastic around it. Stupid hit&amp;miss Logitech cordless mice... oh well. A simple MS Intellimouse Explorer2 like I use here at home would be better. No drivers to install, and I've only changed the batteries like once in a year. The MX900 wouldn't last more than a day, so if I forgot to charge it it was no bueno. I also need new monitors. The dual 17" LCD's I have now aren't cutting it. Spending a grand on a couple Dell FP2001's doesn't seem like such a big deal to me. I know makin' it happen is probably going to take an act of god though. I love the Samsung 213T though. That's what I use at home. It's long in the tooth I suppose, but it's got good contrast, it's bright, it's big... what more could you want? We'll see what I can pull off I guess.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111922224877259718?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111922224877259718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111922224877259718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111922224877259718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111922224877259718'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/choices-choices-choices.html' title='Choices choices choices...'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111783632391340071</id><published>2005-06-03T14:45:00.000-07:00</published><updated>2005-06-03T15:05:23.916-07:00</updated><title type='text'>Adaptive Object Modeling and Aspect Oriented Programming</title><content type='html'>So I was reading Chris Lasater's articles on AOM at CodeProject, and it got me thinking...&lt;br /&gt;&lt;br /&gt;At work, there's an application that's in routine flux. The past week alone I've had 3 change requests for it. It takes in Sales Leads, assigns them statuses, and then assigns the leads to users based on the state of the SalesLead object. I wrote a rudimentary RulesEngine to make my life easier with these changes, and now much of the process flow is driven by rules defined in the app.config. 95% of these changes are limited to these two operations: Assignment of Status, and Assignment to User.&lt;br /&gt;&lt;br /&gt;In this scenario then I don't see much value in AOM. On the other hand, the RulesEngine could be more powerful. Not because it's really needed to be so far, but because it'd be cool. :)&lt;br /&gt;&lt;br /&gt;So far the rule Consequences are simple ValueType assignments to the examined object, so no biggie. On the other hand, wouldn't it be cool if I could transfer more of the behaviour to meta-data? For example, if the phoneNumber already exists in the database, it's considered a duplicate, the status is set accordingly, and the duplicateHandler is assigned the lead. This is in code right now, and it's one of the sore spots design-wise that just gets under my skin.&lt;br /&gt;&lt;br /&gt;What if I could move that to the business rules meta-data?&lt;br /&gt;&lt;br /&gt;Well... I'd need support for more than just simple target value matching then. I'd need to be able to tell it to try to match that field against all SalesLeads in the database.&lt;br /&gt;&lt;br /&gt;So I'm no whiz when it comes to AOP, but I do have a level of familiarity with Aspect#, so I'm pretty comfortable thinking I could use it to inject some pointcuts and mixins to extend the behaviour of my object. If I fleshed out the rules engine so that it could have more fully realized Condition and Consequence scenarios that'd be cool too.&lt;br /&gt;&lt;br /&gt;Basically instead of the Controller I have now to process these objects, I could merely Parse-&gt;ApplyBusinessRules-&gt;Persist. The Controller then would be much simpler.&lt;br /&gt;&lt;br /&gt;Just tryin' to think this through, but yeah... this seems do-able...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111783632391340071?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111783632391340071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111783632391340071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111783632391340071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111783632391340071'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/adaptive-object-modeling-and-aspect.html' title='Adaptive Object Modeling and Aspect Oriented Programming'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111782740886995146</id><published>2005-06-03T12:29:00.000-07:00</published><updated>2005-06-03T12:57:50.396-07:00</updated><title type='text'>NHibernate ICriteria.SetFetchMode() issue.</title><content type='html'>I think I might have solved it? It's sloppy, and frankly, might be causing other bugs, but it &lt;span style="font-style:italic;"&gt;seems&lt;/span&gt; to work for me, so until it's officially resolved, I think I'll stick to it if I don't run across anything broken by it.&lt;br /&gt;&lt;br /&gt;The solution was on line 313 in NHibernate.Loader.Loader.cs:&lt;br /&gt;&lt;pre style="font-family: Lucida Console, monospace; font-size: 0.8em; border: grey 1px dotted; background-color: whitesmoke; overflow: auto; color: black;"&gt;&lt;br /&gt;int count;&lt;br /&gt;for ( count = 0; count &lt; maxRows &amp;&amp; rs.Read(); count++ )&lt;br /&gt;{&lt;br /&gt;    object result = GetRowFromResultSet( rs, session, queryParameters, hydratedObjects, optionalObject, optionalId, keys, returnProxies );&lt;br /&gt;    results.Add( result );&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see, each row in the resultSet results in an object reference in the results IList. This is obviously no-bueno.&lt;br /&gt;&lt;br /&gt;So I modified it to this:&lt;br /&gt;&lt;pre style="font-family: Lucida Console, monospace; font-size: 0.8em; border: grey 1px dotted; background-color: whitesmoke; overflow: auto; color: black; white-space: pre;"&gt;&lt;br /&gt;int count;&lt;br /&gt;for ( count = 0; count &lt; maxRows &amp;&amp; rs.Read(); count++ )&lt;br /&gt;{&lt;br /&gt;    object result = GetRowFromResultSet( rs, session, queryParameters, hydratedObjects, optionalObject, optionalId, keys, returnProxies );&lt;br /&gt;    if(!results.Contains(result)) {&lt;br /&gt;        results.Add( result );&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And now you see the hackiness. Basically this will prevent you from getting a list with duplicate objects in it.&lt;br /&gt;&lt;br /&gt;Now I can't think of why you'd want that off the top of my head, but it does seem a huge change to be making, so I dunno. I'm anxious to see what the real solution is the NHibernate guys come up with...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111782740886995146?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111782740886995146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111782740886995146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111782740886995146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111782740886995146'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/nhibernate-icriteriasetfetchmode-issue.html' title='NHibernate ICriteria.SetFetchMode() issue.'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111782126279686781</id><published>2005-06-03T10:40:00.000-07:00</published><updated>2005-06-03T10:54:22.800-07:00</updated><title type='text'>My Job (2)</title><content type='html'>Things are much better this week. It looks like all the hard work on the ASP.Net project paid off, and things are looking up!&lt;br /&gt;&lt;br /&gt;Woo hoo!&lt;br /&gt;&lt;br /&gt;I've got a lot on my plate to digest this weekend. Hopefully I'll get to atleast one. :)&lt;br /&gt;&lt;br /&gt;I want to look into that new OfficeXml stuff to see if it'll be useable anytime soon. I wanted to take a deeper look at Drools2.0. I need to work more on my own RulesEngine. I need to add some more features to my UIBroker. I need to add support for Flags() enums in the XmlActivator, and I really need to get around to adding support for custom Constructors. I need to see if I can swap out NHibernate 0.8's criteriaImpl for 0.7's so I get my pre-fetch support back. I need to get started on a new version of an Excel/SqlServer Automation Reporting/Mailing Service I wrote. If I can get it done on the weekend I'll open-source it. (Probably not, but who knows?)&lt;br /&gt;&lt;br /&gt;I need to brush up on my Asp.Net skills more regarding dynamic controls, server controls, etc. I need to polish up my Ajax adventures and control-ify 'em.&lt;br /&gt;&lt;br /&gt;If I could I'd spend a couple weeks on all that. :)&lt;br /&gt;&lt;br /&gt;Oh yeah, and I need to polish off "The Pickaxe" Ruby book... I think I might do that Excel automation thing in Ruby for practice.&lt;br /&gt;&lt;br /&gt;I'm currently reading:&lt;br /&gt;&lt;br /&gt;"Anti-Patterns" by Brown, Malveau, McCormick, &amp; Mowbray.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111782126279686781?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111782126279686781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111782126279686781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111782126279686781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111782126279686781'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/06/my-job-2.html' title='My Job (2)'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111723337415269640</id><published>2005-05-27T15:15:00.000-07:00</published><updated>2005-06-24T20:27:19.970-07:00</updated><title type='text'>Ajax.NET</title><content type='html'>&lt;a href="http://ajax.schwarz-interactive.de/csharpsample/default.aspx"&gt;Ajax.NET&lt;/a&gt; is a really nice, easy to use library that should be able to help anyone get up to speed quickly with cross-browser compatible AJAX.&lt;br /&gt;&lt;br /&gt;If you don't know what AJAX is, visit the link, there's a few nifty examples. The nice thing about Ajax.NET is that it supports Types not inheriting from Page. This is a big advantage since it means you can basically keep a very clean Controller design, and just plugin AJAX capable controls in place of traditional ones.&lt;br /&gt;&lt;br /&gt;The hardest thing about a recent AJAX feature I toyed with for an application (an auto-complete TextBox, and yes I know there's free examples out there, I wanted the practice) was not using the library. I literally had that done in 15 minutes and that includes reading the docs. The hardest part was that I wanted the drop-down to be an iframe so I wouldn't have to worry about SelectBoxes with infinite z-index in IE. To do this took a lot of work. In the past I've used hidden iframes for communication, but the elements I was using to pass values were actually in the page already. I never had to generate/add elements (in an iframe) on the fly before. Add to that I couldn't use InnerText (FireFox doesn't support it), appendChild() (IE doesn't support it within an iframe), and IE &amp; FF access iframe content differently and it was a tough nut to crack.&lt;br /&gt;&lt;br /&gt;Still, in the end, the results came out very nicely, so it was worth it I suppose. Of course there are Controls you can buy that will do this for you. I think the bigger draw to AJAX is things like validation, authentication, postback-less editing, etc.&lt;br /&gt;&lt;br /&gt;I messed with authentication a few minutes before work today, but it seems you can't call FormsAuthentication.Redirect... within an Ajax.NET method. Not sure why. Could possible be because there is no postback?&lt;br /&gt;&lt;br /&gt;Edit: Got interrupted there. Ok, so anyways, my thoughts were a Redirect isn't really a force-update of the client's URL. It's a substitution in the HttpStream that the client is already recieving. So you can't Redirect from an AJAX call.&lt;br /&gt;&lt;br /&gt;So what can I do? Well, I can just change the location with Javascript. As long as I have a valid FormsAuthentication ticket, then the new location target won't get bounced.&lt;br /&gt;&lt;br /&gt;The down-side is this doesn't degrade gracefully. Ok... should I care? I mean really, ASP.Net depends on postbacks pretty heavily. Anything "cool" is going to require some Javascript support. Is there any need to support browsers that don't support Javascript? Is it an accessability issue? I think some things can be, like the auto-completion TextBox. A login though? I'm just substituting Microsoft's doPostBack() with my own logic. I don't see that as a problem. What do you think though?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111723337415269640?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111723337415269640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111723337415269640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111723337415269640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111723337415269640'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/05/ajaxnet.html' title='Ajax.NET'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111721530430948929</id><published>2005-05-27T10:09:00.000-07:00</published><updated>2005-05-27T10:35:04.316-07:00</updated><title type='text'>My Job (Venting)</title><content type='html'>I work in an ASP Classic shop. No COM, Stored Procedures for everything, the Database is the answer to every problem because that's all my manager knows how to do.&lt;br /&gt;&lt;br /&gt;The only vbScript classes are the ones I've written. Every page just gets a huge Functions include.&lt;br /&gt;&lt;br /&gt;Formatting is done with custom string parsers that are flaky, and extremely slow. The story is the same for Validation. Where there is client/server-side validation that is, most places if the input is invalid it's just ignored. Instead of Regex, string parsing is handled with lots of copy/pasted nested ifs for left/right/mid statements and lots of string concatenation.&lt;br /&gt;&lt;br /&gt;A hundred context switches on a page are pretty much standard practice.&lt;br /&gt;&lt;br /&gt;Everything's abbreviated until it doesn't make sense. Default is abbreviated to "dflt", TimeZone is abbreviated to "timezn". The Databases have no constraints, no FK's, are denormalized to a rediculous level, the IndexTuningWizard has never been run, there are no traces, every "lookup" (semi-static data to join with) is in an EntityAttributeValue style table with 5 different Value columns. If we need to store more than the 80 characters a single Value column allows, we concatenate the columns. The Text datatype is never used, even on pages that display one large block of text. Instead the text is split on newlines during insert, and inserted as single lines of varchar(256) with a column for line numbers.&lt;br /&gt;&lt;br /&gt;We spend days going through renaming all pages in a site to prefix a new magic number for new clients even though they are physically different websites. Actually magic numbers are the order of the day. Recently a manager forced one of our database developers to remove the identity designation from a column being used as a descriminator for organization type because he was concerned that when one was deleted, and a new one added, there would be missing numbers. Missing numbers. On a surrogate key!&lt;br /&gt;&lt;br /&gt;We could supply TheDailyWTF with a years worth of posts.&lt;br /&gt;&lt;br /&gt;I'd like to be all intellectual and say "the language doesn't matter", but come on. VBScript. The c# stuff that handles batch processing is both faster and more reliable than the DTS packages used for the rest. The ASP.Net site I recently worked on for a demo was better than any production site we have now in performance, maintenance, features, and looks, and it was delivered in less time than it takes to copy/paste/rename one of the existing sites to setup a new client. And that's using NHibernate 0.8.3, where Pre-fetching is broken, so when that's resolved the one or two pages that aren't "click-boom" will be. The Database is normalized, with no abbreviations, and no EntityAttributeValue tables. ConnectionStrings are managed by DPAPI instead of the joke that is "here's the connectionString to database-A in an XmlFile, use it to get the connectionString for database-B (which is usually just database-A) from a table in database-A".&lt;br /&gt;&lt;br /&gt;How do you convince people who are most concerned with keeping the status-quo that there's a better way?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111721530430948929?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111721530430948929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111721530430948929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111721530430948929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111721530430948929'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/05/my-job-venting.html' title='My Job (Venting)'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111720638184784908</id><published>2005-05-27T08:06:00.000-07:00</published><updated>2005-05-27T08:06:21.850-07:00</updated><title type='text'>Saw it at CodeBetter</title><content type='html'>&lt;TABLE BORDER=0&gt;&lt;TR&gt;&lt;TD&gt;&lt;br /&gt;&lt;A HREF="http://quiz.ravenblack.net/videogame.pl"&gt;&lt;IMG BORDER=0 ALIGN="LEFT" WIDTH=150 HEIGHT=80 SRC="http://quiz.ravenblack.net/videogame/16.png" ALT="What Video Game Character Are You? I am a Light Cycle." /&gt;&lt;/A&gt;I am &lt;B&gt;a Light Cycle&lt;/B&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;br /&gt;I drive fast, I turn fast, I do everything fast. I even breakfast. I tend to confuse people with my sudden changes of heart. Sometimes I even confuse myself, which tends to cause problems. &lt;A HREF="http://quiz.ravenblack.net/videogame.pl"&gt;What Video Game Character Are You?&lt;/A&gt;&lt;br /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111720638184784908?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111720638184784908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111720638184784908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111720638184784908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111720638184784908'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/05/saw-it-at-codebetter.html' title='Saw it at CodeBetter'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111720423620764460</id><published>2005-05-27T07:10:00.000-07:00</published><updated>2005-05-27T07:30:36.213-07:00</updated><title type='text'>Eronel.Common and UIBroker</title><content type='html'>I made a few small updates to the XmlActivator. I added some test benchmarks, and support for overriding an object's Type with a type description in the Xml. In other words you can now use Interfaces, or Abstracts in your objects and specify the concrete or derived type in the Xml.&lt;br /&gt;&lt;br /&gt;The benchmarks aren't earth-shattering, and truly it's going to be very usage specific. The bigger the object graph, the larger the Xml, the more Members there are to set, the more Reference types you use over ValueTypes, the slower. I used the "Garage" test (a Garage class with a few members, one being a list of Vehicles) as the basis for the XmlActivator benchmark. It executed 10,000 times in 4 seconds on my Centrino1.5Ghz laptop. 2,500 objects per second then. Seems fair enough to me, though I'm sure with actual Profiling there's lots of room to improve on that.&lt;br /&gt;&lt;br /&gt;Just to reinforce how usage specific the performance will be, I also benchmarked the RegexActivator using the "Pet" test as it's basis (a Pet class with some members, one being a Person as the owner). Even though the RegexActivator is just a wrapper for the XmlActivator with some Matching and extra string manipulation, 10,000 iterations with it took only 3 seconds.&lt;br /&gt;&lt;br /&gt;On to the UIBroker... I need to add dot-notation (or underscore replacements) support to it. Right now you have to compromise your form design with extra containers just to map deeper in the graph. I'll need dot-notation anyways to add mapping-file support cleanly I think.&lt;br /&gt;&lt;br /&gt;Nothin' much else new. Done a bit of AJAX recently. Really nice. Working in an ASP3/No-COM/Sproc-Everywhere shop still sucks. Badly. But hopefully with the delivery of an ASP.NET project I just worked on things will finally start to change.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111720423620764460?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111720423620764460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111720423620764460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111720423620764460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111720423620764460'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/05/eronelcommon-and-uibroker.html' title='Eronel.Common and UIBroker'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111559505449632196</id><published>2005-05-08T16:19:00.000-07:00</published><updated>2005-05-08T16:30:54.510-07:00</updated><title type='text'>Eronel.Common 1.4</title><content type='html'>As promised, I just uploaded a new version of Eronel.Common to ProjectDistributor that includes a rewrite of the UIBroker.&lt;br /&gt;&lt;br /&gt;Validator generation isn't supported. The old version's Attributes are done away with, with no replacement custom mappings as of yet. It is recursive on both the control tree side, and object graph side however.&lt;br /&gt;&lt;br /&gt;1.4 also includes a tweak to Utility.ConvertStringToType() to support Types with no default constructor, but a constructor that accepts a single string as a parameter. (Such as Guid &amp; Uri)&lt;br /&gt;&lt;br /&gt;I need to get an ObjectView together for my latest work with NHibernate real quick, after that, I'll work on polishing up the UIBroker some more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111559505449632196?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111559505449632196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111559505449632196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111559505449632196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111559505449632196'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/05/eronelcommon-14.html' title='Eronel.Common 1.4'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111553463569181853</id><published>2005-05-07T23:33:00.000-07:00</published><updated>2005-05-07T23:43:55.700-07:00</updated><title type='text'>UIBroker update...</title><content type='html'>Coming soon! Promise! Probably tommorow... I started work last week on the first web project I've worked on in about a year, and could've really used something like the UIBroker. So I'm gonna go ahead and re-write it. I'll keep the base class I think, but I'm probably going to kill the WinForms version until I get a quality implementation of the web-version. After that's done the WinForms version should be a piece of cake.&lt;br /&gt;&lt;br /&gt;Since I've already re-written a good deal of it, and have a better idea of the direction I want it to go in, it should be pretty easy. I'm also going to do this one TDD style, like the XmlActivator was, since I'm pretty happy with how that turned out.&lt;br /&gt;&lt;br /&gt;Definitely need to make this one recursive too. Lets lay it out real quick:&lt;br /&gt;&lt;br /&gt;The whole point of this is to minimize tedious code. So I need to try to infer as much as possible. That means using the control-tree as the initial mapping, (after configuration-time mapping anyways), and walking it recursively. How do I handle mapping to an object graph recursively though? Can ID's have periods in them? Dunno off the top o' me head. If so, that's the way I'll go. If not, well, something else then.&lt;br /&gt;&lt;br /&gt;I'll probably leave out validators in this version too. Tests, overall design, ease of use, and simple mappings are the focus of this version since that's what I have a need for right now. Performance, WinForms, and the last 5% of use-cases are on the back burner this release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111553463569181853?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111553463569181853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111553463569181853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111553463569181853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111553463569181853'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/05/uibroker-update.html' title='UIBroker update...'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111479071447180413</id><published>2005-04-29T09:04:00.000-07:00</published><updated>2005-04-29T09:05:14.470-07:00</updated><title type='text'>Eronel.Common 1.3 Released</title><content type='html'>That pretty much says it all. The features promised for 1.3 are in, and it passes all the tests so...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111479071447180413?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111479071447180413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111479071447180413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111479071447180413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111479071447180413'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/04/eronelcommon-13-released.html' title='Eronel.Common 1.3 Released'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111474652053591833</id><published>2005-04-28T20:09:00.000-07:00</published><updated>2005-04-29T10:24:49.996-07:00</updated><title type='text'>Eronel.Common</title><content type='html'>I've published a project at &lt;a href="http://www.projectdistributor.net/"&gt;ProjectDistributor&lt;/a&gt; called &lt;a href="http://projectdistributor.net/Projects/Project.aspx?projectId=100"&gt;Eronel.Common&lt;/a&gt;. It's a personal library I've come up with through thinking about useful things for my own projects in addition to what I could use at work.&lt;br /&gt;&lt;br /&gt;Currently it revolves mostly around the XmlActivator class since I really needed something like that at work, I've talked about it in the past, it was a small/doable project, and it was just plain fun. :)&lt;br /&gt;&lt;br /&gt;My current progress on it is: The next release (1.3) should be out by Monday. I've introduced the CasingStrategies enum which lets you choose between Insensitive, CamelCased, and ExactMatch (to match XmlNode names to MemberInfos in the XmlActivator). I plan to add IDictionary support next, and that's probably it before release. My one static library is called Utility. It's a catch-all for methods that are short, but useful, and I can't think of a good factoring for them as objects. Over time the methods often grow in functionality, or several are added together, and then as a whole they make more sense and I factor them out into their own classes. In my current build I've added the Console helper mentioned in the previous post. I'm not sure what other functionality I want to include in the XmlActivator, so this mini-project (the class, not the library) may be nearing the end.&lt;br /&gt;&lt;br /&gt;I had originally thought I might add constructors and method invocations to it, but as it evolves, that seems less appropriate. I'll probably add constructors anyways. It shouldn't be hard, and it removes the current constraint of requiring a default constructor. I might also add support for non-public members. Besides that though, I think it's pretty robust.&lt;br /&gt;&lt;br /&gt;One thing I don't have for it right now are a lot of obvious use-cases. I've used it mostly for configuration, though it's been used at work in a prototype parser I think is actually really neat. To use it in configuration right now you have to load up the Xml manually though. I wrote a TypedConfigurationSectionHandler at work to let me just do stuff like the following:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 102);"&gt;MailSettings settings = (MailSettings) ConfigurationSettings.GetConfig("mailSettings");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's a lot cleaner IMO than using App.Config. I know VS2005 makes this kind of thing a lot easier, but I don't like the Xml it produces, so I'll probably try and adapt it to my own preferences when I find the time. Plus we're probably a year off from doing much at all with c#2 at work so in the meantime this is pretty useful for me personally.&lt;br /&gt;&lt;br /&gt;Going back to that parsing app, it was actually a combination of the TypedConfigurationSectionHandler, XmlActivator, RegexActivator, and a class I wrote called the RegexStreamParser. That last one I'm pretty proud of. It lets you do things like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 0, 102);font-size:85%;" &gt;void Run() {&lt;br /&gt;RegexStreamParser parser = new RegexStreamParser("invoices.txt", "(?&amp;lt;data&amp;gt;^begin\sinvoice.*\r\n(^.*\r\n)*?^end\sinvoice)");&lt;br /&gt; parser.FoundMatch += new FoundMatchEventHandler(this.ProcessMatch);&lt;br /&gt; parser.Start();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void ProcessMatch(RegexStreamParser parser, Match match) {&lt;br /&gt; using(ISession session = Database.GetSession()) {&lt;br /&gt;  Invoice invoice = (Invoice) RegexActivator.CreateInstance(typeof(Invoice), parser.Expression, match);&lt;br /&gt;  session.Save(invoice);&lt;br /&gt; }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So using NHibernate, and the custom classes, I can write parsers for multi-Gigabyte files. The RegexStreamParser uses another class internally that buffers a file, allows you to resize the buffer on the fly, allows you to advance the buffer n-number of bytes, and allows exposes the buffered byte[] array in a property; this lets me keep memory usage low even on huge files and still be 99.99999999999999999999999% sure that I don't miss any possible matches since a single match spanning more than double the default buffer (it auto-expands/advances in 10% increments (up to 2x for expansions) if no match is found) of 5MB would be insane. Anyways, the point is I can write some pretty wicked, (and performant) parsers for large files with only what, a dozen lines of code in a simple case like above? Like I said, I'm pretty proud of it. :)&lt;br /&gt;&lt;br /&gt;So that's probably the direction I'll head with the library after v1.3. Add more examples, and build some "support" classes (including the configSectionHandler, and hopefully a spiffy new implementation of a RegexStreamParser).&lt;br /&gt;&lt;br /&gt;After that I might get around to finishing up the UIBroker since I'm over the configuration hump now, and it's already been half-way rewritten anyways. Hard to get motivated about something I don't use though (since I don't really do any business Forms development right now) and don't get any feedback on. :( We'll see...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111474652053591833?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111474652053591833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111474652053591833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111474652053591833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111474652053591833'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/04/eronelcommon.html' title='Eronel.Common'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111473233907149464</id><published>2005-04-28T15:57:00.000-07:00</published><updated>2005-04-28T16:59:41.483-07:00</updated><title type='text'>Sometimes performance means nothing.</title><content type='html'>The code pretty much says it all here, so let's just dig in m'kay?&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-size:85%;" &gt;namespace Eronel.Common {&lt;br /&gt;    public class Utility {&lt;br /&gt;        Utility() {}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(102, 102, 102); font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;        public static void ExecuteStaticArgsForConsole(Type type, string[] args) {&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;            string option = Regex.Replace(args[0], "^[/-]", String.Empty);&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;            try {&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                type.GetMethod(option,&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                    BindingFlags.Public | BindingFlags.Static | BindingFlags.IgnoreCase).Invoke(null, null);&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;            } catch {&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                Console.WriteLine("Option not found.");&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;br /&gt; &lt;/span&gt;  &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                MethodInfo[] methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;br /&gt; &lt;/span&gt;  &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                if(methods.Length &amp;gt; 0) {&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                    Console.Write("Valid options are:");&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;font-size:85%;"  &gt;                    for(int i = 0; i &amp;lt; methods.Length; i++)&lt;br /&gt;                        if(i == 0) {&lt;br /&gt;                            Console.Write(" {0}", methods[i].Name);&lt;br /&gt;                        } else if(i == methods.Length - 1) {&lt;br /&gt;                            Console.WriteLine(" and {0}.", methods[i].Name);&lt;br /&gt;                        } else {&lt;br /&gt;                            Console.Write(", {0}", methods[i].Name);&lt;br /&gt;                        }&lt;br /&gt;                                        }&lt;br /&gt;                                }&lt;br /&gt;            }&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And you've got a simple little ConsoleApp like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:courier new;font-size:85%;"  &gt;using Eronel.Common;&lt;br /&gt;&lt;br /&gt;namespace StaticInvocation {&lt;br /&gt;&lt;summary&gt;&lt;/summary&gt;&lt;br /&gt;    public class Program {&lt;br /&gt;        [STAThread]&lt;br /&gt;        static void Main(string[] args) {&lt;br /&gt;            if(args.Length &gt; 0) {&lt;br /&gt;                Utility.ExecuteStaticArgsForConsole(typeof(Program), args);&lt;br /&gt;            } else {&lt;br /&gt;                Program program = new Program();&lt;br /&gt;                program.Run();&lt;br /&gt;            }&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;        public static void Howl() {&lt;br /&gt;            Console.WriteLine("ARRROOOOOOOH!");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void Bark() {&lt;br /&gt;            Console.WriteLine("WOOF!");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void Whine() {&lt;br /&gt;            Console.WriteLine("No kitty that's mah pot pie!");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        void Run() {&lt;br /&gt;            Console.WriteLine("Program Started...");&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Of course you could do more, this is just an example. It works, it makes all those switch statements a thing of the past, and it's easy on the eyes. What more could you want?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111473233907149464?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111473233907149464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111473233907149464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111473233907149464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111473233907149464'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/04/sometimes-performance-means-nothing.html' title='Sometimes performance means nothing.'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111352092320130007</id><published>2005-04-14T15:54:00.000-07:00</published><updated>2005-04-14T16:22:03.203-07:00</updated><title type='text'>Ruby Strikes Back</title><content type='html'>Don't you just hate when you spend forever trying to figure out how to do something easy? Trying to get Ruby and Microsoft SQL Server talking was kinda like that for me.&lt;br /&gt;&lt;br /&gt;I never could get ODBC support to work, all the examples and newsgroup posts I could find only described using it with a DSN (which I didn't want to do). So I fell back on the ADO DatabaseDriver (DBD).&lt;br /&gt;&lt;br /&gt;So what does it take? Download and install the Ruby DBI package. (Just Google for Ruby dbi and you'll find it.) Then config/setup/install. To get it to install I had to rename/delete a number of files in my Ruby installation, but I figure I'm just getting later versions with the dbi install, and so far haven't seen any harm.&lt;br /&gt;&lt;br /&gt;Oh, btw, there's a newer version of FreeRIDE to try than what comes with the Ruby installer. Not quite as snazzy as ArachnoRuby, but it's simple and has Ruby Documentation integrated, so it's pretty cool, and is what I'm using for now.&lt;br /&gt;&lt;br /&gt;Anyways, once you have DBI, it's actually really easy to use.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;require 'dbi'&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="font-family: courier new;"&gt;dbh = DBI.connect("DBI:ado:Driver={SQL Server};Server=127.0.0.1;Database=Northwind;Uid=sa;Pwd=password")&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;sth = dbh.execute("select * from products")&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;rows = sth.fetch_all&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;sth.finish&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;rows do |row| puts row[:ProductName]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's it!&lt;br /&gt;&lt;br /&gt;Cool huh? Well, it gets mo' betta. Check out this code that basically serializes the Products table from Northwind to an Xml file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;dbh = DBI.connect("DBI:ado:Driver={SQL Server};Server=127.0.0.1;Database=Northwind;Uid=sa;Pwd=password")&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;DBI::Utils::XMLFormatter.table(dbh.select_all("select * from products"), "products", "product", File.new("products.xml", "w+"))&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;You could actually do this all on one line if you were a little crazy since the .connect method of DBI returns a database handle that you could call .select_all on directly.&lt;br /&gt;&lt;br /&gt;If you look at the above examples you can see, besides "DBI:ado:", the connectionStrings are just standard OLEDB ones you'd find at &lt;a href="http://www.connectionstrings.com"&gt;http://www.connectionstrings.com&lt;/a&gt;. So once you know how, it's really simple.&lt;br /&gt;&lt;br /&gt;I think this goes to show one of the advantages of a statically typed language though: The learning curve is much lower when you have tools like Intellisense and Type cast compilation errors to help you out.&lt;br /&gt;&lt;br /&gt;Anyways, cool stuff. I'm taking my newfound Ruby knowledge and applying it to a report generator for work that will use Xml streams of queries as "Resources", and allow you to use Xslt embedded in the "Job" files to do things like send out an Excel report once a week for SalesPerson Commissions. I think I should be able to replace the existing system (written in c#) of about 500 lines of code, with a Ruby version of about half that, that provides more features to boot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111352092320130007?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111352092320130007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111352092320130007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111352092320130007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111352092320130007'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/04/ruby-strikes-back.html' title='Ruby Strikes Back'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111315948480108597</id><published>2005-04-10T11:45:00.000-07:00</published><updated>2005-04-10T11:58:04.803-07:00</updated><title type='text'>Ruby</title><content type='html'>Ruby is cool. AranchoRuby IDE is definitely the one to go for, if for nothing else than it manages to get auto-tabbing right. I love the fact that RegularExpressions are first class citizens in Ruby, and blocks are cool. (I just started learning yesterday, so sue me ;) )&lt;br /&gt;&lt;br /&gt;%w{My name is Sam}.each {|s| puts s}&lt;br /&gt;&lt;br /&gt;Results in:&lt;br /&gt;My&lt;br /&gt;name&lt;br /&gt;is&lt;br /&gt;Sam&lt;br /&gt;&lt;br /&gt;Is that cool or what? Some people may say "meh", but ignore the example and think about what it's doing instead. In c# you'd have to do something like this:&lt;br /&gt;&lt;br /&gt;foreach(string s in new string[] {"My", "name", "is", "Sam"}) Console.WriteLine(s);&lt;br /&gt;&lt;br /&gt;If you're at all interested in programming you owe yourself to give Ruby a shot. Goto &lt;a href="http://www.rubycentral.com/"&gt;http://www.rubycentral.com/&lt;/a&gt; and click on the "Ruby Book (old)" link. If you're running Windows just find the windows installer at RubyForge. It comes with the FreeRide IDE, which would be nice enough if it had Arachno's color coding and tab completion. Maybe that'll be added soon.&lt;br /&gt;&lt;br /&gt;BTW, if you thought Aspect Oriented Programming was cool, but were frustrated at c#'s roadblocks to it, you'll love Ruby. Runtime mixins of any type you could want, and you can emulate a pointcut through overwriting I think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111315948480108597?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111315948480108597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111315948480108597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111315948480108597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111315948480108597'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/04/ruby.html' title='Ruby'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-111315869747504802</id><published>2005-04-10T11:43:00.000-07:00</published><updated>2005-04-10T11:44:57.476-07:00</updated><title type='text'>UIBroker</title><content type='html'>I really need to polish off the update I made. It's been languishing on my laptop for a month now. It's a lot cleaner, should be faster too (though I haven't profiled it yet), but since I'm not doing any web/winforms development, I haven't had the motivation to finish it. Ah well. Eventually...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-111315869747504802?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/111315869747504802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=111315869747504802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111315869747504802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/111315869747504802'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/04/uibroker.html' title='UIBroker'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-110589781079285011</id><published>2005-01-16T09:18:00.000-08:00</published><updated>2005-01-16T09:50:10.793-08:00</updated><title type='text'>NTrans ramblings</title><content type='html'>So I'm writing this O/R Mapper called NTrans. (The letter N seems very "in" and I couldn't think of anything). It's hosted at &lt;a href="http://projectdistributor.com"&gt;http://projectdistributor.com&lt;/a&gt; under the Eronel group. It's a prototype right now, but I hope to build it into something useful rather quickly (hopefully the basics will all be there by the end of this month).&lt;br /&gt;&lt;br /&gt;Curious? Ok, go check it out. I'll wait.&lt;br /&gt;&lt;br /&gt;You didn't did you? Ok, well none of this is going to mean much to you probably then. :)&lt;br /&gt;&lt;br /&gt;I'm having a problem with the ObjectScope and Context classes. I'm not even sure they should be seperate classes really, but I like how the Context factory works. I think basically I need to move more of the IDbCommand stuff into the Context I suppose.&lt;br /&gt;&lt;br /&gt;I also need to add more granular tracking of objects I think. Specifically wether individual properties are Clean, Dirty, or Unloaded. Once I have that, Lazy Loading should be a snap. Right now it's not because I can't differentiate between nulls that are just not loaded, or nulls that are really null.&lt;br /&gt;&lt;br /&gt;I also need to create a FillProperty(object obj, string propertyName) method for lazy loading. I think it should be internal since lazy loading is the only situation it should be used, and that should be transparent.&lt;br /&gt;&lt;br /&gt;I really need to get around to creating some UnitTests. I've created a Test Project full of stubs, but haven't filled it in with anything usefull. I wish I could say it's because I write perfect code, but the truth is I just haven't gotten motivated about it. :)&lt;br /&gt;&lt;br /&gt;So what now? Well, I have a hunch the property state I mentioned above for lazy loading will fit into a QueryAPI somehow. Plus it'll help me update just the EmbeddedValue properties that are actually dirty.&lt;br /&gt;&lt;br /&gt;Actually, can you modify Attributes at runtime? I mean, if I added a LazyLoadedAttribute to the project, could I expose an IsLoaded property, and after loading the property, the LazyLoader would set the IsLoaded property to true so the property wouldn't be loaded multiple times. Definitely something to test. Actually, if I can do this, then there probably isn't even a need for the PersistentObject class. I could just expose internal properties of the PersistentAttribute instead.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-110589781079285011?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/110589781079285011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=110589781079285011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/110589781079285011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/110589781079285011'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/01/ntrans-ramblings.html' title='NTrans ramblings'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10193025.post-110589559414941749</id><published>2005-01-16T09:00:00.000-08:00</published><updated>2005-01-16T09:13:14.150-08:00</updated><title type='text'>VS2005 Likes/Dislikes</title><content type='html'>So since I've been using VS2005 pretty steadily for all my personal projects, I've run into a few cool things, and not so cool things.&lt;br /&gt;&lt;br /&gt;First up, the cool stuff: Intellisense is better. The Office2003 layout is nicer. Project Diagrams are cool (if not all that useful). Project Properties are spiffy (even if it's hard to figure out how to get "Settings" values to stick sometimes).&lt;br /&gt;&lt;br /&gt;Now the bad: The refactoring support is next to useless. The expansions are cumbersome (so much so that I just don't use them). Intellisense sometimes gets in the way of typing what you want (though not as much as CodeRush). I can't figure out how to turn off the Using Directives auto-regioning. If the "Add Using" support was as clean as Resharpers this would actually be a cool feature (the using regions), but since it's slow, and usually requires mousing around, it actually ends up a big nuiscance.&lt;br /&gt;&lt;br /&gt;The long and short of it is I can't wait until Resharper has a port for VS2005. If I could go back to VS2003 + Resharper and still use c#2.0, I would (I can't can I?).&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10193025-110589559414941749?l=srsmoot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://srsmoot.blogspot.com/feeds/110589559414941749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10193025&amp;postID=110589559414941749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/110589559414941749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10193025/posts/default/110589559414941749'/><link rel='alternate' type='text/html' href='http://srsmoot.blogspot.com/2005/01/vs2005-likesdislikes.html' title='VS2005 Likes/Dislikes'/><author><name>Sam</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
