<?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-7057604035463178430</id><updated>2012-01-27T22:29:05.063-08:00</updated><category term='ruby'/><category term='ruby-on-rails'/><category term='Gaming'/><category term='linq'/><category term='iphone'/><category term='Microsoft'/><category term='WCF'/><category term='rubymine'/><category term='OOP'/><category term='Wii'/><category term='design-patterns'/><category term='Windows'/><category term='logging c# asp.net enterprise-library'/><category term='Android'/><category term='real-estate'/><category term='google'/><category term='Silverlight'/><category term='chrome'/><category term='databases'/><title type='text'>Coding, Mostly</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-7172866645815622693</id><published>2012-01-19T16:19:00.000-08:00</published><updated>2012-01-19T16:19:23.907-08:00</updated><title type='text'>Storing values outside your stub with Rspec</title><content type='html'>I'm working on some code today that saves records to a database. For my rspec tests I want to redirect the "save" to a stub. And I want to take the data that would have been saved and stow it somewhere else. Well, I had plenty of problems with this so I'm here to share the real solution.&lt;br /&gt;&lt;br /&gt;The first issue that I ran into: return values on stubs must match the type of the return value in your live code. Duh. But I'm coming from the static typed world, so this one slipped by me. I had a method that was returning the number of new records created (0 or 1). Simple. But the stub was just pushing the input into an array:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; saved_rows = []&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; proc.stub(:save) do |arg0|&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; puts 'redirecting save'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; saved_rows &amp;lt;&amp;lt; arg0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Which meant that the return value (that was going to 'real' code) was a big array. No bueno. Ok, fixing that was a huge aha moment. Just add a '0' on the line after&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;@saved_rows &amp;lt;&amp;lt; arg0. &lt;/span&gt;&lt;span style="font-family: inherit;"&gt;Much cursing about this one -- the object worked find from irb but failed when I did the test.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Next up: storing the row in an array outside of the stub. I couldn't find any samples of this, so it was trial and error. In the code above, it certainly looks like it'd work. But it doesn't. I assume&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;saved_rows&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;is getting created in two places.&amp;nbsp;The solution: use an&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt; @instance &lt;/span&gt;&lt;span style="font-family: inherit;"&gt;variable:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;@saved_rows = []&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; proc.stub(:&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;save&lt;/span&gt;&amp;nbsp;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;) do |arg0|&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; puts "&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;redirecting save&lt;/span&gt;&amp;nbsp;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @saved_rows &amp;lt;&amp;lt; arg0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Bada-bing. Now I have a save method that is storing the new data in a place where I can get to it (and test it).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Related Rspec doc:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.relishapp.com/rspec/rspec-mocks/docs/method-stubs/stub-with-substitute-implementation"&gt;https://www.relishapp.com/rspec/rspec-mocks/docs/method-stubs/stub-with-substitute-implementation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-7172866645815622693?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/7172866645815622693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2012/01/storing-values-outside-your-stub-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/7172866645815622693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/7172866645815622693'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2012/01/storing-values-outside-your-stub-with.html' title='Storing values outside your stub with Rspec'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-6218641219007281280</id><published>2011-11-25T15:28:00.000-08:00</published><updated>2011-11-25T15:33:54.295-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby-on-rails'/><title type='text'>sometimes hard conventions suck (rendering partials in RoR)</title><content type='html'>I spent an hour today on this one: &lt;br /&gt;&lt;blockquote class="tr_bq"&gt;partials are named with a leading underscore to distinguish them from regular views, even though they are referred to without the underscore&lt;/blockquote&gt;&lt;blockquote class="tr_bq"&gt;&lt;a href="http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials"&gt;http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials&lt;/a&gt; &lt;/blockquote&gt;So I had some code that said: &lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; render :partial =&amp;gt; "short_list", :collection =&amp;gt; @items&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which was in an ajax call. I was doing it with 'render :inline' but partials seemed like a much better idea. Well, that wasn't such a great idea.&amp;nbsp;I kept getting ActionView::MissingTemplate errors. Tried about 15 things, read three or four blog posts, several SO questions. Then I noticed one that had an underscore in front of the file name. Odd. So I go read the docs and sure enough.&lt;br /&gt;&lt;br /&gt;Even if you specifically say:&amp;nbsp;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; render :partial =&amp;gt; "item/short_list", :collection =&amp;gt; @items&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;it will not find your partial &lt;b&gt;because it doesn't start with an underscore&lt;/b&gt;. Even though there is only one view in that directory. &lt;br /&gt;&lt;br /&gt;That, that is stupid. Conventions are fine when you want to just sorta let the app wire things up. But when you specifically say "do it this way" the convention should not get in your way.&amp;nbsp;&lt;div&gt;&lt;br /&gt;The odd thing about Ruby is that it is much more of an RTFM language than C# -- because there's no compiler to tell you "hey, you did that wrong" and the autocomplete is usually just not there.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-6218641219007281280?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/6218641219007281280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2011/11/sometimes-hard-conventions-suck.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/6218641219007281280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/6218641219007281280'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2011/11/sometimes-hard-conventions-suck.html' title='sometimes hard conventions suck (rendering partials in RoR)'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-1465562017615048289</id><published>2011-11-15T14:16:00.000-08:00</published><updated>2011-11-15T14:16:09.531-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rubymine'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby-on-rails'/><title type='text'>More Rubymine Impressions</title><content type='html'>OK here's another couple of things I love about this IDE. For the sake of typing, RM means RubyMine.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Local History: you get a diff-able view of all the saves that you have made to a file. If you're using a DVCS that's 3 different views of the changes that you've made to a file. Wild. I love this because I've often thought of adding a "commit on every successful build" sort of thing to Visual Studio so that I have a step by step recreation of what I did with a file. That way if you think 'huh, that was working 20 minutes ago' you'd be able to backtrack. With RubyMine, no need.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Parentheses: Seems like such a small thing, but it makes my life easier. When I type '(' into RM it gives me a closing paren for free. But if I miss that for whatever reason and then type the closing paren anyway, RM figures it out and just overwrites the closing paren that I typed. I'm waiting for this to trip me up, but it hasn't happened yet so so far it's awesome.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Find is fast fast fast: So far I've got about 200 files in my app. Not many really. But when I do a Shift Ctrl F and search for a string in the files it is nearly instantaneous. It is possible that that's because the files are on an SSD. Still it seems faster than Visual Studio.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-1465562017615048289?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/1465562017615048289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2011/11/more-rubymine-impressions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1465562017615048289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1465562017615048289'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2011/11/more-rubymine-impressions.html' title='More Rubymine Impressions'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-4098444784808283076</id><published>2011-11-09T08:36:00.000-08:00</published><updated>2011-11-15T14:16:56.482-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rubymine'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby-on-rails'/><title type='text'>ROR + RubyMine impressions (from a .NET Dev)</title><content type='html'>Playing with RubyMine and ROR today. I'm actually hoping to build something real with this in the next few days. Well, a few days might be optimistic. I'm a .NET dev and I remember people saying that MVC was really just Microsoft-ROR. Didn't know much about it at the time but I'm starting to see it.&lt;br /&gt;&lt;br /&gt;Here are some impressions of RubyMine and ROR, in no particular order.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;What a deal: I got RubyMine for $35. A steal. Part of the 'Winter is coming' sale. Someone's been watching too much Game of Thrones eh?&amp;nbsp;&lt;/li&gt;&lt;li&gt;Autocompletey magic: Love the auto complete in RubyMine so far. I've never seen Visual Studio pick up on `&amp;lt;` as well as RubyMine does. Gives me every option that I could ever want to put next to a less than.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Ruby is: I don't know yet. Still deciding.&amp;nbsp;&lt;/li&gt;&lt;li&gt;VCS: RubyMine's source control integration is effortless. Makes me wonder why MS hasn't made a decent plug in for SVN by now. If a $35 product can pull it off but a $5k+ product is 'missing' that, well what's the deal?&amp;nbsp;&lt;/li&gt;&lt;li&gt;Console: wait so I can interact with my model directly from the command line?&amp;nbsp;&lt;a href="http://guides.rubyonrails.org/getting_started.html"&gt;http://guides.rubyonrails.org/getting_started.html&lt;/a&gt;&amp;nbsp;Section 6.6 (no anchor there?!). OK that's pretty cool.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Wizard-ish things: `rails generate model ...` makes Rails stronger in code generation than Visual Studio? Weird. I expected a lot of 'type this text into a new text file'. Instead there's a generator that takes care of that for me. The generator also builds functional tests and unit tests? Testing as the norm instead of a 'like-ta-have'. Huh.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Associations are built into the routing (nested resource). Interesting.&amp;nbsp;&lt;/li&gt;&lt;li&gt;ASP.NET MVC = C# on Rails? Yeah I can see it. Wonder what web language used &amp;lt;%= %&amp;gt; first.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Speed speed speed: this one keeps coming back to me as I read the getting started guide. Something that would take me half an hour in C# MVC would take maybe 4 mins in ROR. Most of that time is in the database. And I'm not including the migration time for a database that is in a new environment (e.g Beta) in the .NET world -- what version is the db in now and what version should it be migrated to? In C# MVC: don't know and don't know (usually). In ROR: known and known. Versioning and migration are built in over here in the ROR world. &lt;b&gt;This I like.&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;More later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-4098444784808283076?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/4098444784808283076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2011/11/ror-rubymine-impressions-from-net-dev.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/4098444784808283076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/4098444784808283076'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2011/11/ror-rubymine-impressions-from-net-dev.html' title='ROR + RubyMine impressions (from a .NET Dev)'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-4522090023346316839</id><published>2011-06-12T13:30:00.000-07:00</published><updated>2011-06-12T13:30:41.645-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logging c# asp.net enterprise-library'/><title type='text'>Thinking of an ideal logging framework</title><content type='html'>First, let me say that logging is important. It's one of the &lt;a href="http://www.amazon.com/Martian-Principles-Successful-Enterprise-Systems/dp/0471789658"&gt;Martian Principles&lt;/a&gt;: &amp;nbsp;#13 Log Everything. Disk space is so cheap anymore that having weeks worth of detailed logs shouldn't be any big deal, provided you aren't taking a noticeable performance hit.&lt;br /&gt;&lt;br /&gt;Today I'm working with the Enterprise Library Logging framework and finding it lacking. It certainly does all-that-and-a-bag-of-chips. But it's got some issues that have really tedious workarounds:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Changing logging configuration on the fly without restarting your web app isn't easy. You have to add some custom code to make Enterprise Library look for a config file that isn't web.config. Small workaround, but every app needs it. I hear that EL 5.0 Optional Update 1 has a fix for this. Note the version number there: EL is up to version 5 and just now it's thinking of a standalone config.&lt;/li&gt;&lt;li&gt;Changing the EL.config as part of your deployment is wow a lot of work. I found &lt;a href="http://www.olegsych.com/2010/12/config-file-transformation/"&gt;this post by Oleg Sych&lt;/a&gt; that explains how to do it. It isn't trivial. Getting the rest of my team to agree to that amount of work to get Prod/Testing/Debug configuration of EL.config working? Hah, forget it. It requires hand-editing of the csproj file. Not good.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;Hand editing config files on a live and running site seems like a bad idea to me. One wrong save and BANG site is offline or not working correctly -- silently broken. And if what you silently broke is your logging? &lt;b&gt;Ouch&lt;/b&gt;. I'd prefer to have Production locked down to the point that this just isn't an option unless it's an emergency.&lt;br /&gt;&lt;br /&gt;I did look at ELMAH. It looks good, but it breaks the MP#13 because it's only logging the errors.&lt;br /&gt;&lt;br /&gt;So, the ideal laundry list for a logging solution:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Simple simple simple to add to an existing app.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Configure the logging level on the fly without restarting the app.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Write to a local (in the app directory) no-footprint database.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Multiple handling of certain classes of entries (errors get an email, verbose entries don't)&lt;/li&gt;&lt;li&gt;Easy to configure for production deploy via a script or .config transform (preferably second option)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;We had a similar setup at the last job (but it wrote to the Windows event log, yech). I don't really want to roll my own here. We were using log4net, but I recall a lot of configuration pain around it. Not sure why, but the guy who was working on it was bright enough that I don't think he was the issue. Plus, I think the on-the-fly config was something we had to do on our own.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Will update if I can find anything that satisfies all these conditions.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-4522090023346316839?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/4522090023346316839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2011/06/thinking-of-ideal-logging-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/4522090023346316839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/4522090023346316839'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2011/06/thinking-of-ideal-logging-framework.html' title='Thinking of an ideal logging framework'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-6199783325742897353</id><published>2011-03-30T21:35:00.000-07:00</published><updated>2011-03-30T21:35:30.845-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='real-estate'/><title type='text'>Buying a house in a depreciating market</title><content type='html'>TLDR: This calculator is surprisingly accurate for a first time buyer:&amp;nbsp;&lt;a href="http://www.nytimes.com/interactive/business/buy-rent-calculator.html"&gt;NYT Rent vs Buy Calculator&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First time homebuyer here. Been ready - nearly - to buy for a few years now but the combination of "WTF is with the housing market" and a shaky economy has left me thinking it's a bad idea. Granted, this was sort of a vague feeling of unease -- not a decision I looked at super closely.&lt;br /&gt;&lt;br /&gt;Here it is a few years later and the economy is getting better. Slowly. In fact so slowly that it looks unlikely that we'll get back to full employment before the next recession. Nevertheless, my career is doing fine and demand for my skill set is strong. I feel that now might finally be time to buy.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;However, &lt;/b&gt;I really want to be objective as possible about it. This is money we're talking about here and it's a good idea to keep your money and emotions far apart. &lt;br /&gt;&lt;br /&gt;To that end, I decided to do some math.&lt;br /&gt;&lt;br /&gt;First, house payments are partially interest payments and partially principal payments. So that's some money that goes to the bank and some that goes to you. Then there's PMI, house insurance and property taxes.&lt;br /&gt;&lt;br /&gt;Here's the big negative: depreciation. In my market, we're looking at almost $17,000 per year for depreciation according to Case Schiller values.&lt;br /&gt;&lt;br /&gt;You may say: "But what about the emotional satisfaction of owning a home?" Sure. Then there's the weekends spent re-caulking the bathtub and kitchen sink. Houses can be a spare time sink. I surely love my spare time. Allows me to write more in my blog (can't you tell?!). I consider the emotional benefit of owning a home to be offset by the emotional cost of having less time to watch Jersey Shore. That's a joke.&lt;br /&gt;&lt;br /&gt;In the benefits column, we have: tax savings, principal payments and... well that's it. Not paying rent anymore? Sure, but you're paying the ITI in PITI so that washes out quickly.&lt;br /&gt;&lt;br /&gt;Now for the math: the total "not going in my pocket" costs per year are the sum of: PMI, Homeowner Insurance, Property Taxes, Depreciation and Interest -- I'll call these Costs. The "going in my pocket" amount is the sum of tax savings and principal payments -- I'll call these Credits. For me, buying a $225k property at 5.25% with 3% down means my total outlay (Costs minus Credits) would be about $8k. Well that's much much less than I'm paying in rent ($9.5k / year for an apartment that certainly isn't the same as a decent house). OK so buying a house looks like a no-brainer: I'm coming out about $100 a month ahead.&lt;br /&gt;&lt;br /&gt;Wait, not so fast. That's in a static (not appreciating or depreciating) market. Factor in depreciation as it stands currently (about 7%) and my total outlay per year bumps up to $23k. Granted, a huge chunk of that is solely depreciation. But why pay depreciation unless you're already in a house? This is the same reason people walk away from mortgages. Depreciation is just moving the goal line -- the goal line of you owning your house outright.&lt;br /&gt;&lt;br /&gt;It seems unlikely that the market will depreciate for years though. When would be the optimal time to buy? When the total outlay per month is the same as the rent on a similar house. The way I calculate it, that's when depreciation is heading toward positive territory but still negative -- above -4% to be exact. If you're comfortable living in a smaller apt instead of a larger house, that number moves to -2%.&lt;br /&gt;&lt;br /&gt;Play around with this &lt;a href="http://www.nytimes.com/interactive/business/buy-rent-calculator.html"&gt;Buy vs Rent calculator&lt;/a&gt; on the NYT website and &amp;nbsp;you'll see that when the market is depreciating still it will take you &lt;b&gt;about 20 years&lt;/b&gt; for buying to be better than renting. Yikes.&lt;br /&gt;&lt;br /&gt;In the meantime -- while I'm looking for the market to improve enough that I won't be underwater on the house in a year, evaporating my down payment -- I think I'll hang around the foreclosure market and see if anything pops.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-6199783325742897353?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/6199783325742897353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2011/03/buying-house-in-depreciating-market.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/6199783325742897353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/6199783325742897353'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2011/03/buying-house-in-depreciating-market.html' title='Buying a house in a depreciating market'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-5791643718050278127</id><published>2009-05-02T19:19:00.000-07:00</published><updated>2009-05-10T19:13:31.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Why you need Fiddler if you're publishing web sites</title><content type='html'>I'm publishing a new web site today (this is my new project that's using Silverlight, SQLite, LINQ via DbLinq and WCF). Well I tried to publish it on Monday but ran into a snag with the service I used to talk to the database. I thought it was a url problem, so I spent maybe an hour or two messing around with web.config and the service references in my Silverlight project. I've learned a couple of valuable lessons here.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Changing service references around can be a real hassle&lt;/span&gt;. There's two solutions to this. First, you can just have two references to the service in your Silverlight project, just changing the using statement at the top of your files to the one you want. However this might mean changing your code in more than one place, which will get old. Second, you can use a ServiceHostFactory (&lt;a href="http://www.silverlightwebapps.com/Tutorials.aspx"&gt;I read about this here&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;public class MySiteHostFactory : ServiceHostFactory&lt;br /&gt;{&lt;br /&gt;  protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)&lt;br /&gt;  {&lt;br /&gt;            // Specify the exact URL of your web service&lt;br /&gt;   Uri webServiceAddress = new Uri(ConfigurationManager.AppSettings["ServiceUri_MySite"]);&lt;br /&gt;            ServiceHost webServiceHost = new ServiceHost(serviceType, webServiceAddress);&lt;br /&gt;            return webServiceHost;&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;And then add a key/value pair to your web.config. I did try this approach and it worked, but still didn't get to the root of my problem.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Get your policies straight&lt;/span&gt;. When you're deployed you'll probably want to lock down who can access your service. But in the meantime, open that policy right up. You'll need two files, clientaccesspolicy.xml and crossdomain.xml.&lt;br /&gt;&lt;br /&gt;clientaccesspolicy.xml:&lt;allow-from headers="*"&gt;&lt;grant-to&gt;&lt;resource path="/" subpaths="true"&gt;&lt;/resource&gt;&lt;/grant-to&gt;&lt;/allow-from&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;access-policy&gt;&lt;cross-domain-access&gt;&lt;policy&gt;&lt;/policy&gt;&lt;access-policy&gt;&lt;cross-domain-access&gt;&lt;policy&gt;&lt;allow-from headers="*"&gt;&lt;domain uri="*"&gt;&lt;/domain&gt;&lt;grant-to&gt;&lt;resource path="/" subpaths="true"&gt;&lt;/resource&gt;&lt;/grant-to&gt;&lt;/allow-from&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;access-policy&amp;gt;&lt;br /&gt; &amp;lt;cross-domain-access&amp;gt;&lt;br /&gt;   &amp;lt;policy&amp;gt;&lt;br /&gt;     &amp;lt;allow-from http-request-headers="*" &amp;gt;&lt;br /&gt;       &amp;lt;domain uri="*"/&amp;gt;&lt;br /&gt;     &amp;lt;/allow-from&amp;gt;&lt;br /&gt;     &amp;lt;grant-to&amp;gt;&lt;br /&gt;       &amp;lt;resource path="/" include-subpaths="true"/&amp;gt;&lt;br /&gt;     &amp;lt;/grant-to&amp;gt;&lt;br /&gt;   &amp;lt;/policy&amp;gt;&lt;br /&gt; &amp;lt;/cross-domain-access&amp;gt;&lt;br /&gt;&amp;lt;/access-policy&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/policy&gt;&lt;/cross-domain-access&gt;&lt;/access-policy&gt;&lt;/cross-domain-access&gt;&lt;/access-policy&gt;&lt;/blockquote&gt;And crossdomain.xml:&lt;br /&gt;&lt;blockquote&gt;&lt;cross-domain-policy&gt;&lt;allow-http-request-headers-from domain="*" headers="*"&gt;&lt;/allow-http-request-headers-from&gt;&lt;cross-domain-policy&gt;&lt;allow-http-request-headers-from domain="*" headers="*"&gt;&lt;/allow-http-request-headers-from&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"&amp;gt;&lt;br /&gt;&amp;lt;cross-domain-policy&amp;gt;&lt;br /&gt; &amp;lt;allow-http-request-headers-from domain="*" headers="*"/&amp;gt;&lt;br /&gt;&amp;lt;/cross-domain-policy&amp;gt;&lt;br /&gt;&lt;/cross-domain-policy&gt;&lt;/cross-domain-policy&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;NotFound can mean a lot of things&lt;/span&gt;. I kept getting a NotFound error out of my service. This was where I spent most of my time. Publishing the service? No prob. Opening up cross domain access? No prob. NotFound? What the heck does that mean. I could browse to the service. I could build a proxy using svcutil.exe. I was running my Silverlight app locally so I knew everything else was running right. So what the heck was going on? Well, a lot of messing around went by and still I didn't get anywhere until I did this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use Fiddler and add this to your web.config: &amp;lt;serviceDebug includeExceptionDetailInFaults="true" /&amp;gt;&lt;servicedebug includeexceptiondetailinfaults="true"&gt;. &lt;/servicedebug&gt;&lt;/span&gt;Using these two I found the issue in 10 minutes. Keep in mind that I was running the Silverlight app locally but I was pointing to the remote server. Turned out I was missing a dll (System.Data.SQLite). So I added it from my local dblinq directory. Still got the NotFound error. What?? Back to Fiddler. Go to the line that has the error (a 500 in my case) then Inspectors, TextView in the bottom pane. "The located assembly's manifest definition does not match the assembly reference": ah hah, wrong dll. Uploaded the correct one and away we went. All done.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; seetha asked what you need to do to get SQLite running on discountasp.net. The answer: not much. It's all about the trust level that your host let's you run .net apps under. Discountasp.net lets you run at Full Trust so there's no tweaking needed to get it going. Just make sure your app can find the .s3db file regardless of directory structure (I put mine in App_Data) and make sure you have the right version of your SQLite dll in your bin.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-5791643718050278127?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/5791643718050278127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/05/why-you-need-fiddler-if-youre.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/5791643718050278127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/5791643718050278127'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/05/why-you-need-fiddler-if-youre.html' title='Why you need Fiddler if you&apos;re publishing web sites'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-9041066831175713894</id><published>2009-04-14T14:53:00.000-07:00</published><updated>2009-04-14T14:55:10.333-07:00</updated><title type='text'>outlook r dumb</title><content type='html'>Why can't Outlook figure out that when I hit "Reply All" on an email that I sent out, I don't really need to send a copy *to myself*!? I miss gmail every time I use Outlook.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-9041066831175713894?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/9041066831175713894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/04/outlook-r-dumb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/9041066831175713894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/9041066831175713894'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/04/outlook-r-dumb.html' title='outlook r dumb'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-9156951797923451967</id><published>2009-03-01T21:56:00.000-08:00</published><updated>2009-03-01T22:13:08.199-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Expression Blend 2</title><content type='html'>Been messing around with Expression Blend 2 tonight as I build my latest Silverlight project. Right now I have IE7, FF3, VS 2008 and Exp Blend 2 open. The XAML that I'm working on looks the same in IE and FF but doesn't match what VS 2008 and Expression Blend are showing me. I guess Blend is nice to have if you want to do animation but it's &lt;span style="font-style: italic;"&gt;so&lt;/span&gt; crippled because &lt;span style="font-weight: bold;"&gt;there's no autocomplete&lt;/span&gt;. I find myself using VS 2008 for XAML editing because of that. Lacking autocomplete would be fine if all the language features were there in the properties pane. But for the life of me I can't find a MaxHeight property for an Image. Seems like that's pretty important for a designer to have. And since it's preview doesn't match what the browser is showing me, it's value is even more dubious.&lt;br /&gt;&lt;br /&gt;Oh wait there it is, there's a little grayed out arrow at the bottom of that pane. You expand that and you get the advanced properties. Here's the image. Wow that thing is hard to see.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_24f5ohsWDOs/Sat3kDlOSyI/AAAAAAAAABY/_ppj6knIxwk/s1600-h/expblend.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 63px;" src="http://4.bp.blogspot.com/_24f5ohsWDOs/Sat3kDlOSyI/AAAAAAAAABY/_ppj6knIxwk/s200/expblend.jpg" alt="" id="BLOGGER_PHOTO_ID_5308468047106689826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Still, lacking autocomplete is a deal breaker for me. Also, so far I see no way to change key bindings. Build solution in my VS is F6 but in EB it's Ctrl+Shift+B (while Run is F5). Lame.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-9156951797923451967?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/9156951797923451967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/03/expression-blend-2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/9156951797923451967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/9156951797923451967'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/03/expression-blend-2.html' title='Expression Blend 2'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_24f5ohsWDOs/Sat3kDlOSyI/AAAAAAAAABY/_ppj6knIxwk/s72-c/expblend.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-8052176521387852650</id><published>2009-02-07T13:08:00.001-08:00</published><updated>2009-02-07T13:13:49.679-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design-patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><title type='text'>Mitochondrial DNA uses Encapsulation</title><content type='html'>I read this on the PZ Myers's blog (&lt;a href="http://scienceblogs.com/pharyngula/2008/02/a_baffling_failure_of_peer_rev.php"&gt;link&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;"They also have a peculiar evolutionary history, arising as endosymbionts; their ancestors were independent organisms that took up residence inside eukaryotic cells in a mutually happy and long-lasting relationship. They exhibit some interesting relics of that prior history, as mitochondria have their own private strand of DNA which encodes some of the genes needed for the chemical processes they execute."&lt;br /&gt;&lt;br /&gt;Sounds to me like mitochondrial DNA are practicing a little bit of encapsulation. Cell evolutionary biology as an example of "&lt;em style="font-style: italic;"&gt;Favor&lt;/em&gt;&lt;span style="font-style: italic;"&gt; object &lt;/span&gt;&lt;em style="font-style: italic;"&gt;composition over&lt;/em&gt;&lt;span style="font-style: italic;"&gt; class &lt;/span&gt;&lt;em&gt;inheritance&lt;/em&gt;" [GOF].&lt;em&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt; &lt;/em&gt;How's that for a little mind-bending intersection of computer science and real science? &lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-8052176521387852650?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/8052176521387852650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/02/mitochondrial-dna-uses-encapsulation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/8052176521387852650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/8052176521387852650'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/02/mitochondrial-dna-uses-encapsulation.html' title='Mitochondrial DNA uses Encapsulation'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-1936251938079774977</id><published>2009-02-01T10:38:00.000-08:00</published><updated>2009-02-01T13:01:52.265-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>Lightweight databases (SQL Server alternatives)</title><content type='html'>&lt;span style="font-style: italic;"&gt;Portions of this post will read like some Bukowski stream of consciousness thing. Apologies. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As part of my new project (more to come on that later) I'm interviewing lightweight databases. What I'm really looking for is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;will work in a shared hosting environment with no additional software installs&lt;br /&gt;&lt;/li&gt;&lt;li&gt;xcopy deployable&lt;br /&gt;&lt;/li&gt;&lt;li&gt;has a decent IDE &lt;/li&gt;&lt;li&gt;will work well with LINQ&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The list so far (thanks to the people on &lt;a href="http://stackoverflow.com/questions/481684/linq-lightweight-database-which-db-to-choose"&gt;StackOverflow&lt;/a&gt; for helping me here):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;SQL Server Compact Edition&lt;/li&gt;&lt;li&gt;SQLite&lt;/li&gt;&lt;li&gt;VistaDB&lt;/li&gt;&lt;li&gt;Firebird&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Next step, evaluation:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SQLite&lt;/span&gt;:&lt;br /&gt;I already knew a little bit about SQLite because of my exposure to Android. It's the db that's used on Android and iPhone OS by default. So it's already in the lead because I'll need to know about it for those two platforms.&lt;br /&gt;&lt;br /&gt;Installation: easy. Go to sqlite.org and hit the download page. There's 4 files for windows but it's pretty easy to see what's what. Download the dll, put it in a place that's easy to find. There's no install. Just a dll. Done, in 1 minute.&lt;br /&gt;&lt;br /&gt;GUI: I read about SQLite administrator on &lt;a href="http://www.mikeduncan.com/sqlite-on-dotnet-in-3-mins/"&gt;mikeduncan.com&lt;/a&gt; so I tried that. Easy, quick, light. Some bugs, but no killers so far. All fine, but get this, &lt;span style="font-weight: bold;"&gt;it has AutoComplete&lt;/span&gt;! It was like a choir of angels singing when I saw that one. AutoComplete in a free SQL tool. Whoda thunk. I wanted to find a clip of a choir of angels singing and a light from heaven from a movie but couldn't find it or think of one. Damn.&lt;br /&gt;&lt;br /&gt;Downsides:&lt;br /&gt;No FKs. Damn, I really hate this one. FKs seem mandatory for a relational db for me. You can enforce them with triggers but that seems like a lot of work for FK enforcement.&lt;br /&gt;Entire database is locked for a write. Versus row or table locking on more sophisticated dbs. So if your db is going to see a lot of writes then this will hurt your performance. Since my project is for a public-facing website the R/W ratio will be so high it won't matter. The SQLite FAQ says it's appropriate for sites that see up to 100k hits per day. Which is 90% of them?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Next up&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; SQL Server Compact&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Disclaimer: I wrote about this in real time as I was installing, so I may look like I could've done this better.&lt;br /&gt;&lt;br /&gt;Upon going to the download page, I'm hit with the dreaded Wall of Text. There's 3 versions on there, with 5 download links each. But if it's a simple database, it seems like it should be simple to install. SSC is failing there. "SQL Server Compact 3.5 Service Pack 1 for Windows Desktop (includes Synchronization Services for ADO.NET version 1.0 Service Pack 1)" seems like my best option. Then I go to the download page and it's the same thing, wall of text. 4/5th of the way down the page is "SSCERuntime-ENU-x86.msi" that's probably what I need. Then I hit install and I get the option of Repair or Remove. No install. OK great I downloaded the Service Pack version, I need to download the non-service pack version then install the service pack I guess? Ugh. I want a big button that says "Get the latest version!!" So I go back in the browser and hit the link for version 3.5 (without the Service Pack). It asks me to register, I say no. Then it sends me to the download page for 3.5 SP1. Arrrrgh. I'm ready to give up on Compact Edition right here. Done, over, finito. I've blown 10 mins on just the freakin installation. I wonder at this point if I already have Compact installed because I have SQL Server 2005 installed? I don't remember actually installing it, but the options in the installer are "Repair" or "Remove" so maybe... Is SQL Server (Full) installed? Don't see any management tools in my Programs list. Go to add/remove programs. Wait. Update blog post. Yep, sure enough, it's installed.&lt;br /&gt;&lt;br /&gt;This is the point where I'm giving up on SQL Server Compact. I want a database solution that can exist totally independently of SQL Server and that's not clear from what I've done so far. I suspect that it can operate without SQL Server, but I don't want to uninstall SQL Server just so I can be sure. And I want management tools that are free and good (I already know this is possible with SQLite).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TLDR&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;edition&lt;/span&gt;: Too much work to install, especially compared to SQLite.&lt;br /&gt;&lt;br /&gt;Next up: &lt;span style="font-weight: bold;"&gt;VistaDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Again, a recommendation from StackOverflow. VistaDB has an unfortunate naming collision with the most hated of all OS's, so I felt bad for em. They were probably there first.&lt;br /&gt;&lt;br /&gt;The features look great. But then there's the license. No free license. There's a single dev distribution license, but it's pricey. I can get 3 years of SQL access on shared hosting for the price of that license. Gonna have to take a pass, the math just doesn't work. It's possible that I don't understand the licensing. But I already know SQLite is totally free and easy to use, so I'm not inclined to dig into the particulars of the licensing here.&lt;br /&gt;&lt;br /&gt;Next up: &lt;span style="font-weight: bold;"&gt;Firebird&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The specs look good. Requires an install, which is a con already. But maybe it'll be OK. I install, pause briefly when I see the option for installing as an Application or a Service. Really I don't want either, but I pick Application. Then there's "Start Firebird automatically every time you boot up." Rut-roh, does this mean that any host I put this my site's db on will have to have Firebird installed? Hmmm.  I complete the install. CPU usage seems pretty extreme for an install. Then I hit "Finish" and get an exception: "Firebird server failure: Missing configuration file [Program Files]\Firebird\Firebird_2_1\firebird.conf". So it failed to bring in a file that it needed when it installed. Great. Now I have to track down whether that file exists and what it's supposed to do. I'm tempted to dump Firebird right here. Can't make an installer correctly? I don't have time to deal with your software.&lt;br /&gt;&lt;br /&gt;Actually, I'm passing on Firebird. The installation makes me think that whatever host I pick would have to support it; my target host (&lt;a href="http://discountasp.net/"&gt;discountasp.net&lt;/a&gt;) doesn't support it. I don't like restricting hosting options for my clients. Plus, it has a *nix smell about it; the first paragraph in the install guide says "Please study this chapter before attempting to install any servers." In other words, RTFM, which feels *nixy to my ears. I want a quickstart guide (which I did find, but after the install guide).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Wait&lt;/span&gt;, what's this, there's an &lt;span style="font-weight: bold;"&gt;embedded &lt;/span&gt;version. OK, that might work. I look around for an install link and find this in the Firebird documentation: "It's                      typically named                      &lt;code class="filename"&gt;Firebird-&lt;em class="replaceable"&gt;&lt;code&gt;n.n.n.xxxx&lt;/code&gt;&lt;/em&gt;_embed_win32.zip&lt;/code&gt;,                      with &lt;em class="replaceable"&gt;&lt;code&gt;n.n.n.xxxx&lt;/code&gt;&lt;/em&gt; the Firebird version and                      build number". At least give me a link to the page! Blerg. Here's the &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=9028&amp;amp;package_id=29791"&gt;link for win32&lt;/a&gt;. Before I install Firebird Embedded I should uninstall Firebird (to make sure Embedded doesn't require the full version). Programs-&gt;Firebird-&gt;Uninstall. It fails, missing shortcut. Great. So I go through "Add / Remove Programs" and when I uninstall, I get an error; it tells me it "may already have been uninstalled." Man. Maybe I uninstalled and the uninstaller didn't clean up the Programs menu? Or the Add/Remove Programs list? Again, *nixy. I'm gonna give it 10 more mins at this point. Got to budget time.&lt;br /&gt;&lt;br /&gt;The big question about Firebird Embedded is: can I use a GUI with it? I'm of the opinion that command lines should be easy to get, but rarely needed, &lt;span style="font-weight: bold;"&gt;it's the Roe v. Wade opinion of GUIs&lt;/span&gt;. I found a blog post, but his suggestion involves renaming a dll and providing a nonexistent password so FlameRobin can connect to the embedded server. I think if the GUI wasn't intended to do something you're asking for trouble when you trick it into doing that thing. We'll see. Here's the &lt;a href="http://pabloj.blogspot.com/2006/08/flamerobin-as-gui-for-embedded.html"&gt;blog post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm using Firebird 2.0 instead of 1.5 so that's a red flag already. I try what he suggests and get:  "A fatal error has occurred. If you know how to reproduce..." Well that's the end of that. Firebird might be fine, but it's best GUI tool won't work with the embedded version.&lt;br /&gt;&lt;br /&gt;And The Winner: &lt;span style="font-weight: bold;"&gt;SQLite&lt;/span&gt;. I can live without foreign keys. I'll be doing the whole data access layer in LINQ, so no sprocs will be fine. I need to know it for Android programming. The whole-db-is-locked-for-a-write issue won't affect this project very much. It's incredibly easy to get going. The GUI tool that I'm using has autocomplete. Auto. Freakin. Complete.&lt;br /&gt;&lt;br /&gt;On a related note, I found the &lt;a href="http://code.google.com/p/dblinq2007/downloads/list"&gt;dbml project &lt;/a&gt;which is aimed at providing LINQ access to a variety of databases. Looks great, they've got a bazillion unit tests in every project. Not all of them are passing though; it's still Alpha.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-1936251938079774977?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/1936251938079774977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/02/lightweight-databases-sql-server.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1936251938079774977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1936251938079774977'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/02/lightweight-databases-sql-server.html' title='Lightweight databases (SQL Server alternatives)'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-8688645104645835392</id><published>2009-01-05T13:20:00.001-08:00</published><updated>2009-06-03T13:23:56.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Microsoft Marketing</title><content type='html'>Sometimes I wonder what is going on in Microsoft's Marketing division. Or how many divisions there are. Today, I saw somewhere that the Windows 7 logo has a 7 in the middle: Windows Se7en. Like Tr2n - I think the producers of Tron 2 bagged that though, and wisely so). I'm thinking that the logo with the 7 in the middle is bogus. So no further comments.&lt;br /&gt;&lt;br /&gt;This is the one I found on Microsoft.com:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.microsoft.com/windows/framework/images/hh_promo_windows7_cropped.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 100px; height: 83px;" src="http://www.microsoft.com/windows/framework/images/hh_promo_windows7_cropped.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;OK, that's nice, I can deal with that.&lt;br /&gt;&lt;br /&gt;But. Windows 7? Let's look at the name history.&lt;br /&gt;&lt;br /&gt;Windows 1&lt;br /&gt;Windows 2&lt;br /&gt;Windows 3&lt;br /&gt;Windows 95&lt;br /&gt;Windows 98 (shudder)&lt;br /&gt;Windows NT (was in here somewhere)&lt;br /&gt;Windows ME (yeah, I went there)&lt;br /&gt;Windows XP&lt;br /&gt;Windows Vista&lt;br /&gt;Windows 7&lt;br /&gt;&lt;br /&gt;I'm probably missing some server editions in there.&lt;br /&gt;&lt;br /&gt;For Windows 1-3 we've got a very boring naming scheme, but that's fine, a company getting off the ground and all that. Windows 95, 98, sure that works but it's really not more exciting than 1-3 for naming.&lt;br /&gt;&lt;br /&gt;Windows NT: well really what were they trying to convey there? No idea. Next Technology?&lt;br /&gt;&lt;br /&gt;Windows ME I'm just gonna skip. It's the one that they locked in the attic and the public heard some strange sounds coming from that direction from time to time.&lt;br /&gt;&lt;br /&gt;Windows XP: Well it's consistently cryptic along with NT and ME. Next I want Windows SX.&lt;br /&gt;&lt;br /&gt;Windows Vista: Wow, like a real name and everything? Seriously, of all the names this is my favorite. It conveys something. Like "Out my back window is an impressive vista." It's actually trying for something.&lt;br /&gt;&lt;br /&gt;Windows 7: Well, we give up so we're gonna go back to numbers. Lucky numbers only though!&lt;br /&gt;&lt;br /&gt;Once again, Apple shows they have a better PR division. Sure the first 6 versions where just System [Number]. Booorring. But then you go to Mac OS [Number]. Now they have some cat names in there for sub-versions, guess that's OK. Will they do bird names for OS XI? The important part here is that Mac has a &lt;span style="font-weight: bold;"&gt;consistent&lt;/span&gt; image. Microsoft is seriously lacking here.&lt;br /&gt;&lt;br /&gt;The .NET Framework has the same issue really. When people first heard about it they assumed it was some kind of website. Not many people really know whether it's .net, .NET or .Net and their branding hasn't helped this. If it's not just for making web pages then why is it called .NET? Dropped the ball here. They're consistent at least, version 4.0 is on the way and there's no name change.&lt;br /&gt;&lt;br /&gt;There are signs that they're turning around. Silverlight and Azure are both great names. They sound nice and won't be confused with anything else. Azure's got a decent logo:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.microsoft.com/azure/images/WindowsAzure.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 290px; height: 55px;" src="http://www.microsoft.com/azure/images/WindowsAzure.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Silverlight logo is unclear and looks like a sea creature to me:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://silverlight.net/Themes/silverlight/images/logo.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 357px; height: 143px;" src="http://silverlight.net/Themes/silverlight/images/logo.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's never gonna scale down well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-8688645104645835392?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/8688645104645835392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/01/microsoft-marketing.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/8688645104645835392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/8688645104645835392'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/01/microsoft-marketing.html' title='Microsoft Marketing'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-1275857889508475958</id><published>2009-01-03T14:37:00.000-08:00</published><updated>2009-01-03T14:50:54.269-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gaming'/><category scheme='http://www.blogger.com/atom/ns#' term='Wii'/><title type='text'>Wii Tennis Pro</title><content type='html'>Bought my son a Wii for Christmas. He's pretty happy with it. I've been playing it a bit too; went through Metroid Prime Corruption on the days that the Portland area was in a Deep Freeze. Snowed in for 3 days makes Jack a little crazy - and bored.  Fun but not much replay value, so back to Goozex it goes. &lt;br /&gt;&lt;br /&gt;But now, I'm all about the Wii Tennis. Wii Bowling is nice and all, but it really just boils down to how consistently can you throw a strike. No change in the difficulty, just the chase for a 300 game. Best I did was 5 strikes in a row, no idea now how I did that because a double seems to be the best I can do now. The nicknames don't get better: 3rd strike is a Turkey, but 4th is just Fourth. Wii Tennis is way fun though. I broke in to the Pro ranks the other day, man that was a real struggle, seemed like I was stuck at 850 for days. Now I'm sitting at 1150. So I'm solidly in Pro territory. &lt;br /&gt;&lt;br /&gt;Crazy thing was the other day when I won a game &lt;span style="font-weight:bold;"&gt;and&lt;/span&gt; lost 100 points of rank. WHAT. I was playing a solo-double game (me playing both positions) but was missing shots sometimes when I'd try to get in a late shot with the front position, miss and then be too late to get the ball with the back player (because both players swing at the same time when you're playing both). So I switch to doubles with the computer thinking it'll be better. My first computer partner is 600 points below me in rank. Ouch. But I go on to win against computer players rated at 1300; won 3-2 out of 5. Then I see the change in rank and I lost 100 points. What!? Oh well, next game. My next computer player is ranked 0. Zero. Against two computer players ranked 1500. What the hell. Went on to win, but still got a terrible point bounce considering: +50. Yeesh, so it's back to solo/double for me. &lt;br /&gt;&lt;br /&gt;Where's the Wii Tennis League in Portland? Off to google it I goes. I'd rather be playing tennis indoors with booze in January anyway. Plus, I've tried like 3 times to sign up for real tennis lessons that aren't at 9AM and haven't been able to get in. Too much demand for the Wednesday night classes it seems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-1275857889508475958?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/1275857889508475958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/01/wii-tennis-pro.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1275857889508475958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1275857889508475958'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/01/wii-tennis-pro.html' title='Wii Tennis Pro'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-2826880891353927866</id><published>2009-01-03T10:27:00.000-08:00</published><updated>2009-01-03T10:35:40.269-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Chrome without a Google Toolbar? No thanks</title><content type='html'>This is something that I keep coming back to every few weeks. Have they released a google toolbar for Chrome yet? No? [waits a couple weeks] How about now? No. &lt;br /&gt;&lt;br /&gt;Chrome is nice and all; separation of pages into their own process is nice, but really how often does my browser (FF) fully crash? It's rare. So that's a minor problem that Chrome solves. The interface is nice. That's about all it's got going for it. But no google bookmarks? Deal breaker. An eyeball count says I've got 150 pages in my bookmarks. I use that toolbar all the time. &lt;br /&gt;&lt;br /&gt;I think it's really weird that the big G released an inhouse browser and 3 months later there's still no toolbar. What's going on over there? Are those teams fighting? Do I need to &lt;span style="font-weight:bold;"&gt;pull this car over&lt;/span&gt;? I was really hoping to find a youtube clip of Clark Griswold saying that; no dice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-2826880891353927866?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/2826880891353927866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2009/01/chrome-without-google-toolbar-no-thanks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/2826880891353927866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/2826880891353927866'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2009/01/chrome-without-google-toolbar-no-thanks.html' title='Chrome without a Google Toolbar? No thanks'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-8921160219361918831</id><published>2008-12-29T08:33:00.001-08:00</published><updated>2008-12-29T08:51:59.390-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Update: Hello World iphone</title><content type='html'>KGelner pointed out that my Hello World iphone edition wasn't very good, looks like he was right. I did try to find an official edition. So I found this link: &lt;a href="http://developer.apple.com/iphone/library/samplecode/HelloWorldClassic/index.html"&gt;HelloWorldClassic&lt;/a&gt;, but it requires registration to access. And by registration, it's not just "get a login" it's "give us your home address". No thanks. Compare that to Android code, which is freely available without a login. I'm not positive, but I'd bet that the Agreement on the developer.apple.com site says that I can't copy and paste code from their site to my blog. Or risk running afoul of the Apple legal team. Anyway, someone posted this code in &lt;a href="http://discussions.apple.com/thread.jspa?threadID=1433373"&gt;discussions.apple.com&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;- (void) drawRect:(CGRect) rect {&lt;br /&gt;      * [UIColor whiteColor] set;*&lt;br /&gt;      * [@"Hello World" drawInRect:CGRectMake(0, 175, 320, 50)*&lt;br /&gt;      * withFont:UIFont fontWithName:@"Marker Felt" size:40&lt;br /&gt;      lineBreakMode:UILineBreakModeMiddleTruncation*&lt;br /&gt;      * alignment:UITextAlignmentCenter]; *&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;That looks much better, and not too far off from the Android version. There's something up with the withFont line in the original version, so that line might be incorrect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-8921160219361918831?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/8921160219361918831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2008/12/update-hello-world-iphone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/8921160219361918831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/8921160219361918831'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2008/12/update-hello-world-iphone.html' title='Update: Hello World iphone'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-1627532959727428633</id><published>2008-12-22T14:39:00.001-08:00</published><updated>2008-12-22T14:41:51.714-08:00</updated><title type='text'>Video of Android Soft Keyboard</title><content type='html'>Here we are, the Android soft keyboard in action; wonder if he's heard of those things called "tripods". Sorry for the poor vid quality, first one I've found.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/F4Nvy3iRffM&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/F4Nvy3iRffM&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-1627532959727428633?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/1627532959727428633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2008/12/video-of-android-soft-keyboard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1627532959727428633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1627532959727428633'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2008/12/video-of-android-soft-keyboard.html' title='Video of Android Soft Keyboard'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-1636769783273101603</id><published>2008-12-21T15:00:00.000-08:00</published><updated>2008-12-21T23:35:07.133-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gaming'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Yeah, but will it run Doom?</title><content type='html'>Read about this on Adam Kinney's blog. This is a great proof of concept for light gaming on the Silverlight platform. Looks damn good. Wish there were some higher res versions of the video.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.innoveware.com/quakelight.html"&gt;http://www.innoveware.com/quakelight.html &lt;/a&gt;(scroll past the fold for videos)&lt;br /&gt;&lt;br /&gt;There are some versions of Quake running in Flash, but they aren't ports they're &lt;a href="http://www.youtube.com/watch?v=6TKGNS1N1yo"&gt;just an interface&lt;/a&gt; over the top of the Quake code. The Innoveware Quake is a port from C++ to C#. It's still in progress, no real demo yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-1636769783273101603?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/1636769783273101603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2008/12/yeah-but-will-it-run-doom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1636769783273101603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/1636769783273101603'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2008/12/yeah-but-will-it-run-doom.html' title='Yeah, but will it run Doom?'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-6563148762001249975</id><published>2008-12-21T13:15:00.000-08:00</published><updated>2008-12-21T13:23:50.016-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Samsung + Android = Good</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.samsung.com/us/system/news/content/2008/06/09/8999/omnia_m2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 369px; height: 491px;" src="http://www.samsung.com/us/system/news/content/2008/06/09/8999/omnia_m2.jpg" alt="" border="0" /&gt;Looks like Samsung might be launching an &lt;/a&gt;&lt;a href="http://www.switched.com/2008/12/19/samsung-launching-google-phone-in-2009/"&gt;Android phone next year&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I've been very happy with every piece of Samsung hardware I've owned, so this is a step in the right direction for me. Still, don't think I could live without a dedicated keyboard. A soft keyboard is on the way for the G1, we'll see what I think in a few months. But I think for anything other than SMS, it'll suck.&lt;br /&gt;&lt;br /&gt;Looks like there's going to be an Android version of the Instinct on Sprint and the Omnia on T-Mo. There's rumors of a version of the Omnia heading to AT&amp;amp;T, so does that mean AT&amp;amp;T will have an Android-capable phone that's not running Android? That'll be interesting. And we'll have a phone that's now running WinMo that's being released as Android too. So will people be able to switch over on their existing phones?&lt;br /&gt;&lt;br /&gt;The Omnia site lists an "Etiquette Mode"... hmm... I know some people who could really use that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-6563148762001249975?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/6563148762001249975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2008/12/samsung-android-good.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/6563148762001249975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/6563148762001249975'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2008/12/samsung-android-good.html' title='Samsung + Android = Good'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-718582448886439188</id><published>2008-12-16T13:51:00.000-08:00</published><updated>2008-12-18T11:02:50.156-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight --&gt; Windows</title><content type='html'>Just read the last post in Scott Gu's great &lt;a href="http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-1-creating-quot-hello-world-quot-with-silverlight-2-and-vs-2008.aspx"&gt;intro to Silverlight&lt;/a&gt;. Great tutorial. But it was the last one that really shocked me: porting a Silverlight app to Windows. Seriously, very little work involved. I think if you knew what controls to avoid ahead of time you could make it almost seamless. Shawn Burke has a discussion &lt;a href="http://blogs.msdn.com/sburke/archive/2008/11/11/wpf-and-silverlight-toolkit-compatibility.aspx"&gt;here&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt; about why the transition isn't seamless now. &lt;br /&gt;&lt;br /&gt;For my money, I'd start with Silverlight and port to Winforms. Basing that on the amount of jobs for asp.net devs vs. jobs for winforms devs. Expecting that trend to continue into the Silverlight world. There's also a big "why" for porting apps from Silverlight to winforms (WPF)? For line of business apps, if your connection to your db is down then having a WPF version of your app won't help you much. No network, no workie. And if your connection to your db is down so often that you really need to have a WPF version of your app, then you have a bigger fish to fry.&lt;br /&gt;&lt;br /&gt;Now, if we're talking about a mobile app, then disconnected might matter, but we have many other issues to deal with as well, so it's a big conversation.&lt;br /&gt;&lt;br /&gt;Also, got my "Nice Answer" badge on &lt;a href="http://stackoverflow.com/"&gt;StackOverflow&lt;/a&gt;. Achievements for developers, whoop whoop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-718582448886439188?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/718582448886439188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2008/12/silverlight-windows.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/718582448886439188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/718582448886439188'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2008/12/silverlight-windows.html' title='Silverlight --&gt; Windows'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057604035463178430.post-2351934214152561338</id><published>2008-12-15T21:15:00.000-08:00</published><updated>2008-12-15T21:37:40.113-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Hello Android</title><content type='html'>... or not.&lt;br /&gt;&lt;br /&gt;Trying to get going on Android Development, and everything's going fine. But I'm not able to get to my coveted "Hello Android" due to this message:&lt;br /&gt;&lt;blockquote&gt;"Connection Failure when starting to monitor device 'emulator-5554' : device (emulator-5554) request rejected: device offline"&lt;br /&gt;&lt;/blockquote&gt;So my emulator is offline. Hmm. It's a file in a directory, seems unlikely that it would be offline. Impossible really. Well the emulator did fire up once, so it can't be too broken. But my first impressions of Eclipse are quite good, it's a darn nice app for being free.&lt;br /&gt;&lt;br /&gt;I thought this part of the tutorial was pretty funny (in reference to installing a driver file for the G1, on Windows this is the standard "Found New Device" wizard):&lt;br /&gt;&lt;blockquote&gt;If you're developing on Mac OS X, it just works. Skip this step.&lt;/blockquote&gt;Vs.&lt;br /&gt;&lt;blockquote&gt;If you're developing on Ubuntu Linux, you need to add a rules file:       &lt;br /&gt;Login as root and create this file:&lt;br /&gt;/etc/udev/rules.d/50-android.rules.           &lt;br /&gt;For Gusty/Hardy, edit the file to read:&lt;br /&gt;           SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"&lt;br /&gt;For Dapper, edit the file to read:&lt;br /&gt;           SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"                      &lt;br /&gt;Now execute:&lt;br /&gt;chmod a+rx /etc/udev/rules.d/50-android.rules&lt;/blockquote&gt;I guess that's the Mac &lt;span style="font-style: italic;"&gt;gestalt&lt;/span&gt; in action. Wonder what it's called on Linux? It's a sort of &lt;span style="font-style: italic;"&gt;gestalt&lt;/span&gt; that's for sure. Shudder. Would watching someone type that in would give me &lt;em&gt;schadenfreude&lt;/em&gt;? Look at all the big German words getting tossed around. Yes I had to look up the spelling. No I'm not putting in any umlauts.&lt;br /&gt;&lt;br /&gt;Now compare the Android version of Hello World to the iPhone version:&lt;br /&gt;&lt;br /&gt;Android:&lt;br /&gt;&lt;blockquote&gt;&lt;pre class="prettyprint"&gt;public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;      super.onCreate(savedInstanceState);&lt;br /&gt;      TextView tv = new TextView(this);&lt;br /&gt;      tv.setText("Hello, Android");&lt;br /&gt;      setContentView(tv);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;iPhone:&lt;br /&gt;&lt;pre&gt;&lt;blockquote&gt;- (void) applicationDidFinishLaunching: (id) unused&lt;br /&gt;{&lt;br /&gt;  UIWindow *window;&lt;br /&gt;  struct CGRect rect = [UIHardware fullScreenApplicationContentRect];&lt;br /&gt;  rect.origin.x = rect.origin.y = 0.0f;&lt;br /&gt;&lt;br /&gt;  window = [[UIWindow alloc] initWithContentRect: rect];&lt;br /&gt;  mainView = [[UIView alloc] initWithFrame: rect];&lt;br /&gt;  textView = [[UITextView alloc]&lt;br /&gt;      initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];&lt;br /&gt;  [textView setEditable:YES];&lt;br /&gt;  [textView setTextSize:14];&lt;br /&gt;&lt;br /&gt;  [window orderFront: self];&lt;br /&gt;  [window makeKey: self];&lt;br /&gt;  [window _setHidden: NO];&lt;br /&gt;  [window setContentView: mainView];&lt;br /&gt;  [mainView addSubview:textView];&lt;br /&gt;&lt;br /&gt;  [textView setText:@"Hello World"];&lt;br /&gt;}&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;Wow, just looking at the iPhone version makes my carpal tunnel flare up. Coming from a C# background, the Android version is a cakewalk. I'll reserve my "learn weird code" miles for F#.&lt;br /&gt;&lt;br /&gt;Hello Android will have to wait, not sure what the deal is with that emulator. Google search was no help there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057604035463178430-2351934214152561338?l=codingmostly.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingmostly.blogspot.com/feeds/2351934214152561338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codingmostly.blogspot.com/2008/12/hello-android.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/2351934214152561338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057604035463178430/posts/default/2351934214152561338'/><link rel='alternate' type='text/html' href='http://codingmostly.blogspot.com/2008/12/hello-android.html' title='Hello Android'/><author><name>Justin Collum</name><uri>http://www.blogger.com/profile/07190193185280912171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-P-Act9sid1A/TsLmMRlkIJI/AAAAAAAAAWc/2UMcroJNsGM/s220/Justin.jpg'/></author><thr:total>9</thr:total></entry></feed>
