tag:blogger.com,1999:blog-81216971732655653762024-03-19T04:26:07.320-04:00Matt PfefferleUh oh... someone got me thinking.Unknownnoreply@blogger.comBlogger31125tag:blogger.com,1999:blog-8121697173265565376.post-32485285387492593382010-07-12T11:06:00.002-04:002010-07-12T11:12:33.875-04:00My Problem With The Relational DatabaseI build modern applications using modern tools, but I have to put an inordinate amount of effort into what is essentially screen scraping an interface from the 70's. <div><br /></div><div>Let's not throw the baby out with the bathwater though. The RDBMS is built on a solid foundation: relational theory. It's interface needs an upgrade to play nicely with modern tools. SQL is not that interface. But I'm not sure what is.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-24186000440383386072010-03-16T20:56:00.005-04:002010-03-16T22:05:28.821-04:00Why do I have so many boxes underneath my TV?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBSi4hgz7OgtNKuLWQkh47nMuUkBLeQANOVzJWgs32GgGc6Dh_cPoQh7sgWcTv7xMHuNYI2QHWUn3Zx5U_Z0YsSvspLdyBq3RdzO5qvuKp39jnuWYczn9Cl3_F4wYF75f8af5WaIq9eqo/s1600-h/IMG_0151.JPG"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBSi4hgz7OgtNKuLWQkh47nMuUkBLeQANOVzJWgs32GgGc6Dh_cPoQh7sgWcTv7xMHuNYI2QHWUn3Zx5U_Z0YsSvspLdyBq3RdzO5qvuKp39jnuWYczn9Cl3_F4wYF75f8af5WaIq9eqo/s320/IMG_0151.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5449401012422230274" /></a>These are all the boxes that live underneath my TV. Nothing too exciting: DVR, receiver, Blu-Ray, Wii... The most exotic toy is the AppleTV.<div><br /></div><div>So why am I bothering to post this? Because <a href="http://bijansabet.com/post/452890181/my-ideal-home-entertainment-system">this article</a> got me thinking: that's a lot of shelf space for hardware.</div><div><br /></div><div>Seriously! It's a a couple optical readers and a couple hard-drives. <a href="http://en.wikipedia.org/wiki/Netbook">You can fit those in a backpack now</a>. Why do I need two whole shelves when I connect them to my TV?</div><div><br /></div><div>Granted, I can't fit everything onto PC hardware, we're actually rather close. With a Windows Media Center (gasp!) we can consolidate the AppleTV, the Blu-Ray, and the DVR into a single box. My question is: why is it so hard to find a box that does this? and why is it so unusual to try?</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-18172945083118175052010-02-12T11:45:00.002-05:002010-02-12T11:50:14.141-05:00Loader constraint violation when trying to generate an AXIS WSDL.I've got an RPC style web service implemented using Apache AXIS. It was developed using JBoss 4, but when I deployed it on JBoss 5, I got this nasty error:<br /><br /><script src="http://gist.github.com/302740.js?file=gistfile1.txt"></script><br /><br />There seems to be a conflict between axis-jaxrpc*.jar and JbossWS. Both of them contain definitions for the QName class.<br /><br />The solution? When using JBoss 5, exclude axis-jaxrpc*.jar from your WAR files.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-54587418991770066582010-02-11T09:00:00.012-05:002010-02-11T12:00:34.347-05:00Upgrading to JBoss 5 - JBossXBRuntimeException: White spaces are required between publicId and systemIdI have a WAR file that deploys and starts fine in JBoss 4. When I deploy it to JBoss 5 though, deployment fails with approximately this stack-trace:<br /><br /><script src="http://gist.github.com/301691.js?file=gistfile1.txt"></script><br /><br />Directly above that trace, I notice that it's trying to resolve a bunch of Spring schemas. In particular:<br /><br /><script src="http://gist.github.com/301693.js?file=gistfile1.txt"></script><br /><br />A grep of my project tells me that that schema is referenced in only in my applicationContext-hibernate.xml. According to this post (<a href="http://forum.springsource.org/showthread.php?t=68949&page=2"></a>), the error occurs because JBoss is attempting to validate that file, but fails for some as yet undetermined reason. The current solution is to move applicationContext-hibernate.xml to a sub-folder, on the classpath, below WEB-INF (ie. WEB-INF/classes/applicationContext-hibernate.xml). Make sure you update all of your references to applicationContext-hibernate.xml including the command that builds your WAR.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-6941638565453998252009-12-09T23:15:00.003-05:002009-12-10T20:11:22.415-05:00Magic Incantations for Installing asdf-install in Clozure Common Lisp<div>I'm on my way to bed, but I wanted to document this first. </div><ol><li>Follow the instructions here: <a href="http://common-lisp.net/project/asdf-install/tutorial/setup.html">http://common-lisp.net/project/asdf-install/tutorial/setup.html</a></li><li>Skip the command "(asdf:operate 'asdf:compile-op :asdf-install)". It didn't run for me, but everything seems to work fine without it.</li></ol><div>In my case, that means adding the following to my openmcl-init:</div><div><div></div><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>(require 'asdf)<br />(pushnew "/Users/matt/lib/asdf/" asdf:*central-registry* :test #'equal)<br />(asdf:operate 'asdf:load-op :asdf-install)<br /></code></pre><div></div></div><div>None of the other results in Google had it quite right, and they sent me on an hour long wild goose chase.</div><div><br /></div><div>Saying stuff like "(asdf-install:install 'md5)" now works.</div><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-52334855521544063832009-11-16T17:02:00.004-05:002009-11-16T17:14:03.433-05:00The Flattened Requirements MatrixI have no idea if something like this exists in the project management literature (ick, project management), but it's a hack I'm in the processes of putting together because I'm sick of less organized projects spinning out of control.<div><br /></div><div>Here's the scenario: I have a ton of new features I need to spec out and a developer who will be doing most of the coding. I also need to make sure it gets done "right". Of course we're using my definition of right here because I'm in charge (sorta)... YMMV.</div><div><br /></div><div>I don't like long spec docs. And saying "make it do this" never works. The outcome is never the correct "this". </div><div><br /></div><div>Instead, this is what I'm trying. </div><div><br /></div><div>I have a Google doc and each feature is a heading. Under the heading I have a paragraph describing what the feature should do. Below that I have subsections titled "depends on" and "dependents". Each is a list of links to either more specific features or back to more general ones. I repeat until people stop asking questions with "obvious" answers... assuming they actually read it.</div><div><br /></div><div>I call it the Flattened Requirements Traceability Matrix</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-22279911267987052502009-04-10T14:04:00.004-04:002009-04-10T14:14:26.601-04:00Making Django's Built-in Auth Tests Pass<p class="zemanta-img" style="margin: 1em; float: right; display: block; width: 210px;"><a href="http://en.wikipedia.org/wiki/Image:Django_default_page.png"><img src="http://upload.wikimedia.org/wikipedia/en/thumb/0/00/Django_default_page.png/200px-Django_default_page.png" alt="Django (web framework)" style="border: medium none ; display: block;" height="155" width="200" /></a><span class="zemanta-img-attribution">Image via <a href="http://en.wikipedia.org/wiki/Image:Django_default_page.png">Wikipedia</a></span></p>I added the built in auth framework to a relatively fresh <a class="zem_slink" href="http://www.djangoproject.com" title="Django (web framework)" rel="homepage">Django</a> project today, and upon running my tests, I got a large number of failures coming from auth. This problem does not appear to be fully documented so this is what I did.<br /><br />First, notice that most of the errors are template missing errors. Fix these by<br /><ol><li>Installing the admin tool. Auth relies on some of its templates.</li><li>Stub out any other missing templates (ie. login, logout).</li></ol>Next, the test cases will complain about missing text in your new templates. Just add in exactly what its asking for as plain text.<br /><br />Finally, some of the password reset tests were complaining about getting redirect (301) codes instead of success (200) codes. This was an error on my part. They're looking for a link in the password reset email and GETting it. I wrapped the link in an HTML anchor, and the regex in the test was grabbing the closing HTML tag. Removing the HTML fixed that problem. Finally, I just had to add some missing text as above, and all the tests passed.<br /> <div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/25bddaf8-d2e1-476a-a787-0cef301c68dc/" title="Reblog this post [with Zemanta]"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=25bddaf8-d2e1-476a-a787-0cef301c68dc" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-1363062842124308112009-02-22T13:45:00.002-05:002009-02-22T13:57:50.134-05:00How to Compile OCMOCK_VALUE for the iPhoneIf you're using OCMock to test your iPhone application and OCMOCK_VALUE gives you this error message:<br /><pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>error: syntax error before 'typeof'</code></pre><br /><br />Add this line to the top of your test case:<br /><pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>#define typeof __typeof__</code></pre><br /><br />What seems to be happening is that the ObjC compiler on the iPhone has renamed 'typeof' to '__typeof__'. The macro above will add the old version back in. Some Googleing seems to suggest that this is related to C99 compatibility.<br /> <div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/84872cca-2e3c-4ef5-8191-bf4223f28979/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=84872cca-2e3c-4ef5-8191-bf4223f28979" alt="Reblog this post [with Zemanta]" /></a></div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8121697173265565376.post-33552635726572763292008-12-01T15:16:00.004-05:002008-12-01T15:33:17.804-05:00Make money from open source? Umm, no.<span class="zemanta-img" style="margin: 1em; float: right; display: block;"><a href="http://www.flickr.com/photos/21692968@N08/2997960369"><img src="http://farm4.static.flickr.com/3045/2997960369_258313ab0a_m.jpg" alt="Computer rigeneriamoci" style="border: medium none ; display: block;" /></a><span class="zemanta-img-attribution">Image by <a href="http://www.flickr.com/photos/21692968@N08/2997960369">rigeneriamoci</a> via Flickr</span></span>On Open Source:<br /><blockquote>Companies have long hoped to make money from this freely available software by charging customers for support and add-on features. Some have succeeded. Many others have failed or will falter, and their ranks may swell as the economy worsens. This will require many to adopt a new mindset, viewing open source more as a means than an end in itself.<br />- <a href="http://www.businessweek.com/technology/content/nov2008/tc20081130_276152.htm">Open Source: The Model Is Broken</a><br /></blockquote>Umm... Duh.<br /><br />Let's look at a couple of the premises of Open Source.<br /><ol><li>Open Source code is higher quality</li><li>Anyone can modify it</li><li>The more successful the software it, the larger the community.</li></ol>Now, lets look at the business model.<br /><ol><li>Give software away for free</li><li>Charge for support</li><li>Charge for custom development<br /></li></ol>You're giving the software away for free so you can't charge for a license. Charging for support means that when something breaks or your clients need help, you help them in exchange for a yearly or monthly fee. Unfortunately, by making your product a successful open source project, you destroy the value of your support contracts (see 1 and 3 in the first list). You say you want to charge for customization like a consultant? See number 2 in the above list. That project is going to the lowest bidder. Also, good luck making that scale.<br /><br />What sucks here is that I like open source. And to make something sustainable, you have to be able to make money off of it. I don't know how to do that. The original author might, but he just spent two pages not telling us.<br /><br /><br /><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles by Zemanta</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://blogs.gnome.org/bolsh/2008/10/24/jerry-maguire-on-the-future-of-the-free-software-industry/">Dave Neary: Jerry Maguire on the future of the free software industry</a></li><li class="zemanta-article-ul-li"><a href="http://www.infobright.org/site/is_2009_the_breakout_year_for_open_source/">Is 2009 the Breakout Year for Open Source?</a></li><li class="zemanta-article-ul-li"><a href="http://techdirt.com/articles/20081022/0235122616.shtml">Open Source Isn't A Business Model... Just Like Free Isn't A Business Model</a></li></ul></fieldset> <div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/cfc2ba12-6c65-4b01-b0a8-2fed50dc1ea5/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=cfc2ba12-6c65-4b01-b0a8-2fed50dc1ea5" alt="Reblog this post [with Zemanta]" /></a></div>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8121697173265565376.post-13815006883913867262008-12-01T14:41:00.003-05:002008-12-01T15:11:55.510-05:00The Best Programming Books of 2008<span class="zemanta-img" style="margin: 1em; float: right; display: block;"><a href="http://www.flickr.com/photos/82539647@N00/187719974"><img src="http://farm1.static.flickr.com/66/187719974_e41592d388_m.jpg" alt="Smalltalk books" style="border: medium none ; display: block;" /></a><span class="zemanta-img-attribution">Image by <a href="http://www.flickr.com/photos/82539647@N00/187719974">eMaringolo</a> via Flickr</span></span>There's a thread over at <a href="http://stackoverflow.com">Stack Overflow</a> asking for the <a href="http://stackoverflow.com/questions/18120/best-programming-books-in-2008">Best Programming Books in 2008</a>. I think I'm missing out because I've only read one of them: <a href="http://www.amazon.com/gp/product/0596529325?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0596529325">Programming Collective Intelligence: Building Smart Web 2.0 Applications</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=as2&o=1&a=0596529325" alt="" style="border: medium none ! important; margin: 0px ! important;" border="0" height="1" width="1" />.<br /><br />It can be hard to keep up with what's been going on in the world of programming so I appreciate these lists. They help keep me up to date.<br /><br />These are the books that are on my reading list, but only one of them is from 2008.<br /><br /><ol><li><a href="http://www.amazon.com/gp/product/0321127420?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0321127420">Patterns of Enterprise Application Architecture (Addison-Wesley Signature Series)</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=as2&o=1&a=0321127420" alt="" style="border: medium none ! important; margin: 0px ! important;" border="0" height="1" width="1" /><br /></li><br /><li><a href="http://www.amazon.com/gp/product/0596514980?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0596514980">Real World Haskell</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=as2&o=1&a=0596514980" alt="" style="border: medium none ! important; margin: 0px ! important;" border="0" height="1" width="1" /><br /></li><br /><li><a href="http://www.amazon.com/gp/product/0201136880?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0201136880">Smalltalk 80: The Language</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=as2&o=1&a=0201136880" alt="" style="border: medium none ! important; margin: 0px ! important;" border="0" height="1" width="1" /><br /></li></ol><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles by Zemanta</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://ianskerrett.wordpress.com/2008/10/09/is-smalltalk-cool-again/">Is Smalltalk Cool Again?</a></li><li class="zemanta-article-ul-li"><a href="http://oreilly.com/catalog/9780596514983/">Real World Haskell</a></li><li class="zemanta-article-ul-li"><a href="http://www.codinghorror.com/blog/archives/001169.html">Stack Overflow: None of Us is as Dumb as All of Us</a></li></ul></fieldset><br /><br /><div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/852e9355-c1c2-42ce-9bef-0e50c7b3bb22/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=852e9355-c1c2-42ce-9bef-0e50c7b3bb22" alt="Reblog this post [with Zemanta]" /></a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-9854497045135843732008-12-01T13:09:00.004-05:002008-12-01T13:18:47.497-05:00Unless you do something, listening is a waste of time<span class="zemanta-img" style="margin: 1em; float: right; display: block;"><a href="http://commons.wikipedia.org/wiki/Image:Tidens_naturl%C3%A6re_fig40.png"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Tidens_naturl%C3%A6re_fig40.png/202px-Tidens_naturl%C3%A6re_fig40.png" alt="" tidens="" naturlære="" 1903="" af="" poul="" la="" cour,="" fig.="" ...="" style="border: medium none ; display: block;"></a><span class="zemanta-img-attribution">Image via <a href="http://commons.wikipedia.org/wiki/Image:Tidens_naturl%C3%A6re_fig40.png">Wikipedia</a></span></span>Listening is hard. It's easier to ignore and rationalize. What's harder though is learning from those conversations and applying what you've learned. The real reason? People don't like change. It scares them.<br /><br /><a href="http://en.wikipedia.org/wiki/Dave_Winer" title="Dave Winer" rel="wikipedia" class="zem_slink">Dave Winer</a>'s recent article - <a href="http://www.scripting.com/stories/2008/11/29/ifYouNeverListenYouNeverLe.html">If you never listen you never learn</a> - makes this point. He also offers an anecdote where they listened to one suggestion from one user "and company went from being in the brink of shutting down to gushing cash".<br /><br />Yes, if you listen you can learn, but unless you're willing to do something about it, its a wasted effort.<br /><br /><div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/e4911655-eb5c-4df0-9b17-97399217acfb/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=e4911655-eb5c-4df0-9b17-97399217acfb" alt="Reblog this post [with Zemanta]"></a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-70613767939944274102008-11-26T10:26:00.009-05:002008-11-26T13:19:24.069-05:00If EMail is EFail, What's EFTW?<span class="zemanta-img" style="margin: 1em; float: right; display: block;"><a href="http://www.flickr.com/photos/96123571@N00/2288420757"><img src="http://farm4.static.flickr.com/3100/2288420757_0b340d4281_m.jpg" alt="Twitter-Google" style="border: medium none ; display: block;"></a><span class="zemanta-img-attribution">Image by <a href="http://www.flickr.com/photos/96123571@N00/2288420757">Nils Geylen</a> via Flickr</span></span>"The underlying problem is that individual human beings don't scale." - <a href="http://www.codinghorror.com/blog/archives/001191.html">Jeff Atwood</a><br /><br />Not only is email inefficient, it leads to lost information. If I send you something by email, but Bob needs that info, how is he supposed to get it? In this day in age, if you can't get it through a <a href="http://google.com" title="Google Search" rel="homepage" class="zem_slink">Google search</a> bar, it doesn't exist.<br /><br />Now, I don't want to dump all of my company's information into the big G's index, and their appliances are a little pricey. So what do we do about internal data? Here are a couple of ideas I've come up with recently.<br /><ul><br /> <li>Set up <a href="http://wordpress.org" title="WordPress" rel="homepage" class="zem_slink">Wordpress</a> and post time sensitive notices there.</li><br /> <li>Set up a <a href="http://www.mediawiki.org/" title="MediaWiki" rel="homepage" class="zem_slink">Mediawiki</a> and use it to document EVERYTHING.</li><br /> <li>When someone asks you a question, reply with the link, not the info.</li><br /> <li>When you get information by email, put it in the wiki and reply with the new link</li><br /> <li>When the volume of information starts to grow, set up <a href="http://lucene.apache.org/nutch/" title="Nutch" rel="homepage" class="zem_slink">Nutch</a>, the <a href="http://en.wikipedia.org/wiki/Web_search_engine" title="Web search engine" rel="wikipedia" class="zem_slink">open source search engine</a>, or invest in a <a href="http://www.google.com/enterprise/gsa" title="Google Search Appliance" rel="homepage" class="zem_slink">Google Mini</a>.</li><br /></ul><br /><br />This doesn't solve every problem. For instance, you still don't get a private <a href="http://twitter.com" title="Twitter" rel="homepage" class="zem_slink">Twitter</a> or <a href="http://friendfeed.com" title="FriendFeed" rel="homepage" class="zem_slink">FriendFeed</a>, but with a little creativity, I'm sure you can hack something together.<br /><br />Final thought: Email is an expensive way to transfer information, and your time is to valuable.<br /><br /><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles by Zemanta</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://www.vnunet.com/vnunet/news/2223418/google-updates-search-box">Google updates search box</a></li></ul></fieldset><br /><br /><div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/e309e5cf-13ec-4713-8a14-fc95f2fdb6c2/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=e309e5cf-13ec-4713-8a14-fc95f2fdb6c2" alt="Reblog this post [with Zemanta]"></a></div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8121697173265565376.post-59456829200913741862008-11-25T22:53:00.005-05:002008-11-25T23:04:43.302-05:00Follow my TumblelogI've started posting some of the random stuff I find online to a Tumlelog. You can find it at <a href="http://pfeff.tumblr.com">http://pfeff.tumblr.com</a>. <br /><br />The stuff I post there comes mostly from my collection of <a href="http://en.wikipedia.org/wiki/RSS" title="RSS" rel="wikipedia" class="zem_slink">RSS</a> feeds. Using the <a href="http://en.wikipedia.org/wiki/Bookmarklet" title="Bookmarklet" rel="wikipedia" class="zem_slink">bookmarklet</a>, its really to just post an interesting article with a quick thought. I have trouble keeping up with blogging, but RSS + <a href="http://en.wikipedia.org/wiki/Tumblelog" title="Tumblelog" rel="wikipedia" class="zem_slink">Tumblr</a> makes it really easy to post throughout the day.<br /><br /><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles by Zemanta</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://www.rexblog.com/2008/05/05/17643/">The Tumblr-fication of Google Reader</a></li><li class="zemanta-article-ul-li"><a href="http://www.sociallyminded.co.uk/2008/11/is-microblogging-the-ultimate-test-for-an-idea/">Is microblogging the ultimate test for an idea?</a></li></ul></fieldset><br /><br /><div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/af2c6932-e571-4381-823a-f1b655dceb8d/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=af2c6932-e571-4381-823a-f1b655dceb8d" alt="Reblog this post [with Zemanta]"></a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-14969939361545938652008-11-16T14:34:00.001-05:002008-11-16T14:36:27.351-05:00Code Formatting for BloggerThe code in my last post was formatted using <a href="http://formatmysourcecode.blogspot.com/">Format My Source Code for Blogging</a>.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-70359794335797300952008-11-16T14:15:00.004-05:002008-11-16T14:34:07.447-05:00Accessing the FriendFeed API from RailsI was hacking around with the FriendFeed API last night, and after quite a bit of frustration I got ActiveResource to download the public and user feeds. The main problem I ran into was that ActiveResource assumes a very specific URL format, and I've never actually encountered an API that actually conforms to it.<br /><br />This tutorial about <a href="http://www.quarkruby.com/2008/1/15/activeresource-and-youtube">ActiveResource and the YouTube API</a> tells you how to manipulate the URL format. I didn't go nearly as far as they did though. To get ActiveResource to do what I needed it to do, I only needed to override one method:<br /><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>class FriendFeed::User < FriendFeed::FriendFeedApi<br /> <br /> class << self<br /> def element_path(id, prefix_options = {}, query_options = nil)<br /> prefix_option, query_options = split_options(prefix_options) if query_options.nil?<br /> "/api/feed/user/#{id}"<br /> end<br /> end<br /> <br />end<br /></code></pre><br /><br />This class wraps the user feed api. It makes a request to http://friendfeed.com/api/feed/user/{id} and converts the response to a ruby object when you make a call to FriendFeed::User.find(id). <br /><br />The parent class, FriendFeed::FriendFeedApi, inherits from ActiveResource::Base and takes care of setting some defaults used across each of the API categories. For example, it sets the site variable on ActiveResource::Base to "http://friendfeed.com" and the format variable to :json.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-17675521370296271512008-10-22T21:44:00.004-04:002008-10-22T21:55:01.324-04:00What Do Search Engines Know that is NOT on the Internet?When a company is as secretive as Apple, everyone loves to speculate about what they're going to do next. The latest rumor is that apple is about to jump into low-cost, ultra portable PCs (aka Netbooks). While this may or may not be true, something in <a href="http://bits.blogs.nytimes.com/2008/10/21/read-my-lips/">one speculative article</a> caught my eye.<br /><br /><blockquote><br />That would seem to confirm findings that a search engine company shared with me on condition that I not reveal its name: The company spotted Web visits from an unannounced Apple product with a display somewhere between an iPhone and a MacBook. Is it the iPhone 3.0 or the NetMac 1.0?<br /></blockquote><br /><br />Forget the stuff about the NetMac and the iPhone. What's interesting is the source: a "search engine company". They may be in the business of organizing the information ON the internet, but because of their position, they actually have MORE information than is on the internet. Given their vast search logs, what else do they know that none of us COULD know?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-64410593225992403492008-10-21T18:32:00.003-04:002008-10-21T18:53:25.462-04:00You Need to Know Marketing, Start with Seth GodinI've been following <a href="http://sethgodin.typepad.com/">Seth Godin</a> for a while now. His book, <a href="http://www.amazon.com/gp/product/159184021X?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=159184021X">Purple Cow</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=as2&o=1&a=159184021X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, is a great read, and I just discovered that one of his earlier books, <a href="http://www.amazon.com/gp/product/0786887176?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0786887176">Unleashing the Ideavirus</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=as2&o=1&a=0786887176" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, is available online as a free eBook. You can <a href="http://www.sethgodin.com/ideavirus/downloads/IdeavirusReadandShare.pdf">download it here</a>.<br /><br />We geeks tend not to care much for marketing. I know I've my share of unpleasant run-ins, but instead of avoiding the business end, I've decided to learn more about it. Seth's books and his blog have turned out to be great resources.Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8121697173265565376.post-63137743941584622952008-10-21T15:52:00.002-04:002008-10-21T15:58:27.757-04:00VCBUILD : error Message: '9.00' violates enumeration constraint of '7.00 7,00 7.10 7,10 8.00 8,00'I upgraded a Visual C++ project from Visual Studio 2005 to 2008 today, and my MSBuild script stopped working. It spat out the error message below and Google was no help.<br /><br />VCBUILD : error Message:<br /> '9.00' violates enumeration constraint of '7.00 7,00 7.10 7,10 8.00 8,00'<br /><br />I made two changes that seemed to fix the problem:<br /><br />1. Use the MSBuild.exe in \Windows\Microsoft.NET\Framework\v3.5\ instead of \Windows\Microsoft.NET\Framework\v3.xx.<br /><br />2. Pass MSBuild the "/toolsversion:3.5" flag.<br /><br />I hope someone out there finds this useful.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8121697173265565376.post-49407768758073159342008-10-21T12:07:00.004-04:002008-10-21T12:20:59.366-04:00Check out this Good Video on Getting RealHeard of Getting Real? Here's a video of Jason Fried (one of the authors) speaking at Business of Software. Check it out. If you have or haven't read the book its a good resource for familiarizing yourself with the concepts.<br /><br /><embed src="http://blip.tv/play/AdOYJZCcZQ" type="application/x-shockwave-flash" width="640" height="510" allowscriptaccess="always" allowfullscreen="true"></embed> <br /><br />Thanks to <a href="http://www.balsamiq.com/blog/?p=375">Balsamiq</a> for the pointer.<br /><br />Also, I just found these <a href="http://events.carsonified.com/fowa/2008/london/content">videos over at Carsonified</a>. I'll be checking them out this evening.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-2077887276519821462008-08-24T20:50:00.003-04:002008-08-24T21:11:53.136-04:00Why should I bother with multicore?The September 1 issue of Fortune has an article on multicore processors (I don't think there's a link yet). Basically, it's telling the business folks what we've known for a while: the free lunch provided by Moore's law is over, and no one really knows how to program for these systems.<br /><br />None of this is news to us. So why am I wasting your time bringing it up again? Well, I want to know who this is really going to affect. If we assume that most software will eventually be delivered over the web, the heavy lifting is going to be done on the server by something like a LAMP stack, and you're going to use JavaScript for the blinky lights. This is going to change how to approach concurrency, and how you take advantage of multicore, if you can.<br /><br />On the server, a multicore chip is simply going to mean more thread in Apache or more Mongrels. How much to you really win by spawning multiple threads to handle a request though? That's just one more thread waiting for the database query to come back over the network. Likewise on the client. What are multiple threads going to get you other than more resources allocated to waiting on an Ajax call? I guess you could argue that it'll allow the UI to be more responsive, but we already know how to do that.<br /><br />Before I get flamed, I want to mention that I am in fact aware that there are some areas that really do benefit from the increased horsepower. In particular: games, audio/video, large scale data processing. We already know that each of those can benefit from parallelism. What can your average web application do with those kinds of features though? Or rather, where should I be looking for application domains that take advantage of this new technology rather than simply have technology for technologies sake?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-40959447833852464512008-08-19T21:19:00.002-04:002008-08-19T21:31:18.236-04:00Code SucksMost code sucks. Mine included... especially mine... but other people's too. Despite the best of intentions and planning and playing with paper sketches and squiggly lines, all code eventually turns into an impenetrable mess.<br /><br />You can follow all the rules about writing code and organizing modules and whatnot, but you end up in the same place. The problem is that we don't know the rules to writing software yet. The rules we do have a contradictory. We work with people that don't know the rules and/or don't know about them.<br /><br />It drives me insane.<br /><br />Sometimes you can fix parts of the code. Line by line, class by class, you can refactor and test as you go. Or, at least, that's what I thought. Sometimes there's just too much inertia. Your best code doesn't work in the presence of the existing code. Sometimes the code, the project, and the team are just too far gone.<br /><br />It's a sinking ship... and there's no honor in going down with her. Man the lifeboats and wait to get picked up by another ship.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-39834848771269240412008-08-09T13:01:00.004-04:002008-08-09T13:51:05.544-04:00Its the Software, StupidI've had the opportunity to work with <a href="http://www.symbian.com">high end smartphones</a> for almost my entire career. What I've learned is that the handset manufacturers like to sell based on hardware features while the carriers (ie Verizon and AT&T) like to run their own versions of the software. The result is a package that's never quite satisfying. In most cases you end with a hunk of plastic that, despite grand claims, can't do much more than make phone calls.<br /><br />Last week, I dumped Verizon for AT&T so I could get an iPhone. Here in Columbus, Verizon has the best network, period. AT&T's coverage is rather spotty. I put up with it though because the iPhone is the first handset that get's the hardware/software package right (translation: the hardware is decent and the software actually works). <br /><br />Verizon offered us a deal on the LG Voyager to try to get us to stay, but they completely miss the point. No one wants a phone because they look similar on a spec sheet. A smartphone is going to sink or swim based on the strength of its software. And until the rest of the market gets this and stops half-assing their software, the iPhone will win.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-37686784994978457002008-08-07T19:45:00.004-04:002008-08-07T20:10:14.394-04:00Naked Objects in WPF?There is a rather niche architectural pattern called <a href="http://en.wikipedia.org/wiki/Naked_objects">naked objects</a>. In this pattern, you build your entire application as an abstract domain model. If you do MVC, this is like building the application using only the M. Your users will then interact with this model directly.<br /><br />I call this a niche pattern because none of the major frameworks support it. What I want to explore though is how we can fake it in <a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation">WPF</a>.<br /><br />If you use strict naked objects, you won't build a user interface. The framework will take care of it for you. Frankly, this kind of scares me. I only imagine the monstrous forms that will come out of this thing. <br /><br />In WPF, you can define a template for arbitrary classes. What I'd like to try is to define a UI form by dropping domain objects and importing a resource that will act like a skin. That resource will have the templates that define how the properties of my objects will map to UI controls. <br /><br />This is just a thought I've been kicking around though. One problem I haven't worked out is how to map events on the controls to method calls on my objects without making every single method a routed event handler. I'll have to see if there is a generically capture the events on some controller class and automatically re-map them to method calls.<br /><br />Why would I want to do this? Well... I've got a couple 2000 line code-behind file's I've inherited that prove, yet again, that you can write spaghetti FORTRAN in any language.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-8208057273532934482008-08-06T21:35:00.007-04:002008-08-06T21:52:14.337-04:00A Crazy Idea about Dependency InjectionAt the end of my post yesterday, I mentioned the term Dependency Injection. I can't go into too much detail because it's not a concept I've really been able to work with much... yet. My only real exposure is the <a href="http://www.amazon.com/gp/product/1590599977?ie=UTF8&tag=mattpfef-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1590599977">Google Guice book</a>.<br /><br />That's not gonna stop me from diving right in though.<br /><br />Basically, when you use DI, you never use the new operator which means you never explicitly allocate objects. In a modern programming language (where modern implies garbage collection), this give you quite a bit of flexibility to reconfigure your app without changing your business logic. You just configure which concrete classes are mapped to which interface. For instance, you can remap ICurrency from Dollar to Euro in one place.<br /><br />What's struck me though is the implications this might have for C++. By taking 'new' out of the program logic, we should be able to abstract away most, if not all, of the manual memory management that is so painful. <br /><br />Instead of allocating an instance object in the constructor and freeing it in the destructor, we inject an already allocated object into the constructor. It is now the DI container's job to allocate and deallocate that object. Finally, assuming that you have a good enough DI framework (is this like a smart enough compiler?), it should take care of that task for you. You just map types.<br /><br />Am I crazy?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8121697173265565376.post-78578444455426406702008-08-05T20:30:00.006-04:002008-08-05T21:06:00.500-04:00What's in your object?In the <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FThoughtWorks-Anthology-Technology-Innovation-Programmers%2Fdp%2F193435614X%3Fie%3DUTF8%26s%3Dbooks%26qid%3D1217982732%26sr%3D8-1&tag=mattpfef-20&linkCode=ur2&camp=1789&creative=9325">ThoughtWorks Anthology</a><img src="http://www.assoc-amazon.com/e/ir?t=mattpfef-20&l=ur2&o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, there's an essay by Jeff Bay called Object Calisthenics. Briefly, the essay lays out a set of rules for designing classes that are rather strict and quite different from what you'd normally use to guide your programming. If you do a quick Google, you'll see that this essay has received quite a bit of criticism in the blogosphere. Most people seem to say that the rules are too strict and just get in the way.<br /><br />If you haven't read the essay, there's an overview <a href="http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html">here</a>.<br /><br />I'm applying these rules as much as I can in my day to day development, and I've noticed a few things. First, it's not kind toward legacy code bases. It is especially unkind toward WPF applications. WPF is built almost entirely on .NET properties and practically begs you to break encapsulation. Yuck... but I blame WPF rather than these rules.<br /><br />Next, it's turned my code inside out. I'm used to grabbing a few objects, getting some data out of them, doing something to that data, and then passing that data to some other method. Usually this is so I can then return a new value. Since I'm not doing gets anymore, I have to send commands to those objects and then let them do some computation on behalf of the caller. It kinda reminds me of the message passing style you do in Erlang.<br /><br />So what's this gotten me? For one, unit testing is easier. If you use get, you end up with an object that you then have to verify. This object will have state of its own which will likely have to be verified. This isn't a unit test anymore. It's an integration test. Instead, by sending messages, especially with mocks as parameters, you only have one layer of code to test.<br /><br />Also, Dependency Injection become much more natural. But that's a topic for another post.Unknownnoreply@blogger.com0