<?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-12831763</id><updated>2012-01-08T01:38:03.839-05:00</updated><title type='text'>Marc-André Cournoyer 's old blog</title><subtitle type='html'>My software passion spreading place</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12831763.post-115500292913412982</id><published>2006-08-07T22:01:00.000-04:00</published><updated>2006-08-07T22:09:43.230-04:00</updated><title type='text'>Switching blog host</title><content type='html'>As you might have noticed, I switched from &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt; to &lt;a href="http://wordpress.org/"&gt;WordPress&lt;/a&gt;. WordPress is one of the best blogging engine without a doubt. But some &lt;em&gt;fundamental&lt;/em&gt; features are not included in the version hosted on &lt;a href="http://wordpress.com/"&gt;wordpress.com&lt;/a&gt; like Markdown and Textile support.&lt;br /&gt;&lt;br /&gt;Importing posts from Blogger to WordPress was a breeze. And setting up my new blog was equally delicious.&lt;br /&gt;&lt;br /&gt;I now can blog from TextMate which make up a bit from the lack of markup support, plus I can add pages, widgets and stuff but not customize the templates... So I guess that when I'll have enough time I'll switch again to &lt;a href="http://typo.leetsoft.com/"&gt;Typo&lt;/a&gt; on a free Rails host.&lt;br /&gt;&lt;br /&gt;My new blog is located at &lt;a href="http://macournoyer.wordpress.com/"&gt;http://macournoyer.wordpress.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115500292913412982?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115500292913412982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115500292913412982' title='45 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115500292913412982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115500292913412982'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/08/switching-blog-host.html' title='Switching blog host'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>45</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-115483789341330960</id><published>2006-08-06T00:17:00.000-04:00</published><updated>2006-08-06T11:26:13.066-04:00</updated><title type='text'>Live coding with MonoRail</title><content type='html'>In my constant quest to bring &lt;a href="http://www.castleproject.org/index.php/MonoRail"&gt;Castle MonoRail&lt;/a&gt; closer to Ruby on Rails development style, one of the thing that kept me from choosing MonoRail over Rails for fun and pleasure was the code-compile-refresh process. Because we're working in the static compiled world, a usual scenario looks like this.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt;Add or remove some code&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Compile from the IDE or run NAnt&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Restart the web server (under *nix XSP needs to be restarted to load the new assembly)&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Refresh the browser (and wait for the app to restart AR and all other services)&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;This is painful! Why can't we just code and refresh like with scripting languages?&lt;br /&gt;&lt;br /&gt;While reading &lt;a href="http://www.logankoester.com/mt/2006/07/live_coding_with_python_1.html"&gt;an article&lt;/a&gt; on reddit about &lt;a href="http://en.wikipedia.org/wiki/Live_coding"&gt;Live coding&lt;/a&gt;, I had a idea...&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;pre&gt;# Rebuilds the project periodically and restarts the web server on success&lt;br /&gt;&lt;br /&gt; import System&lt;br /&gt; import System.IO&lt;br /&gt; import System.Threading&lt;br /&gt; import System.Diagnostics&lt;br /&gt;&lt;br /&gt; SERVER_CMD = 'xsp2'&lt;br /&gt; SERVER_ARGUMENTS = '--root public'&lt;br /&gt; NANT_ARGUMENTS = 'build -nologo -q'&lt;br /&gt; PROJECT_ASSEMBLY = 'public/bin/MyBlog.dll'&lt;br /&gt; REBUILD_DELAY = 1000 #ms&lt;br /&gt;&lt;br /&gt; serverProcess as Process&lt;br /&gt; lastWriteTime as DateTime&lt;br /&gt;&lt;br /&gt; print "Starting runner process, hit CTRL+C to stop"&lt;br /&gt; while (true):&lt;br /&gt;  buildProcess = shellp('nant', NANT_ARGUMENTS)&lt;br /&gt;  buildProcess.WaitForExit()&lt;br /&gt;&lt;br /&gt;  if buildProcess.ExitCode == 0:&lt;br /&gt;   if FileInfo(PROJECT_ASSEMBLY).LastWriteTime &gt; lastWriteTime:&lt;br /&gt;    print "Project recompiled, restarting the server"&lt;br /&gt;    if serverProcess != null:&lt;br /&gt;     try:&lt;br /&gt;      # Stops the server&lt;br /&gt;      serverProcess.Kill()&lt;br /&gt;     except e:&lt;br /&gt;      pass&lt;br /&gt;     serverProcess.WaitForExit()&lt;br /&gt;     serverProcess = null&lt;br /&gt;    serverProcess = shellp(SERVER_CMD, SERVER_ARGUMENTS)&lt;br /&gt;    lastWriteTime = FileInfo(PROJECT_ASSEMBLY).LastWriteTime&lt;br /&gt;  else:&lt;br /&gt;   print buildProcess.StandardOutput.ReadToEnd()&lt;br /&gt;&lt;br /&gt;  # Waits a couple of seconds&lt;br /&gt;  Thread.CurrentThread.Sleep(REBUILD_DELAY)&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you can't see what this is about...&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-7839057158683496907&amp;hl=fr" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL"  FlashVars="playerMode=embedded"&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;The other thing that keep me from dropping Rails for MonoRail is C# extra verbose and lack of fun and style. But I can't do nothing about that, except use Boo whenever I can.&lt;br /&gt;&lt;br /&gt;Note that this script will soon be integrated in the &lt;a href="http://www.castleproject.org/index.php/Generator"&gt;Generator&lt;/a&gt; so when you generate a new MonoRail project, the server script while run something like this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115483789341330960?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115483789341330960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115483789341330960' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115483789341330960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115483789341330960'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/08/live-coding-with-monorail.html' title='Live coding with MonoRail'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-115439928583942837</id><published>2006-07-31T22:18:00.000-04:00</published><updated>2006-07-31T22:28:05.860-04:00</updated><title type='text'>NProject featured on Miguel de Icaza's blog</title><content type='html'>I've received a couple of e-mails from people about NProject telling they found about it on &lt;a href="http://tirania.org/blog/archive/2006/Jul-26.html"&gt;Miguel de Icaza's blog&lt;/a&gt;... ok well, thanks Miguel, &lt;a href="http://en.wikipedia.org/wiki/Miguel_de_Icaza"&gt;who ever this is&lt;/a&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115439928583942837?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115439928583942837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115439928583942837' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115439928583942837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115439928583942837'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/07/nproject-featured-on-miguel-de-icazas.html' title='NProject featured on Miguel de Icaza&apos;s blog'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-115403799890285604</id><published>2006-07-27T17:36:00.000-04:00</published><updated>2006-08-01T21:38:33.646-04:00</updated><title type='text'>NProject featured in the Daily Grind</title><content type='html'>It seems that NProject is getting more and more exposure too. I just found out it was in the &lt;a href="http://www.larkware.com/dg6/TheDailyGrind933.aspx"&gt;daily grind&lt;/a&gt; a couple of days ago. I can't beleive it! Wow!&lt;br /&gt;&lt;br /&gt;Also, if you'd like to contribute to the project in anyway please contact me! Their's still plenty of things to be done. If you've got some experience with &lt;a href="http://www.castleproject.org/"&gt;Castle&lt;/a&gt; MonoRail and ActiveRecord and got some crazy ideas about NProject, send me an &lt;a href="&amp;#109;&amp;#97;&amp;#105;&amp;#x6C;&amp;#x74;&amp;#x6F;:&amp;#x6D;&amp;#x61;&amp;#99;&amp;#111;u&amp;#x72;&amp;#110;&amp;#x6F;&amp;#121;&amp;#101;&amp;#114;&amp;#64;&amp;#x79;&amp;#97;&amp;#x68;&amp;#x6F;&amp;#111;&amp;#46;&amp;#x63;a"&gt;e-mail&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm currently finishing my final session at &lt;a href="http://www.etsmtl.ca/"&gt;ETS&lt;/a&gt; in software engeneering and then I'll be able to pursue NProject developement. Check &lt;a href="http://www.nproject.org/"&gt;NProject development site&lt;/a&gt; (and test site as their's more junk in there then usefull information...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115403799890285604?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115403799890285604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115403799890285604' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115403799890285604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115403799890285604'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/07/nproject-featured-in-daily-grind.html' title='NProject featured in the Daily Grind'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-115397169256737513</id><published>2006-07-26T23:28:00.000-04:00</published><updated>2006-07-26T23:42:11.123-04:00</updated><title type='text'>Generator project moved to Castle</title><content type='html'>Thanks to &lt;a href="http://hammett.castleproject.org/"&gt;hammett&lt;/a&gt;, my code generator project has been accepted as a Castle contrib project. Everything is still the same but you now have to checkout the code from &lt;code&gt;http://svn.castleproject.org/svn/castlecontrib/generator/trunk/&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;By the way I'd like to say thanks to &lt;a href="http://www.shidix.com/carlosble/"&gt;Carlos&lt;/a&gt;, &lt;a href="http://www.tannerburson.com/"&gt;Tanner&lt;/a&gt;, Peter and &lt;a href="http://www.almostserio.us/"&gt;Kevin&lt;/a&gt; for their help and support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115397169256737513?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115397169256737513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115397169256737513' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115397169256737513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115397169256737513'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/07/generator-project-moved-to-castle.html' title='Generator project moved to Castle'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-115375313482679234</id><published>2006-07-24T10:32:00.000-04:00</published><updated>2006-07-26T23:27:10.816-04:00</updated><title type='text'>Getting MonoRail closer to Rails again</title><content type='html'>In a previous post I've bloged about the scaffold generator for &lt;a href="http://www.castleproject.org"&gt;Castle MonoRail&lt;/a&gt;. And now it's time for the fully-packed-turbo-ultra-cool MonoRail project generator. Just type &lt;code&gt;generate project MyProject&lt;/code&gt; (or make a link for &lt;code&gt;monorail&lt;/code&gt; like in the vid).&lt;br /&gt;&lt;br /&gt;Some people won't like the directory structure I've used, which is inspired by Rails ratter then by Visual Studio. I find it more secure, more structured and more fun. If you want to argue on this, please do in this post comments! this is a work in progress and I'm pretty open to constructive suggestions and comments.&lt;br /&gt;&lt;br /&gt;As usual : watch it live!!!&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=8788726275243372418" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL"  FlashVars="playerMode=embedded"&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;This work is not complete! If you intend to use it, you understand that this is an alpha release. The source is at http://svn.castleproject.org/svn/castlecontrib/generator/trunk.&lt;br /&gt;&lt;br /&gt;If someone is interested in adding Visual Studio support just contact me by email.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115375313482679234?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115375313482679234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115375313482679234' title='146 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115375313482679234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115375313482679234'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/07/getting-monorail-closer-to-rails-again.html' title='Getting MonoRail closer to Rails again'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>146</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-115319265287831393</id><published>2006-07-17T22:58:00.000-04:00</published><updated>2006-07-18T23:29:14.343-04:00</updated><title type='text'>Switching to Mac</title><content type='html'>&lt;img src="http://static.flickr.com/72/192273446_0465509559.jpg?v=0" title="My MacBook" width="400" /&gt;&lt;br /&gt;A couple of weeks ago, I bought a cool white 2 Ghz MacBook. It's actually the first time I really use a Mac and I got to say that I'm pleased and surprised! I switched for 3 main reasons:&lt;br /&gt;&lt;br /&gt;1. It looks cool&lt;br /&gt;2. It's unix based (darwin)&lt;br /&gt;3. It just works&lt;br /&gt;&lt;br /&gt;I think that only people with bad taste can argue that a MacBook doesn't look good. The only problem is that I'm starting to get those yellow discoloration on the bottom plus an ugly stain that wont go away is parked on the right side. But I called Apple and they'll replace the case without arguing to much. Other then that, it's true that it get a little bit hot sometimes (up to 80 C on full processor usage). But I still love it! The keyboard feels so good you just want to type all day.&lt;br /&gt;&lt;br /&gt;Another stupid reason I bought a Mac was to use &lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt;. At first I tough I'd miss auto-completion and things like that but I found snippets and commands functionalities much more powerful. Plus, TextMate is fully scriptable in bash, ruby, python, etc.&lt;br /&gt;&lt;br /&gt;I got to admit that I was largely influenced by other geek around the net, but hey! Why should they have all the fun ? And what are you waiting for ? Go buy yourself Mac !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-115319265287831393?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/115319265287831393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=115319265287831393' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115319265287831393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/115319265287831393'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/07/switching-to-mac.html' title='Switching to Mac'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114921559474852708</id><published>2006-06-01T22:28:00.000-04:00</published><updated>2006-06-01T23:09:48.066-04:00</updated><title type='text'>NProject</title><content type='html'>NProject is a software project and content management system mainly for the .NET Framework (and Mono). It integrates a Wiki, an issue management and reporting system, a dynamic project calendar and integration with &lt;a href="http://ccnet.thoughtworks.com/"&gt;CruiseControl.NET&lt;/a&gt;. It's inspired by &lt;a href="http://projects.edgewall.com/trac/"&gt;Trac&lt;/a&gt; and other cool projects. It's based on &lt;a href="http://www.castleproject.org/"&gt;Castle MonoRail, ActiveRecord and Windsor projects&lt;/a&gt;. But most important : it's fun and looks cool!&lt;br /&gt;&lt;br /&gt;The demo site is up at &lt;a href="http://dev.nproject.org"&gt;http://dev.nproject.org&lt;/a&gt;. It's fully working! You can try the wiki on the &lt;a href="http://www.nproject.org/dev/wiki/TestPage.aspx"&gt;TestPage&lt;/a&gt;. Or submit an Issue or... do what you want! Any comments or suggestions are greatly appreciated.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Subversion integration&lt;/h3&gt;&lt;br /&gt;I started subversion integration. The library NSvn which is part of the &lt;a href="http://ankhsvn.tigris.org/"&gt;AnhkSvn project&lt;/a&gt; is used to interact with a subversion server. It worked on my local computer, but not on the server. I can't get the full list of dependencies because I don't have direct access to the server (only FTP). I've tried to ask for help in AnhkSvn mailing-list with no success. I can't reproduce it because I previously installed AnhkSvn with the MSI installer and it copied all the dependencies.&lt;br /&gt;&lt;br /&gt;The version with subversion support is on &lt;a href="https://svn.sourceforge.net/svnroot/nproject/NProject/branches/subversion/"&gt;this branch&lt;/a&gt; If someone could checkout and build and then run &lt;a href="http://www.dependencywalker.com"&gt;this tool&lt;/a&gt; to get the list of missing libs. I'll send you an eCard with little bunnies and hearts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114921559474852708?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114921559474852708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114921559474852708' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114921559474852708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114921559474852708'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/06/nproject.html' title='NProject'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114732428703036083</id><published>2006-05-11T01:07:00.000-04:00</published><updated>2006-07-26T23:28:05.766-04:00</updated><title type='text'>Code generation and scaffolding</title><content type='html'>With all the respect that I have for the Castle projects and team members, their are two things I don't like about the projects.&lt;br /&gt;- Visual Studio Integration rather then a command line tool&lt;br /&gt;- The scaffolding&lt;br /&gt;&lt;br /&gt;So instead of complaining, here's what I've done: The Generator, mouhaha! :&lt;br /&gt;To compile and run:&lt;br /&gt;1. Run &lt;code&gt;svn co http://svn.castleproject.org/svn/castlecontrib/generator/trunk&lt;/code&gt;&lt;br /&gt;2. Run &lt;code&gt;nant&lt;/code&gt; in the base directory to compile&lt;br /&gt;3. Run &lt;code&gt;generate&lt;/code&gt; to get help&lt;br /&gt;&lt;br /&gt;It's a fully customizable code generator written in Boo and templates with ASP style syntax. I've made 4 generators: controller, model, generator and scaffold.&lt;br /&gt;&lt;br /&gt;The scaffold generator is heavily inspired by RoR, it generates real code you can modify for the controller, the views, layouts, css and tests. The CRUD views will look similar to current MR scaffold with the difference that the code is live in you project so you can add a field, color, validation, change the workflow without copy pasting for the last controller you've done! Plus you already got some running tests! (just 2 simple for now)&lt;br /&gt;&lt;br /&gt;To use it :&lt;br /&gt;Edit the file Generators\Config.boo to fit your project structure&lt;br /&gt;run bin\generate from your project root folder.&lt;br /&gt;&lt;br /&gt;This is a work in progress so contributions or comments are welcome.&lt;br /&gt;&lt;br /&gt;Oh and I almost forgot, a short video: &lt;a href="http://nproject.sf.net/GeneratorDemo.wmv"&gt;Video&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114732428703036083?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114732428703036083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114732428703036083' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114732428703036083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114732428703036083'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/05/code-generation-and-scaffolding.html' title='Code generation and scaffolding'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114554541565722050</id><published>2006-04-20T10:46:00.000-04:00</published><updated>2006-04-20T12:30:54.313-04:00</updated><title type='text'>Cool Generic Visitor Pattern in C# 2.0</title><content type='html'>I recently discovered that C# 2.0 was more then generic, you also get anonymous methods, partial and static classes, and some others...&lt;br /&gt;The more I work with generic and anonymous methods, the more I feel like hacking with a dynamic language such as Ruby, Python or Boo (Boo is not dynamic I know, but so close).&lt;br /&gt;My following example is somewhat trivial in this case, iterating a simple list is better done with a foreach block. But this pattern could be useful to browse some more complex hierarchy like a tree or a graph.&lt;br /&gt;&lt;br /&gt;So here's the implementation of the actual visitor:&lt;br /&gt;&lt;div class="code"&gt;&lt;pre&gt;&lt;br /&gt;public class ListVisitor&amp;lt;T&amp;gt;&lt;br /&gt;{&lt;br /&gt; public delegate void VisitDelegate(T visited);&lt;br /&gt; &lt;br /&gt; private IList _list;&lt;br /&gt; &lt;br /&gt; public ListVisitor(IList list)&lt;br /&gt; {&lt;br /&gt;  _list = list;&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; public void Visit(VisitDelegate callback)&lt;br /&gt; {&lt;br /&gt;  foreach (T item in _list)&lt;br /&gt;  {&lt;br /&gt;   callback.Invoke(item);&lt;br /&gt;  }&lt;br /&gt; } &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And now to call it we specify an anonymous method with a block executed on each iteration. The delegate type is inferred by the compiler.&lt;br /&gt;&lt;div class="code"&gt;&lt;pre&gt;&lt;br /&gt;ArrayList list = new ArrayList("This is a test".Split(' '));&lt;br /&gt;&lt;br /&gt;ListVisitor&amp;lt;string&amp;gt; visitor = new ListVisitor&amp;lt;string&amp;gt;(list);&lt;br /&gt;&lt;br /&gt;visitor.Visit(delegate(string obj) { Console.WriteLine(obj); });&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This is starting to look a lot like closures, don't you think ?&lt;br /&gt;&lt;br /&gt;A rather more useful application would be to add a ForEach(delegate) to Castle's &lt;a href="http://www.castleproject.org/index.php/ActiveRecord"&gt;ActiveRecord&lt;/a&gt; so we could do something like this:&lt;br /&gt;&lt;div class="code"&gt;&lt;pre&gt;&lt;br /&gt;int greatTotal = 0;&lt;br /&gt;Order.ForEach(delegate(Order o) { greatTotal += o.Total; });&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Or even cooler (ActiveRecord.Update() would be called after each iteration.):&lt;br /&gt;&lt;div class="code"&gt;&lt;pre&gt;&lt;br /&gt;Order.UpdateEach(delegate(Order o) { if (o.Date &gt; DateTime.Now.Date) o.Closed = true; });&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114554541565722050?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114554541565722050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114554541565722050' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114554541565722050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114554541565722050'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/04/cool-generic-visitor-pattern-in-c-20.html' title='Cool Generic Visitor Pattern in C# 2.0'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114442872941364065</id><published>2006-04-07T12:40:00.000-04:00</published><updated>2006-04-07T12:52:09.426-04:00</updated><title type='text'>Linkdump</title><content type='html'>An interesting debate about Rails never making it to the mainstream is going on &lt;a href="http://beust.com/weblog/archives/000382.html"&gt;Cedric's weblog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On a other node, Joel Spolsky is preparing his second edition of &lt;a href="http://www.joelonsoftware.com/items/2006/03/31.html"&gt;Best Software Writing&lt;/a&gt; book serie. I really liked the &lt;a href="http://www.amazon.com/gp/product/1590595009/sr=8-1/qid=1144428180/ref=pd_bbs_1/104-6917542-6761568?%5Fencoding=UTF8"&gt;first one&lt;/a&gt;, has it made me discover some other greats writers (see my blogroll on the right).&lt;br /&gt;&lt;br /&gt;And I have just ordered myself &lt;a href="http://www.amazon.com/gp/product/020161622X/ref=pd_ys_ir_all_4/104-6917542-6761568?%5Fencoding=UTF8&amp;v=glance&amp;n=283155"&gt;The Pragmatic Programmer&lt;/a&gt;. I really like Dave Thomas writing in &lt;a href="http://www.amazon.com/gp/product/097669400X/ref=pd_null_recs_b_i/104-6917542-6761568?s=books&amp;v=glance&amp;n=283155"&gt;Agile Web development with Rails&lt;/a&gt;, and I heard this one was is classic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114442872941364065?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114442872941364065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114442872941364065' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114442872941364065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114442872941364065'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/04/linkdump.html' title='Linkdump'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114383597553874167</id><published>2006-03-31T14:41:00.000-05:00</published><updated>2006-03-31T15:16:40.100-05:00</updated><title type='text'>Backward incompatibility</title><content type='html'>After reading Jeff Smith's &lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2006/03/30/9471.aspx"&gt;Programming is a funny thing&lt;/a&gt; article I felt the need to comment.&lt;br /&gt;&lt;br /&gt;As a strong advocate about simplicity I was according to the fact that "experts" writes clearer code then beginners. But I think Jeff missed the point when he said that in the software industry, beginners gets all the hard and big projects. They make it hard by their selves. For years software developers have been solving similar problems over and over. That's why we end up with design patterns, frameworks, libraries, etc. But to be selective with all those tools, you have to know them. Software "experts" know them because they've been around for a while, so they know that for this kind of problem you do this kind of thing, and whoop! You've just divided your project in half the complexity and time and LOC and ... Fred Brooks mentioned in his famous No Silver Bullet article (published in 1987) that all low-level problems had already been solved.&lt;br /&gt;&lt;br /&gt;Sure knowledge is not everything. You could still have someone with 20 years of experience under his belt, knowing all about everything, but unable to select the correct solution for a given problem. You need to be good at synthesizing all that knowledge too.&lt;br /&gt;&lt;br /&gt;I think I can sum this up like this: &lt;strong&gt;you're not an expert when you can solve a problem, but when you can choose the best solution to that problem&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;(I would have loved to put a nice analogy with some other industry, but yeah! I only work in the software one)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114383597553874167?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114383597553874167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114383597553874167' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114383597553874167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114383597553874167'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/03/backward-incompatibility.html' title='Backward incompatibility'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113806691483076576</id><published>2006-03-30T13:00:00.000-05:00</published><updated>2006-03-30T17:17:55.553-05:00</updated><title type='text'>A C# interpreter in 50 lines of code</title><content type='html'>With all the hype around scripting languages these days, here's my contribution. A C# line interpreter. The principe is simple: append the code to a string and evaluate it when a return statement is added. This is some magic we can do with the System.CodeDom and System.Reflection namespace. Not quite has dynamic has ruby or python, but better then nothing...&lt;br /&gt;&lt;br /&gt;Run it. Type some c# code, each line will be compiled instantly, type a &lt;code&gt;return something;&lt;/code&gt; to restart the &lt;em&gt;session&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Here's an example:&lt;br /&gt;&lt;pre class="cmdline"&gt;Instant C#, hack some code...&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; string cool = "wow that's cool!";&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; cool = cool.ToUpper();&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; return cool;&lt;br /&gt;WOW THAT'S COOL!&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;div style="overflow: auto; font-family: Courier New; font-size: 8pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; padding: 8px;"&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Reflection;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.CodeDom.Compiler;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; Microsoft.CSharp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; InstantCSharp&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;{&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; StringBuilder _code = &lt;span style="color: blue;"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICodeCompiler compiler = &lt;span style="color: blue;"&gt;new&lt;/span&gt; CSharpCodeProvider().CreateCompiler();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CompilerParameters parameters = &lt;span style="color: blue;"&gt;new&lt;/span&gt; CompilerParameters();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main()&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;new&lt;/span&gt; InstantCSharp().Start();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; InstantCSharp()&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.GenerateInMemory = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.ReferencedAssemblies.Add("System.dll");&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Start()&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Instant C#, hack some code...");&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; cmd = ReadCmd();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;while&lt;/span&gt; (cmd != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;object&lt;/span&gt; obj = Run(cmd);&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (obj != &lt;span style="color: blue;"&gt;null&lt;/span&gt;) Console.WriteLine(obj);&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmd = ReadCmd();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; ReadCmd()&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Write("&amp;gt;&amp;gt;&amp;gt; ");&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; Console.ReadLine();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;object&lt;/span&gt; Run(&lt;span style="color: blue;"&gt;string&lt;/span&gt; cmd)&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; code;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; returnline = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; haserrors = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (!cmd.StartsWith("return"))&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; returnline = "return null;";&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; code = @"&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; using System;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public class Runner&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public object Run()&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; " + _code.ToString() + cmd + returnline + @"&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }";&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CompilerResults compiled =&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; compiler.CompileAssemblyFromSource(parameters, code);&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (CompilerError e &lt;span style="color: blue;"&gt;in&lt;/span&gt; compiled.Errors)&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(e.ErrorText);&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (!e.IsWarning) haserrors = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (haserrors) &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;object&lt;/span&gt; obj = compiled.CompiledAssembly.CreateInstance("Runner");&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;object&lt;/span&gt; returned = compiled.CompiledAssembly.GetType("Runner")&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .InvokeMember(&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; "Run",&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BindingFlags.InvokeMethod,&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;null&lt;/span&gt;, obj, &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: blue;"&gt;object&lt;/span&gt;[] {}&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; );&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _code.Append(cmd); &lt;span style="color: green;"&gt;// All ok so include the line&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (returnline == &lt;span style="color: blue;"&gt;null&lt;/span&gt;) &lt;span style="color: green;"&gt;// A return call means end of the session&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _code = &lt;span style="color: blue;"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; returned;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="margin: 0px;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113806691483076576?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113806691483076576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113806691483076576' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113806691483076576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113806691483076576'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/03/c-interpreter-in-50-lines-of-code.html' title='A C# interpreter in 50 lines of code'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114364302479297254</id><published>2006-03-29T08:50:00.000-05:00</published><updated>2006-03-30T11:04:45.796-05:00</updated><title type='text'>Rock Star programming : my two cents</title><content type='html'>I was a little outraged when I red Mikael Grev's &lt;a href="http://www.javalobby.org/java/forums/t65399.html"&gt;My Top Ten Tips on how to become a Rock Star Programmer&lt;/a&gt; a couple of weeks ago when it ended up on &lt;a href="http://programming.reddit.com/"&gt;reddit&lt;/a&gt;. And now that &lt;a href="http://ironmonkey.blogspot.com/2006/03/one-tip-that-rules-them-all.html"&gt;ironmonkey&lt;/a&gt; has done his own meaculpa I feel the need to add my little two cents.&lt;br /&gt;&lt;br /&gt;Ironmonkey probably has the greatest tip of all, that not only apply to programming : to be the best, learn from the best.&lt;br /&gt;One of the two original tips I was most shocked about was &lt;em&gt;Don't learn APIs too well&lt;/em&gt;. Keeping in mind that his tips were for becoming a rockstart programmer. Someone that, when you look at his code, all you can say is: WOW! How did he thought about it!&lt;br /&gt;Cool code has to be compact, yes... but mostly brilliant and simple. Absurdly simple. People have to be ashamed that they haven't thought about it before when they see it. That's rockstar programming. Now how can you end up writing this type of code? You have to know the programming language and api and all libs you're using by heart, its weakness and strengths. Let's sum this up with an example in ruby (a rockstart ready language):&lt;br /&gt;&lt;br /&gt;Let's say you've just learned ruby, but have been using java for some year and consider yourself a good programmer. The simple problem for my demonstration is this: the second command line argument of a script is the language, if not specified, it has to be English (en). So I'm going to write it first has a new ruby programmer and refactoring it to a more rockstar fashion.&lt;br /&gt;&lt;br /&gt;Ok I know ruby syntax, and I know how to do this, simple&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;if $*.size &gt; 2&lt;br /&gt;  lang = $*[2]&lt;br /&gt;else&lt;br /&gt;  lang = 'en'&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;That works... I don't know the api, but I've looked at the docs 'cause I didn't knew how to retrieve command line arguments ($*).&lt;br /&gt;&lt;br /&gt;Now I read some more about ruby, check some code written by cool ppl, put sunglasses on and refactor to the following:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;lang = 'en'&lt;br /&gt;lang = $*[2] if $*.size &gt; 2&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Ha ah!!! from 5 lines to 2!!! How cool is that???&lt;br /&gt;&lt;br /&gt;I read some more code, tear my shirt off, pierce my nose and refactor to the following:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;lang = $*[2] || 'en'&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;What? Isn't this throwing a IndexOutOfRangeException and those are not boolean expressions!?! (remember, I'm a java programmer) People who don't know by heart a language or api would assume a great number of things, some are false, some aren't. My point is that there's no way I could have guessed that my last line would have worked in ruby if I didn't knew the language by looking at other people's code, books and tried it myself. &lt;strong&gt;You have to know API and syntax really well&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;Other's tips are also wrong IMHO, but I can't make a point this clear about them, for now...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114364302479297254?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114364302479297254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114364302479297254' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114364302479297254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114364302479297254'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/03/rock-star-programming-my-two-cents.html' title='Rock Star programming : my two cents'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114339461097802732</id><published>2006-03-26T12:28:00.000-05:00</published><updated>2006-03-26T12:47:09.490-05:00</updated><title type='text'>Code generator : the languages comparison</title><content type='html'>I've been hacking a code generator in various languages just to get the fell of each languages, none is the worst, but some are so much cooler. Here's the results of my experimentation.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;C#&lt;/h3&gt;&lt;br /&gt;Goods&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Fast&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Should run on any win32 machine with .NET&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Bads&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Too much of LOC&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Had to use NVelocity has a template engine&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Code to inject template bindings was ugly&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Python&lt;/h3&gt;&lt;br /&gt;Goods&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Easy to read class and attributes metadata&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Scripting language so the developement cycle was faster, no compile step&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Easely multiplateforme&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Bads&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Had to use Cheetah has the template engine&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Boo&lt;/h3&gt;&lt;br /&gt;Goods&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Fast&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Implemented the generator code has a script in Boo&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Bads&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Playing with the compiler pipeline and stuff is complexe&lt;/li&gt;&lt;br /&gt; &lt;li&gt;lack of docs (but yeah Boo has not hit 1.0 yet)&lt;/li&gt;&lt;br /&gt; &lt;li&gt;No template engine usable for this with Boo's syntax&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Ruby&lt;/h3&gt;&lt;br /&gt;Goods&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;OMG!&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Implemented in 2 LOC&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;require 'erb'&lt;br /&gt;print ERB::new('mytemplate').run(binding)&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Bads&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Too easy ;)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114339461097802732?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114339461097802732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114339461097802732' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114339461097802732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114339461097802732'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/03/code-generator-languages-comparison.html' title='Code generator : the languages comparison'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-114326221912483808</id><published>2006-03-24T23:47:00.000-05:00</published><updated>2006-03-26T12:27:42.553-05:00</updated><title type='text'>AJAX and the whole 2.0 stuff</title><content type='html'>Some are all buzzed about it, some others are angry that someone has even thought about naming a fashion Web 2.0. Like their was a version for the "Web". It's like naming your own child "Version 1.2" (I know some guy did... That's not my point). I'm not angry at this, I think it's a marketing stuff, "hey come with us we got the next version of the internet wright now!", hum... Pretty tempting. But all that matters to us programmers (and users) is if it will make our live easier.&lt;br /&gt;Today I get to try Yahoo Mail boosted on Ajax. You can drag and drop stuff all around, and you even get a popup menu to tickle you mail. But man! It's slow! I thought that AJAX was all about asynchronous processing to make web pages more fast. Now I have to wait 5 full seconds to even check if I got mail. I switched back to my old and comforting yahoo mail without all the glamour stuff, but the efficiency.&lt;br /&gt;&lt;br /&gt;At the same time I'm building a web app and using AJAX to boost up my ... ego. But on the functional side, It's great, having to interact remotely with the server without posting or without not-so-cool spaghetti javascript packed with collections loaded at post time... hurrrrr... You know when you got a child collection to be modified on a web page without reloading, that's the kind of stuff that makes your life easier and your code cleaner.&lt;br /&gt;&lt;br /&gt;All my work has been done with &lt;a href="http://www.castleproject.org"&gt;Castle&lt;/a&gt;, MonoRail and ActiveRecord are like Ruby on Rails, but it's the MicroKernel Container of Ioc that makes it super powerful. You can hack services (full of dependencies if you wish or have to), test them with mocks and them plug it in the container. Then you only add the interface to your service in the Controller's constructor like this:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;public ServiceController(IMyCoolService service)&lt;br /&gt;{&lt;br /&gt;  _service = service;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;No factory, no crazy xml config file, cool!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-114326221912483808?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/114326221912483808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=114326221912483808' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114326221912483808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/114326221912483808'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/03/ajax-and-whole-20-stuff.html' title='AJAX and the whole 2.0 stuff'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113941891104301016</id><published>2006-02-08T11:47:00.000-05:00</published><updated>2006-02-08T12:17:25.770-05:00</updated><title type='text'>Ahrrg! Got bitten by a snake!</title><content type='html'>When I started to wrote some lines in python I was not all happy about the libs and how namespace are managed and by the not so OO design of most of the built-in libs. But now that I've written some more lines I think it's all right. Even more, I think that python is by far the most productive language I've learn. Let me sum this up like this:&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;1. Identation&lt;/h2&gt;&lt;br /&gt;Making indentation matter solves more then the 'style' problem. The code flow comes really close to the thinking flow. For example, when I write a function in C or java, until I've written the final } I can't even start to think, my brain is frozen. I know what you're saying! Wear a hat while coding! Yeah, but I'm not a hat type of guy. So when I code I like it to flow as fast as my thoughts and not make me think of what I want to do at the end when I've not even started to think what I was trying to do. Idendation makes the code looks right in my brain, this should be a closer step to implementing a compiler right into my brain.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;2. Imports&lt;/h2&gt;&lt;br /&gt;Even if I've not all hyped about namespace management, typically the fact the you have to write &lt;code&gt;&lt;b&gt;shutil&lt;/b&gt;.copy(...)&lt;/code&gt; and not &lt;code&gt;copy(...)&lt;/code&gt; bugs me a bit. But in a way, this make the code more readable, cause when looking at a line you know exactly what libs is taking care of what and when. But the thing I like is how imports are handled in you scripts. You can be in the 10th directory level and still write &lt;code&gt;from base import MyClass&lt;/code&gt; and all that without defining references of annoying stuff like that.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Yes, but...&lt;/h2&gt;&lt;br /&gt;But the main drawback is speed. Python is slow, really. So maybe &lt;a href="http://boo.codehaus.org/"&gt;Boo&lt;/a&gt; could be a cool alternative, plus that it can use all .NET libs, aye!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113941891104301016?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113941891104301016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113941891104301016' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113941891104301016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113941891104301016'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/02/ahrrg-got-bitten-by-snake.html' title='Ahrrg! Got bitten by a snake!'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113936635200303506</id><published>2006-02-07T21:13:00.000-05:00</published><updated>2006-02-07T21:42:44.776-05:00</updated><title type='text'>Double release</title><content type='html'>Today I'm releasing two of my projects one was sleeping on my hard drive for some time now. So I guess if this can be of some use for someone else, cause it was for me, so there it is...&lt;br /&gt;&lt;br /&gt;The first is an asp code documenter, implemented has a NAnt task. It browses you asp pages and gather all XML comments (same format as .NET XML comments) and extract them to a XML file. I've also included a XSL file to format the document to a HTML page. So you could easily twiq this to generate the doc and post it to your web site, which is what I did for some asp project.&lt;br /&gt;&lt;br /&gt;Here's the binaries : &lt;a href="http://aspspider.net/macournoyer/files/ASPCommenter-1.0.0-bin.zip"&gt;ASPCommenter-1.0.0-bin.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here's the sources : &lt;a href="http://aspspider.net/macournoyer/files/ASPCommenter-1.0.0-src.zip"&gt;ASPCommenter-1.0.0-src.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To compile run :&lt;br /&gt;&lt;p class="cmdline"&gt;&amp;gt; nant build.debug&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;My other project is my first intro to python, it's a code generator largely inspired by Ruby on Rails generators&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aspspider.net/macournoyer/files/generator.zip"&gt;generator.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To run it type in the base directory:&lt;br /&gt;&lt;p class="cmdline"&gt;&amp;gt; python generate.py&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;This one should be even easier to twiq. To add a generator of your own, go to the base directory and type:&lt;br /&gt;&lt;p class="cmdline"&gt;&amp;gt; python generate.py generator mygenerator&lt;/p&gt;&lt;br /&gt;Then go to the directory /mygenerator that was created. The file mygenerator_generator.py is the main class that act has the generator, check other directories for sample usage. The directory templates contains all the templates used to generate the output. Here's a sample generator to explain this a little:&lt;br /&gt;&lt;p class="code"&gt;&lt;br /&gt;class SampleGenerator(Generator):&lt;br /&gt; def run(self, argv):&lt;br /&gt;  # Each time you define a new class variable,&lt;br /&gt;  # it will be accessible from the templates&lt;br /&gt;  # generated from here.&lt;br /&gt;  self.name = argv[0]&lt;br /&gt;  &lt;br /&gt;  # This is pretty explicit...&lt;br /&gt;  self.mkdir(self.name)&lt;br /&gt;  &lt;br /&gt;  # This parse a file while replacing all&lt;br /&gt;  # python template variables (starting&lt;br /&gt;  # with a $) with class variable (self.)&lt;br /&gt;  # and outputing to readme.txt in the&lt;br /&gt;  # directory previously created.&lt;br /&gt;  self.process("readme.txt", self.name)&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113936635200303506?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113936635200303506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113936635200303506' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113936635200303506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113936635200303506'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/02/double-release.html' title='Double release'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113906532970072100</id><published>2006-02-04T09:54:00.000-05:00</published><updated>2006-02-04T10:02:09.720-05:00</updated><title type='text'>Switching to Linux</title><content type='html'>Recently I had to install Linux on my computer to complete a school assignment (with Qt and OpenGL) which I did on dual boot with Grub. I chose SUSE, with which I had minor problems will installing, but overall it was pretty easy. And now using KDE, all I can say is wow! All is fully customizable from the window behavior to the bottom panel icons animation. What a difference with Microsoft rigidity (which I guess is volontary to keep a uniform "brand" look). Anyway all that to say that I'm very please I will probably stick with Linux... as long as I can get to compile all my main project with Mono, heur...&lt;br /&gt;Anyone had experience "porting" existing .NET projects to Mono?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113906532970072100?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113906532970072100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113906532970072100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113906532970072100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113906532970072100'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/02/switching-to-linux.html' title='Switching to Linux'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113816007351712064</id><published>2006-01-24T22:27:00.000-05:00</published><updated>2006-01-26T13:52:27.706-05:00</updated><title type='text'>Shake-n-bake templates</title><content type='html'>Will searching for some free images for on of my web apps, I ran across &lt;a href="http://www.templatesbox.com/"&gt;this site&lt;/a&gt; with a couples of free web site templates, logos and images. Some are dull, but since you got the Photoshop source you can use only parts, that's what I did, saves a lot of time.&lt;br /&gt;&lt;br /&gt;Plus I found &lt;a href="http://wellstyled.com/tools/colorscheme2/index-en.html"&gt;this site&lt;/a&gt; which matches color sets, that could be some help for web design dummies like myself.&lt;br /&gt;&lt;br /&gt;About &lt;a href="http://thelazyprogrammer.blogspot.com/2006/01/yet-another-variation-on-theme-of-c.html"&gt;yesterday's post&lt;/a&gt;, here's an example of what the interpreter can do...&lt;br /&gt;&lt;br /&gt;&lt;pre class="cmdline"&gt;Instant C#, hack some code...&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; string cool = "wow that's cool!";&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; cool = cool.ToUpper();&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; return cool;&lt;br /&gt;WOW THAT'S COOL!&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I guess that could be helpful for quickly testing some code. Just like de console rails script where you can play with you model class and add record in the tables with the interpreter (running ruby script\console). I guess I could adapt this to work with Castle ActiveRecord classes. That would require to initialize the framework and reference the proper assemblies...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113816007351712064?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113816007351712064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113816007351712064' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113816007351712064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113816007351712064'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/01/shake-n-bake-templates.html' title='Shake-n-bake templates'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113795269290482531</id><published>2006-01-22T12:48:00.000-05:00</published><updated>2006-01-23T20:29:51.370-05:00</updated><title type='text'>Sharp and dynamic</title><content type='html'>While hacking some code generator app in c# I ran into some issues. Being a compiled language, extending some parts of the generator would require recompiling the app, so if I want to use it in my project that mean I'd have to drag the source code all around... I don't like the idea. I strongly think that all dev tools should be quickly extendable. I think that's the main reason more and more devs are turning on to python, ruby and other scripting language.&lt;br /&gt;The problems is, I'm using c#, and I don't want to mix languages like that for the simple purpose of using a code generator... That's when something popped up in my head. I remember something, somewhere deep in the .NET System.CodeDom namespace that could dynamically compile c# code and run it in the actual assembly. Yeah! If I can do that I can run c# code as script!!!&lt;br /&gt;Too bad Oleg Shilo thought about it before I did, here's the result http://www.csscript.net/.&lt;br /&gt;I think this is opening a new world of possibility to the .net framework and .net dev tools. Imagine creating build script in c#, the only thing missing maybe is a couple of helper classes and methods...&lt;br /&gt;&lt;br /&gt;Speaking of my code generator. You may ask why? Why another code generator, please! No! Not again! Let me explain...&lt;br /&gt;All generator tools are based on the template to file pattern, or are optimized for this. Open a template, then parse it to a file, then use this file. I want to push this a step further, and I wont hide the fact that I'm porting some ruby's generator concepts. So the patterns should be, send the generator some arguments and the the files are generated and parsed directly in your app directory structured. Simple, clean and mostly FAST. But not very portable since you app directory structure is not mine... That why all the generator logic is one class that inherits Generator and overrides a run methods. In the methods you do what you have to do:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;[Generator("test")]&lt;br /&gt;public class TestGenerator : Generator&lt;br /&gt;{&lt;br /&gt;public override void Run(string[] args)&lt;br /&gt;{&lt;br /&gt;AddParameter("test", args[0]);&lt;br /&gt;&lt;br /&gt;CreateDirectory("Temp");&lt;br /&gt;ProcessTemplate("Test.vm", @"Temp\SomeTest.txt");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For now I'm using NVelocity template engine. I think this could get any more simple. You can pass parameters to the template and then create the structure and parse your templates or any other dependencies to the folder you want.&lt;br /&gt;The generator is launch with this : &lt;code&gt;generate test Hello&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;And what if I could create a dynamic scripting language with the System.CodeDom stuff! humm..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113795269290482531?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113795269290482531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113795269290482531' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113795269290482531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113795269290482531'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/01/sharp-and-dynamic.html' title='Sharp and dynamic'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-113788037835576410</id><published>2006-01-21T16:32:00.000-05:00</published><updated>2006-01-21T16:58:48.076-05:00</updated><title type='text'>Long time no read...</title><content type='html'>I haven't post since long time now. Hopefully, I'll try to maintain this blog. The thing is : you post. It's fun. You post to yourself. It's getting boring. You don't get feedback. You give up. This is mainly the lifecycle of the average personal blog around the web I guess. So I've made a personal arrangment with myself. To post thing here has it comes out of my head and has the title of this blog mention, be lazy. But intelligently lazy... you know.&lt;br /&gt;&lt;br /&gt;Speaking of being lazy, lets talk a bit about lazy friendly application frameworks, or what some other people like to call RAD framework of rapid application development frameworks. If you're a web developer and haven't heard or Ruby on Rails, then... man... that's BAD laziness, you know? Bad! the kind of laziness that leads you to end up with nothing! Not even some frozen dinner to eat or some starwars t-shirt full of holes smelling buritos flavor doritos 3d, N-O-T-H-I-N-G! You get my point. What was I talking about already? A yeah: &lt;a href="http://www.rubyonrails.com"&gt;http://www.rubyonrails.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I think Rails popularity is based on the fact that people are lazy. Yeah! really! I mean if you know what Rails is about, one of the sentences that comes around a lot when reading about it was ... "code less"! The framework comes fully packed with scripts and  libs that, with a couple of command in the prompt, pops-up a fully functional web app in no time. Plus, all well structured in a directory structure and beautifully following the MVC pattern. Not to mention some other cool paterns like Martin Fowlers ActiveRecord.&lt;br /&gt;&lt;br /&gt;Rails also inspired some other good frameworks, like Castle for the .NET framework : &lt;a href="http://www.castleproject.org"&gt;http://www.castleproject.org&lt;/a&gt;. Which is more then a port... well... It couldn't be anyway since ruby is a dynamic script language and .NET a static compiled one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-113788037835576410?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/113788037835576410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=113788037835576410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113788037835576410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/113788037835576410'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2006/01/long-time-no-read.html' title='Long time no read...'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-111629315921215810</id><published>2005-05-16T21:03:00.000-04:00</published><updated>2005-05-18T17:00:01.853-04:00</updated><title type='text'>Don't be a fool, use tools</title><content type='html'>Programmers with good coding knowledge are great, but programmers with good tools knowledge are greater. Combine the two and you got an awesomely productive programmer. Using tools the lazy programmer way is done in one simple way: to quickly reproduce successful practices.&lt;br /&gt;As a programmer you are already using tool to code, such as Microsoft Visual Studio or &lt;a href="http://eclipse.org/"&gt;Eclipse&lt;/a&gt; and maybe some others. But I don't include those in the lazy programmer toolbox. Why not? Cause they don't "quickly reproduce successful practices".&lt;br /&gt;Number one question is why use tools that can "quickly reproduce successful practices" ? As a lazy person, you should be ... Lazy, and lazy people don't do things twice. So if you did something that helped you perform better, be sure to do it again whenever it is possible.&lt;br /&gt;If you're an &lt;a href="http://www.extremeprogramming.org/"&gt;eXtreme programmer&lt;/a&gt;, you should already know some benefit of using tools (and some tools too!).&lt;br /&gt;&lt;h3&gt;What, which, huh!?, names! names!&lt;br /&gt;&lt;/h3&gt;Right now, I mainly develop in .NET so most of the tools I suggest were designed to be used with the .NET Framework but some can be used with any language.&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.nunit.org/"&gt;NUnit&lt;/a&gt;&lt;/li&gt;   &lt;li&gt;&lt;a href="http://nant.sourceforge.net/"&gt;NAnt&lt;/a&gt;&lt;/li&gt;   &lt;li&gt;&lt;a href="http://confluence.public.thoughtworks.org/display/CCNET"&gt;CruiseControl.NET&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; Those tree tools (or any equivalent) are the back bone of lazy programming. Plus they are complementary to those you should already be using such as a source control and a bug tracking software. Be sure to check out &lt;a href="http://www.joelonsoftware.com/articles/fog0000000043.html"&gt;The Joel Test&lt;/a&gt;, which is a really simple and quick test to check if your development process is effective. NUnit is a unit testing framework, so use it to make sure you don't write code to test the same thing twice and that you can run those tests as much as you want. NAnt helps you perform common tasks, its like a super turbo batch file written in XML. Finally, Cruise Control is your control panel, it automatically builds your projects so you can, at anytime, know if things are going well or not.&lt;br /&gt;Sure thing is that they are numerous tools offered to programmers. One thing you have to keep in mind is to not integrate tools in your development process that adds time without adding quality to your product. If you're gonna work, make it worth!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-111629315921215810?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/111629315921215810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=111629315921215810' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/111629315921215810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/111629315921215810'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2005/05/dont-be-fool-use-tools.html' title='Don&apos;t be a fool, use tools'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12831763.post-111586197507581780</id><published>2005-05-11T21:24:00.000-04:00</published><updated>2005-05-12T10:23:30.746-04:00</updated><title type='text'>What is a Lazy Programmer anyway ?</title><content type='html'>What is a Lazy Programmer you may ask. Is it pejorative, bad, an incurable disease affecting people couple of year short to retirement? Well, good thing you ask! I define myself as a Lazy Programmer and even starting a blog promoting my "bad habit".&lt;br /&gt;But lets make something clear right away. As anything in life you can have dumb laziness and intelligent laziness. Obviously here I'm going to talk about the intelligent one.&lt;br /&gt;&lt;h3&gt;What is good laziness then ?&lt;/h3&gt;Lazy Programming is fundamentally a time managing style. Just think about the last long, boring and useless task you've done. If your a student, it's probably the last assignment you had to hand-in. You probably already know this, if you'd started working on your assignment earlier it would have been better and you would have putted a lot less effort to it. Lazy Programming is based on this simple rule :&lt;br /&gt;&lt;blockquote&gt;Do all the work you can the earlier possible.&lt;/blockquote&gt;&lt;br /&gt;Work ? Do &lt;span style="font-weight: bold;"&gt;all&lt;/span&gt; the work ? Wasn't I supposed to talk about lazy programming ? Well I've never said it was going to be easy. But, the good thing is, we are programmers, we make programs to make people life simpler, ours in particulars. What brings me to the second rule, which is the logical continuation of the first in the lazy programmer world.&lt;br /&gt;&lt;blockquote&gt;Do everything possible to not do the same work again.&lt;/blockquote&gt;&lt;br /&gt;Aah! Now &lt;span style="font-weight: bold;"&gt;that&lt;/span&gt; is cool! I hate doing the same work twice. So when I do something boring I want to make sure I won't be doing it again. So I write a batch file, a little program, anything that will automate my task the next time I want to do it again. Note that term that I used, automate, here's the golden rules of lazy programming :&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;Automate&lt;/li&gt;   &lt;li&gt;Automate&lt;/li&gt;   &lt;li&gt;Automate some more&lt;/li&gt; &lt;/ol&gt;&lt;br /&gt;Your boss always asks you to do the fill the same boring document over and over again ? Automate! You end up testing your code more then you code ? Automate! You spend countless hours building and packaging the final release of your fabulous application ? Automate! Your girlfriend (or boyfriend) has dumped and your back hurts like hell ? Get some spleep.&lt;br /&gt;&lt;br /&gt;In my next post, I'm going do talk more in details on &lt;span style="font-weight: bold;"&gt;how&lt;/span&gt; to automate and be a true lazy programmer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12831763-111586197507581780?l=macournoyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://macournoyer.blogspot.com/feeds/111586197507581780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12831763&amp;postID=111586197507581780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/111586197507581780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12831763/posts/default/111586197507581780'/><link rel='alternate' type='text/html' href='http://macournoyer.blogspot.com/2005/05/what-is-lazy-programmer-anyway.html' title='What is a Lazy Programmer anyway ?'/><author><name>MAC</name><uri>http://www.blogger.com/profile/08172338427833324296</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://files.colonies.com/UserData/114165/Mugshot/55877/170x170_5_0_1.jpg'/></author><thr:total>0</thr:total></entry></feed>
