<?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-3479332109691979736</id><updated>2012-02-16T21:28:59.047-02:00</updated><category term='multithread'/><category term='Visual Studio'/><category term='utilitário'/><category term='personal'/><category term='java'/><category term='divertido'/><category term='computador'/><category term='security'/><category term='Free Software'/><category term='wix'/><category term='book'/><category term='what is wrong'/><category term='trip'/><category term='did you know'/><category term='geral'/><category term='home'/><category term='c#'/><category term='C++'/><category term='db4o'/><category term='segurança'/><category term='powershell'/><category term='computer'/><category term='COM+'/><category term='virus'/><category term='Software'/><category term='windows'/><category term='editor textos'/><category term='programing'/><category term='fun'/><category term='livros'/><category term='dotnet'/><category term='work'/><category term='rant'/><category term='hardware'/><category term='vista'/><title type='text'>Programing Fun</title><subtitle type='html'>A blog about programing and fun :)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>93</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8189266373442978187</id><published>2012-02-08T23:23:00.003-02:00</published><updated>2012-02-08T23:23:28.461-02:00</updated><title type='text'>What's wrong with this code - fun with assembly</title><content type='html'>&lt;span class="postshown" id="1138881115455453381" style="display: inline; text-align: left;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="color: #0b5394;"&gt;Since, I'm a bit busy to create new posts I decided to cheat, translating this post from my old&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif; text-align: left;"&gt;(Portuguese)&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif; text-align: left;"&gt;blog :)&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;Before we continue let me make this clear: finding the actual issue is not terrible hard (even though it toke me some time and of course I'll keep the answer to a future post :); the interesting part is to figure it out &lt;/span&gt;&lt;b style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;why&lt;/b&gt;&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;&amp;nbsp;it works (or at least, why it works when compiled with some compilers).&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;Ok, so lets go. Take a look in the following program:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;This program accepts a number (command line) and calculates its factorial.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;I came across it while I was corrigindo a programming assignment from one of my students (yep, 14 years ago I used to work as a professor teaching C, C++, assembly and the like).&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;At that time I used&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white;"&gt;&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;Borland C++ 3.0 to compile and to my&amp;nbsp;astonishment&amp;nbsp;it worked! Last time, when I tried to compile it with VC 6 I noticed a different behavior (the application produced a wrong result) but using Visual Studio 2010 I can reproduce the same behavior as when I first compiled it with&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; color: #0b5394; font-family: Verdana, sans-serif;"&gt;Borland C++ 3.0; of course, the compiler generated some warnings which were promptly ignored!&lt;/span&gt;&lt;/div&gt;
&lt;span class="postshown" style="display: inline; text-align: left;"&gt;&lt;span style="background-color: #e0e0e0; font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 19px;"&gt;&lt;span style="color: #0b5394;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border="1" cellpadding="5" cellspacing="0" style="background-color: #e0e0e0; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; color: #333333; font-family: verdana; font-size: 13px; line-height: 19px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;tbody&gt;
&lt;tr style="background-color: #dddddd; border-bottom-width: 1px; border-left-width: 1px; border-right-width: 0px; border-top-width: 0px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px; padding-top: 4px;" valign="top"&gt;&lt;td&gt;&lt;span style="color: red; font-size: 11px;"&gt;&lt;b&gt;Warning&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign="top"&gt;&lt;td&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span style="font-size: 11px;"&gt;To ignore compiler warnings is not such a smart idea and of course I'm not recommending you should do it!&lt;br /&gt;&lt;br /&gt;Pelo contrário; check all compiler&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 11px;"&gt;warnings in your code and understand the reasons leading the compiler to complain.Do not assume that the compiler has bugs (after all, Select is not broken)&lt;/span&gt;&lt;span style="font-size: 11px;"&gt;. If the conclusion is that the code generating the warning is legitimate I suggest you to try to change it, or, in the worst case, disable&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 11px;"&gt;the specific warning (via #pragma warning) just in the parts of the code that is producing the warning.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;int fat(int n)
{
    if (n == 1)
        return 1;
    else
        n = n * fat(n - 1);
}

int main(int argc, char *argv[])
{
     int n = argc &amp;gt; 1 ? atoi(argv[1]) : 5;
     int i = fat(n);
   
     return printf("Fat(%d): %d", n, i);
 }
&lt;/pre&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif; text-align: left;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #0b5394; font-family: Verdana, sans-serif; text-align: left;"&gt;Have you figured it out already?&lt;/span&gt;&lt;br /&gt;
&lt;span class="postshown" style="display: inline; text-align: left;"&gt;&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="postshown" style="display: inline; text-align: left;"&gt;&lt;span style="color: #0b5394; font-family: Verdana, sans-serif;"&gt;See you!&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8189266373442978187?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8189266373442978187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8189266373442978187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8189266373442978187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8189266373442978187'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2012/02/whats-wrong-with-this-code-fun-with.html' title='What&apos;s wrong with this code - fun with assembly'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8600641515221988696</id><published>2012-01-26T23:01:00.000-02:00</published><updated>2012-01-26T23:03:48.662-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='Free Software'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Interfaces in IL</title><content type='html'>&lt;span style="color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;After&lt;/span&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt; a long period of silence, today I've something interesting (IMHO) (and the time to, of course :)) to post about.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Last night I was reading a &lt;a href="http://www.amazon.com/Expert-NET-Assembler-Serge-Lidin/dp/1590596463/ref=pd_vtp_b_7"&gt;book about MS IL&lt;/a&gt; (&lt;a href="http://en.wikipedia.org/wiki/Common_Intermediate_Language"&gt;intermediate language&lt;/a&gt;) when suddenly I stumbled with an intriguing paragraph about interfaces. The "&lt;i&gt;intriguing&lt;/i&gt;" part motivated me to write a sample application to test whenever that would be valid in C# or not. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Given the following NUnit test, how can you define a type "IAmAnInterface" so it can pass ?&lt;/span&gt;&lt;br /&gt;
&lt;pre class="brush: csharp"&gt; 
using System;
using NUnit.Framework;

namespace Testing
{
 
 [TestFixture]
 public class BlobPost_Interface
 {
  [Test]
  public void Test()
  {
   var type = typeof(IAmAnInterface);
   Assert.That(type.IsInterface, Is.True);

   var field = type.GetField("fld");
   Console.WriteLine("    Field: {0}", field);
   Assert.That(field, Is.Not.Null);

   field.SetValue(null, 10);

   Assert.That(field.GetValue(null), Is.EqualTo(10));
  }
 }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Just in case you missed it, the crux here, is that the test expects &lt;i&gt;IAmAnInterface&lt;/i&gt; to be an interface &lt;b&gt;and&lt;/b&gt; (and here lies the issue) to define a &lt;/span&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;(static) &lt;/span&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;field!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;How come? An interface with fields?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Well, it happens that the C# specification (and the compiler also!) disallows such constructs, but they are actually valid in IL (as described in &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-335.htm"&gt;Common Language Infrastructure&lt;/a&gt; ,session 8.9.4)!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;So, in order to get this to work I simply created an assembly in IL (actually I disassembled an assembly written in C# and changed it) that looks like: &lt;/span&gt;&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         
  .ver 4:0:0:0
}
.assembly TestString
{
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
                                                                                                             63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       // ceptionThrows.
  .hash algorithm 0x00008004
  .ver 0:0:0:0
}
.module TestString.dll
// MVID: {64C46A76-194E-4608-A835-B41B179AF4FA}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003       // WINDOWS_CUI
.corflags 0x00000001    //  ILONLY
// Image base: 0x004D0000


// =============== CLASS MEMBERS DECLARATION ===================

.class interface public abstract auto ansi IAmAnInterface
{
  .method public hidebysig newslot specialname abstract virtual 
          instance int32  get_value() cil managed
  {
  } // end of method IAmAnInterface::get_value
  
  .field public static int32 fld

} // end of class IAmAnInterface


// =============================================================
&lt;/pre&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;and referenced it in my C# test application inside VS2010 which happily showed the field in &lt;a href="http://en.wikipedia.org/wiki/IntelliSense"&gt;IntelliSense&lt;/a&gt; but gave an error when I tried to compile the code (so I resorted to reflection, and it worked) (see picture below):&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-LNFjpG6C3pk/TyH3t9saOAI/AAAAAAAAC3w/sIvUVlUeLXU/s1600/FieldInInterfaceIntelesense.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-LNFjpG6C3pk/TyH3t9saOAI/AAAAAAAAC3w/sIvUVlUeLXU/s1600/FieldInInterfaceIntelesense.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;What do you think?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Best&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8600641515221988696?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8600641515221988696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8600641515221988696' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8600641515221988696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8600641515221988696'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2012/01/interfaces-in-il.html' title='Interfaces in IL'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-LNFjpG6C3pk/TyH3t9saOAI/AAAAAAAAC3w/sIvUVlUeLXU/s72-c/FieldInInterfaceIntelesense.jpg' height='72' width='72'/><thr:total>2</thr:total><georss:featurename>R. João Wyclif, 382-528 - Leonor, Londrina - Paraná, 86050-450, Brazil</georss:featurename><georss:point>-23.333303191554165 -51.17500305175781</georss:point><georss:box>-23.391622191554166 -51.25396705175781 -23.274984191554164 -51.09603905175781</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2940163866180594071</id><published>2011-03-30T23:14:00.001-03:00</published><updated>2012-01-26T11:42:38.890-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Do as I say, not as I do</title><content type='html'>&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;It has been a long time since my last post ...&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;As usual I have been busy taking care of my kids (if you have two kids you have an idea how much time they require :)), studying, playing with may pet projects and what not.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;But something happened and motivated me to stay late and to write this post. To make a long history short, yesterday night I was working on one of my pet projects, &lt;a href="http://programing-fun.blogspot.com/2009/03/automating-skype-through-com.html"&gt;binboo&lt;/a&gt;&amp;nbsp;(basically a skype plugin that I and other team mates use to add/update issues on our bug tracker) and I spot some code that looked pretty useless to me.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Since I have unit tests (yeah, some of you would argue that strictly speeking&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;they are not&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&amp;nbsp;unit tests, but anyway, I have automated tests in place) I was not scared of changing the code, so in the next step I just removed the &lt;i&gt;"dead"&lt;/i&gt; code running the tests after that. To my&amp;nbsp;happiness, I saw only green in the unit test runner screen.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Perfect, I though, proud of myself.&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;After that I just&amp;nbsp;committed&amp;nbsp;my changes and went (happy) to bed only to be&amp;nbsp;embarrassed&amp;nbsp;in our meeting today with an ugly, idiot,&amp;nbsp;ridiculous&amp;nbsp;bug in the exact same code I have touched yesterday. It became clear to me that my unit test coverage can be improved.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;After my normal work day I just loaded the project in VS to look at the specific test case that should have failed due to my change but, to my surprise, I had no test case for this particular scenario.&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Hum... stupid developer.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Lesson learned, I have written a test case before reverting the changes (and of course, I'll study the code to understand why it is required after all).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Ok, let me get back to my other pet projects.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Have fun!&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #4c1130; font-family: Verdana, sans-serif;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2940163866180594071?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2940163866180594071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2940163866180594071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2940163866180594071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2940163866180594071'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2011/03/do-as-i-say-not-as-i-do.html' title='Do as I say, not as I do'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2786391328863738329</id><published>2010-12-29T00:32:00.003-02:00</published><updated>2010-12-29T00:43:01.038-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='what is wrong'/><title type='text'>What's wrong with this code (Part XII)</title><content type='html'>&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;In the &lt;a href="http://programing-fun.blogspot.com/2009/07/whats-wrong-with-this-codepart-xi.html"&gt;last post&lt;/a&gt; in this series (&lt;i&gt;"what's wrong with this code"&lt;/i&gt;) we discussed how db4o's reference system remembers which objects have been stored / retrieved.&lt;br /&gt;
&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
In this post I'll show you another piece of code that doesn't always work as the developer expects:&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;class User
{
   public string Name;
   public User Manager;
   public IList Addresses;

   public User(string name, User manager)
   {
      Name = name;
      Manager = manager;
   }
}

class Address
{
   public string Street;

   public Address(string street)
   {
      Street = street;
   }
}  


using (var db = Db4oEmbedded.OpenFile(databaseFileName))
{
   List&amp;ltAddress&amp;gt addrs = new List();
   addrs.Add(new Address("Street1"));
   addrs.Add(new Address("Street2"));
   User fooManager = new User("Foo") { Addresses = addrs };

   User fooBarManager = new User("FooBar", fooManager);
   User barManager = new User("John Doe",  fooBarManager);
   User user = new User("Adriano",  barManager);
    
   db.Store(user);
}

using (var db = Db4oEmbedded.OpenFile(databaseFileName))
{
   var query = db.Query();
   query.Constrain(typeof (User));
   query.Descend("Name").Constrain("Adriano");
   
   User user = (User) query.Execute()[0];
   Console.WriteLine(user.Manager.Manager.Manager.Addresses[0].Street);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;Can you see the problem? No, I am not talking about &lt;a href="http://en.wikipedia.org/wiki/Law_of_Demeter"&gt;Law of Demeter&lt;/a&gt; "&lt;i&gt;violation&lt;/i&gt;" :) (By the way, if you are interested in this subject you can find a nice discussion &lt;a href="http://haacked.com/archive/2009/07/14/law-of-demeter-dot-counting.aspx"&gt;here&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
Again, if you have been working with db4o for some time I am sure you already spent some time debugging this kind of issue.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;As always, the answer comes in a future post.&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
Have fun!&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
Adriano&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2786391328863738329?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2786391328863738329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2786391328863738329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2786391328863738329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2786391328863738329'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/07/whats-wrong-with-this-code-part-xii.html' title='What&apos;s wrong with this code (Part XII)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4521828928622992599</id><published>2010-05-16T12:08:00.000-03:00</published><updated>2010-05-16T12:08:16.363-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Installing Nokia SDK on a Windows 7 box</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;Hi&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;As you can figure out based on the post title, I want to start to play with Mobile development using Java (no, I haven't gave up on .Net :); it just happens that I own an N95 and I want to write a little application for it&lt;sup&gt;1&lt;/sup&gt;).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;After downloading latest Nokia SDK I &amp;nbsp;tried to follow the steps in the documentation (IDEs for Java Development) but I just get the infamous error:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;Cannot start Series 60 SDK for MIDP&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;while importing the device.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;Thanks God, it was just a matter of "googling" for the error message and I got the following page&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;a href="http://wiki.urban.cens.ucla.edu/index.php?title=Nokia's_Java_Platform_(Carbide.j)"&gt;http://wiki.urban.cens.ucla.edu/index.php?title=Nokia's_Java_Platform_(Carbide.j)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;which fixed the issue (I just search in my hard disks and found 5 copies of the offending DLL).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;Well, since my daughter has just born I guess this project will run really&amp;nbsp;slowly but I hope it will not stall :)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #660000; font-family: Georgia, 'Times New Roman', serif;"&gt;Best&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #660000; font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #660000; font-family: Georgia, 'Times New Roman', serif;"&gt;Adriano&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #660000; font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #660000; font-family: Georgia, 'Times New Roman', serif;"&gt;1. I am planning to write an application that stores information about gym&amp;nbsp;exercises in a db4o database.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4521828928622992599?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4521828928622992599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4521828928622992599' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4521828928622992599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4521828928622992599'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2010/05/installing-nokia-sdk-on-windows-7-box.html' title='Installing Nokia SDK on a Windows 7 box'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-3448740229729956953</id><published>2010-05-11T20:04:00.000-03:00</published><updated>2010-05-11T20:04:47.103-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Project deployed</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;Hi&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;In the latest days I've been really busy with the deployment of the project&amp;nbsp;formerly&amp;nbsp;known as "&lt;b&gt;baby 2.0&lt;/b&gt;" (by the way, the official project name is &lt;i&gt;Gabriela&lt;/i&gt;).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;Last&amp;nbsp;Thursday (May, 6) my daughter was born with 4.1 Kg and 52 cm. Of course my whole family if very happy and I an my wife are very proud :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="color: #741b47;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;Following you can see some pictures of her:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh5.ggpht.com/_JjJXM4oi98I/S-nhCft21lI/AAAAAAAABWk/Dv2yd9LZTjg/s1600/P1050066.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh5.ggpht.com/_JjJXM4oi98I/S-nhCft21lI/AAAAAAAABWk/Dv2yd9LZTjg/s320/P1050066.JPG" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://lh4.ggpht.com/_JjJXM4oi98I/S-nhTtEgZkI/AAAAAAAABWs/tv2Qnp6FRkQ/s1600/P1050129.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh4.ggpht.com/_JjJXM4oi98I/S-nhTtEgZkI/AAAAAAAABWs/tv2Qnp6FRkQ/s320/P1050129.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh4.ggpht.com/_JjJXM4oi98I/S-nhS-ljgLI/AAAAAAAABWo/Yc8EAZWmrzo/s1600/P1050120.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh4.ggpht.com/_JjJXM4oi98I/S-nhS-ljgLI/AAAAAAAABWo/Yc8EAZWmrzo/s320/P1050120.JPG" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://lh4.ggpht.com/_JjJXM4oi98I/S-nhUbrFMxI/AAAAAAAABWw/itPfRGl2Gaw/s1600/P1050144.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh4.ggpht.com/_JjJXM4oi98I/S-nhUbrFMxI/AAAAAAAABWw/itPfRGl2Gaw/s320/P1050144.JPG" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://lh6.ggpht.com/_JjJXM4oi98I/S-nhU8BZveI/AAAAAAAABW0/GyV4nn5FN6E/s1600/P1050148.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_JjJXM4oi98I/S-nhU8BZveI/AAAAAAAABW0/GyV4nn5FN6E/s320/P1050148.JPG" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://lh6.ggpht.com/_JjJXM4oi98I/S-nhVhmO-5I/AAAAAAAABW4/1UhUXwkTMQQ/s1600/P1040991.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_JjJXM4oi98I/S-nhVhmO-5I/AAAAAAAABW4/1UhUXwkTMQQ/s320/P1040991.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;That's it for now (I'm gonna to sleep :))&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;Best&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;Adriano&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #741b47; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-3448740229729956953?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/3448740229729956953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=3448740229729956953' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3448740229729956953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3448740229729956953'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2010/05/project-deployed.html' title='Project deployed'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_JjJXM4oi98I/S-nhCft21lI/AAAAAAAABWk/Dv2yd9LZTjg/s72-c/P1050066.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4065431620994049893</id><published>2010-03-18T20:34:00.000-03:00</published><updated>2010-03-18T20:34:54.513-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>I am not dead. Not yet</title><content type='html'>&lt;div style="color: #660000; text-align: center;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Warning: Personal content ahead&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;I can hear someone screaming already: but it really looked like you have died! :)&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Well, you know, I have been having to much &lt;strike&gt;work&lt;/strike&gt; fun lately.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Also, more or less 7 months ago, I and my wife decided to start a new project, &lt;b&gt;daughter 2.0&lt;/b&gt;, and since then we have been working hard to get the environment ready to the deployment (there are too many details in such projects deployment).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;At this stage we can say that the project is growing as expected and that we are looking forward to the deployment date.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;As always we expect the maintenance phase to consume much more time/resources than the development phase, but we are more than willing to do the required investment so the project will be able to meet its goals; after all, this is our baby :).&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Last but not least, as you can see, I am actually alive :). So, bear with me! As soon as I get some spare time I'll do some more posts!&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
Good to get back to posting!&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;See you all.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="color: #20124d;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4065431620994049893?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4065431620994049893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4065431620994049893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4065431620994049893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4065431620994049893'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2010/03/i-am-not-dead-not-yet.html' title='I am not dead. Not yet'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7207959485784573640</id><published>2009-08-10T17:35:00.002-03:00</published><updated>2009-08-10T17:37:14.728-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='did you know'/><title type='text'>Did you know ? (Part I) - Executing sub-queries</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana, sans-serif;"&gt;With this post I want to start a series of "Did you know?" regarding programing related topics and db4o features / usage patterns that may not be well known.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana, sans-serif;"&gt;As the first one, take a look in the following code:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt; &lt;br /&gt;
&lt;pre class="brush: csharp"&gt;class Address
{
  public Address(string streetName)
  {
     StreetName = streetName;
  }

  public string StreetName { get; set; }

  public override string ToString()
  {
     return "Address: " + StreetName;
  }
}

class Person
{
   public Person(string name, Address address)
   {
       Name = name;
      _address = address;
   }

   public Address Address
   {
      get { return _address; }
      set { _address = value; }
   }

   public string Name { get; set;}

   public override string ToString()
   {
      return "Person: " + Name;
   }
   private Address _address;
}

using (var db = Db4oEmbedded.OpenFile(databaseFileName))
{
   db.Store(new Person("Adriano", new Address("You know where I live")));
   db.Store(new Person("Sulivan", new Address("Monstropolis")));
   db.Store(new Person("Mike", new Address("Who cares?")));
   db.Store(new Address("Foo address"));

   IQuery q =  db.Query();
   q.Constrain(typeof(Person));
   IQuery descendantQuery = q.Descend("_address");
   
   foreach(var result in descendantQuery.Execute())
   {
      Console.WriteLine(result);
   }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana, sans-serif;"&gt;What do you think will be the result?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Well, it will return all &lt;b&gt;addresses&lt;/b&gt; objects that &lt;b&gt;have&lt;/b&gt; a Person as a parent, i.e, &lt;span style="font-style: italic;"&gt;"foo address" &lt;/span&gt;will not be retrieved/shown!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;You can even specify constrains in both queries (getting the addresses for persons with a specific name!).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana, sans-serif;"&gt;Note that this does not work for fields with value type semantics (basically any primitive value, enums [in .Net], string, etc.).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Do you have any db4o topic that, in your opinion, is commonly misunderstood and you would like to discuss? Please, let us know :) &lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Have fun!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Adriano  &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7207959485784573640?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7207959485784573640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7207959485784573640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7207959485784573640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7207959485784573640'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/08/did-you-know-part-i-executing-sub.html' title='Did you know ? (Part I) - Executing sub-queries'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-792134220851581321</id><published>2009-07-25T14:10:00.002-03:00</published><updated>2009-07-25T14:12:42.263-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><title type='text'>What's wrong with this code(Part XI)  - Answer</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;In &lt;a href="http://programing-fun.blogspot.com/2009/07/whats-wrong-with-this-codepart-xi.html"&gt;this post&lt;/a&gt; I presented the following code.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using Db4objects.Db4o;
using Db4objects.Db4o.Linq;
using System.Linq;

class Item
{
public string Name { get; set; }
public Item Father { get; set ; }
}

public class Test
{
 private const string DatabaseFile = "wwwtc1.odb";
 private static void Main()
 {
     Item item1 = new Item { Name = "Adriano" };
     using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
     {
         db.Store(item1);
     }

     using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
     {
         Item item2 = new Item {Name = "Carol",  Father = item1 };
         db.Store(item2);
     }
 }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;And asked what was wrong with it (and commenter "tehlike"&lt;/span&gt; &lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;got it :).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; In line 20 we close the database (technically, the using statement will call &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;IDisposable.Dispose()&lt;/span&gt; method on the object container which in turn will close it), reopen it at line 22 and finally add a new object (&lt;span style="font-style: italic;"&gt;item2&lt;/span&gt;) at line 25. &lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Take a closer look in the program and you'll see that &lt;i&gt;item2&lt;/i&gt; references &lt;span style="font-style: italic;"&gt;item1&lt;/span&gt; which was stored in the database previously.&lt;/span&gt; &lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; As the documentation states (&lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Basic_Concepts/Object_Identity/Weak_References"&gt;here&lt;/a&gt; and &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Basic_Concepts/Object_Identity/Unique_Identity_Concept"&gt;here&lt;/a&gt;), db4o uses a reference system to "memorize" which objects are known to be stored in the database (relying on &lt;span style="font-style: italic;"&gt;object identity&lt;/span&gt; when checking if a given object is already present in this reference system).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;When a database is opened its reference system is empty, so when storing &lt;span style="font-style: italic;"&gt;item2&lt;/span&gt; db4o will store &lt;span style="font-style: italic;"&gt;item1&lt;/span&gt; again (after all we re-opened the database, so there are no objects in the reference system and both objects are considered as "new", i.e, need to be inserted into the database),&amp;nbsp; i.e, now we have 2 instances of class Item with the same contents in the database.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;What can a developer do to avoid this behavior? Easy, just let the just opened object container know that &lt;i&gt;item1&lt;/i&gt; has already been persisted by retrieving it before &lt;span style="font-style: italic;"&gt;referencing&lt;/span&gt; it from &lt;span style="font-style: italic;"&gt;item2&lt;/span&gt; :)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using Db4objects.Db4o;
using Db4objects.Db4o.Linq;
using System.Linq;

class Item
{
  public string Name { get; set; }
  public Item Father { get; set ; }
}

public class Test
{
 private const string DatabaseFile = "wwwtc1.odb";
 private static void Main()
 {
     Item item1 = new Item { Name = "Adriano" };
     using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
     {
         db.Store(item1);
     }

     using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
     {
         item1 = (from Person p in db where p.Name == "Adriano").Single();
         Item item2 = new Item {Name = "Carol",  Father = item1 };
         db.Store(item2);
     }
 }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Another possible solution (with less performance impact) would be to not close/reopen the database so &lt;span style="font-style: italic;"&gt;item1&lt;/span&gt; would be kept in the reference system and db4o would understand that it does not need to store this object again.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using Db4objects.Db4o;
using Db4objects.Db4o.Linq;
using System.Linq;

class Item
{
  public string Name { get; set; }
  public Item Father { get; set ; }
}

public class Test
{
  private const string DatabaseFile = "wwwtc1.odb";
  private static void Main()
  {
     Item item1 = new Item { Name = "Adriano" };
     using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
     {
         db.Store(item1);
         Item item2 = new Item {Name = "Carol",  Father = item1 };
         db.Store(item2);
     }
  }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Have fun!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Adriano &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-792134220851581321?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/792134220851581321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=792134220851581321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/792134220851581321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/792134220851581321'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/07/whats-wrong-with-this-codepart-xi_25.html' title='What&apos;s wrong with this code(Part XI)  - Answer'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5700353903836212693</id><published>2009-07-16T15:34:00.003-03:00</published><updated>2009-07-18T15:58:20.245-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='what is wrong'/><title type='text'>What's wrong with this code(Part XI) ?</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Since I joined &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; I'm actively following our &lt;a href="http://developer.db4o.com/forums/default.aspx"&gt;forums&lt;/a&gt; and trying to help developers to get their questions / issues answered.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Starting with this post I want to present the most recurring topics &lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;(don't know exactly how many) &lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;in the format of "&lt;i&gt;What's wrong with this code"&lt;/i&gt;. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;But before we start you may be wondering where are the other parts (since this is titled as Part XI, where are parts from &lt;b&gt;I&lt;/b&gt; to &lt;b&gt;X&lt;/b&gt;). Well, they do exists in the portuguese posts (titled as "O que esta errado com este código (Parte ?)") so I decided to continue with the numbering schema ;)&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Ok, for this first one, take a look in the following code:&lt;/span&gt;&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;using Db4objects.Db4o;
using Db4objects.Db4o.Linq;
using System.Linq;

class Item 
{
 public string Name { get; set; }
 public Item Father { get; set ; }
}

public class Test
{
    private const string DatabaseFile = "wwwtc1.odb";
    private static void Main()
    {
        Item item1 = new Item { Name = "Adriano" };
        using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
        {
           db.Store(item1);
        }
  
        using (var db = Db4oEmbedded.OpenFile(DatabaseFile))
        {
          Item item2 = new Item {Name = "Carol",  Father = item1 };
          db.Store(item2);
        }  
    }
}
&lt;/pre&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;If you have done some work with db4o you probably will easily spot the problem.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;I'll provide the answer in a future post.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Have fun!&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5700353903836212693?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5700353903836212693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5700353903836212693' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5700353903836212693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5700353903836212693'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/07/whats-wrong-with-this-codepart-xi.html' title='What&apos;s wrong with this code(Part XI) ?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-3610990916003976576</id><published>2009-06-20T10:27:00.002-03:00</published><updated>2009-06-20T22:35:04.580-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='trip'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Going to ICOODB</title><content type='html'>&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;Hi.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;Next week I'll attend the &lt;a href="http://www.icoodb2009.org/"&gt;second international conference on object databases&lt;/a&gt; in Zürich. Woow! &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;I am sure it will be really amazing moments; I'll have the chance to meet db4o fellows face to face again, to attend to interesting talks, to talk to db4o community members and db4o enthusiasts! Since most db4o team members will meet at Zurich we're taking the chance to discuss db4o directions also.&amp;nbsp; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;Of course, visiting another country (even though being a work trip) and getting in touch with a different culture will be really a great experience.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;My friends knows how much I like chocolates, so I am sure I am going to get some extra weight :)&lt;/span&gt;&lt;span style="border-collapse: separate; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"&gt;&lt;span style="color: #660000; font-family: Verdana; font-size: 13px; line-height: 19px; text-align: left;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;The not so nice part is that I'll have a 14 hours flight from Brazil to Switzerland and I must admit that I am a bit anxious with the latest flight news (the interesting thing is that I am almost sure I'll have some nice live pair programing session with my good friend &lt;a href="http://docs.codehaus.org/display/%7Ebamboo"&gt;Rodrigo&lt;/a&gt; while we wait for our flight). &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;The worst part is to be far from my wife / daughter (I'll miss my daughter's school presentation).&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;For those that I'll meet at Zurich, see you soon. For everyone else, see you in this blog :)&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;Best&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #660000; font-family: Verdana,sans-serif;"&gt;Adriano &lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-3610990916003976576?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/3610990916003976576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=3610990916003976576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3610990916003976576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3610990916003976576'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/06/going-to-iccodb.html' title='Going to ICOODB'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1489203303774410350</id><published>2009-06-19T12:03:00.001-03:00</published><updated>2009-06-19T12:28:21.048-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Free Software'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Hexadecimal Control Viewer DotNet</title><content type='html'>&lt;span style="color: #663333; font-family: trebuchet ms;"&gt; Hi!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Some time ago I started developing a .Net &lt;a href="http://serialwizard.sourceforge.net/"&gt;application&lt;/a&gt; that requires a control to display hexadecimal values; &lt;/span&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;considering &lt;/span&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;that I could not find a suitable one (and also, that I do suffer for the &lt;a href="http://en.wikipedia.org/wiki/Not_Invented_Here"&gt;NIH&lt;/a&gt; syndrome) I decided to write one myself.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;After some time developing the application I lost interest (since I moved jobs and the main goal of the application was to make my previous job easier) and now it is kind of abandoned but I think that the hexadecimal control may be handy for some developers.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: trebuchet ms;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: trebuchet ms;"&gt; Here is a list of this control's main features:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Find  &lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Print / Print Preview &lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt; Ranges: It's possible to specify that some byte ranges should be displayed with a specific color for instance &lt;/span&gt;&lt;/li&gt;
&lt;span style="color: #663333;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;li&gt;&lt;span style="color: #663333;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;Selection&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Cut/Past &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Since the application is released under an open source license anyone can grab the sources, or, if you are interested I can add you as a developer on source forge!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Best&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #663333; font-family: trebuchet ms;"&gt;Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1489203303774410350?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1489203303774410350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1489203303774410350' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1489203303774410350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1489203303774410350'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/06/hexadecimal-control-view-dotnet.html' title='Hexadecimal Control Viewer DotNet'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6313451052121830647</id><published>2009-06-18T23:29:00.065-03:00</published><updated>2009-06-18T23:53:19.502-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='COM+'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Elementary my dear Watson</title><content type='html'>&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;In my &lt;a href="http://programing-fun.blogspot.com/2009/06/another-day-in-developers-life.html"&gt;last pos&lt;/a&gt;t I was talking about some issues I found while trying to automate the process of launching&amp;nbsp; a web browser, navigating to a specific page and grabbing some results.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;I do have a bunch of stickers with sayings: "&lt;i&gt;Works on My Machine (tm)&lt;/i&gt;" but this time I could not even use one of them since even in my machine it refused to work :(. So, the goal of this post is to explain the reasons I got so much pain...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;Since an image speak for 1000 words, here it is:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/SjrqM_KIKvI/AAAAAAAAAfo/8qzO6ioqtYI/s1600-h/Process.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_JjJXM4oi98I/SjrqM_KIKvI/AAAAAAAAAfo/8qzO6ioqtYI/s400/Process.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;I am sure you already got it. As you can see I am running Vista x64 on my machine and, as explained &lt;a href="http://support.microsoft.com/kb/896457"&gt;here&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/ie/archive/2005/01/12/351808.aspx"&gt;here&lt;/a&gt;, when launching IE through &lt;i&gt;Quick Launcher&lt;/i&gt;, the 32 bits version is the one that gets launched; by the other hand, when started through COM the &lt;i&gt;bitness&lt;/i&gt; of the launcher defines which IE version gets started (32 or 64 bits).&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;In my case &lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;(remember, my first approach was to &lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;use a JScript script to automate IE) &lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;I was trying to start it from Windows console application (cmd.exe) that happens to be a 64 bit application&lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;. That's explain why IE insisted to offer me to install Silverlight; on IE 64 bit version I had not installed it (actually, &lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;u&lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;nfortunately, as of today, Silverlight has &lt;/span&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;support for this platform).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;The next step was to figure out why my C# application (the one that hosts the &lt;a href="http://msdn.microsoft.com/en-us/library/aa752040%28VS.85%29.aspx"&gt;&lt;i&gt;WebBrowser&lt;/i&gt;&lt;/a&gt; control) was failing with the same symptoms. To be sincere, since I had already faced similar issues when using COM components on .Net applications in x64 machines, this one was a lot easier: Again, as explained &lt;a href="http://msdn.microsoft.com/en-us/library/zekwfyz4%28VS.80%29.aspx"&gt;here&lt;/a&gt;, by default VS sets your application to run on whichever processor architecture (regarding to bitness) you throw at it, i.e, it sets the &lt;i&gt;"target platform"&lt;/i&gt; to &lt;i&gt;"Any CPU"&lt;/i&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/Sjr31AVvw5I/AAAAAAAAAfw/0OnsV6oO6cg/s1600-h/TargetPlatform.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_JjJXM4oi98I/Sjr31AVvw5I/AAAAAAAAAfw/0OnsV6oO6cg/s400/TargetPlatform.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;That's mean that in a 64 bit machine (like mine) this application will run in 64 bit CLR, hence IE x64 being launched! Peace of cake :). All I had to do was to set this configuration to "&lt;i&gt;x86"&lt;/i&gt;. Finally my day would be a little less frustrating than I anticipated it to be.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;Really fun, don't you agree?&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;For the next post I am planing to continue on this subject: 32 x 64 bits developer's pitfalls.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;Have fun!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #274e13; font-family: Verdana,sans-serif;"&gt;Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6313451052121830647?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6313451052121830647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6313451052121830647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6313451052121830647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6313451052121830647'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/06/x.html' title='Elementary my dear Watson'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JjJXM4oi98I/SjrqM_KIKvI/AAAAAAAAAfo/8qzO6ioqtYI/s72-c/Process.png' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Londrina - PR, Brazil</georss:featurename><georss:point>-23.28600612474714 -51.173415184020996</georss:point><georss:box>-23.28723812474714 -51.175239184020995 -23.284774124747138 -51.171591184021</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-44749794763292451</id><published>2009-06-15T18:12:00.014-03:00</published><updated>2009-07-17T01:04:54.803-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Another day in a developer's life....</title><content type='html'>&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;Yesterday was a frustrating day. By the morning I started to work (pairing with a really smart friend) on an apparently &lt;i&gt;simple&lt;/i&gt; task: to automate the process of starting an internet explorer (ie) instance, navigate to a specific page stored on the local machine, wait for some processing to finish (notified by the page) and grab the results.&lt;/span&gt;&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;
&lt;/span&gt;
&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;Having some years of experience with Microsoft technologies, mainly developing COM components, and aimed with (&lt;i&gt;lack of&lt;/i&gt;) humbleness I started to write a jscript script to drive IE through automation, after all how hard could that that be? &lt;/span&gt;&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;

Indeed, the first part was really easy:&lt;/span&gt;
&lt;pre class="brush: js"&gt;
var browser = new ActiveXObject("InternetExplorer.Application");
browser.Visible = true;
browser.Navigate("http://programing-fun.blogspot.com");
&lt;/pre&gt;
&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt; &lt;/span&gt;&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;I run the just finished prototype and the browser opened, navigating to the desired page. I was really happy (and thinking how I am smart). So far, so good. &lt;/span&gt;

&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;But things started to get weird really fast. Even having a good grasp on IE's object model (I don't &lt;/span&gt;&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;know it by heart) I failed miserably to retrieve a reference to a page element:&lt;/span&gt;
&lt;pre class="brush: js"&gt;
var browser = new ActiveXObject("InternetExplorer.Application");
browser.Visible = true;
browser.Navigate("http://programing-fun.blogspot.com");
while (browser.Busy) {
WScript.Sleep(10);
}
var element = browser.Document.getElementById("some-id");
&lt;/pre&gt;
&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;After some time we decided to give up on using jscript and switched to C#, so I created a Windows Form application to host &lt;i&gt;WebBrower&lt;/i&gt; control (hum... someone said IE?) but we kept seeing strange behavior. For instance, the page we were trying to load hosts a Silverlight application but IE insisted that we should install Silverlight; WTF? I do have Silverlight installed !!!
&lt;/span&gt;
&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;Well, at that time I was not felling so smart anymore; and since it was almost lunch time we decided to continue latter. &lt;/span&gt;

&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;When I got back to work I was determined to get it working so I did what any reasonable developer does in such situations: I decided to do something else :) and I ended up watching a screencast about how to improve the experience for users that don't have Silverlight installed; hum.. interesting. The presenter suggested to disable the Silverlight add-on (instead of uninstalling it). &lt;/span&gt;

&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;Great! Maybe the add-on was just disabled (due to some stricter security configuration when launching IE through automation). Why I haven't thought about this before? &lt;/span&gt;

&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;I started my application (C#) as fast as I could and a new browser appeared (in the same way as before), then I went to the add-on configuration dialog and voilà! There was no Silverlight add-on listed (how could I enable/disable it?) &lt;/span&gt;

&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;So the problem was that, for some reason, IE was not even considering Silverlight add-on to be installed (but that was what IE was trying to say me all the time no?). Then I launched IE manually (clicking on its icon on desktop) and opened the same add-on configuration dialog. This time I could see that Silverlight (and a lot of other add-ons) were installed and enabled.&lt;/span&gt;
&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt; &lt;/span&gt;
&lt;div  style="color:yellow;"&gt;&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;Well, now I was starting to fell better :). But I still had to understand why I was getting different behaviors depending on how I launched IE. After some head screeching followed by some thinking and some extra searches I do figured out the issue, but that's the subject of the next post :)
&lt;/span&gt;
&lt;span style="color: rgb(39, 78, 19);font-family:Verdana,sans-serif;" &gt;Have fun!

Adriano
&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-44749794763292451?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/44749794763292451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=44749794763292451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/44749794763292451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/44749794763292451'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/06/another-day-in-developers-life.html' title='Another day in a developer&apos;s life....'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6479076658702244633</id><published>2009-06-13T10:58:00.002-03:00</published><updated>2009-06-15T08:29:32.323-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>On test writing discipline and gains</title><content type='html'>&lt;div style="color: #990000; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;div style="color: #351c75; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Hi.&lt;/div&gt;&lt;div style="color: #351c75; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;
Let's start this post with the usual disclaimers :). Actually, I have only one: Everything discussed here is related to my own experiences with unit testing and/or TDD in the last years.&lt;/div&gt;&lt;div style="color: #351c75; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;
In fact, I have been in contact with some sort of more formal testing procedures for some time now; in the early days it was more a desperate act trying to avoid SDD (sorry if I use potentially valid acronyms here), i.e, &lt;i&gt;'Shame Driven Development'&lt;/i&gt;. Since most of my code have no tests at all (other than the usual driver application that covered only the changes being applyied at the moment), it was not uncommon to have some developer, tester or even final users approaching me and complaining about some broken feature in a just released version of the module I've worked on (whence the &lt;i&gt;shame&lt;/i&gt;). Of course the usual problems of lacking good tests were plain visible: resistance to refactor / change code, lack of confidence whether a piece of code was good enough or not, no sensible metric to declare completeness, regressions all over the place, etc.)&lt;br /&gt;
&lt;br /&gt;
After understanding (thanks to my coach :) the importance of having a well developed ( one that values readability,  maintainability, expressiveness, in the sense of making clear test intents, completeness, etc) test suite, finding the time and motivation to write such tests became easier. Even though understanding the benefits of having such tests, the urge to get something working, and so that it could be shown (to managers, clients, whoever), made me tempted to skip the test writing (remember, I haven't get into the TDD mind set yet, so tests were seen as a post development phase).&lt;br /&gt;
&lt;br /&gt;
In these early days, most of my teammates had little or no idea of the concept of unit testing and it was hard to convice them that it worths the time dedicated to write such tests. Anyway, sometimes I took the burden upon myself and wrote unit tests (even though no time was allocated to that). Of course everybody noticed that my code was less buggy and that I was less concerned aboud changing it :)&lt;br /&gt;
&lt;br /&gt;
Some years have passed and even though doing my best to start my coding sessions with a test I must admit that I am not a TDD practitioner yet, at least not in the strict sense of the definition. This becomes clear when it comes to my personal projects: most of them have no tests at all :(.&lt;br /&gt;
&lt;br /&gt;
But thanks to some embarrassing episodes (related to one of these personal projects) (and to my coach :) I had finally decided to do "&lt;i&gt;the right thing&lt;sup&gt;(tm)&lt;/sup&gt;&lt;/i&gt;" and I am writing the tests I should have writen long before :) (guess what, I've already found hidden bugs). I am even using a nice mock library for .Net called &lt;a href="http://code.google.com/p/moq/"&gt;Moq&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Of course I am starting to see the pays off of pursuing this goal :)&lt;br /&gt;
&lt;br /&gt;
Best regards (and have fun!)&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6479076658702244633?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6479076658702244633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6479076658702244633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6479076658702244633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6479076658702244633'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/06/on-test-writing-discipline-and-gains-1.html' title='On test writing discipline and gains'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6615734654191094865</id><published>2009-06-10T21:46:00.000-03:00</published><updated>2009-06-10T21:46:59.355-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>How to not ask for help on online forums</title><content type='html'>&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="color: #660000;"&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;Hi.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;Well, you know, being a software developer automatically entitles you as your "family IT manager"; there's nothing we can do about it:). That's the way life is.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;But if you are involved with an open source project chances are that you participate in that community either asking or answering questions (or both) in project's forums, mailing lists, etc. In the following lines I want to present some points I believe may make the difference between getting an effective answer or getting your question forgotten in some dirty corner in the internet. &lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;ul style="color: #0b5394;"&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Screaming for "help" like the good girls on movies is not effective.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Don't expect people to do our work. Don't get me wrong, but how many times, for whatever reason, we just cry for help without even trying to figure the problem out first?&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;A simple search in the internet before asking will at least allow us to be more precise or even eliminate the need to ask at all (chances are that someone else already faced the same problem/doubt we are facing). In the open source world there are lots of different places we can look for more information, for instance: &lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Project forums&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Bug tracker / Issue system&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Mailing lists&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Source code (why not :)&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;etc.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Focus on what you are trying to achieve not in the problem: consider the possibility that you may be attacking the wrong problem.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Provide as much context as possible:&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Calling your mechanic and saying: &lt;i&gt;"You know what? may car isn't working"&lt;/i&gt; is a little bit vague and won't be that helpful. Probably saying: &lt;i&gt;"I turn on the ignition but nothing happens"&lt;/i&gt; would be a little bit better (but not that much); providing more information, something like: &lt;i&gt;"I checked it out and I can see that I am not out of gas; also I can see that the battery looks to be ok, but when I try to start the engine nothing happens other than the indication lights turning on"&lt;/i&gt; would be much better. I think that you got the idea :)&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Environment (software version, etc)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;If you have a stack trace, please, don't hide it from your buddy.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Be friendly (in general people is earn nothing, other than personal satisfaction, by helping you). Above anything, don't behave as if the person trying to help you had the obligation to provide you an answer/fix.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Reproducible behavior is a lot easier to debug / fix, so, if possible, prepare the smallest test case that triggers the problem. Even better, if you really want to rise the chances of people helping you, use the same test framework used in the project.&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;I do believe these &lt;i&gt;"principles"&lt;/i&gt; apply equally well whenever you are about to submit a new bug/issue report to your favorite project bug/issue track system. I mean, I doubt that filling such systems with duplicated and/or misleading, inconsistent, etc. entries will help anyone in making a better project.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;So, next time we fell compelled to ask for help let's refrain ourselves and first try a little bit harder; I am a fierce believer that this is the best way to learn (trying to fix it ourselves instead of just asking); as a side benefit we'll not disturb other developers letting them to use their time to improve the project&amp;nbsp; instead of scanning / answering questions that was already answered before.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;Last but not least, I don't want to give the false impression that I am against asking for help; I just think that we ought to leave this approach as our last resort, i.e, to situations where it's really not possible to figure out the problem alone (for instance, when a specific behavior/API/whatever is not documented and no information can be found, at least not easily found).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;Of course this is not an exhaustive list, so, feel free to comment :) &amp;nbsp; &lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;Best regards (and lets have fun !)&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;span style="font-family: verdana;"&gt;Adriano&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;/div&gt;&lt;div style="color: #0b5394;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6615734654191094865?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6615734654191094865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6615734654191094865' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6615734654191094865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6615734654191094865'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/06/how-to-not-ask-for-help-on-online.html' title='How to not ask for help on online forums'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4366611341767545057</id><published>2009-03-23T17:51:00.000-03:00</published><updated>2009-03-23T17:51:10.491-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Db4o with Visual Studio 10 / .Net Framework 4</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Hi.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;When Microsoft announced they would make available VS 2010 CTP I got curious about how easy (or hard) it would be to compile / run Db4o and also how OMN would behave in this early CTP (would it just work, without even require a recompilation? If not, how easy/hard it would be to make it work if possible at all, etc). &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Well, yesterday I managed to &lt;a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-1-Working-with-the-Visual-Studio-2010-CTP-VPC/"&gt;download the CTP&lt;/a&gt;; after extracting the files (24 Gb!!) I just took OMN 2008 installation and give it a try. It was really amazing. The only change I've applied was to update the file &lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%ALLUSERSPROFILE%\Application Data\Microsoft\MSEnvShared\Addins\OMAddin.addin&lt;/span&gt; in order to change the target VS (OMN 2008 will set it to &lt;b&gt;9.0&lt;/b&gt; but VS 2010 is &lt;b&gt;10.0&lt;/b&gt;).&amp;nbsp; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;After this change I just fired up VS and OMN addin was there, working with no issues (as far as I tested :)) as you can see in the screen shot bellow. Cool.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_JjJXM4oi98I/ScU-1lP_sTI/AAAAAAAAAe8/AT3nM65SFwc/s1600-h/OMN-VS2010.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_JjJXM4oi98I/ScU-1lP_sTI/AAAAAAAAAe8/AT3nM65SFwc/s400/OMN-VS2010.png" style="cursor: move;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Next step was to load Db4o 2008 solution file; VS 2010 asked whenever I'd like to convert the solution/project files to the newer version; I just consent to that and when it finished converting I just run Db4o Tests.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;This time some tests failed due to missing jars (I didn't run a full build) required to run Java/.Net compatibility tests; besides that expected failure,&amp;nbsp; only one test failed (I just disabled it for now).&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;My next steps will be: &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Try to understand / fix the falling test.&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Prepare the environment to at least run the target "build-before-checkin"&amp;nbsp; defined in build.xml (and uncomment any test commented out to make the tests pass).&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; Reason whenever it makes sense to use some of C# 4.0 / .Net Framework 4.0 &lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;new features &lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;(for instance dynamic types) and how Db4o handle them.&lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Since these will require more time to investigate / test I'll leave them for a forthcoming post.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4366611341767545057?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4366611341767545057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4366611341767545057' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4366611341767545057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4366611341767545057'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/03/db4o-with-visual-studio-10-net.html' title='Db4o with Visual Studio 10 / .Net Framework 4'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JjJXM4oi98I/ScU-1lP_sTI/AAAAAAAAAe8/AT3nM65SFwc/s72-c/OMN-VS2010.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8272569560438354722</id><published>2009-03-21T16:46:00.000-03:00</published><updated>2009-03-21T16:46:07.481-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Epilogue</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;After 9 posts in this subject &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;(BTW, I have written this post long ago) &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;I am going to finish it... and the big question is:&lt;br /&gt;
&lt;br /&gt;
Did it worth?&lt;br /&gt;
&lt;br /&gt;
Well, to answer this question I pondered on various aspects: It allowed me to move to a smaller city, closer to my wife's parents, a less violent, less expansive &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;city&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;, etc; it gave me the chance to spend more time with my family and a lot more benefits!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;So, IMO it really worth the move! Even missing some &lt;span style="font-style: italic;"&gt;"usual work style&lt;/span&gt;", I am pretty happy working with very smart people, in a really cool product, applying really nice development methodologies and last, but not least, being able to organize my own time :).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;I don't know how long I'll be working with these stunning guys, but I do hope I could be there for a long time ;). There's just so many things to learn yet!&lt;br /&gt;
&lt;br /&gt;
That's it ;)&lt;br /&gt;
&lt;br /&gt;
See you all.&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8272569560438354722?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8272569560438354722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8272569560438354722' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8272569560438354722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8272569560438354722'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/03/benefits-of-working-from-home-epilogue.html' title='Benefits of working from home - Epilogue'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4632174334431573223</id><published>2009-03-10T19:00:00.002-03:00</published><updated>2011-03-30T22:55:40.921-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='COM+'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Automating Skype through COM</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;Wow.. finally a technical post again :)&lt;br /&gt;
&lt;br /&gt;
Those of you who knows me knows that I am a firm believer of component technologies.&lt;br /&gt;
&lt;br /&gt;
Personally I really appreciate Microsoft's COM technology; ok, it does has it drawbacks (as everything in life) but when used correctly it proved to be a very powerful way to support &lt;span style="font-style: italic;"&gt;software automation&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;extensibility. &lt;/span&gt;Let me briefly explain what those funny words means for those who don't know yet.&lt;br /&gt;
&lt;br /&gt;
Basically, &lt;span style="font-style: italic;"&gt;software automation&lt;/span&gt; is the process of a software controlling another one. For instance, if you have Microsoft Office installed it's possible to write a program (even a JavaScript script) that creates a Word Document through &lt;span style="font-style: italic;"&gt;automation&lt;/span&gt;, i.e, your program may "control" word (and Excel, Power Point, etc). This kind of flexibility can be very helpful in some scenarios.&lt;br /&gt;
&lt;br /&gt;
By &lt;span style="font-style: italic;"&gt;extensibility&lt;/span&gt; I mean ways of extending a given application. A good example is &lt;span style="font-style: italic;"&gt;Windows Explorer&lt;/span&gt;; it's possible to add new items to a context menu (in the same way &lt;a href="http://www.7-zip.org/"&gt;7-Zip&lt;/a&gt; and many other applications do) simply by implementing an specific COM &lt;a href="http://msdn.microsoft.com/en-us/library/bb776086%28VS.85%29.aspx"&gt;interface&lt;/a&gt; (and registering your component of course).&lt;br /&gt;
&lt;br /&gt;
These are just 2 examples of what's possible; of course other softwares also support some level of automation (for instance Adobe Acrobat).&lt;br /&gt;
&lt;br /&gt;
In this post I just want to talk (again, briefly) about Skype and how it's possible to extend it through COM (Skype also supports automation through Java, XXX, etc).&lt;br /&gt;
&lt;br /&gt;
First let me just explain that the possibilities are infinite; what you may want to do with automation is not my business :); all I can say is that if you think a little bit you'll be able to find some nice use for skype automation.&lt;br /&gt;
&lt;br /&gt;
For instance (as I said in my last posts) I use Skype heavily on my work to communicate with other team's members. At least once per week we do a Skype meeting in order to decide what we're going to do in that week; to manage these tasks we have a "queue" of tasks in our &lt;a href="http://tracker.db4o.com/secure/IssueNavigator.jspa?reset=true&amp;amp;mode=hide&amp;amp;pid=10000"&gt;Jira&lt;/a&gt; installation.&lt;br /&gt;
&lt;br /&gt;
One annoyance during this meeting is that once someone decide he wants to take a specific task the process involves at least 2 steps: to announce in the chat meeting and going to the browser to update Jira.&lt;br /&gt;
&lt;br /&gt;
Since it's possible to automate Skype I wrote (to be more precise I am debugging it right now) a &lt;span style="font-style: italic;"&gt;"plug-in"&lt;/span&gt; that simply keeps listening all chat messages and react accordingly for specific patterns; for instance if I want to take a task (let's say TSK-1) I may just type:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #333333; font-family: 'courier new';"&gt;      $jira assign TSK-1 myself&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This way I announce to the team and update Jira at once :) (I don't need to go to the browser anymore)&lt;br /&gt;
&lt;br /&gt;
The plugin is "smart" enough (through configuration) to figure out who I am ("&lt;span style="font-style: italic;"&gt;myself"&lt;/span&gt;) and to go to Jira (through a WebService) and update the specific issue (task).&lt;br /&gt;
&lt;br /&gt;
And this is only a basic example about what can be done (the sky is the limit :).&lt;br /&gt;
&lt;br /&gt;
For more information about Skype automation visit &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;a href="https://developer.skype.com/"&gt;https://developer.skype.com/&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;If you want to take a look into this plugin, just grab the code at: git@github.com:adrianoc/binboo.git or browse the code online at&amp;nbsp;&lt;a href="https://github.com/adrianoc/binboo"&gt;https://github.com/adrianoc/binboo&lt;/a&gt;&amp;nbsp;(just keep in mind that there're lots of assumptions/dependencies to our Jira installation but I guess one can learn a lot about how to integrate to either Jira or Skype).&amp;nbsp; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt; See you.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;Adriano&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4632174334431573223?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4632174334431573223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4632174334431573223' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4632174334431573223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4632174334431573223'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/03/automating-skype-through-com.html' title='Automating Skype through COM'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>4</thr:total><georss:featurename>Londrina - PR, Brazil</georss:featurename><georss:point>-23.3103871 -51.1647943</georss:point><georss:box>-23.940967099999998 -52.0986323 -22.6798071 -50.230956299999995</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5443019859974192408</id><published>2009-01-21T23:38:00.000-02:00</published><updated>2009-01-22T00:03:26.959-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='wix'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>WIX Tips</title><content type='html'>&lt;span style="color: #783f04; font-family: Verdana,sans-serif;"&gt;Hi.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #783f04; font-family: Verdana,sans-serif;"&gt;Since I have been playing a lot with MSI installers latelly and I'd like to share two tips with those authoring Windows Installers with &lt;a href="http://wix.sourceforge.net/"&gt;WIX&lt;/a&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #783f04; font-family: Verdana,sans-serif;"&gt;You can get a lot of information by running your installation package through msiexec:&lt;br /&gt;
&lt;br /&gt;
msiexec /i CustomAction.msi /lvx log.txt&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;The command above just runs CustomAction.msi logging everything including the kitchen sink :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: #783f04; font-family: Verdana,sans-serif;"&gt;You can use &lt;a href="http://www.7-zip.org/"&gt;7Zip&lt;/a&gt; to open msi files (and ofcourse, extract content from it)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="color: #783f04; font-family: Verdana,sans-serif;"&gt;Happing programming ;)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #783f04; font-family: Verdana,sans-serif;"&gt;Adriano&amp;nbsp; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5443019859974192408?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5443019859974192408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5443019859974192408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5443019859974192408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5443019859974192408'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/01/wix-tips.html' title='WIX Tips'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5338680815903237621</id><published>2009-01-07T21:01:00.008-02:00</published><updated>2009-01-13T21:40:46.608-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>First impressions of Windows 7</title><content type='html'>&lt;span style="font-family: Verdana,sans-serif;"&gt;Hi,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;As a computer addicted I decided to download Windows 7 Beta 1 (32 bits) &lt;/span&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;and give it &lt;/span&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;a try (if you are interested, just search for "Windows 7 Beta1" in your favorite search engine and I am sure you'll find your way :)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;In this post I want to present my first impressions about it. Please, note that I am not an expert in this subject and also that this is just my opinion based on my perception without any pretension regarding "data" accuracy. &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;I need to admit that I am impressed about it. My first impression is that it is way faster than Vista when running on the same machine; at least it is pretty responsive. Bellow you can find a list of items that caught&amp;nbsp; my attention and won my respect (at least for now):&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Fast Installation: ~ 20 min for a full install.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Few prompts during installation.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;No problems with device drivers at all (Video, audio, keyboard, etc)&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Some devices already have preliminary versions for Windows 7&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;I guess that this is more a result of not introducing deeper changes to the driver model (Vista introduced really deep changes there).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;There are some compatible antivirus already.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; Looks really fast on a relatively old hardware&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;I really liked the &lt;/span&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;UI&lt;/span&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; changes (even being minor changes).&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Just a few UAC prompts&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Using it for some time I have seem UAC prompts only for software installation.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;IE 8 is not as fast as I'd like it to be. (But I've already installed firefox)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp;Bellow you can see a screen shot.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_JjJXM4oi98I/SWU_A_SocdI/AAAAAAAAAec/bjFXeoRIgBk/s1600-h/Windows+7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_JjJXM4oi98I/SWU_mbm4NrI/AAAAAAAAAek/vLdoUPi7jK4/s1600-h/Windows+7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_JjJXM4oi98I/SWU_mbm4NrI/AAAAAAAAAek/vLdoUPi7jK4/s320/Windows+7.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;Well, that's it for now.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Verdana,sans-serif;"&gt;Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5338680815903237621?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5338680815903237621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5338680815903237621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5338680815903237621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5338680815903237621'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/01/first-impressions-of-windows-7.html' title='First impressions of Windows 7'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JjJXM4oi98I/SWU_mbm4NrI/AAAAAAAAAek/vLdoUPi7jK4/s72-c/Windows+7.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7148122364665415885</id><published>2009-01-07T20:55:00.000-02:00</published><updated>2009-01-07T21:00:39.892-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Storing PowerShell objects into a Db4o database</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif;"&gt;Hi,&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;First of all, Happy New Year :)&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;If you use both PowerShell and Db4o you maybe interested in &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/12/30/storing-powershell-objects-into-a-db4o-database.aspx"&gt;this post&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;Best&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;Adriano&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7148122364665415885?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7148122364665415885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7148122364665415885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7148122364665415885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7148122364665415885'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2009/01/storing-powershell-objects-into-db4o.html' title='Storing PowerShell objects into a Db4o database'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1602193808268501226</id><published>2008-11-21T19:50:00.000-02:00</published><updated>2008-11-21T19:52:52.617-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part IX- Infrastructure</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;In &lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-v.html"&gt;this post&lt;/a&gt; I described how using my computer in my home office was the first time that I'm getting a direct return on my &lt;span style="font-weight: bold;"&gt;investment&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
In this post I'll take a look in the other side of the coin: the investment in infrastructure.&lt;br /&gt;
&lt;br /&gt;
When my home computer used to be only that, i.e, my home computer, I had no hard requirements to keep it up to date. I could simply update it each 5 years or more if I wanted to; also, my internet connection need not to be very fast; the same applies for my desk; it could be very ordinary as I didn't spent a lot of time in my computer.&lt;br /&gt;
&lt;br /&gt;
Of course, being a computer/programmer addicted as I am, shortened my computer's update cycle for something between 2 ~ 3 years, and&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt; internet connection, you know: you never get enough bandwidth ;)&lt;br /&gt;
&lt;br /&gt;
By the other hand, using my computer to work pushes it to its limits... and of course, each minute I spend looking at the hour glass represents a minute less with my family (or my Wii :) so I want to wait the lesser amount of time possible in front of it.&lt;br /&gt;
&lt;br /&gt;
Just to put some numbers, the first time I run db4o build on my machine it took more or less 1 hour to run to completion (mostly running tests). I just couldn't believe that. My machine was not a top one but it was not so old/slow either. After a lot of tweaking I managed to get the build running in 15 minutes but that required some $$$ (nowadays, even with a new machine tests take 20 ~ 25 minutes to run due to lots of new tests).&lt;br /&gt;
&lt;br /&gt;
Also, I never considered (or had the requirement to) run 2 VMs, 2 Visual Studio (one in one VM and another in the host OS), Eclipse and some other apps at the same time. So now, 2Gb of memory doesn't look that much anymore.&lt;br /&gt;
&lt;br /&gt;
Another important aspect that will have  great impact on your productivity/health is the &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;overall quality of &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;your office furniture: remember when you used to complain about your boss not willing to spend a few extra dollars on a good chair for you? I certainly remember myself complaining with mine :( Of course you don't need to go out and get the best chair in the world, but make sure you'll not get a &lt;span style="font-style: italic;"&gt;"not so good" &lt;/span&gt;one&lt;span style="font-style: italic;"&gt; &lt;/span&gt;only to save a few extra bucks either (If you are going to spend more than 4 hours seated I do recommend you to get a very good one - for instance, this &lt;a href="http://www.hermanmiller.com/CDA/SSA/Product/0,,a10-c440-p8,00.html"&gt;one&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
Well, that's not the end yet; telecommuting meant also that I became my own IT department ;). Not that I have any problem fixing my computer, installing software or whatsoever; the really big point is that all these maintenance work takes time (and time is money) and also that the burden to keep everything working is on me (to be fair, I'd rather be the one in charge for this task than to let someone else doing it &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;anyway&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;).&lt;br /&gt;
&lt;br /&gt;
Last, but not least, consider having &lt;span style="font-style: italic;"&gt;"hardware"&lt;/span&gt; backup; I mean, what are you going to do if next morning when you turn your computer on it don't actually turns on? Of course you do have backups of your important data (don't you?), but what about your hardware? How long it will take to be fixed? Are you willing to spend time on fixing it? Or do you have another computer that can be used so you can continue to work while someone else fixes it for you.&lt;br /&gt;
&lt;br /&gt;
In the end of the day, you'll need to put some money on your office / infrastructure, so don't forget to take this into account.&lt;br /&gt;
&lt;br /&gt;
That's it.&lt;br /&gt;
&lt;br /&gt;
Bear with me ! We are approaching the end :)&lt;br /&gt;
&lt;br /&gt;
See you&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1602193808268501226?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1602193808268501226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1602193808268501226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1602193808268501226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1602193808268501226'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/11/benefits-of-working-from-home-part-ix.html' title='Benefits of working from home - Part IX- Infrastructure'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2210610882913641790</id><published>2008-11-17T11:30:00.002-02:00</published><updated>2008-11-17T16:53:37.077-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><title type='text'>Changes in Db4o configuration.....</title><content type='html'>&lt;div style="color: #351c75; font-family: Verdana,sans-serif;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
If you take a look in our svn repository you'll see that lots of changes were applied to configuration code (starting with version 7.7). Take it easy, we kept the "old" configuration interface in place; we just deprecated it, so update your code to use the new interfaces if you have the chance ;) &lt;br /&gt;
&lt;br /&gt;
In this post I'd like to discuss some of these changes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;New, specific, &lt;i&gt;factory &lt;/i&gt;classes&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Do you remember Db4oFactory OpenFile(), OpenServer() and OpenClient() methods? We decided to move them to more specific factory classes:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Db4oClientServer&lt;/li&gt;
&lt;li&gt;Db4oEmbedded&lt;/li&gt;
&lt;/ul&gt;This way the boilerplate code used to open an embedded database changed from:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;IObjectContainer db = Db4oFactory.OpenFile("MyData.odb");&lt;/pre&gt;&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;IObjectContainer db = Db4oEmbedded.OpenFile(Db4oEmbedded.NewConfiguration(), "MyData.odb");&lt;/pre&gt;&lt;br /&gt;
As an additional benefit now we use the same class in both platforms (Java/.Net) (Remember, we used to have &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Db4o.openXXXX()&lt;/span&gt; for Java and&amp;nbsp; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Db4oFactory.OpenXXX()&lt;/span&gt;for .Net).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuration interface split in File / Network / Common&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We are applying &lt;a href="http://www.oodesign.com/interface-segregation-principle.html"&gt;Interface Segregation&lt;/a&gt; principle to configuration, so, now related configuration options are close together in specific interfaces.&lt;br /&gt;
&lt;br /&gt;
For instance, all &lt;i&gt;embedded &lt;/i&gt;related configuration lives in &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;IEmbeddedConfiguration&lt;/span&gt;. But we didn't stopped there. We went a step further and broke common functionality in more coarse grained interfaces. For instance, there are configurations that do apply to both embedded and client server modes. So we introduced the concept of &lt;i&gt;Configuration Providers&lt;/i&gt; which sole purpose is to help to aggregate configuration into specific interfaces, so it's easier (at least in our opinion :) to identify which configuration applies to each db4o mode and also make it more clear which aspect of db4o are being affected by that configuration.For instance:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;IEmbeddedConfig config = Db4oEnbedded.NewConfiguration();
config.File.ReadOnly = true;&lt;/pre&gt;&lt;br /&gt;
In this sample there's no space for doubts that &lt;i style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReadOnly&lt;/i&gt; configuration relates to a file system aspect of an embedded database.&lt;br /&gt;
&lt;br /&gt;
That said, we basically partitioned configuration into four categories:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Embedded&lt;/li&gt;
&lt;li&gt;Server&lt;/li&gt;
&lt;li&gt;Client&lt;/li&gt;
&lt;li&gt;Common&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;No more "default" configuration&lt;/b&gt;;&lt;br /&gt;
&lt;br /&gt;
Suppose your application, at some point, requires a Db4o database with an &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Activation/Global_Activation_Settings"&gt;activation depth&lt;/a&gt; configured to the highest possible value (&lt;b&gt;in most scenarios this is not recommended&lt;/b&gt;) so you use some code like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;IConfiguration globalConfig = Db4oFactory.Configure();
globalConfig.ActivationDepth(Int32.MaxValue);

using(IObjectContainer db = Db4oFactory.OpenFile("test.yap"))
{
/* Use the database */
}&lt;/pre&gt;&lt;br /&gt;
So far, so good. Now, in a completely different point in your application you need to open another Db4o database and so you just type:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;using(IObjectContainer anotherDb = Db4oFactory.OpenFile("test1.yap"))
{
/* Use the database */
}
&lt;/pre&gt;&lt;br /&gt;
This new database ends up configured to fully activate objects! Even knowing that you should avoid configuring activation depth this way (you did your homework, right?) it's possible to do it by accident.&lt;br /&gt;
&lt;br /&gt;
The problem is that it is relatively easy to mess with configuration.&lt;br /&gt;
&lt;br /&gt;
That's the reason that now, all &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;OpenXXXX()&lt;/span&gt; methods (in the new factories) requires a configuration to be passed through!&lt;br /&gt;
&lt;br /&gt;
We are considering reintroducing the original signature methods but with different semantics; instead of return a clone of the global configuration we can return a fresh configuration object populated with default values so developers can be sure about what configuration they get!&lt;br /&gt;
&lt;br /&gt;
To wrap up the session on configuration I'd like to present a short "cheat sheet":&lt;br /&gt;
&lt;br /&gt;
&lt;table height="376" style="background-color: white; border-collapse: separate; border-spacing: 1px; border: 1px solid green; margin-bottom: 1px; padding: 4px; width: 602px;"&gt;&lt;tbody&gt;
&lt;tr style="background-color: #e6f3e4;"&gt;   &lt;td rowspan="2" style="background-color: #cee4be;"&gt;Emdedded&lt;/td&gt;   &lt;td&gt;Old&lt;/td&gt;   &lt;td&gt;&lt;pre&gt;Db4oFactory.OpenFile("dbfile");&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style="background-color: #e6f3e4;"&gt;   &lt;td&gt;New&lt;/td&gt;   &lt;td&gt;&lt;pre&gt;Db4oEmbedded.OpenFile(
   Db4oEmbedded.NewConfiguration(),
   "dbfile");&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style="background-color: #eeeeee; color: black;"&gt;   &lt;td rowspan="2" style="background-color: #dddddd; text-align: center;"&gt;S&lt;br /&gt;
e&lt;br /&gt;
r&lt;br /&gt;
v&lt;br /&gt;
e&lt;br /&gt;
r&lt;/td&gt;   &lt;td&gt;Old&lt;/td&gt;   &lt;td&gt;&lt;pre&gt;Db4oFactory.OpenServer("dbfile", port);&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style="background-color: #eeeeee; color: black;"&gt;   &lt;td&gt;New&lt;/td&gt;   &lt;td&gt;&lt;pre&gt;Db4oClientServer.OpenServer(
 Db4oClientServer.NewServerConfiguration(),
 "dbfile",
 port);&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style="background-color: #e6f3e4;"&gt;   &lt;td rowspan="2" style="background-color: #cee4be; text-align: center;"&gt;C&lt;br /&gt;
l&lt;br /&gt;
i&lt;br /&gt;
e&lt;br /&gt;
n&lt;br /&gt;
t&lt;/td&gt;   &lt;td&gt;Old&lt;/td&gt;   &lt;td&gt;&lt;pre&gt;Db4oFactory.OpenClient(
       "dbfile", 
        port, 
        "user", 
        "pwd");&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style="background-color: #e6f3e4;"&gt;   &lt;td&gt;New&lt;/td&gt;   &lt;td&gt;&lt;pre&gt;Db4oClientServer.OpenClient(
 Db4oClientServer.NewClientConfiguration(), 
        "dbfile", 
        port, 
        "user",
        "pwd")&lt;/pre&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;b&gt; ExceptionsOnNotStorable is turned on by default&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
That's (IMHO) really nice. I don't like to just pretend that classes are storable on Db4o and let customers struggling trying to figure out why their applications doesn't work when we could follow &lt;a href="http://en.wikipedia.org/wiki/Fail_Fast"&gt;fail fast&lt;/a&gt; principles and let they know that one or more classes may have problems as it is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Use of properties in .Net &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
That's mean more natural code style for .Net developers :). Now, instead of saying:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;config.OutStream(Console.Out);&lt;/pre&gt;&lt;br /&gt;
you will write:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;config.OutStream = Console.Out;&lt;/pre&gt;&lt;br /&gt;
We are aware that there other places where using properties instead of methods (or even using a different approach) would make more sense (on .Net of course) but we just don't have the time to improve them now. But you may be sure we'll do our best to keep improving both .Net/Java developers experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's it!&lt;br /&gt;
&lt;br /&gt;
See you.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2210610882913641790?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2210610882913641790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2210610882913641790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2210610882913641790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2210610882913641790'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/changes-in-db4o-configuration.html' title='Changes in Db4o configuration.....'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-3663103900160489709</id><published>2008-11-05T10:52:00.000-02:00</published><updated>2008-11-05T10:55:25.297-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Free Software'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Are you a C# developer?</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;If so, you should go and grab a copy (for free) of &lt;a href="http://devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/"&gt;CodeRush Xpress&lt;/a&gt; for Visual Studio!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;(I already own a copy of another addin, but I'll give it a try anyway :)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Adriano&amp;nbsp;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-3663103900160489709?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/3663103900160489709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=3663103900160489709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3663103900160489709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3663103900160489709'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/11/are-you-c-developer.html' title='Are you a C# developer?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1971391858012808415</id><published>2008-11-02T11:36:00.000-02:00</published><updated>2008-11-02T11:41:31.212-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>PDC 2008 Videos - For free!! :)</title><content type='html'>&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;Hi.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;Are you a Windows developer? Or simple a Windows enthusiast? So you probably is aware of Microsoft PDC 2008.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;I'd love attend it but I couldn't&amp;nbsp; :(&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;At least we can grab (all?) &lt;a href="http://channel9.msdn.com/pdc2008/"&gt;Microsoft PDC 2008 Videos&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;Have fun!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #674ea7; font-family: Verdana,sans-serif;"&gt;Adriano &lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1971391858012808415?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1971391858012808415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1971391858012808415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1971391858012808415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1971391858012808415'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/11/pdc-2008-videos-for-free.html' title='PDC 2008 Videos - For free!! :)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-3654050643539308765</id><published>2008-11-02T10:00:00.000-02:00</published><updated>2008-11-02T10:05:34.696-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part VII - Alone in the office</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;With this post I'll stop talking about the advantages of working from home and start to discuss some of the drawbacks related to this way of work.&lt;br /&gt;
&lt;br /&gt;
(sorry for the subject, I just couldn't resist :)&lt;br /&gt;
&lt;br /&gt;
Note that some points that I first took as an advantage may appear again, but this time, with a focus on possible disadvantages; this doesn't mean I've changed my mind (what I would say is perfectly normal); its just &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;the other side of the same coin.&lt;br /&gt;
&lt;br /&gt;
I'll start with the most problematic one (at least in my case), working from home meant to loose almost all contact with my friends and coworkers. I remember it perfectly when I was being interviewed (through skype) and I was asked how I felt about working alone, 8 hours per day; honestly, at that moment I did think it would not be an issue, but sometimes it is a little bit lonely.&lt;br /&gt;
&lt;br /&gt;
Since I was not bound to an office anymore, after 4 months we (I and my wife) decided that the time to move to a quieter, safer, less violent place had come, so we moved from São Paulo to &lt;a href="http://maps.google.com/maps?f=q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=R.+Cl%C3%A1udia+Rizzi+90,+Londrina,+86076-030&amp;amp;sll=-23.548943,-46.638818&amp;amp;sspn=1.742295,2.471924&amp;amp;ie=UTF8&amp;amp;z=17&amp;amp;iwloc=addr"&gt;Londrina&lt;/a&gt;; you see, most of my friends still live in São Paulo and even having some (good) old friends (and my wife's parent) here in &lt;a href="http://maps.google.com/maps?f=q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=R.+Cl%C3%A1udia+Rizzi+90,+Londrina,+86076-030&amp;amp;sll=-23.548943,-46.638818&amp;amp;sspn=1.742295,2.471924&amp;amp;ie=UTF8&amp;amp;z=17&amp;amp;iwloc=addr"&gt;Londrina&lt;/a&gt; I somewhat miss personal contact.&lt;br /&gt;
&lt;br /&gt;
Another important aspect of working from home is that all discussions (at least in my case) are done through some IM software (be it skype/msn/etc) and this is considerably harder to do than when you are engaged in a face-to-face talking.&lt;br /&gt;
&lt;br /&gt;
It's enough for the first "not so good" series... let me play a little bit of "Star Wars" on my Wii ;)&lt;br /&gt;
&lt;br /&gt;
See you.&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-3654050643539308765?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/3654050643539308765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=3654050643539308765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3654050643539308765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3654050643539308765'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/11/benefits-of-working-from-home-part-vii.html' title='Benefits of working from home - Part VII - Alone in the office'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1367187614667051302</id><published>2008-10-30T23:20:00.000-02:00</published><updated>2008-10-30T23:25:23.946-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - VI - Mange my time</title><content type='html'>&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Hi,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Have you ever needed to ask (embarrassed) your boss to let you leave early so you could go to the doctor or to address some personal issue? &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Well, not have to do this is another benefit of working from home :) as (&lt;i&gt;usually&lt;/i&gt;) you are in charge of managing your own time!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; Of course this is not an "all or nothing situation". Even when I had a &lt;i&gt;"traditional"&lt;/i&gt; job my bosses were kind (or intelligent) enough (I bet they were both :) to let me deal with my personal issues during my working time if that were necessary. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;My point is that nowadays all I have to do is to get organized so I don't miss any meeting, pair session &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;and/or a dead line &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #990000; font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;and everything is fine :). It's even better as I can choose the best time (a time in which I'll get less traffic, that is not to hot, etc.) to do my personal stuff.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;Thats it! Even though being far from a comprehensive list of the advantages of working from home, &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;I finally reached the last (&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;but not least&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;) advantage &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;I wanted to blog about. In the next posts I'll talk about some drawbacks.&lt;br /&gt;
&lt;br /&gt;
Do you have any other advantages in mind? Please, share with us! &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;Best,&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1367187614667051302?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1367187614667051302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1367187614667051302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1367187614667051302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1367187614667051302'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-vi-mange.html' title='Benefits of working from home - VI - Mange my time'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4837754873954547526</id><published>2008-10-30T08:34:00.000-02:00</published><updated>2008-10-30T08:40:33.568-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>PDC Talk: The future of C#</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Hi!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;A very interesting PDC talk (by Anders Hejlsberg) about &lt;a href="http://channel9.msdn.com/pdc2008/TL16/"&gt;the future of C#.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
As a teaser, just some subjects covered in the this talk: &lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;More dynamic constructs&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Optional / Named arguments&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Concurrency&lt;/span&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;If you work with C#/.Net you can't miss this one!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4837754873954547526?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4837754873954547526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4837754873954547526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4837754873954547526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4837754873954547526'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/pdc-talk-future-of-c.html' title='PDC Talk: The future of C#'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5037010911608339827</id><published>2008-10-22T16:57:00.007-02:00</published><updated>2008-10-22T17:21:33.785-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Never give up</title><content type='html'>&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;At least this seems to be the main approach of hackers.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;In the last couple weeks I received at least 7 messages from the same sender, with the exact same contents:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_JjJXM4oi98I/SP98gCRB4II/AAAAAAAAALc/ApFFzkQfjFs/s1600-h/Virus3_5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_JjJXM4oi98I/SP98gCRB4II/AAAAAAAAALc/r-47cpTRR3A/s320-R/Virus3_5.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;It's in portuguese (at least) and says something like: "Hey dude, here are the photos!".&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;What photos? I don't remember asking any friend called "gabriel" to send me any photo ;) even more with supposedly annexed photos linked to files like "fotos_237.com" on a very suspicious server (at least the guy wrote my name correctly)! No thanks !!!&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;In this same time range I got other "phishing" emails like:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_JjJXM4oi98I/SP90cuVthCI/AAAAAAAAALM/eYz4zkvSoJU/s1600-h/Virus.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_JjJXM4oi98I/SP90cuVthCI/AAAAAAAAALM/RqiXTmb0DkQ/s320-R/Virus.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;Another email in Portuguese, pretending to be from hotmail trying to foolish me to get in panic and click on a link.&amp;nbsp; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_JjJXM4oi98I/SP9320tsJpI/AAAAAAAAALU/stRvjMj9IOw/s1600-h/Virus2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_JjJXM4oi98I/SP9320tsJpI/AAAAAAAAALU/_X7KEghYaxA/s320-R/Virus2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;This one (also in portuguese) is supposedly a "Virtual Card" from a girl named "Carla". It even includes a "copyright" notice in the end of the email.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;Well, maybe may mommy would be tempted to clink on these links but not me. Anyway, this kind of threat is getting more sophisticated as time passes so pay attention where you put your mouse :).&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;Best.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #351c75; font-family: Verdana,sans-serif;"&gt;Adriano &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5037010911608339827?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5037010911608339827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5037010911608339827' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5037010911608339827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5037010911608339827'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/never-give-up.html' title='Never give up'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JjJXM4oi98I/SP98gCRB4II/AAAAAAAAALc/r-47cpTRR3A/s72-Rc/Virus3_5.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2249656172275004830</id><published>2008-10-21T10:15:00.000-02:00</published><updated>2008-10-21T12:20:04.919-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Hug a developer :)</title><content type='html'>&lt;div style="color: #990000; font-family: Verdana,sans-serif;"&gt;You need to see &lt;a href="http://www.develop-one.net/blog/2008/08/27/HugADeveloper.aspx"&gt;this&lt;/a&gt;!&lt;/div&gt;&lt;div style="color: #990000; font-family: Verdana,sans-serif;"&gt; &lt;/div&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Really amazing :)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;See you.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2249656172275004830?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2249656172275004830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2249656172275004830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2249656172275004830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2249656172275004830'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/hug-developer.html' title='Hug a developer :)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1871674130136921842</id><published>2008-10-17T17:01:00.002-03:00</published><updated>2008-10-20T08:32:48.401-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part V - Show me the money</title><content type='html'>&lt;span style="color: #993300; font-family: verdana;"&gt;Wow.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;I've always the feeling that my investment in computer hardware/software was somewhat a waste of money; you see, usually I get a &lt;a href="http://programing-fun.blogspot.com/2008/08/just-little-bit-more-information-on-my.html"&gt;pretty descent machine&lt;/a&gt; and stick with it for at least 3 years; so every 3 years I spend a lot of money to get a new one and I &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;didn't get a direct return from my investment&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt; (not to mention that most of the day it keeps turned off), and to &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;be fair, I should take internet connection fees into account.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;Since I started w&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;orking from home I may say that this is the first time I am getting a direct&lt;a href="http://www.blogger.com/post-edit.g?blogID=3479332109691979736&amp;amp;postID=1871674130136921842#roi"&gt;¹&lt;/a&gt; (and measurable) return from this investment. It's even better, now it's easier to justify new hardware, software and other gadgets to the financial department, i.e, my wife :).&lt;br /&gt;
&lt;br /&gt;
In other words, now my computer generates income and I feel compelled to invest more money to keep it &lt;a href="http://programing-fun.blogspot.com/2008/08/just-little-bit-more-information-on-my.html"&gt;up to date&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;Adriano&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;&lt;a href="http://draft.blogger.com/post-edit.g?blogID=3479332109691979736&amp;amp;postID=1871674130136921842" name="roi"&gt;¹&lt;/a&gt; &lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: italic;"&gt;I mean, direct, because I always studied a lot in my home computers so, at least indirectly, they always gave me a financial return (even tough it is hard to measure how much return I got).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1871674130136921842?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1871674130136921842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1871674130136921842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1871674130136921842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1871674130136921842'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-v.html' title='Benefits of working from home - Part V - Show me the money'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1637800004859491552</id><published>2008-10-15T21:00:00.009-03:00</published><updated>2008-10-16T00:33:21.635-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Running Sharpen tests faster...</title><content type='html'>&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;As you probably already know :), &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Sharpen"&gt;Sharpen&lt;/a&gt; is a tool (developed by &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt;) that aims at easing development efforts by translating java source code into C#. This tools make it easier to provide native solutions in either Java/.Net platforms.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;While talking about how to run Sharpen test suite in &lt;a href="http://programing-fun.blogspot.com/2008/06/running-sharpen-tests.html"&gt;this post&lt;/a&gt; I told that I'd show how to improve these tests startup time. &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
After a long wait, here it is. So let's go.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; &lt;br /&gt;
If you tried to run Sharpen tests you probably noticed that whenever you launch them a new Eclipse instance starts also (with it's full GUI) and this is one of the culprits for these tests to take longer than necessary to run. The good news is that it's (relatively) easy to configure Eclipse to not display any GUI at all (since all feedback will be given through the main Eclipse window).&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;To do this, once you checkout all required projects from db4o SVN, just Right Click &lt;b&gt;&lt;i&gt;sharpen.ui.tests&lt;/i&gt;&lt;/b&gt; project and select Run As / Run Configurations menu. &lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_JjJXM4oi98I/SPat197y47I/AAAAAAAAAKc/JoYvzIn4aRk/s1600-h/Sharpen1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_JjJXM4oi98I/SPat197y47I/AAAAAAAAAKc/iGtmjs9ZRwg/s320-R/Sharpen1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Now, in "&lt;b&gt;&lt;i&gt;Run Configuration&lt;/i&gt;&lt;/b&gt;" dialog,&amp;nbsp; right click on &lt;i&gt;"&lt;b&gt;JUnit Plug-in Test&lt;/b&gt;"&lt;/i&gt; and select &lt;b&gt;&lt;i&gt;New&lt;/i&gt;&lt;/b&gt;. &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/SPavNTl2AxI/AAAAAAAAAK8/C6ZYSM0KH1w/s1600-h/Sharpen-Run+Configuration.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_JjJXM4oi98I/SPavNTl2AxI/AAAAAAAAAK8/ORjw6ojIuxM/s320-R/Sharpen-Run+Configuration.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;If you followed the previous steps, "Run all tests ...." should contain the right value (sharpen.ui.tests). Just make sure that you have the latest JUnit selected on "&lt;b&gt;&lt;i&gt;Test Runner&lt;/i&gt;&lt;/b&gt;" dropdown.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/SPau2MqfzBI/AAAAAAAAAK0/aNan9BvyzSQ/s1600-h/Sharpen-New+Test+Properties.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_JjJXM4oi98I/SPau2MqfzBI/AAAAAAAAAK0/FSOyKudeUlY/s400-R/Sharpen-New+Test+Properties.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;We are almost there... :)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;The next step is to click on "&lt;b&gt;&lt;i&gt;Main&lt;/i&gt;&lt;/b&gt;" tab (1), then select "&lt;b&gt;&lt;i&gt;Run as Application&lt;/i&gt;&lt;/b&gt;" checkbox and select "&lt;b&gt;&lt;i&gt;[No Application] - Headless mode&lt;/i&gt;&lt;/b&gt;" in the dropdown (2) and finally, click "&lt;b&gt;&lt;i&gt;Run&lt;/i&gt;&lt;/b&gt;" button (3). &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_JjJXM4oi98I/SPaufrd7cLI/AAAAAAAAAKk/hssYSe_sN98/s1600-h/Sharpen+-Headless.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_JjJXM4oi98I/SPaufrd7cLI/AAAAAAAAAKk/oJ5Us2e8o6A/s400-R/Sharpen+-Headless.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;That's it :)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt; Notice that now sharpen test suite starts faster.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;Many thanks to a great friend (&lt;a href="http://blogs.codehaus.org/people/bamboo/"&gt;Rodrigo&lt;/a&gt;) for sharing this information with me.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;See you.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1637800004859491552?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1637800004859491552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1637800004859491552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1637800004859491552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1637800004859491552'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/running-sharpen-tests-faster.html' title='Running Sharpen tests faster...'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JjJXM4oi98I/SPat197y47I/AAAAAAAAAKc/iGtmjs9ZRwg/s72-Rc/Sharpen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8966183879167256719</id><published>2008-10-13T20:30:00.001-03:00</published><updated>2008-10-13T21:35:10.090-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part IV - DIY</title><content type='html'>&lt;span style="color: #993300; font-family: verdana;"&gt;Hi!&lt;br /&gt;
&lt;br /&gt;
How many times a developer approached you to ask something he/she could have &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;easily &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;find by himself have he/she bothered to spend 10 minutes to do a google search?&lt;br /&gt;
&lt;br /&gt;
And let's be fair, how many times you feel compelled to do the same? I have to confess that even being a firm believer of &lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;&lt;span style="font-style: italic;"&gt;"search before asking" &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #993300; font-family: verdana;"&gt;principle, sometimes I do find myself doing the opposite: asking before looking for information.&lt;br /&gt;
&lt;br /&gt;
And this lead us to this post subject: Working from home gave me more incentive to do "&lt;span style="font-family: trebuchet ms; font-size: medium;"&gt;the right thing&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;™&lt;/span&gt;" :), i.e, to look for solutions prior to asking the guy next to me - after all there's no such thing as the "&lt;span style="font-style: italic;"&gt;guy next to me&lt;/span&gt;" :)&lt;br /&gt;
&lt;br /&gt;
At &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; we do exchange lots of information/knowledge but since we are not at the same room (and in most cases we are at different timezones also) it's more practical to do a quick search and try to fix/solve issues by myself. Only after spending some time in my own research I think about asking the gurus.  &lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;This attitude (searching before asking) leads to a better understanding of the subject and other developers will not be interrupted to explain. Of course (IMHO) there are times (and subjects) that requires someone with more knowledge to guide other developers.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;Anyway, I do believe that the process of explaining some subject may help you to get more insight about it and I do appreciate helping other teammates to improve their knowledge (Nowadays I'm learning more than helping :). &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;What do you think? &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #993300; font-family: verdana;"&gt;&lt;br /&gt;
Adriano &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8966183879167256719?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8966183879167256719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8966183879167256719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8966183879167256719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8966183879167256719'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-iv.html' title='Benefits of working from home - Part IV - DIY'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8004748310746147468</id><published>2008-10-11T10:06:00.000-03:00</published><updated>2008-11-10T22:08:11.124-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='home'/><title type='text'>Benefits of working from home - Part VIII - Working Time</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;One really great advantage (IMHO) of &lt;span style="font-style: italic;"&gt;"traditional work style"&lt;/span&gt; is that &lt;span style="font-style: italic;"&gt;usually&lt;/span&gt; you have very clear separation between work time/free time. Basically your working day finishes as soon as you get out of the office (ok, I known, in development, many times the solutions come to our heads at home :).&lt;br /&gt;
&lt;br /&gt;
Working from home is a very different experience and you can find yourself working a lot more than you'd expect/are willing to :(. The problem (again, IMHO) is that it's hard to separate the matters; you see, the work is there, you are there, and the rest you can guess.&lt;br /&gt;
&lt;br /&gt;
Of course other factors like your productivity, how your manager and you decide on what to do and how long it is expected to last, etc. also plays an important role and can turn your working experience more pleasant or more like a nightmare.&lt;br /&gt;
&lt;br /&gt;
In my specific case, I participate in deciding which tasks I'll be working on every week so I am the only one to be blamed when my working days extends a little bit.&lt;br /&gt;
&lt;br /&gt;
And theres an aggravating factor: I am kinda addicted to computers/programming and sometimes I get so excited to see the outcome of my code that I can't just stop :)&lt;br /&gt;
&lt;br /&gt;
So if you are going to work from home, pay attention to these pretty common pitfalls to avoid getting trapped into them.&lt;br /&gt;
&lt;br /&gt;
See you.&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8004748310746147468?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8004748310746147468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8004748310746147468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8004748310746147468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8004748310746147468'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/11/benefits-of-working-from-home-part-viii.html' title='Benefits of working from home - Part VIII - Working Time'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1524611431931870357</id><published>2008-10-07T19:32:00.001-03:00</published><updated>2008-10-07T19:32:00.866-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part  III - Time efficiency</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;In my &lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-ii.html"&gt;last post&lt;/a&gt; I was talking about not being required to commute to work and I pointed some related benefits.&lt;br /&gt;
&lt;br /&gt;
Today, I'm going to talk about some more benefits (directly related to the previous one), so let's go.&lt;br /&gt;
&lt;br /&gt;
As I explained in the previous post I used to spend 2 hours in traffic; well, since I started working from my home this was not an issue any more and not wasting my time on traffic jams made it possible to do other things (like sleep more, post more frequently, etc. :) and spend less money with gas, but (IMHO), more important than all, it made it possible to spend more time with my family.&lt;br /&gt;
&lt;br /&gt;
Prior to joining &lt;a href="http://draft.blogger.com/www.db4o.com"&gt;db4o&lt;/a&gt;, I used to wake up at 7:00, take a short breakfast and drive to my work so I rarely joined my wife/daughter at breakfast. At lunch time I was not with them again (since it would take me 1 hour to go to home and another one to get back).&lt;br /&gt;
&lt;br /&gt;
Now, even though I usually wake up at the same time,  instead of having a (lonely) fast breakfast and going to my work I just go down to my office and start working (usually I put may email/web reading up to date) then 1 hour latter my daughter wakes up and we (I, my wife and my daughter) can have breakfast together. Them, at lunch time, we can have lunch together  again :)&lt;br /&gt;
&lt;br /&gt;
Pretty nice!&lt;br /&gt;
&lt;br /&gt;
At the end of the day when my daughter returns from school I'm finishing my working day and we can spend a little more time together.&lt;br /&gt;
&lt;br /&gt;
Well, as an interesting tv ad says:&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;Have a good breakfast: U$ 20,00; getting out to have a good meal: U$ 50,00; to be with your beloved ones at these moments: has no price! :)&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;See you! &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1524611431931870357?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1524611431931870357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1524611431931870357' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1524611431931870357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1524611431931870357'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-iii.html' title='Benefits of working from home - Part  III - Time efficiency'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5695669828920222639</id><published>2008-10-05T14:10:00.000-03:00</published><updated>2008-10-05T14:10:00.677-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vista'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Back to Vista x64</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
Some time ago (sometime around 10/2006) I installed Windows Vista (a release candidate at that time) on my home machine in order to &lt;span style="font-style: italic;"&gt;"try" &lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;it (to be sincere I've installed various Vista beta/release candidates).&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt; Performance was not impressive but since I'm a software developer (and I didn't used the machine to work anyway) I decided that it worths to be able to experiment with new API / functionality so I kept it.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;Some time after that &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;it was released so I got a copy and installed in the same machine.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;br /&gt;
On 10/2007 &lt;a href="http://programing-fun.blogspot.com/2007/10/new-challenges.html"&gt;I joined db4o&lt;/a&gt; and started to &lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-i.html"&gt;work from my home&lt;/a&gt; which means that my machine now plays an important role in my development productivity and I decided that I'd rather go with Windows XP (x86 or 32 bits) again (due to the performance impacts I got with Vista x64).&lt;br /&gt;
&lt;br /&gt;
Well, one year passed and &lt;a href="http://programing-fun.blogspot.com/2008/09/here-we-come-again-part-iii-end.html"&gt;I got a new machine&lt;/a&gt; (a pretty fast one, lets say) and so I decided to give Vista x64  a try again.&lt;br /&gt;
&lt;br /&gt;
In the first days I do got some &lt;a href="http://en.wikipedia.org/wiki/Bsod"&gt;BSOD&lt;/a&gt;s (which made me feel frustrated) but after spending some time searching I found some suggestions regarding memory configurations; after applying such changes (I just set the times after &lt;a href="http://www.ocztechnology.com/products/memory/ocz_ddr2_pc2_6400_vista_performance_platinum_2gb_edition"&gt;memory manufacturer&lt;/a&gt; specifications and increased memory voltage by 0,1 volts) it became stable (no BSOD since them).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;I can say that I'm satisfied up to now; no hardware or software conflicts, performance is pretty good (much faster than my previous machine running Windows XP - I know, XP would run even faster on this machine).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;See you.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;Adriano&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5695669828920222639?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5695669828920222639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5695669828920222639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5695669828920222639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5695669828920222639'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/back-to-vista-x64.html' title='Back to Vista x64'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4869640008168256076</id><published>2008-10-03T18:00:00.004-03:00</published><updated>2008-10-03T18:00:00.832-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part II : No need to commute</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;In the &lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-i.html"&gt;previous post&lt;/a&gt; I just said I'd think aloud about advantages/drawbacks of working from home. &lt;br /&gt;
&lt;br /&gt;
Let's take the &lt;a href="http://en.wikipedia.org/wiki/Half_full"&gt;half-full&lt;/a&gt; approach and present the advantages first starting with not &lt;span style="font-style: italic;"&gt;needing to commute&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Well, before joining &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; I used to live in &lt;a href="http://maps.google.com/?ie=UTF8&amp;amp;ll=-23.539753,-46.670265&amp;amp;spn=0.213402,0.436707&amp;amp;z=12"&gt;São&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/S%C3%A3o_Paulo"&gt;Paulo&lt;/a&gt; - Brazil, so this point is pretty easy one ;)&lt;br /&gt;
&lt;br /&gt;
Anyone that knows just a little bit about São Paulo knows that it has a very bad traffic! Usually, in the days that the traffic was not that bad, it used to took me no less than 1 hour from my house to my work place (and I was fortunate enough to not live that far from my job). So 2 hours of my life was spent in a car every &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;day&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;.&lt;br /&gt;
&lt;br /&gt;
Also, not being required to commute (and so avoiding traffic jams) made my expenses with car maintenance &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;drop a little bit &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;and getting involved in a car crash less likely.&lt;br /&gt;
&lt;br /&gt;
As a bonus of not commuting I don't have to find a place to park in a, usually, crowed place :)&lt;br /&gt;
&lt;br /&gt;
So, IMHO this is a huge advantage.&lt;br /&gt;
&lt;br /&gt;
The next post will be closely related to this one but I'll talk about my working time.&lt;br /&gt;
&lt;br /&gt;
PS: Do you work from home? What are your opinion about the subject?&lt;br /&gt;
&lt;br /&gt;
See you!&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4869640008168256076?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4869640008168256076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4869640008168256076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4869640008168256076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4869640008168256076'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-ii.html' title='Benefits of working from home - Part II : No need to commute'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-89191428035881557</id><published>2008-10-01T18:17:00.012-03:00</published><updated>2009-03-21T16:48:48.220-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Benefits of working from home - Part I - The dream job</title><content type='html'>&lt;span style="color: #990000; font-family: verdana;"&gt;As I posted &lt;a href="http://programing-fun.blogspot.com/2007/10/new-challenges.html"&gt;here&lt;/a&gt;, some time ago (to be more precise, exactly one year ago) I joined &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; and started to work from my home; that was not an easy decision/move but (thanks God and some really good friends also) I took it.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;Since one year has passed, I think it is a good time to review this &lt;/span&gt;&lt;span style="color: #990000; font-family: verdana; font-style: italic;"&gt;journey&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt; and rethink whenever its paying off or not.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;In the next posts I'll discuss (shortly) some advantages and some shortcomings (from my point of view, of course :) regarding working from home. The order in which these topics are presented has no particular meaning.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;Keep in mind that my opinion is largely influenced by the place I live in, the environment I am inserted into and the kind of work I am involved with, so, what I see as an disadvantage you may well see as an advantage :). Don't worry, we are not supposed to agree on everything.&lt;br /&gt;
&lt;br /&gt;
Another important point is that some &lt;a href="http://en.wikipedia.org/wiki/Teleworker"&gt;&lt;span style="font-style: italic;"&gt;teleworkers&lt;/span&gt;&lt;/a&gt; (as people that work from home are called) usually do work "&lt;span style="font-style: italic;"&gt;part time&lt;/span&gt;" in a &lt;span style="font-style: italic;"&gt;real&lt;/span&gt; office; that's not my case; I am working 100% of the time from my home and the nearest fellow is at least 100 Km (and the others are 1000 Km) away.&lt;br /&gt;
&lt;br /&gt;
To start with, here are a couple of &lt;a href="http://www.msnbc.msn.com/id/14516399/"&gt;interesting&lt;/a&gt; &lt;a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9112621&amp;amp;pageNumber=1"&gt;articles&lt;/a&gt; to read.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;Hope you find this information useful/fun :)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;See you.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;Adriano&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990000; font-family: verdana;"&gt;[edit: added link to following posts]&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;
&lt;li&gt;This post&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-ii.html"&gt;No need to commute&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-iii.html"&gt;Time Efficiency&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-iv.html"&gt;DIY&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-v.html"&gt;Show me the money&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-vi-mange.html"&gt;Manage your own time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/11/benefits-of-working-from-home-part-vii.html"&gt;Alone in the office&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/11/benefits-of-working-from-home-part-viii.html"&gt;Working Time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2008/11/benefits-of-working-from-home-part-ix.html"&gt;Infrastructure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programing-fun.blogspot.com/2009/03/benefits-of-working-from-home-epilogue.html"&gt;Epilogue&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;&lt;span style="color: #990000; font-family: verdana;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-89191428035881557?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/89191428035881557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=89191428035881557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/89191428035881557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/89191428035881557'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/10/benefits-of-working-from-home-part-i.html' title='Benefits of working from home - Part I - The dream job'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4458849675508460756</id><published>2008-09-10T17:25:00.004-03:00</published><updated>2008-09-10T17:33:07.047-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Here we come again :) - Part III - The end</title><content type='html'>&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Well, after some time researching and comparing prices I've ordered my new toy with the following configuration :
&lt;span style="color: rgb(153, 0, 0);font-family:verdana;font-size:small;"  &gt;&lt;table style="border: 1px solid green; padding: 4px; border-spacing: 0px; border-collapse: separate; background-color: white;"&gt;&lt;tbody&gt;&lt;tr style="background-color: rgb(102, 102, 102); color: rgb(255, 255, 255);"&gt;&lt;td&gt;Component&lt;/td&gt;&lt;td&gt;Detail&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Motherboard&lt;/td&gt;&lt;td&gt;GIGABYTE GA-EP45-DS3R &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Processor&lt;/td&gt;&lt;td&gt;INTEL Core 2 Quad Q3300 2.66GHz 12MB 1.333MHz&lt;/td&gt;&lt;/tr&gt;    &lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Memoty&lt;/td&gt;&lt;td&gt;8 Gb - OCZ DDR2 800&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cooler&lt;/td&gt;&lt;td&gt;Cooler Master Vortex
&lt;/td&gt;&lt;/tr&gt;   &lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Power&lt;/td&gt;&lt;td&gt;550W - Corsair&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Keyboard&lt;/td&gt;&lt;td&gt;Microsoft Wireless Desktop 2000
&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Video Card&lt;/td&gt;&lt;td&gt;Geforce XFX 9600GSO 384MB&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HD&lt;/td&gt;&lt;td&gt;750GB Samsung&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;
I do hope that this machine can keep up with my needs ;)

Also, I ordered a really big &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt; (at least for my standards) &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;monitor ....

&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Now I need to wait more or less one week to put my hands on this and starting
installing (probably Windows Vista x64 and some Linux x64 distro also).

OMG, I am to anxious!

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4458849675508460756?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4458849675508460756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4458849675508460756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4458849675508460756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4458849675508460756'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/09/here-we-come-again-part-iii-end.html' title='Here we come again :) - Part III - The end'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7008901352952030781</id><published>2008-08-11T12:09:00.005-03:00</published><updated>2008-08-11T14:02:47.499-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Extracting files from a MSI file.</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Today I was looking for a way to extract files from a msi installation package when I found a &lt;a href="http://www.tech-recipes.com/rx/2557/vista_how_to_extract_content_from_msi_files"&gt;blog&lt;/a&gt; just explaining how to do it:&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="border: 1px dotted rgb(153, 204, 0); padding: 9px 6px 10px 10px; background: rgb(204, 255, 153) none repeat scroll 0% 0%; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;msiexec /a filepath to MSI file /qb TARGETDIR=filepath to target folder
&lt;/div&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;
Despite the original blog title it does work with XP :)

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7008901352952030781?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7008901352952030781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7008901352952030781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7008901352952030781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7008901352952030781'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/08/extracting-files-from-msi-file.html' title='Extracting files from a MSI file.'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6302652559543842479</id><published>2008-08-04T13:51:00.009-03:00</published><updated>2008-09-08T22:16:11.375-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Here we come again :) - Part II</title><content type='html'>&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Just a little bit more information on my new toy (the one I am planning to get)
&lt;span style="color: rgb(153, 0, 0);font-family:verdana;font-size:small;"  &gt;&lt;table style="border: 1px solid green; padding: 4px; border-spacing: 0px; border-collapse: separate; background-color: white;"&gt;&lt;tbody&gt;&lt;tr style="background-color: rgb(102, 102, 102); color: rgb(255, 255, 255);"&gt;&lt;td&gt;Component&lt;/td&gt;&lt;td&gt;Detail&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Motherboard&lt;/td&gt;&lt;td&gt;GIGABYTE GA-EP45-DS3R &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Processor&lt;/td&gt;&lt;td&gt;INTEL Core 2 Quad Q9450 2.66GHz 12MB 1.333MHz&lt;/td&gt;&lt;/tr&gt;    &lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Memoty&lt;/td&gt;&lt;td&gt;8 Gb - G.SKILL DDR2 800&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cooler&lt;/td&gt;&lt;td&gt;ARCTIC COOLING Freezer 7 Pro&lt;/td&gt;&lt;/tr&gt;   &lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Power&lt;/td&gt;&lt;td&gt;550W - Seventeam&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Keyboard&lt;/td&gt;&lt;td&gt;Microsoft Wireless Desktop 2000 Optico&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-color: rgb(202, 232, 200);"&gt;&lt;td&gt;Video Card&lt;/td&gt;&lt;td&gt;Geforce XFX 8600GT 256MB&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HD&lt;/td&gt;&lt;td&gt;750GB SEAGATE&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;
Even not being the fastest possible configuration it is a pretty good one :)

Why did I need such a beast: Well, working as a software developer sometimes I find myself running Eclipse, Visual Studio as well a guest OS within Virtualbox (running VS and some other programs there also ;).

So I do believe (I'm not a expert in hardware) that a 4 core processor will be helpful; in the same way, 8 GB of memory doesn't seem that much :)

I considered to get a &lt;a href="http://www.wdc.com/en/products/products.asp?driveid=494"&gt;WD Raptor&lt;/a&gt; but it's too expansive here; also, I'll install 2 other HDs (that are sitting in my current machine) so I'll get some performance gains due to a more distributed load.

Do you have a raid 0 configuration? How does it perform? Is it reliable?

&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Right now I am considering to build a Raid 0 array also but I'm not sure. &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;My past experience wih Raid 0 was not so good.

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6302652559543842479?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6302652559543842479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6302652559543842479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6302652559543842479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6302652559543842479'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/08/just-little-bit-more-information-on-my.html' title='Here we come again :) - Part II'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6967322940578591044</id><published>2008-08-01T16:21:00.001-03:00</published><updated>2008-08-01T16:18:31.474-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><title type='text'>Here we come again :)</title><content type='html'>&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;For some time now, my computer started to give me signs that its time is coming. It's a pity since it is only 2 years old and has a &lt;span style="font-style: italic;"&gt;not so bad configuration.&lt;/span&gt;

For me, it's always a dichotomy between a pain and a pleasure when I need to figure out a new configuration. Should I go for a brand computer or should I build it myself? Should I by the latest/fastest/expansive(est) :)  processor/memory/whatever (in a useless try to protect my investment) or should I stick to more affordable parts? Please, keep in mind that I live in Brasil and here computers are not so cheap as in some other places.

Anyway, just for fun, I am dumping all my previous computer's configuration along side my &lt;span style="font-style: italic;"&gt;wishes &lt;/span&gt;for the new one:

&lt;div class="nobr"&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;font-size:small;"  &gt;
&lt;table style="border: 1px solid green; border-spacing: 0px; border-collapse: separate; background-color: white;" class="table-br"&gt; &lt;tbody&gt;  &lt;tr&gt;
 &lt;td width="60"&gt;Year&lt;/td&gt;
 &lt;td width="180"&gt;Processor&lt;/td&gt;
 &lt;td width="100"&gt;Freq.&lt;/td&gt;
 &lt;td width="40"&gt;# Core&lt;/td&gt;
 &lt;td width="80"&gt;RAM&lt;/td&gt;
 &lt;td&gt;Hard Disk&lt;/td&gt;
 &lt;td&gt;Graphics Card&lt;/td&gt;
 &lt;td&gt;Internet&lt;/td&gt;
&lt;/tr&gt;    &lt;tr style="background-color: rgb(202, 232, 200);"&gt;
 &lt;td&gt;1989&lt;/td&gt;
 &lt;td&gt;6502&lt;/td&gt;
 &lt;td&gt;0,75 Mhz&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;256 Kb&lt;/td&gt;
 &lt;td&gt;NA&lt;/td&gt;
 &lt;td&gt;OnBoard&lt;/td&gt;
 &lt;td&gt;NA&lt;/td&gt;
&lt;/tr&gt;    &lt;tr&gt;
 &lt;td&gt;1992&lt;/td&gt;
 &lt;td&gt;Ciryx 486 DLC&lt;/td&gt;
 &lt;td&gt;40 Mhz&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;4 Mb&lt;/td&gt;
 &lt;td&gt;100 Mb&lt;/td&gt;
 &lt;td&gt;Trident&lt;/td&gt;
 &lt;td&gt;NA&lt;/td&gt;
&lt;/tr&gt;    &lt;tr style="background-color: rgb(202, 232, 200);"&gt;
 &lt;td&gt;1996&lt;/td&gt;
 &lt;td&gt;Pentium 100&lt;/td&gt;
 &lt;td&gt;100 Mhz&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;16 Mb&lt;/td&gt;
 &lt;td&gt;1.0 Gb&lt;/td&gt;
 &lt;td&gt;?&lt;/td&gt;
 &lt;td&gt;28 Kbps&lt;/td&gt;
&lt;/tr&gt;    &lt;tr&gt;
 &lt;td&gt;1999&lt;/td&gt;
 &lt;td&gt;Athlon 400&lt;/td&gt;
 &lt;td&gt;400 Mhz&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;128 Mb&lt;/td&gt;
 &lt;td&gt;30 Gb&lt;/td&gt;
 &lt;td&gt;4 Mb&lt;/td&gt;
 &lt;td&gt;56 Kbps&lt;/td&gt;
&lt;/tr&gt;    &lt;tr style="background-color: rgb(202, 232, 200);"&gt;
 &lt;td&gt;2002&lt;/td&gt;
 &lt;td&gt;Athlon XP 2.1&lt;/td&gt;
 &lt;td&gt;1.8 Ghz&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;512 Mb&lt;/td&gt;
 &lt;td&gt;60 Gb&lt;/td&gt;
 &lt;td&gt;AGP 64Mb&lt;/td&gt;
 &lt;td&gt;350 Kbps&lt;/td&gt;
&lt;/tr&gt;    &lt;tr&gt;
 &lt;td&gt;2006&lt;/td&gt;
 &lt;td&gt;Athlon 64 3.8 X2&lt;/td&gt;
 &lt;td&gt;2.0 Ghz&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;td&gt;2.0 Gb&lt;/td&gt;
 &lt;td&gt;370 Gb&lt;/td&gt;
 &lt;td&gt;PCI-X 256Mb&lt;/td&gt;
 &lt;td&gt;2.0 Mbps&lt;/td&gt;
&lt;/tr&gt;    &lt;tr style="background-color: rgb(255, 204, 153);"&gt;
 &lt;td&gt;2008?
&lt;/td&gt;
 &lt;td&gt;Core 2 Quad 9XXXX&lt;/td&gt;
 &lt;td&gt;&gt; 2.50 Ghz&lt;/td&gt;
 &lt;td&gt;4&lt;/td&gt;
 &lt;td&gt;8.0 Gb&lt;/td&gt;
 &lt;td&gt;500 Gb&lt;/td&gt;
 &lt;td&gt;PCI-X 256Mb&lt;/td&gt;
 &lt;td&gt;6.0 Mbps&lt;/td&gt;
&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;
&lt;/div&gt;
Well, what can I say? Current PC, RIP :)

What do &lt;span style="font-weight: bold;"&gt;you&lt;/span&gt; think?

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6967322940578591044?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6967322940578591044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6967322940578591044' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6967322940578591044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6967322940578591044'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/here-we-come-again.html' title='Here we come again :)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7586240380028093622</id><published>2008-07-23T17:09:00.004-03:00</published><updated>2008-07-23T17:37:23.152-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='computer'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>My mind is about to blow</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(153, 0, 0);"&gt;&lt;span style="font-family: georgia;"&gt;Hi.&lt;/span&gt;

&lt;span style="font-family: georgia;"&gt;That computer technology evolves day by day and the amount of information in this area is gigantic many of you already know (so do I), but today I was talking to a friend of mine and I realized how many books I want to ready (only in the subject Windows + .Net).

If you are curious you can see the &lt;a href="http://www.amazon.com/gp/registry/wishlist/1KCP7BCXL9KZA"&gt;list here&lt;/a&gt; but most of them were not published yet (and &lt;a href="http://www.amazon.com/gp/registry/wishlist/333WJE16FP06F"&gt;here&lt;/a&gt; you can find a list of some books I've already read / I'm reading).

What do you think about them? Is there any other book related to .Net / Windows development you consider a must?
&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: verdana; color: rgb(153, 0, 0);"&gt;&lt;span style="font-family: georgia;"&gt;PS: Feel free to give some of them as a gift when they get published :)

Adriano &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7586240380028093622?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7586240380028093622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7586240380028093622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7586240380028093622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7586240380028093622'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/my-mind-is-about-to-blow.html' title='My mind is about to blow'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5042493277281157544</id><published>2008-07-17T09:32:00.002-03:00</published><updated>2008-07-17T09:38:02.612-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Implications of instrumenting assemblies for Transparent Activation / Persistence in db4o - Part I</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(153, 0, 0);"&gt;Hi,

Just to let you know I've &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/07/14/implications-of-intrumenting-assemblies-for-transparent-activation-persistence-in-db4o-part-i.aspx"&gt;posted&lt;/a&gt; about Transparent Activation / Persistence to db4o blogs ;)

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5042493277281157544?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5042493277281157544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5042493277281157544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5042493277281157544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5042493277281157544'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/implications-of-instrumenting.html' title='Implications of instrumenting assemblies for Transparent Activation / Persistence in db4o - Part I'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-3664883667385752255</id><published>2008-07-16T23:45:00.002-03:00</published><updated>2008-07-16T23:49:20.575-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='multithread'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>An interesting video on C# 4.0 design discussions</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;
&lt;iframe src="http://channel9.msdn.com/posts/Charles/409364/player/" scrolling="no" width="320" frameborder="0" height="325"&gt;&lt;/iframe&gt;
&lt;a href="http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/"&gt;C# 4.0: Meet the Design Team&lt;/a&gt;

Have fun

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-3664883667385752255?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/3664883667385752255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=3664883667385752255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3664883667385752255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3664883667385752255'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/interesting-video-on-c-40-design.html' title='An interesting video on C# 4.0 design discussions'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5109502885567975356</id><published>2008-07-15T18:06:00.005-03:00</published><updated>2008-07-15T18:22:28.068-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Another one in the obscure codding practices ...</title><content type='html'>&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;As I said in &lt;a href="http://programing-fun.blogspot.com/2008/07/cert-c-secure-coding-standard.html"&gt;this post&lt;/a&gt;, today I've found an interesting site about C++ programing practices.

While reading this pages I learned another way to write a fragile application (as always, writing bad code is enough :)

So, let's go for it! What will be the output of the following program?
&lt;pre class="c++" name="code"&gt;
void main(int argc, char* argv[])
{
  int n = 255;
  size_t size = sizeof(++n);
  printf("%d", n);
}
&lt;/pre&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Maybe this be can pretty obvious to you, but it was not to me (maybe because I avoid to write obscure code as much as I can :)

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5109502885567975356?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5109502885567975356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5109502885567975356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5109502885567975356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5109502885567975356'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/another-one-in-obscure-codding.html' title='Another one in the obscure codding practices ...'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-9086333486971437695</id><published>2008-07-15T09:13:00.004-03:00</published><updated>2008-07-15T09:17:48.585-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>CERT C++ Secure Coding Standard</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(153, 0, 0);"&gt;Hi.

Today I reached &lt;a href="https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=637"&gt;this page&lt;/a&gt; (on cert.org) site talking about C++ secure standard practices. I haven't read it to the end yet but at a first glance it looks pretty interesting (and useful) to me.

Wait, don't call yet!! There's a page regarding safe practices for C also!

I'll be reading this as soon as I get some time to ;)

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-9086333486971437695?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/9086333486971437695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=9086333486971437695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/9086333486971437695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/9086333486971437695'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/cert-c-secure-coding-standard.html' title='CERT C++ Secure Coding Standard'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5288993404549405882</id><published>2008-07-02T23:38:00.004-03:00</published><updated>2008-07-02T23:57:02.044-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><title type='text'>What is wrong with this code?</title><content type='html'>&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;I was reading some blogs this week and find an interesting story related to references in C++ (and as it has some time that I don't work/post about C++) so I decided to post about it.

Take a look in the code and try to answer the following questions below:
&lt;pre class="C++" name="code"&gt;
#include "stdafx.h"
#include "stdio.h"

class SimpleClass
{
public:
SimpleClass(int n)
{
   value = n;
}

void FirstMethod(TCHAR* str)
{
  wprintf(str);
}

void SecondMethod()
{
  wprintf(L"Value: %d", value);
}

private:
int value;
};

void Test(SimpleClass &amp;amp;ref, int i)
{
switch(i)
{
  case 1:
     ref.FirstMethod(L"Hello world\r\n");
     break;

  case 2:
     ref.SecondMethod();
     break;
}
}

int _tmain(int argc, _TCHAR* argv[])
{
SimpleClass *p = 0;

Test(*p, 1);
Test(*p, 2);

return 0;
}
&lt;/pre&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Will it compile? run?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;What would be the outcome from Test being called in line 39?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;What about line 40?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;Is there any other issues?&lt;/span&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(153, 0, 0);font-family:verdana;" &gt;(PS: VS 2008 compiled it with no warnings....)

Adriano

&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5288993404549405882?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5288993404549405882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5288993404549405882' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5288993404549405882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5288993404549405882'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/07/what-is-wrong-with-this-code.html' title='What is wrong with this code?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7728274604397601759</id><published>2008-06-29T08:06:00.001-03:00</published><updated>2008-06-29T16:21:41.029-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><title type='text'>Do it yourself</title><content type='html'>&lt;span style="color: rgb(153, 0, 0);font-family:georgia;" &gt;Hi,&lt;/span&gt;

&lt;span style="color: rgb(153, 0, 0);font-family:georgia;" &gt;I'm a strong believer that the DIY (Dot it yourself) philosophy helps to improve knowledge on the topic you are working on. So if you &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:georgia;" &gt;If you are a developer using (or planing to use) &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; (and have the time), I highly recommend to try do build it yourself as explained &lt;/span&gt;&lt;a style="font-family: georgia; color: rgb(153, 0, 0);" href="http://developer.db4o.com/blogs/paircasts/archive/2008/06/23/full-db4o-build-from-svn-sources.aspx"&gt;here&lt;/a&gt;&lt;span style="color: rgb(153, 0, 0);font-family:georgia;" &gt;.

One point that can be further explored is the possibility to run the tests on a ramdisk in order to improve performance (in may machine I get an improvement of 20%).

To be able to do this you need to create a ramdisk (personally I use &lt;a href="http://members.fortunecity.com/ramdisk/RAMDisk/ramdriv.htm"&gt;this one&lt;/a&gt;) and them set 2 properties in our machine.properties file:

&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); font-family: courier new;font-family:georgia;" &gt;java.vmargs=-Ddb4ounit.file.path=DIR -Djava.io.tmpdir=DIR
dir.tests.temp=DIR
&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:georgia;" &gt;
Here, &lt;span style="font-style: italic;"&gt;DIR&lt;/span&gt; is an path to your ramdisk (in may case I use &lt;span style="font-weight: bold;"&gt;r:/temp&lt;/span&gt;).

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7728274604397601759?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7728274604397601759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7728274604397601759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7728274604397601759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7728274604397601759'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/do-it-yourself.html' title='Do it yourself'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-9031728280656842546</id><published>2008-06-25T15:15:00.019-03:00</published><updated>2008-07-23T08:06:52.184-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Type safe / refactor friendly configuration for Db4o - Part III</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;Hi,

In the &lt;a href="http://programing-fun.blogspot.com/2008/05/type-safe-refactor-friendly.html"&gt;first&lt;/a&gt; installment of this series I presented the idea of having a typesafe way to configure db4o. In the &lt;a href="http://programing-fun.blogspot.com/2008/05/type-safe-refactor-friendly_14.html"&gt;second one&lt;/a&gt;,  I explored how we could use expression trees to figure out a property name being accessed.

In this post I'll address the issue on h&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;ow to dive into the property's IL (intermediate language) to come up with a field name which we want to configure (if you are not familiar to IL, please, read along some of the links &lt;a href="http://en.wikipedia.org/wiki/Common_Intermediate_Language"&gt;here&lt;/a&gt;).

The best tools I'm aware of  (when it comes to read or even change a method's IL!) are the  &lt;a href="http://www.mono-project.com/Cecil"&gt;Mono Cecil&lt;/a&gt; library and &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Net Reflector&lt;/a&gt;, which is an invaluable tool when you want just to look at a method's IL without writing one line of code. I don't need to say that I used these tools a lot :)

&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;In order to come up with a field name to be indexed, t&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;he main approach &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;is to find all return paths for the property getter in question and check the field being returned. Simple, right? Unfortunately no; what if the property getter returns only constants? what if there are more than one field involved?

Before we dig into the details about IL handling, let's document the behavior for some possible use cases (the less obvious ones) regarding property getter return paths:
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;Only constants: Throw exception
&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;More than one field involved: Throw exception
&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;Chained method: returns the called method / property accessed field.&lt;/span&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;(we could come up with different requirements, for instance, every field referenced in one property return path must be indexed, but in order to keep it simple, let's stick to the rules presented above).

From my previous posts, we already have a way to figure out the property get being accessed; the next step is to analyze the method body; I used Cecil.FlowAnalisys to accomplish this task  (line 6) in the following function:&lt;pre class="C#" name="code"&gt;public FieldReference Resolve(MethodDefinition method)
{
if (CheckRecursion(FullName(method))) return null;
callStack.Push(FullName(method));

ControlFlowGraph graph = FlowGraphFactory.CreateControlFlowGraph(method);

graph.Dump(Console.Out);

Resolve(
graph.Blocks[0],
firstInstruction =&gt; Array.Find(
                   graph.Blocks,
                  candidate =&gt; candidate.FirstInstruction == firstInstruction));

callStack.Pop();

FieldReference reference = CheckReferencedFields(
                         referencedFields, method.Name);
referencedFields.Clear();

return reference;
}
&lt;/pre&gt;Next, for each control block we inspect it's IL as shown in the following code:
&lt;pre class="C#" name="code"&gt;void Resolve(
    InstructionBlock block,
    Func&amp;lt;Instruction, InstructionBlock&amp;gt; blockForStartingInstruction)
{
if (AnalyzeInstructions(block.FirstInstruction, block.LastInstruction))
{
 Resolve(
    blockForStartingInstruction(block.LastInstruction.Next),
    blockForStartingInstruction);
}

for (int i = 0; i &amp;lt; block.Successors.Length; i++)
{
  Resolve(block.Successors[i], blockForStartingInstruction);
}
}
&lt;/pre&gt;
In Line 5 we call a function that do the dirt work of analyzing the IL instructions. This function returns true if the block containing the next instruction  (after the last instruction of the current block) should be handled as the "next block" (this is done to support &lt;span style="font-style: italic;"&gt;finally &lt;/span&gt;blocks).

Lines 12-15 just process the remaining  blocks calling &lt;span style="font-size:130%;"&gt;&lt;span style="font-family:courier new;"&gt;Resolve()&lt;/span&gt;&lt;/span&gt; recursively.

The real fun is in AnalyzeInstructions() function which do the following:
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;Line 7/9: For &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.ldfld.aspx"&gt;Ldfld&lt;/a&gt; / &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.ret.aspx"&gt;Ret&lt;/a&gt; instruction sequences, add ldfld target to return field list (lines 11 and 12).
&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;Line 16: Add an alias for the each &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.ldfld.aspx"&gt;Ldfld&lt;/a&gt; /&lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.stloc.aspx"&gt;Stloc&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt; &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;sequence&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;For &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.ldloc.aspx"&gt;Ldloc&lt;/a&gt; / &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.ret.aspx"&gt;Ret&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt; sequences, search the aliases to see if ldloc's operand is an alias for a field and add any alias found to the return field list (line 23).
&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;If a method call is found, analyze the target's method body (lines 35 - 41).&lt;/span&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;&lt;pre class="c#" name="code"&gt;
bool AnalyzeInstructions(
Instruction current,
Instruction last)
{
while (current != last.Next)
{
if (IsLoadField(current))
{
 if (IsReturn(current.Next))
 {
     referencedFields.Add(
          (FieldReference)current.Operand);
 }
 else
 {
    EnsureLocalVariableAliasFor(current, () =&gt; (FieldReference)current.Operand);
 }
}
else if (IsLdloc(current.OpCode))
{
 if (IsReturn(InstructionOrBranchTarget(current.Next)))
 {
   FlushAliasesFor(current);
 }
 else if (IsStore(InstructionOrBranchTarget(current.Next)))
 {
    EnsureLocalVariableAliasFor(
        current,
        () =&gt; aliases.Find(
            candidate =&gt; candidate.OpCode == current.OpCode).Field);

    current = current.Next;
 }
}
else if (IsMethodCall(current))
{
 EnsureLocalVariableAliasFor(
   current,
   () =&gt; Resolve(
      ResolveMethod((MethodReference)current.Operand)));
}

current = current.Next;
}

return IsLeave(last);
}&lt;/pre&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;That's it!

&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;You can download the full source code &lt;a href="http://www.adrive.com/public/4eae80c9b569fb57222f62d1c6519741b7b6c74dfd731f884e18e3056075def1.html"&gt;here&lt;/a&gt;.

&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family: verdana;"&gt;[Updated on 7/23/2008: Fixed the source code download link]&lt;/span&gt;&lt;/span&gt;

Just in case you want to play with the code, one point can (need to) be  improved is the handling of exception blocks.
&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;Thoughts?&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;
&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:georgia;" &gt;
Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-9031728280656842546?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/9031728280656842546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=9031728280656842546' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/9031728280656842546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/9031728280656842546'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/type-safe-refactor-friendly.html' title='Type safe / refactor friendly configuration for Db4o - Part III'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7495752932925474490</id><published>2008-06-23T11:55:00.003-03:00</published><updated>2008-06-23T13:52:45.707-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Very interesting (and funny)</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(102, 51, 51);"&gt;Hi,

This morning a friend of mine send me &lt;a href="http://www.vimeo.com/1195398?pg=embed&amp;amp;sec=1195398"&gt;this link&lt;/a&gt; about colaborative development in eclipse. Very interesting

Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7495752932925474490?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7495752932925474490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7495752932925474490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7495752932925474490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7495752932925474490'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/very-interesting-and-funny.html' title='Very interesting (and funny)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8507373931597694156</id><published>2008-06-21T10:10:00.041-03:00</published><updated>2008-06-23T00:46:52.242-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>You are not paid to introduce bugs :)</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Hi,

Today's post is in the series "what is wrong with this code" but before presenting the actual problematic code I want to give some background, so bear with me.

At Db4o we run migration tests (regularly) in order to guarantee that we are able to load (and query) databases created by older versions of Db4o engine. The way it's accomplished is very simple:
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;for each configured version, create an database using it and perform a series of tests with the trunk version.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Some time ago, I was asked to fix an annoying bug in these migration tests.

In order minimize the time required to run these tests, we do not run then against every existing Db4o version. To allow this selective running we introduced a way to specify the minimum version to be tested so, if one want to test versions 6.0 and above it is a simple matter of setting a constant in a C# source:&lt;pre class="C#" name="code"&gt;private const double MinimumVersionToTest = 6.0;
&lt;/pre&gt;
At some point in the code we called the following function (wrong version):
&lt;pre class="C#" name="code"&gt;
double VersionFromVersionName(string versionName)
{
Version version = new Version(versionName);
return version.Major + version.Minor / 10;
}
&lt;/pre&gt;
This function is supposed to return the double representation of an assembly version (string) but it fails miserably (this code works correctly only for versions with a decimal value 0 (zero); for instance, 6.0, 7.0, etc).

Now the question is, what's is wrong with this function?

To be fair I have to admit that it's not a hard to spot bug, but when you are in a hurry and have no test for your test code...

The problem is that version.Minor is an integer field and so,
&lt;pre class="C#" name="code"&gt;
version.Minor / 10
&lt;/pre&gt;
will result in a integer number and the decimal part will be happily discarded. The developer who wrote this code (me) is aware of language type conversions but he didn't notice the error&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt; (shame on me) &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;; so whenever we passed a version number not finished  in 0 (zero) we got the wrong double representation for it!
&lt;style type="text/css"&gt;.nobrtable br { display: none }&lt;br /&gt;&lt;/style&gt;
&lt;div class="nobrtable"&gt;

&lt;table cellpading="3" border="1" cellspacing="0"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Actual Version&lt;/td&gt;&lt;td&gt;Function Return&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;6.0&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;6.1&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;7.2&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;/div&gt;
The fix? Pretty easy: Just add a ".0" to the divisor :) (I could also add an F: 10F)
&lt;pre class="C#" name="code"&gt;
double VersionFromVersionName(string versionName)
{
 Version version = new Version(versionName);
 return version.Major + version.Minor / 10.0;
}
&lt;/pre&gt;The bottom line? T&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;his episode just highlights (and reminds me about) the importance of double checking our test code! after all, as a friend of mine likes to ask:

&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;who test that the tests test what they should test?&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;
Have fun.

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8507373931597694156?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8507373931597694156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8507373931597694156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8507373931597694156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8507373931597694156'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/you-are-not-paid-to-introduce-bugs.html' title='You are not paid to introduce bugs :)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8687991218450325282</id><published>2008-06-03T12:09:00.022-03:00</published><updated>2008-06-18T19:05:09.173-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Running Sharpen Tests</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Hi.&lt;br /&gt;&lt;br /&gt;If you start using &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Sharpen"&gt;sharpen&lt;/a&gt;, you'll probably find some limitation / bug and, maybe,  want to take a look into the issue.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;In this case the best approach (IMHO) would be to &lt;span style="font-style: italic;"&gt;i)&lt;/span&gt; start a discussion in &lt;a href="http://developer.db4o.com/forums/158/ShowForum.aspx"&gt;Sharpen Forum&lt;/a&gt; and, if &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt; appropriate&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;d (in the case there's no issue filed already)&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;, &lt;span style="font-style: italic;"&gt;ii)&lt;/span&gt; file a new Jira issue into our &lt;a href="http://tracker.db4o.com/secure/Dashboard.jspa"&gt;issue tracking system&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;Next, if you have the time, &lt;span style="font-style: italic;"&gt;iii) &lt;/span&gt;try&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt; to replicate the behavior with a minimal test &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;case. The last step &lt;span style="font-style: italic;"&gt;iv)&lt;/span&gt; would be trying to fix the issue.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;This post is all about &lt;span style="font-style: italic;"&gt;iii&lt;/span&gt;, or to be more clear, on how to run / write unit tests for Sharpen.&lt;br /&gt;&lt;br /&gt;Let's start by opening an empty  eclipse workspace:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JjJXM4oi98I/SEWA4xKODYI/AAAAAAAAAHw/gqpt5xXgQk8/s1600-h/Eclipe+-+Empty+Workspace.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JjJXM4oi98I/SEWA4xKODYI/AAAAAAAAAHw/gqpt5xXgQk8/s320/Eclipe+-+Empty+Workspace.jpg" alt="" id="BLOGGER_PHOTO_ID_5207710256881077634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Next, open SVN perspective and add a new SVN repository pointing to&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;https://source.db4o.com/db4o/trunk/sharpen/&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JjJXM4oi98I/SEWBkBKODZI/AAAAAAAAAH4/ZNMweeSQ7IY/s1600-h/Eclipe+-+SVN+New+Repository+Location.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JjJXM4oi98I/SEWBkBKODZI/AAAAAAAAAH4/ZNMweeSQ7IY/s320/Eclipe+-+SVN+New+Repository+Location.jpg" alt="" id="BLOGGER_PHOTO_ID_5207710999910419858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;and checkout all projects.&lt;br /&gt;&lt;br /&gt;No install the plugin (as explained &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/05/20/smart-java-to-c-conversion-for-the-masses-with-sharpen.aspx"&gt;here&lt;/a&gt;):&lt;br /&gt;&lt;/span&gt;&lt;ul  style="font-family:verdana;"&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-size:100%;" &gt;In package explorer (Java perspective), right click on sharpen.core and select "&lt;span style="font-style: italic;"&gt;Export&lt;/span&gt;" from the context menu.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-size:100%;" &gt;Expand the "Plug-in Development" folder and select "Deployable plug-ins and fragments".&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-size:100%;" &gt;Set "Destination" to the root folder of your eclipse installation and click "Finish";&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Now you can run Sharpen Tests by right clicking on "sharpen.ui.tests" and selecting "&lt;span style="font-style: italic; font-weight: bold;"&gt;Run as / JUnit Plug-in Test&lt;/span&gt;";&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JjJXM4oi98I/SEWPNhKODaI/AAAAAAAAAIA/buV_4amF5h0/s1600-h/Eclipe+-+Run+Sharpen+Tests.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JjJXM4oi98I/SEWPNhKODaI/AAAAAAAAAIA/buV_4amF5h0/s320/Eclipe+-+Run+Sharpen+Tests.jpg" alt="" id="BLOGGER_PHOTO_ID_5207726006526152098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;after some processing your screen should look something like:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JjJXM4oi98I/SEWPyRKODbI/AAAAAAAAAII/bjYFNaBEUug/s1600-h/Eclipe+-+Run+Sharpen+Tests+2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JjJXM4oi98I/SEWPyRKODbI/AAAAAAAAAII/bjYFNaBEUug/s320/Eclipe+-+Run+Sharpen+Tests+2.jpg" alt="" id="BLOGGER_PHOTO_ID_5207726637886344626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;When the tests finishes you should see 0 (zero) errors and failures (as of today, there's some issue with sharpen.builder and sometimes you will get 2 errors in its tests but these errors don't prevent sharpen to work properly and, as you can see, when I executed the tests the errors didn't showed up).&lt;br /&gt;&lt;br /&gt;Now let's explore the general look 'n' feel of a Sharpen test. In &lt;span style="font-style: italic;"&gt;package explorer &lt;/span&gt;expand the node &lt;span style="font-style: italic;"&gt;sharpen.ui.tests&lt;/span&gt; then &lt;span style="font-style: italic;"&gt;testscases&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JjJXM4oi98I/SEWSTBKODcI/AAAAAAAAAIQ/Yb-FbnKZnGc/s1600-h/Eclipe+-+Sharpen+Test+Anatomy.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JjJXM4oi98I/SEWSTBKODcI/AAAAAAAAAIQ/Yb-FbnKZnGc/s320/Eclipe+-+Sharpen+Test+Anatomy.jpg" alt="" id="BLOGGER_PHOTO_ID_5207729399550315970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;For each sharpen functionality there  will be at least one pair of files (collectively called &lt;span style="font-style: italic;"&gt;Test Case Resource&lt;/span&gt;):&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;One .java.txt that stores the java source to be converted;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;One .cs.txt storing the expected sharpened file;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;In the above picture we are testing interface conversion. Take the time to poke around &lt;span style="font-style: italic;"&gt;testcases&lt;/span&gt; folder checking some of the tests.&lt;br /&gt;&lt;br /&gt;The next logical step is to add new tests. Basically to add a new tests we need to:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Create the original java source (.java.txt)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Create the expected cs file (.cs.txt)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Plug these two files into the test engine. &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;In the common scenarios, all we have to do is to call &lt;span style="font-family:courier new;"&gt;runResourceTestCase()&lt;/span&gt; function.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;To see an example, just expand sharpen.ui.tests/src/sharpen.ui.tests folder and double click on &lt;span style="font-style: italic;"&gt;NativeInterfacesTestCase.java&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JjJXM4oi98I/SEWYfxKODdI/AAAAAAAAAIY/G47Wv-k16hA/s1600-h/Eclipe+-+Sharpen+-+Adding+new+tests.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JjJXM4oi98I/SEWYfxKODdI/AAAAAAAAAIY/G47Wv-k16hA/s320/Eclipe+-+Sharpen+-+Adding+new+tests.jpg" alt="" id="BLOGGER_PHOTO_ID_5207736215663414738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;In a future post (soon I hope) I want to take a look in a few other points such as:&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;&lt;/span&gt;&lt;ul  style="font-family:verdana;"&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Getting a little better performance when starting sharpen using the approach presented in this post.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;How to debug sharpen.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;A trick to see the expected / actual values (useful when creating new tests).&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;font-size:100%;"  &gt;Thoughts?&lt;br /&gt;&lt;br /&gt;Adriano&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8687991218450325282?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8687991218450325282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8687991218450325282' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8687991218450325282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8687991218450325282'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/running-sharpen-tests.html' title='Running Sharpen Tests'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JjJXM4oi98I/SEWA4xKODYI/AAAAAAAAAHw/gqpt5xXgQk8/s72-c/Eclipe+-+Empty+Workspace.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4279061110997212125</id><published>2008-06-02T23:53:00.001-03:00</published><updated>2008-06-03T14:22:45.251-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Dumb security...</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Hi!

Am I in a bad mood today? Well, maybe, but I really feel upset when something supposed to help me to be safer on the net starts to get into my way or, even worse, pushes me in the other direction.

That is what happened today when I tried to use a well know credit card website (which I'll not name here :) to see my billing information. Of course, as I don't use this service very often, I didn't remember my user name / password!

Ok, (I thought) I just need to call their support service and ask them to reset my user name / password to one that I do know. So, I picked up the phone and called them.

My first issue was that they didn't allowed me to choose my user name! Ack! Ok, this is not a big issue anyway (I can always write it down somewhere). The real problem (in my opinion) is that they requires that you &lt;span style="font-weight: bold;"&gt;MUST&lt;/span&gt; set a password which is &lt;span style="font-weight: bold;"&gt;at least 6 &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;&lt;span style="font-weight: bold;"&gt;but no more than 8 &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;characters in lenght! And you &lt;span style="font-weight: bold;"&gt;MUST&lt;/span&gt; use numbers also!

Ok, I understand that mixing numbers, digits, punctuation, etc. in a password helps to make it stronger, but these rules forces me to give up on my "&lt;span style="font-style: italic;"&gt;password schema&lt;/span&gt;" (I use different passwords for each site; each password is an encoding of a lengthy phrase).

The result? I'd never be able to remember the password I choose (no matter which one I pick); it's even worse as probably I'd choose a weaker one in a desperate (hopeless) try to not forget it again.

After this episode I decided to take the time (ok, I'm a little bit lazy) and give &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;some password manager &lt;/span&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;a try (at least they succeeded in the purpose of forcing users - at least me - to use a stronger password :). I'll be experimenting with a firefox plugin called &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/3863"&gt;iMacros&lt;/a&gt;.

Let's see how it works :)

See you.

Adriano.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4279061110997212125?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4279061110997212125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4279061110997212125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4279061110997212125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4279061110997212125'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/dumb-security.html' title='Dumb security...'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5061435209657982967</id><published>2008-06-02T15:04:00.004-03:00</published><updated>2008-06-02T15:14:46.084-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>New programing language!</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-size:100%;" &gt;&lt;span style="font-family:courier new;"&gt;Hi!

Today I got an "job opportunity" from one of jobs sites I'm registered (no, I'm not looking for a new job, I just didn't unregistered) with a really intriguing subject:

&lt;blockquote&gt;A skilled professional with 3 years of experience in C, &lt;span style="font-weight: bold;"&gt;Sharp&lt;/span&gt; and VB.NET.&lt;/blockquote&gt;
I have to admit that I do know &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; and also a little of VB.NET, but I have never seen SHARP :)

Ok, probably it was just a mistyping, but I bet the person who wrote this subject has no idea about programing languages whatsoever ;)


&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5061435209657982967?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5061435209657982967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5061435209657982967' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5061435209657982967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5061435209657982967'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/06/new-programing-language.html' title='New programing language!'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8226266548685157805</id><published>2008-05-22T10:15:00.002-03:00</published><updated>2008-05-22T10:28:13.700-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Where do you search for .Net tools?</title><content type='html'>&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;Hi.

This will be a very short, but I hope useful, post!

Of course I usually do a google search when I want to find some system/programing tools.

Also I do keep an eye on some pretty helpful sites:
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.thefreecountry.com/"&gt;&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;The Free Country&lt;/span&gt;&lt;/a&gt; &lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;(www.thefreecountry.net)&lt;/span&gt;
&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;Source Forge (www.sourceforge.net)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;Codeplex (www.codeplex.com)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;Fresgmeat (freshmeat.net/)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: georgia; color: rgb(102, 51, 0);"&gt;One site that I really like when I want anything related to .Net is &lt;a href="http://sharptoolbox.com"&gt;sharptoolbox&lt;/a&gt; (sharptoolbox.com). If you are a .Net developer you should take a serious look into this site.

Which sites do you visit to get system/programing tools?

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8226266548685157805?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8226266548685157805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8226266548685157805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8226266548685157805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8226266548685157805'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/05/where-do-you-search-for-net-tools.html' title='Where do you search for .Net tools?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6482097187137861637</id><published>2008-05-15T00:01:00.008-03:00</published><updated>2008-05-15T00:23:23.830-03:00</updated><title type='text'>Usefull firefox trick</title><content type='html'>&lt;span style="color: rgb(128, 0, 0); font-family: trebuchet ms;"&gt;There is one little trick in Firefox that few people I know are aware of:&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt; It's possible to create "&lt;em&gt;shortcuts&lt;/em&gt;" in order to &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;make it easy to browse for sites that accepts inputs.&lt;br /&gt;&lt;br /&gt;As an example let's take &lt;em&gt;the free dictionary&lt;/em&gt;, very nice (guess what ??) dictionary site :)&lt;/span&gt;  &lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;When you browse to &lt;a href="http://www.tfd.com/"&gt;www.tfd.com&lt;/a&gt; and enter a word to search it navigates to &lt;a href="http://www.tdf.com/word"&gt;www.tdf.com/&lt;em&gt;word&lt;/em&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;In Firefox we can add a shortcut so we can speedy our browsing experience. See the example below&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: trebuchet ms;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JjJXM4oi98I/SCuripjqPjI/AAAAAAAAAFg/U28h7_9gTxY/s1600-h/Firefox1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JjJXM4oi98I/SCuripjqPjI/AAAAAAAAAFg/U28h7_9gTxY/s400/Firefox1.jpg" alt="" id="BLOGGER_PHOTO_ID_5200438806488694322" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="color: rgb(128, 0, 0); font-family: trebuchet ms;"&gt;Instead going to the TheFreeDictionary site and then typing the word we want to look for (for instance, &lt;em&gt;cake&lt;/em&gt;), just type &lt;strong&gt;tfd cake &lt;/strong&gt;in firefox address bar! Simple like that! :)&lt;/span&gt;  &lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;In order to make this work we need to tell firefox that we want a shortcut named &lt;strong&gt;tfd &lt;/strong&gt;(you can name it at your will) and that it must navigate to &lt;a href="http://www.tfd.com/whatever-we-type-in-address-bar"&gt;www.tfd.com/whatever-we-type-in-address-bar&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;To do this, open bookmark manager (CTRL-B) add a new bookmark as follow:&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: trebuchet ms;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JjJXM4oi98I/SCuoDZjqPeI/AAAAAAAAAE4/TuFFkEP0yTQ/s1600-h/Firefox2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JjJXM4oi98I/SCuoDZjqPeI/AAAAAAAAAE4/TuFFkEP0yTQ/s320/Firefox2.jpg" alt="" id="BLOGGER_PHOTO_ID_5200434971082898914" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p style="font-family: trebuchet ms; text-align: center;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;(note the url: http://www.tfd.com/&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 102, 0); font-style: italic;"&gt;%s&lt;/span&gt;&lt;span style="font-style: italic;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Press Add and you are done! Now just type &lt;strong&gt;&lt;em&gt;tfd cake&lt;/em&gt;&lt;/strong&gt; on firefox address bar!&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: trebuchet ms;"&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Adriano&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6482097187137861637?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6482097187137861637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6482097187137861637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6482097187137861637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6482097187137861637'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/05/usefull-firefox-trick.html' title='Usefull firefox trick'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JjJXM4oi98I/SCuripjqPjI/AAAAAAAAAFg/U28h7_9gTxY/s72-c/Firefox1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1997659507210520188</id><published>2008-05-14T20:05:00.004-03:00</published><updated>2008-05-14T20:13:13.762-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Type safe / refactor friendly configuration for Db4o - Part II</title><content type='html'>&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;In my &lt;a href="http://programing-fun.blogspot.com/2008/05/type-safe-refactor-friendly.html"&gt;last post&lt;/a&gt; I proposed to derive field names from a property accessor in order to gain type safety and compiler support when configuring some aspects of D4bo.
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;So, given the following class:&lt;/span&gt;&lt;/p&gt;&lt;pre class="C#" name="code"&gt;public class Test
{
   private int _age;
   public int Age
   {
      get { return _age; }
      set { _age = value; }
   }
}&lt;/pre&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;we could use the following code:&lt;/span&gt;
&lt;pre class="c#" name="code"&gt;IConfiguration cfg = Db4oFactory.NewConfiguration();
cfg.ObjectField((Test t) =&gt; t.Age).Indexed = true;&lt;/pre&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;instead of:&lt;/span&gt;
&lt;pre class="c#" name="code"&gt;IConfiguration cfg = Db4oFactory.NewConfiguration();
cfg.ObjectClass(typeof(Test)).ObjectField("_age").Indexed = true;&lt;/pre&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;to configure a field to be indexed.&lt;/span&gt;

&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;The first step to use this syntax is to be able to figure out the property being accessed. To demonstrate how this can be done let's write a simple function that takes advantage of C# Expression Trees:&lt;/span&gt;&lt;pre class="C#" name="code"&gt;public string GetPropertyName&amp;lt;T,R&amp;gt;(
               Expression&amp;lt;Func&amp;lt;T,R&amp;gt; exp)
{
  // Get the property name here.
}

public static void Main()
{
   string s = GetPropertyName((Test t) =&amp;gt; t.Age);
}&lt;/pre&gt;
&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;When compiling the above code, the C# compiler will create an expression tree representing our lambda expression ( (Test t) =&amp;gt; t.Age)  and pass it along to GetPropertyName() function.&lt;/span&gt;

&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Inside this function we can just use the &lt;span style=";font-family:Courier New;font-size:100%;"  &gt;Body&lt;/span&gt; property (which in this case represents &lt;span style=";font-family:Courier New;font-size:100%;"  &gt;&lt;strong&gt;t.Age&lt;/strong&gt;&lt;/span&gt; part of our lambda expression) and cast it to &lt;span style=";font-family:Courier New;font-size:100%;"  &gt;MemberExpression&lt;/span&gt;. Now all we have to do is to consult &lt;span style=";font-family:Courier New;font-size:100%;"  &gt;MemberExpression&lt;/span&gt;.Meber.Name property:&lt;/span&gt;&lt;/p&gt;&lt;pre class="C#" name="code"&gt;public string GetPropertyName&amp;lt;T,R&amp;gt;(
               Expression&amp;lt;Func&amp;lt;T,R&amp;gt; exp)
{
    MemberExpression me = fieldExp.Body as
                             MemberExpression;
    if (me == null) return "na";

    MemberInfo m = me.Member;
    return m.DeclaringType.FullName + "." + m.Name;
}&lt;/pre&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;At this point we are able to figure out the name of the property being accessed! If you take a deeper look into &lt;span style=";font-family:Courier New;font-size:100%;"  &gt;me.Member&lt;/span&gt; we will see that it is a &lt;span style=";font-family:Courier New;font-size:100%;"  &gt;PropertyInfo&lt;/span&gt; instance where you can get a lot more information about the property.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;In the next post I'll dig a little bit deeper and investigate how we can select a field based on the property being accessed ;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Thoughts?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Adriano&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1997659507210520188?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1997659507210520188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1997659507210520188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1997659507210520188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1997659507210520188'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/05/type-safe-refactor-friendly_14.html' title='Type safe / refactor friendly configuration for Db4o - Part II'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-3673110312568832830</id><published>2008-05-10T14:57:00.003-03:00</published><updated>2008-05-10T15:05:19.797-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Linq Console Update</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(102, 51, 0);"&gt;Hi!

I've just updated the &lt;a href="http://programing-fun.blogspot.com/2008/04/linq-playground-for-you-and-your.html"&gt;Linq Console&lt;/a&gt; application! Now you don't need to copy your model assemblies to Linq Console folder anymore!

You can use the &lt;span style="font-style: italic; font-weight: bold;"&gt;load&lt;/span&gt; command as follow:

&lt;span style="color: rgb(0, 153, 0);"&gt;:load "c:\my projects\test\Test.Model.dll"&lt;/span&gt;

and the application will be able to load it :)

The source code can be downloaded from our svn server:

&lt;span style="font-size:85%;"&gt;&lt;a href="https://source.db4o.com/db4o/trunk/sandbox/rodrigo/NonOptimizedLinqSpikes/LinqConsole/"&gt;https://source.db4o.com/db4o/trunk/sandbox/rodrigo/NonOptimizedLinqSpikes/LinqConsole/&lt;/a&gt;&lt;/span&gt;

&lt;/span&gt;&lt;span style="font-family: verdana; color: rgb(102, 51, 0);"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-3673110312568832830?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/3673110312568832830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=3673110312568832830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3673110312568832830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/3673110312568832830'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/05/linq-console-update.html' title='Linq Console Update'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-384408910687086651</id><published>2008-05-01T18:18:00.005-03:00</published><updated>2008-05-28T23:38:11.356-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Type safe / refactor friendly configuration for Db4o</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;As of today, Db4o uses strings to reference fields in some scenarios such: &lt;/span&gt;  &lt;ul&gt;   &lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;SODA queries&lt;/span&gt; &lt;/li&gt;    &lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Configuration&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;See the sample bellow: &lt;/span&gt; &lt;/p&gt;  &lt;pre class="c#" name="code"&gt;IConfiguration cfg = Db4oFactory.NewConfiguration();
cfg.ObjectClass(typeof(Test)).ObjectField("_age").Indexed = true;&lt;/pre&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;IMHO, u&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;sing strings in these situations &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;is sub-optimal as:&lt;/span&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Such solution relies in internal class details (field names)&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Compiler can't check whenever the field actually exists.&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;We don't take advantage of modern IDE's refactorings so, chances are that these entities and references to them get out of sync breaking your code; it's even worst because you will figure it out only at runtime :(; it may even get unnoticed as Db4o is completely happy with some &lt;em&gt;invalid&lt;/em&gt; field names.   &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;With the introduction of C# 3.0 and its &lt;span style="font-style: italic;"&gt;automatic properties&lt;/span&gt; we have another issue: we don't even know the field's name used to back the property! &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Sure, we can cheat by using some tool like &lt;span style="font-style: italic;"&gt;&lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;reflector&lt;/a&gt;&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;ildasm&lt;/span&gt; to figure it out but this would be a fragile solution as &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;C# compiler may choose whatever name it wants, so it may choose different names schemas in the future and we don't want to get our code breaking when new C# compilers come out, do we?&lt;/span&gt;

&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;I do believe that this approach was chosen due to technical limitations at the time the code was written, but now, with the debut of C# 3.0 and its new features like extension methods, lambda expressions, expression trees, etc. I bet we can do better :). &lt;/span&gt;&lt;/p&gt;
&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;To be fair, we've already been improving (removing) some string usages, for instance, Linq / Native Queries uses strong typing instead of strings to reference fields (under the hood they generate SODA queries that still use strings, but the crux here is that these "&lt;span style="font-style: italic;"&gt;names&lt;/span&gt;" will always be in sync with its entities). &lt;/span&gt;

&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;One area that, in my opinion, can be improved is configuration. &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;For instance, in order to setup indexes, deletion behavior (when to cascade delete), etc. we still use strings to identify the field we want to apply the configuration. Suppose we have the following code to configure indexes:&lt;/span&gt;&lt;/p&gt;&lt;pre class="c#" name="code"&gt;IConfiguration cfg = Db4oFactory.NewConfiguration();
cfg.ObjectClass(typeof(Test)).ObjectField("_age").Indexed = true;&lt;/pre&gt;
&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;We could introduce new methods to &lt;span style="font-family:Courier New;"&gt;IConfiguration&lt;/span&gt; interface so one would be able to do something like this: &lt;/span&gt;

&lt;pre class="c#" name="code"&gt;IConfiguration cfg = Db4oFactory.NewConfiguration();
cfg.ObjectField((Test s) =&amp;gt; s.Age).Indexed = true;&lt;/pre&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Wow!

Using this syntax we no longer have issues with refactorings, &lt;em&gt;abusive &lt;/em&gt;internal class knowledge and we get compiler time support for free :) (for instance, if we mistype "s.A&lt;strong&gt;f&lt;/strong&gt;e" C# compiler will complain).&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;To be fair, we have some issues with refactorings. If we change field/class's name we need to inform Db4o about this changes as explained &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Implementation_Strategies/Refactoring_and_Schema_Evolution/Refactoring_API"&gt;here&lt;/a&gt; (I do have some ideas on how to express these calls also but this is a little bit more complex topic that I won't cover here).&lt;/span&gt;

&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;What do you think?&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;In a following post I'll discuss how we could implement this new configuration method.

Go to &lt;a href="http://programing-fun.blogspot.com/2008/05/type-safe-refactor-friendly_14.html"&gt;part II&lt;/a&gt; of this post.&lt;/span&gt;
&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;
Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-384408910687086651?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/384408910687086651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=384408910687086651' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/384408910687086651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/384408910687086651'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/05/type-safe-refactor-friendly.html' title='Type safe / refactor friendly configuration for Db4o'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-536198542875319107</id><published>2008-05-01T00:48:00.003-03:00</published><updated>2012-02-08T01:40:51.975-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><category scheme='http://www.blogger.com/atom/ns#' term='geral'/><title type='text'>10 years ago....</title><content type='html'>&lt;span style="color: #663333; font-family: verdana;"&gt;------------------------------
Warning: Personal post :)
------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;Well, ten years ago (may, 1, 1998) I got married to Gislene, my wife :)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;Since then, she has been helping me, providing me&amp;nbsp;advice, being patient with me and loving me!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;Gislene, thanks for all these years! I hope (and will do my best) to be at your side for the next 10 years, then for the next 10 and so on.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;I couldn't finish this without saying.. Gislene, I love you!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #663333; font-family: verdana;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-536198542875319107?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/536198542875319107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=536198542875319107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/536198542875319107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/536198542875319107'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/05/10-years-ago.html' title='10 years ago....'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1471488073599875678</id><published>2008-04-24T23:29:00.006-03:00</published><updated>2008-05-02T10:20:05.485-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='utilitário'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Redirecting standard error output in cmd.exe</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Hi.

Suppose you have the following C++ program (in a Windows box):
&lt;pre name="code" class="C++"&gt;
#include "stdafx.h"
#include "string.h"


void write(char *str, FILE *target)
{
fwrite(str, strlen(str), 1, target);
}

void _tmain(int argc, _TCHAR* argv[])
{
write("Test:stderr\r\n", stderr);
write("Test:stdout\r\n", stdout);
}
&lt;/pre&gt;and you want to redirect its output to a file.

We could try something like in Windows console:

&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;
&lt;span style="font-weight: bold;font-family:courier new;" &gt;test.exe &gt; myfile.txt&lt;/span&gt;

&lt;/pre&gt;
Unfortunately the naive approach don't work because there are data being outputted to stderr and we are redirecting only the standard output (stdout).

In order to redirect stderr we can use the following syntax:

&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;
&lt;span style="font-weight: bold;"&gt;command handler# &gt; target&lt;/span&gt;

&lt;/pre&gt;
let's try a sample:
&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;
&lt;span style="font-weight: bold;font-family:courier new;" &gt;test.exe 1&gt;myfile.txt&lt;/span&gt;

&lt;/pre&gt;
This will redirect stdout (handle &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) to myfile.txt

To redirect stderr (handle &lt;span style="font-weight: bold;"&gt;2&lt;/span&gt;) we can use:

&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;
&lt;span style="font-weight: bold;font-family:courier new;" &gt;test.exe 2&gt;myfile.txt&lt;/span&gt;

&lt;/pre&gt;
Ok. Now we can try:

&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;
&lt;span style="font-weight: bold;font-family:courier new;" &gt;test.exe &gt; myfile.txt 2&gt;myfile.txt&lt;/span&gt;

&lt;/pre&gt;
but, again, this doesn't work; instead we get an error message:

&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;&lt;span style="font-weight: bold;"&gt;D:\temp\cpp\Test\Debug&gt;Test &gt; myfile.txt 2&gt;myfile.txt&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;The process cannot access the file because it is being used by another process.&lt;/span&gt;
&lt;/pre&gt;
Ok, there's one last trick we can try (duplicate stderr to stdout):

&lt;pre  style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial;font-size:14px;"&gt;
&lt;span style="font-weight: bold;"&gt;test.exe &gt; myfile.txt &lt;span style="color: rgb(51, 102, 102);"&gt;2&gt;&amp;amp;1&lt;/span&gt;&lt;/span&gt;

&lt;/pre&gt;
Great! Now it works as expected!

Last, but not least, &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;you can find more information &lt;a href="http://technet2.microsoft.com/windowsserver/en/library/04969a04-a424-4776-bdc7-dc5066ce79b21033.mspx?mfr=true"&gt;here&lt;/a&gt;.&lt;/span&gt;
&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;
Hope this can be useful :)


Adriano


&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1471488073599875678?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1471488073599875678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1471488073599875678' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1471488073599875678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1471488073599875678'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/04/redirecting-standard-error-output-in.html' title='Redirecting standard error output in cmd.exe'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8539200903189499899</id><published>2008-04-22T21:47:00.002-03:00</published><updated>2008-04-22T21:50:44.777-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Db4o news!</title><content type='html'>&lt;span style="font-family: lucida grande; color: rgb(0, 0, 153);"&gt;Hi,

Db4o just announced a new release! Check it out &lt;a href="http://db4o.com/about/news/newsletter/2008_04.aspx"&gt;here&lt;/a&gt; and let us know what you think about these new (IMO) cool features!

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8539200903189499899?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8539200903189499899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8539200903189499899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8539200903189499899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8539200903189499899'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/04/db4o-news.html' title='Db4o news!'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7710144259524107608</id><published>2008-04-09T08:18:00.017-03:00</published><updated>2008-05-09T18:08:25.580-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>A Linq playground for you and your objects</title><content type='html'>&lt;span style="font-family:verdana;"&gt;In this post we'll implement a very basic &lt;/span&gt;&lt;a style="font-family: verdana;" title="Linq" href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx" id="j8.b"&gt;Linq&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; Console application that supports "&lt;/span&gt;&lt;span id="y92r"  style="font-family:verdana;"&gt;&lt;i id="jbgv"&gt;ad hoc&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;" queries allowing users to enter Linq queries and run them against a &lt;/span&gt;&lt;a style="font-family: verdana;" title="db4o" href="http://www.db4o.com/" id="y4nx"&gt;db4o&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; database.&lt;/span&gt; O&lt;span style="font-family:verdana;"&gt;ur main goal is to show how such mechanism can be implemented on top of Linq/Db4o.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;That said, let's play with the application for a while and them dig a little bit in its code.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="y7z4"  style="font-family:verdana;"&gt;&lt;b id="p:k1"&gt;How to use it&lt;/b&gt;&lt;/span&gt;&lt;span id="n:8l"  style="font-family:verdana;"&gt;&lt;b id="o1k0"&gt; ?&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;First, download the code &lt;a href="http://www.mediamax.com/vegaus/Hosted/db4o/LinqConsole/LinqConsole.zip"&gt;here&lt;/a&gt; and compile it (any version of Visual Studio 2008 can be used).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Now populate a &lt;/span&gt;&lt;a style="font-family: verdana;" title="Db4objects Inc" href="http://www.db4o.com/" id="zjno"&gt;db4o&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; database (with data) and copy the an assembly containing the types stored in that database to the LinqConsole.exe folder.&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: thin dashed rgb(0, 68, 68); background: rgb(255, 255, 217) none repeat scroll 0% 50%; padding-left: 10px; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; font-size: 14px;"&gt;&lt;br /&gt;You will need to copy your &lt;b&gt;model assembly&lt;/b&gt; to&lt;br /&gt;LinqConsole executable directory, otherwise it&lt;br /&gt;will not be able to find it.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Start the application and, once presented the prompt (&lt;/span&gt;&lt;span id="mc7z"  style="font-family:verdana;"&gt;&lt;b id="h6o_"&gt;&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;), enter commands (prefixed with "&lt;/span&gt;&lt;span id="drtj"  style="font-family:verdana;"&gt;&lt;b id="v-05"&gt;:&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;") or a query (finished with "&lt;/span&gt;&lt;span id="vrkd"  style="font-family:verdana;"&gt;&lt;b id="qf9d"&gt;;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;"). The very first command you may want to try is &lt;/span&gt;&lt;span id="cb80"  style="font-family:verdana;"&gt;&lt;b id="e835"&gt;:help&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; to see a list of valid commands (type &lt;/span&gt;&lt;span id="vdhk"  style="font-family:verdana;"&gt;&lt;b id="ml0o"&gt;:help&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; and press &lt;enter&gt;):  &lt;/enter&gt;&lt;/span&gt;&lt;div id="rm6i" style="padding: 1em 0pt; text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JjJXM4oi98I/R_ymwDzroBI/AAAAAAAAAC0/F1go3s6fUyg/s1600-h/LinqConsole.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JjJXM4oi98I/R_ymwDzroBI/AAAAAAAAAC0/F1go3s6fUyg/s320/LinqConsole.png" alt="" id="BLOGGER_PHOTO_ID_5187204215409975314" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt; Basically, we want to run a (Linq) query against a db4o database, so we need to specify:  &lt;/span&gt;&lt;ul style="font-family: verdana;" id="mgd9"&gt;&lt;li id="y5:-"&gt;the database file to query (through &lt;b id="acqw"&gt;database&lt;/b&gt; command)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="icry"&gt;the assembly containing the types stored in the database; we call this assembly, &lt;b id="u95t"&gt;model assembly&lt;/b&gt; because usually, it will hold your business objects (the &lt;span id="ln4p"&gt;&lt;b id="zikd"&gt;model&lt;/b&gt;&lt;/span&gt; in MVC pattern). Unfortunately, this assembly &lt;b id="rn2m"&gt;must&lt;/b&gt; be in the same directory as the application, otherwise the application will not be it able to find it (technically one can configure the application using &lt;span id="eb_b"&gt;&lt;i id="q0-v"&gt;Linq.Console.exe.config&lt;/i&gt;&lt;/span&gt; file to allow assemblies to be stored in alternative directories).  &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:verdana;"&gt; With these parameters defined you can type Linq queries as you would do pragmatically, for instance:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div id="t-5l"  style="text-align: left;font-family:verdana;"&gt;&lt;div style="text-align: center;"&gt;&lt;span id="q7u_"  style="font-size:100%;"&gt;&lt;span id="a0jq"&gt;                   &lt;span style="font-weight: bold;font-family:courier new;" &gt;from Type t in database select t;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt; and press &lt;enter&gt; to see the results:&lt;br /&gt;&lt;br /&gt;&lt;/enter&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JjJXM4oi98I/R_ynNTzroCI/AAAAAAAAAC8/YkVEJ_IIkhc/s1600-h/LinqConsoleResults.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JjJXM4oi98I/R_ynNTzroCI/AAAAAAAAAC8/YkVEJ_IIkhc/s320/LinqConsoleResults.png" alt="" id="BLOGGER_PHOTO_ID_5187204717921148962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;enter&gt;&lt;/enter&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;As the application tries to run the query only when it finds a semicolon "&lt;/span&gt;&lt;span id="mid7"  style="font-family:verdana;"&gt;&lt;b id="ehn1"&gt;;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;" it's also possible to enter a query in multiple lines.  You can see a short demo of the application in bellow.&lt;center&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0" width="493" height="351"&gt;&lt;br /&gt;&lt;param name="movie" value="http://www.mediamax.com/vegaus/Hosted/db4o/LinqConsole/LinqConsole.swf"&gt;&lt;br /&gt;&lt;param name="play" value="true"&gt;&lt;br /&gt;&lt;param name="loop" value="false"&gt;&lt;br /&gt;&lt;param name="wmode" value="transparent"&gt;&lt;br /&gt;&lt;param name="quality" value="low"&gt;&lt;br /&gt;&lt;embed src="http://www.mediamax.com/vegaus/Hosted/db4o/LinqConsole/LinqConsole.swf" quality="low" loop="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="493" height="351"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;/center&gt;&lt;br /&gt;Before leaving this topic, I'd like to call your attention that in order to Linq for db4o to work you need to specify a &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; in the query (that's the entry point for our custom "Linq Provider"), otherwise, you will get an error like the one bellow:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JjJXM4oi98I/R_ynqTzroDI/AAAAAAAAADE/LiGHQQ9lUNw/s1600-h/LinqConsoleError.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JjJXM4oi98I/R_ynqTzroDI/AAAAAAAAADE/LiGHQQ9lUNw/s320/LinqConsoleError.png" alt="" id="BLOGGER_PHOTO_ID_5187205216137355314" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Note that in this case I've omitted &lt;span style="font-weight: bold;"&gt;Person&lt;/span&gt; type in the query, i.e, I've typed:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;from p in database select p;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;instead of:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;from &lt;span style="color: rgb(204, 0, 0);"&gt;Person&lt;/span&gt; p in database select p; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="ys_d"  style="font-family:verdana;"&gt;&lt;b id="kab4"&gt;How it works ?&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;br /&gt;The basic idea behind this application is pretty simple: Given a model assembly (specified through &lt;/span&gt;&lt;b style="font-family: verdana;" id="gte7"&gt;load&lt;/b&gt;&lt;span style="font-family:verdana;"&gt; command), a db4o database (specified through &lt;/span&gt;&lt;b style="font-family: verdana;" id="go8f"&gt;database&lt;/b&gt;&lt;span style="font-family:verdana;"&gt; command) and a Linq query, find all types and namespaces defined in such assembly them emit code to run the query against the database.&lt;br /&gt;&lt;br /&gt;In &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;" id="q5jv"  &gt;&lt;span id="bz6b"&gt;CompileQuery()&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; method we emit a new type (&lt;span style="font-family:courier new;"&gt;TheQuery&lt;/span&gt;) using the specified values (database, namespace and query). This type implements &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;" id="zavz"  &gt;&lt;span id="sczc"&gt;IInteractiveQuery&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; interface, so, after instantiating it we call its &lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;" id="onhj"  &gt;&lt;span id="hy2h"&gt;&lt;span style="font-family:courier new;"&gt;Run()&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;method to execute the query.&lt;br /&gt;&lt;br /&gt;In order to dynamically compile this type (&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:courier new;"&gt;TheQuery&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;) we use classes defined in &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;" id="z13:"  &gt;&lt;span id="jski"&gt;System.CodeDom.Compiler&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; and &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;" id="nhdn"  &gt;&lt;span id="r847"&gt;Microsoft.CSharp&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; namespaces; any compilation errors will be rendered in red on yellow background text.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="cil:"  style="font-family:verdana;"&gt;&lt;b id="hmto"&gt;Improvements&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;br /&gt;Well, I must admit: in its current state, this program has some limitations (but most of them are there to allow you to play with it ;)&lt;br /&gt;&lt;br /&gt;From the top of my head, I can came up with a list (of coarse, not an exhaustive one) of possible improvements:  &lt;/span&gt;&lt;ul style="font-family: verdana;" id="sr_i"&gt;&lt;li id="kbt4"&gt;&lt;strike&gt;Support model assemblies in other directories&lt;br /&gt;Currently in order to use a model assembly, users are required to copy it to the application folder.&lt;/strike&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;Check if the types stored in the database can be found in the model assembly.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;Better error handling in general&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;Warn users about invalid commands Currently nothing happens for invalid commands (no message).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;List types inside an assembly A new command (for instance, &lt;span id="l2vp"&gt;&lt;b id="v3h2"&gt;types&lt;/b&gt;&lt;/span&gt;) could be added to allow users to list the types contained in an assembly.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;Add support to query Db4o in server mode.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;Auto-completion This probably would require major changes in the input handling, but it would be nice to add auto-completion to list types, assemblies, databases, etc. in the commands.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li id="kbt4"&gt;You name it! The sky is the limit :) &lt;/li&gt;&lt;/ul&gt;  &lt;span id="phb3"  style="font-family:verdana;"&gt;&lt;b id="rnk4"&gt;Final Words!&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;I really expect that you enjoyed this application; if you have questions/suggestions please, fell free to drop me a line :)&lt;br /&gt;&lt;br /&gt;Thoughts?&lt;br /&gt;&lt;br /&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7710144259524107608?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7710144259524107608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7710144259524107608' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7710144259524107608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7710144259524107608'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2008/04/linq-playground-for-you-and-your.html' title='A Linq playground for you and your objects'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JjJXM4oi98I/R_ymwDzroBI/AAAAAAAAAC0/F1go3s6fUyg/s72-c/LinqConsole.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7383907084059370288</id><published>2007-12-10T13:45:00.005-02:00</published><updated>2009-07-20T13:14:15.531-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Activation in depth</title><content type='html'>&lt;span style="font-family: verdana;"&gt;In this post I'll discuss a key concept of &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; and how it improved in our latest versions: &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;object activation. &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;I'll focus mainly on the .Net version but these concepts apply equally well to the Java version.&lt;br /&gt;
&lt;br /&gt;
In order to access some resources listed in this post you will be required to register (for free) in &lt;a href="http://developer.db4o.com/"&gt;http://developer.db4o.com&lt;/a&gt;.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: trebuchet ms; font-size: 130%;"&gt;Activation in depth&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Activation" style="font-family: verdana;"&gt;Activation&lt;/a&gt; &lt;span style="font-family: verdana;"&gt;in&lt;/span&gt;&lt;b style="font-family: verdana;"&gt; db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; parlance is the process of loading object data from the database to memory. You can see this concept in practice by asking &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; to not activate objects at all and having a look at them. Objects that are not activated will have only its &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Basic_Concepts/Object_Identity"&gt;&lt;i style="font-family: verdana;"&gt;object identity&lt;/i&gt;&lt;/a&gt; loaded from the database (In order to see the identifier for an object stored in &lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; you can&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt; &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;IObjectContainer.Ext().GetId(obj);&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;After building the graph of candidates (objects that satisfies a query's conditions),  &lt;b&gt;db4o&lt;/b&gt; needs to know how deep in this graph it must go activating (i.e, reading the object's data into memory). At this point it may seems that we have two contradictory objectives: &lt;span style="font-style: italic; font-weight: bold;"&gt;i)&lt;/span&gt; we want to make &lt;b&gt;db4o&lt;/b&gt; as transparent as&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; possible to developers (making it easier to be used); &lt;span style="font-style: italic; font-weight: bold;"&gt;ii)&lt;/span&gt; we do want to make sure that  &lt;b&gt;db4o&lt;/b&gt; will use computational resources (in this case memory) as efficiently as possible.&lt;br /&gt;
&lt;br /&gt;
The simple approach to achieve &lt;b&gt;i&lt;/b&gt; is to activate the whole graph but this clearly contrasts to &lt;b&gt;ii &lt;/b&gt; because it may exhaust all free memory if the query returned a lot of  objects. By the other hand, the easiest way to achieve &lt;b&gt;ii&lt;/b&gt; (from the perspective of memory utilization) is to read only the identity of the objects in the graph and&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; leave to the developer the responsibility to activate them when needed. Again, this strategy goes against the other one (i.e, simplicity of use). &lt;b&gt;db4o&lt;/b&gt; latest versions includes a new functionality (conceptually called &lt;i&gt;&lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Activation/Transparent_Activation_Framework" id="upbk" title="Transparent Activation Framework"&gt;Transparent Activation&lt;/a&gt;&lt;/i&gt;, or simple &lt;b&gt;TA&lt;/b&gt; for brevity) aimed to achieve both goals (&lt;b&gt;i&lt;/b&gt; and &lt;b&gt;ii&lt;/b&gt;) without sacrificing each other.&lt;br /&gt;
&lt;br /&gt;
Consider the following classes:&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;public class Person : SupportObjectId
{
    private Address address;

    public Address Address
    {
        get { return address; }
        set { address = value; }
    }

    private string name;

    public string Name
   {
        get { return name; }
        set { name = value; }
   }

   private int age;

   public int Age
  {
      get { return age; }
     set { age = value; }
  }

   private Person parent;

   public Person Parent
   {
       get { return parent; }
       set { parent = value; }
   }

   public Person(string name, int age, Address address, Person parent)
   {
        this.name = name;
        this.address = address;
        this.age = age;
        this.parent = parent;
    }

   public override string ToString()
   {
       return PrintInfo(0);
   }

   private string PrintInfo(int i)
   {
       string tab = new string('\t', i);
      return string.Format("{0} {4} {1}{5}\r\n{4}{4}Address: {2}\r\n{4}{4}Parent: {3}",
                                        (name ?? "null"),
                                        age,
                                        (address != null ? address.ToString() : "null"),
                                        (parent != null ? parent.PrintInfo(i+1) : "null"),
                                       tab,
                                      base.ToString());
    }
}

public class Address : SupportObjectId
{
    private string street;
    public string Street
    {
         get { return street; }
         set { street = value; }
    }

    private int number;
    public int Number
    {
        get { return number; }
        set { number = value; }
    }

    private string city;
    public string City
   {
        get { return city; }
        set { city = value; }
   }

    public Address(string city, string street, int number)
   {
        this.city = city;
        this.street = street;
       this.number = number;
   }

   public override string ToString()
   {
        return "[" + (street ?? "**") + "(" + number + ") - " + (city ?? "**") + base.ToString() + "]" ;
   }
}
&lt;/pre&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;and the following objects in the database:&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;private static void InsertData()
{
     using (IObjectContainer db = Db4oFactory.OpenFile(DATABASE_FILE))
    {
         Person grandParent = new Person("Joseph", 65, new Address("Descalvado", "JV street", 160), null);
         Person father = new Person("Adrian", 36, new Address("São Paulo", "C. L. E. M. street", 250), grandParent);
         Person child = new Person("Caroline", 4, new Address("São Paulo", "C. L. E. M. street", 250), father);

         db.Set(child);
    }
}&lt;/pre&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;
The following image shows the result when querying for &lt;i&gt;"Car&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;&lt;i&gt;oline" &lt;/i&gt;at different &lt;i&gt;activation depth&lt;/i&gt;s (with &lt;i&gt;Transparent Activation &lt;b&gt;disabled&lt;/b&gt;)&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/R110MY4b0wI/AAAAAAAAACs/ANy8eN0Xino/s1600-h/ActivationLevel2.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5142394105713382146" src="http://4.bp.blogspot.com/_JjJXM4oi98I/R110MY4b0wI/AAAAAAAAACs/ANy8eN0Xino/s320/ActivationLevel2.jpg" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;Note that at depth 0 (zero) only the &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;object identifier&lt;/i&gt;&lt;span style="font-family: verdana;"&gt; for &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;"Caroline" &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;(1336) was loaded from the database; at depth 1 &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;Caroline&lt;/i&gt;&lt;span style="font-family: verdana;"&gt;'s value types were fully loaded and reference fields were initialized (to null) but not activated (see &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;Caroline's &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;address and parent fields). At depth 2 &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;Caroline's&lt;/i&gt;&lt;span style="font-family: verdana;"&gt; parent object was also loaded (and activated) but its reference fields (for instance &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;Caroline's&lt;/i&gt;&lt;span style="font-family: verdana;"&gt; grand father) were not activated yet.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: Trebuchet MS;"&gt;Related Concepts&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;The same trade-of (simplicity/performance) applies when updating objects in a &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; database; I mean, usually you'll not want to update the whole set of objects reachable from the one you are currently updating because this would probably end up updating a lot of objects needlessly. To control this behavior you may configure the &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;&lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Update_Depth" id="zhsi" title="update depth"&gt;update depth&lt;/a&gt; &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;through  &lt;/span&gt;&lt;span style="font-family: Courier New;"&gt;IConfiguration.UpdateDepth()&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; method which takes an integer meaning how deep &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; will go when updating objects (keep in mind that when inserting, &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; will follow all references and insert all of then). This configuration may be globally (i.e, to all classes) or selectively applied (i.e, to specific classes). As of the current version &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; sets the &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;default update depth&lt;/i&gt;&lt;span style="font-family: verdana;"&gt; to 0 that means that only &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;value types&lt;/i&gt;&lt;span style="font-family: verdana;"&gt; and strings fields will be updated when an object is updated (i.e, reference fields will not be updated). Optionally it's possible to &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;propagate &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;updates to all objects reachable from the object being updated by configuring &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;cascade on update &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;for the specific classes you want to propagate updates.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;IConfiguration.ObjectClass(typeof(your_type)).CascadeOnUpdate(true);&lt;/pre&gt;&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;When configured this way, &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; will go down, updating all objects reachable from &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;your_type &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;until it reaches an object not configured for cascade updating  (note that this may impact performance severely if this object references a lot of objects also configured for cascade updating).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Trebuchet MS; font-size: 130%;"&gt;Transparent Activation&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;Transparent Activation is a functionality that enables developers to handle objects returned by queries as if they were fully activated without incurring the cost of activating a whole graph of objects. In other words, when TA is enabled, developers may code as if &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;activation depth &lt;/i&gt;&lt;span style="font-family: verdana;"&gt;was set to infinity without having to &lt;/span&gt;&lt;span style="background-color: white; font-family: verdana;"&gt;worry about the whole set of objects being loaded into memory. &lt;/span&gt;&lt;span style="font-family: verdana;"&gt;Basically, &lt;/span&gt;&lt;i style="font-family: verdana;"&gt;Transparent Activation&lt;/i&gt;&lt;span style="font-family: verdana;"&gt; transfers the responsibility of object activation from developers to &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; allowing them to focus on their business logic.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: verdana;"&gt;Configuring your &lt;/span&gt;&lt;b style="font-family: verdana;"&gt;db4o&lt;/b&gt;&lt;span style="font-family: verdana;"&gt; projects to use TA is 2 steps process:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;
&lt;li&gt;Configure TA support (prior to opening the database):&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Courier New;"&gt; IConfiguration.Add(new TransparentActivationSupport());&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;implement &lt;span style="font-family: Courier New;"&gt;IActivatable &lt;/span&gt;interface in classes you want to be TA aware.&lt;br /&gt;
&lt;br /&gt;
You can implement it by yourself or let us (ok, our tools) to do this work for you through &lt;b&gt;Db4oTool&lt;/b&gt; (the old &lt;i&gt;Db4oAdmin&lt;/i&gt;) application.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;Keep in mind that when transparent activation support is enabled &lt;span style="font-family: Courier New;"&gt;IConfiguration&lt;/span&gt;&lt;span style="font-family: Courier New;"&gt;.ActivationDepth()&lt;/span&gt; is ignored; also, all objects that are note TA aware (i.e, that doesn't implement &lt;span style="font-family: Courier New;"&gt;IActivatable&lt;/span&gt; interface) will be fully activated; so, we don't recommend to enable TA if you have lots of objects that doesn't implement this interface. While activating objects &lt;b&gt;db4o&lt;/b&gt; will stop following references as soon as it reaches an TA aware object (after all it will be activated when needed).&lt;br /&gt;
&lt;br /&gt;
More technical details about TA can be found &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Activation/Transparent_Activation_Framework/Detailed_Example" id="xa3o" title="here"&gt;here&lt;/a&gt; and a full sample along with details about it can be found &lt;a href="http://programing-fun.blogspot.com/2007/10/enabling-tranparent-activation-in-your.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: Trebuchet MS;"&gt;Putting it all together &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://source.db4o.com/db4o/trunk/sandbox/Adriano/ObjectActivation/"&gt;Here&lt;/a&gt; you can checkout the sample application that shows the points discussed above. It inserts a simple graph of objects into a database and then queries for the &lt;i&gt;root&lt;/i&gt; of the objects using different &lt;i&gt;activation depth&lt;/i&gt; configurations. Also, you can ask the application to pretend that it's objects supports TA through the &lt;i&gt;-ta&lt;/i&gt; command line option.&lt;br /&gt;
&lt;br /&gt;
I recommend you to download it and do the following:&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;
&lt;li&gt;Poke around, looking into the code :)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Give it a try, i.e, run it without any parameter and see what you get;&lt;/li&gt;
&lt;li&gt;Try to run it again, but this time passing &lt;i&gt;-ta&lt;/i&gt; parameter, and, again, see what you get;&lt;/li&gt;
&lt;li&gt;Make its classes TA aware (see &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Activation/Transparent_Activation_Framework/TA_Enhanced_Example/TA_Enhancement_With_Db4oTool"&gt;here&lt;/a&gt; the easy way) and try to run it with and without &lt;i&gt;&lt;b&gt;-ta&lt;/b&gt;&lt;/i&gt; parameter.&lt;/li&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;
If you have any question don't hesitate to ask them here!&lt;br /&gt;
&lt;br /&gt;
Adriano&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7383907084059370288?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/7383907084059370288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=7383907084059370288' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7383907084059370288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7383907084059370288'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/12/in-this-post-ill-discuss-key-concept-of.html' title='Activation in depth'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JjJXM4oi98I/R110MY4b0wI/AAAAAAAAACs/ANy8eN0Xino/s72-c/ActivationLevel2.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2182127976355108199</id><published>2007-11-20T15:03:00.000-02:00</published><updated>2007-11-20T15:15:36.671-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Old news from the front!</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Visual Studio 2008 has been &lt;a href="http://blogs.msdn.com/ukvsts/archive/2007/11/19/visual-studio-2008-has-rtm-ed.aspx"&gt;released&lt;/a&gt; (Yep, I'm downloading it right now :)

Niiice.

&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2182127976355108199?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2182127976355108199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2182127976355108199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2182127976355108199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2182127976355108199'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/11/old-news-from-front.html' title='Old news from the front!'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5790288465040618095</id><published>2007-10-24T22:08:00.000-02:00</published><updated>2007-10-25T00:21:24.218-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Do you fear ghosts?</title><content type='html'>Well, me too, at least until one month ago :)

Seriously, a long time ago (maybe not so long), &lt;a href="http://blogs.codehaus.org/people/bamboo/"&gt;Rodrigo&lt;/a&gt;, a great friend of mine, started talking about write a new language for the .Net platform. Of course, I promptly ignored him, after all, who needs another computer language? Some time passed and I started to hear about a new language called &lt;a href="http://boo.codehaus.org/"&gt;&lt;span style="font-style: italic;"&gt;Boo&lt;/span&gt;&lt;/a&gt;.

I was so deeply entrenched in my own world that it took me some time (and some books also :) to realize that that would be great to be exposed to a lot of new concepts (at least to me).

Well, yesterday I've wrote my first Boo program! Sure, it's a humble one but it's a start. In order to learn (not only the syntax, but a lot of concepts such &lt;span style="font-style: italic;"&gt;closures&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;ducking typing, etc.&lt;/span&gt;) I'll try to write more code using boo from now on :)

And for those curious minds out there, here is my first piece of Boo code :)
&lt;pre name="code" class="c#"&gt;def Sum(list):
 ret = 0
 for value as int in list:
    ret = ret + value
 return ret

list = (1, 2, 3, 4)
for v in list:
 print(v)
 
print Sum(list)&lt;/pre&gt;
This is really very simple:

Lines 1 ~ 5 defines a function called &lt;span style="font-style: italic;"&gt;Sum&lt;/span&gt;.

Line 7 declares a variable (&lt;span style="font-style: italic;"&gt;list&lt;/span&gt;) that holds an integer list from 1 to 4

Lines 8 ~9  prints this list to console, item by item

Line 11 prints the result of &lt;span style="font-style: italic;"&gt;Sum&lt;/span&gt; when called with &lt;span style="font-style: italic;"&gt;list&lt;/span&gt; as the argument.

Thats it.

Adriano&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5790288465040618095?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5790288465040618095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5790288465040618095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5790288465040618095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5790288465040618095'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/10/do-you-fear-ghosts.html' title='Do you fear ghosts?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5106170847679996086</id><published>2007-10-08T15:33:00.001-03:00</published><updated>2011-10-14T08:47:22.935-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Enabling transparent activation in your db4o applications</title><content type='html'>&lt;span style="color: #000099; font-family: Verdana;"&gt;As a software developer, one common&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; pattern I've found over and over again is the typical parent/child relationship.&lt;br /&gt;
&lt;br /&gt;
In this post I'll present you a program &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;(a WinForms based application) &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;that lets you create, store and delete objects&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; (representing tasks) that follows this common structure in&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; a &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; database and take the opportunity to show how a new db4o feature (to be introduced in our next release) helps to solve some related problems.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="background-color: gainsboro; color: #1e1e64; font-family: Verdana;"&gt;&lt;br /&gt;
Obs: I'll focus on the .Net side of db4o but these concepts apply equally to our Java interface. Also, in order to be able to access various links related in this post you'll be required to join (for free) the "db4o Developer Community"; it's a very simple process: just click on &lt;span style="font-weight: bold;"&gt;join&lt;/span&gt; when asked for your credentials (user name/password).&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
Ok, let's use the application for while ...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;Open &lt;span style="font-weight: bold;"&gt;TaskSample.sln&lt;/span&gt; solution in Visual Studio 2005 (it should also work on the Express Edition) and compile it. Then, launch it and add some &lt;span style="font-style: italic;"&gt;tasks&lt;/span&gt; by pressing &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: 'courier new';"&gt;"CTRL-A"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; or selecting &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: 'courier new';"&gt;"Tasks/Add.."&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; menu.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;Now add some &lt;span style="font-style: italic;"&gt;tasks&lt;/span&gt; as the following structure ...&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Work&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Todo&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Projects &lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Super hyper ultra mega project&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Components&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;GoldenHammer.dll&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; GoldenNail.dll&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;GoldenHead.dll&lt;/span&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5iTCD_IDI/AAAAAAAAACM/t3mC8jZyRFQ/s1600-h/SampleTaskTasks.PNG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5120137905477460018" src="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5iTCD_IDI/AAAAAAAAACM/t3mC8jZyRFQ/s400/SampleTaskTasks.PNG" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;... close the database selecting &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: 'courier new';"&gt;"File/Close"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; in the main menu ...&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5i9CD_IEI/AAAAAAAAACU/VNGI3qQ-re8/s1600-h/SampleTaskCloseDatabase.PNG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5120138627031965762" src="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5i9CD_IEI/AAAAAAAAACU/VNGI3qQ-re8/s400/SampleTaskCloseDatabase.PNG" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;... and reload it &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;(select &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: 'courier new';"&gt;"File/Open"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;) &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Now expand the &lt;span style="font-style: italic;"&gt;tasks&lt;/span&gt; in order to see &lt;span style="font-style: italic;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana; font-style: italic;"&gt;Super hyper ultra mega project&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-style: italic;"&gt;" &lt;/span&gt;sub tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5h4CD_ICI/AAAAAAAAACE/l5dDI2JSziE/s1600-h/MissingSubTasks.PNG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5120137441620992034" src="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5h4CD_ICI/AAAAAAAAACE/l5dDI2JSziE/s400/MissingSubTasks.PNG" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;What? What happened to &lt;span style="font-style: italic;"&gt;Components, &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-style: italic;"&gt; GodenHammer.dll, &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-style: italic;"&gt;GodenNail.dll &lt;/span&gt;and&lt;span style="font-style: italic;"&gt; GondelHead.dll&lt;/span&gt;? Where are they?&lt;br /&gt;
&lt;br /&gt;
Take it easy; I assure you that db4o didn't ate your &lt;span style="font-style: italic;"&gt;task&lt;/span&gt; objects :) What happened is that our old friend, the cost/benefit trade-off is showing its ugly head.&lt;br /&gt;
&lt;br /&gt;
In order to keep memory consumption low and object throughput high, db4o sets a hard limit&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;on &lt;span style="font-style: italic;"&gt;"how deep the rabbit hole goes"&lt;/span&gt; &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;(a&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; concept called &lt;a href="http://developer.db4o.com/Documentation/Reference/db4o-8.0/net35/reference/Content/basics/activation.htm"&gt;&lt;span style="font-style: italic;"&gt;activation depth&lt;/span&gt;&lt;/a&gt;)&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;, or, in other words, how many levels it is willing to go down in the object graph reading (&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;activating&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;) them from the database.&lt;br /&gt;
&lt;br /&gt;
It just happens that in its current version, db4o sets this limit to 5, i.e, starting from each object directly selected by a query, at most 5 levels bellow will be returned.&lt;br /&gt;
&lt;br /&gt;
That explains why the sub tasks were not loaded from the database.&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; (they are six levels down the root &lt;span style="font-style: italic;"&gt;task&lt;/span&gt; so db4o stopped following references when it reached the &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-style: italic;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana; font-style: italic;"&gt;Super hyper ultra mega project&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-style: italic;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; task.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;How can we ensure smooth operation of our application? &lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;setting the activation level to a higher value might be an option (but which value? small values will activate too little objects; higher values may lead to high memory consumption and possibly &lt;span style="font-style: italic;"&gt;out of memory&lt;/span&gt; exceptions):&lt;/span&gt;&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;IConfiguration configuration = Db4oFactory.NewConfiguration();
configuration.ObjectClass(typeof(Task)).MinimumActivationDepth(10);

using(IObjectContainer db = Db4oFactory.OpenFile(configuration, Db4oFileName))
{
// perform some work here
}
&lt;/pre&gt;&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;To test this option, select a higher &lt;span style="font-style: italic;"&gt;activation depth&lt;/span&gt; (let's say, 8) in the sample application; the database will be reopened; now you'll be able to see all the tasks :)&lt;/span&gt; &lt;span style="color: #000099; font-family: Verdana;"&gt;For more details about &lt;span style="font-style: italic;"&gt;activation depth&lt;/span&gt;, please, see &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Object_Lifecycle/Activation"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Manually activating objects as needed;&lt;br /&gt;
&lt;br /&gt;
In this scenario we may track expansions in out task treeview and activate them as needed.&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;db.Activate(task, 1);
AddOutlines(task.FirsChild);
&lt;/pre&gt;&lt;br /&gt;
To test this option select the "&lt;span style="font-style: italic;"&gt;Enables automatic activation"&lt;/span&gt; button on the toolbar (the little bulb lamp). The database will be reloaded and now you'll be able to see all tasks again.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Or, IMHO, the best one, letting &lt;span style="font-weight: bold;"&gt;db4o&lt;/span&gt; take care of this through &lt;span style="font-style: italic;"&gt;Transparent Activation&lt;/span&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;(herein referred only as &lt;span style="font-weight: bold;"&gt;TA&lt;/span&gt;), a new feature to be introduced in our next release (&lt;span style="color: #000099;"&gt;download the latest development build &lt;a href="http://developer.db4o.com/Downloads.aspx"&gt;here&lt;/a&gt;&lt;/span&gt;) &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;(for more details and samples about this feature look &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2007/09/11/transparent-activation-design-update.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://developer.db4o.com/Documentation/Reference/db4o-8.0/net35/reference/Content/basics/transparent_persistence.htm"&gt;here&lt;/a&gt;)&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;;&lt;/span&gt; &lt;/li&gt;
&lt;/ol&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Note that in order to benefit from &lt;span style="font-style: italic;"&gt;TA &lt;/span&gt;(solution 3) objects must implement &lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: 'courier new';"&gt;IActivable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; interface, either explicitly or through instrumentation as explained &lt;a href="http://developer.db4o.com/Documentation/Reference/db4o-8.0/net35/reference/Content/basics/transparentpersistence/ta_enhanced_example.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I recommend following the instrumentation path (let the computer do the dirty work for us :). Db4o ships with an utility program (Db4oTool.exe) that you may use among other duties, to instrument assemblies to support TA.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;All you need is to call &lt;span style="font-style: italic;"&gt;Db4oAdmin&lt;/span&gt;.exe after building your assemblies and it'll add the required pieces to support TA.&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: #000099; font-family: Verdana; font-size: 130%;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(255, 255, 217) none repeat scroll 0% 50%; border: thin dashed rgb(0, 68, 68); color: black; font-size: 14px; padding-left: 10px;"&gt;&lt;span style="color: #000099; font-family: Verdana; font-size: 130%;"&gt;Db4oTool -ta assembly_name.ext&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;If you prefer, add a post build step to TaskSample.snl project as follows:&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;div style="font-family: courier new; text-align: left;"&gt;&lt;span style="color: #000099; font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(255, 255, 217) none repeat scroll 0% 50%; border: thin dashed rgb(0, 68, 68); color: black; font-size: 14px; padding-left: 10px;"&gt;&lt;span style="color: #000099; font-size: 100%;"&gt;&lt;span style="color: #000099;"&gt;\db4o-8.0\bin\net-3.0\Db4oTool.exe -ta "$(TargetPath)"&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/_JjJXM4oi98I/Rw4iLSD_IBI/AAAAAAAAAB8/n6XizaSrqYg/s1600-h/PostBuildTask.PNG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5120067403589296146" src="http://1.bp.blogspot.com/_JjJXM4oi98I/Rw4iLSD_IBI/AAAAAAAAAB8/n6XizaSrqYg/s400/PostBuildTask.PNG" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;In order to instrument signed assemblies you'll need to &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/07/CLRInsideOut/#S6"&gt;delay sign &lt;/a&gt;them (because instrumentation process changes the assembly). For more information about delay signed assemblies, please, refer to &lt;a href="http://msdn2.microsoft.com/en-us/library/9fas12zx%28VS.80%29.aspx"&gt;this msdn article&lt;/a&gt;.&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;The application title bar shows you if the application was instrumented or not (if it supports TA or not).&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw4dACD_IAI/AAAAAAAAAB0/L49WxkMRrHw/s1600-h/SampleTaskTAStateOff.PNG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5120061712757628930" src="http://4.bp.blogspot.com/_JjJXM4oi98I/Rw4dACD_IAI/AAAAAAAAAB0/L49WxkMRrHw/s400/SampleTaskTAStateOff.PNG" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;Try to play with the sample and check the results. You may download the sample (source files) for this post &lt;a href="https://source.db4o.com/db4o/trunk/sandbox/Adriano/TasksSample/TasksSample.zip"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #000099; font-family: Verdana;"&gt; Thank you and see you soon ;)&lt;br /&gt;
&lt;br /&gt;
Adriano &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5106170847679996086?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5106170847679996086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5106170847679996086' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5106170847679996086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5106170847679996086'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/10/enabling-tranparent-activation-in-your.html' title='Enabling transparent activation in your db4o applications'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JjJXM4oi98I/Rw5iTCD_IDI/AAAAAAAAACM/t3mC8jZyRFQ/s72-c/SampleTaskTasks.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2094876721851446730</id><published>2007-10-06T17:26:00.000-03:00</published><updated>2007-10-06T18:04:13.974-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>New challenges.</title><content type='html'>&lt;span style="font-family:verdana;"&gt;This week I've joined &lt;a href="http://db4o.com/"&gt;db4objects&lt;/a&gt; team to contribute with the .Net development side (but I'm pretty sure I'll do a lot of Java development also). &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Indeed it has been a busy week; lots of new concepts and code to get to know, new management style, new tools, etc.

&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;I'll be working from my home (cool!!), collaborating with a distributed (talented) development team through skype.

Some may call me crazy but &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;db4objects have a cool product to work with and &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;this opportunity will let me dedicate more time to my family, to study new topics (related to computers, of course), to watch movies, etc (I know, studies proved that working in home means to work more, but I'll get some spare time cause I'll not be required to go to jammed traffic :)

&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Also, you can expect to see more posts on this blog covering &lt;a href="http://www.db4o.com/"&gt;db4o&lt;/a&gt; ;)
&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;
&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Well, that's it.

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2094876721851446730?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2094876721851446730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2094876721851446730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2094876721851446730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2094876721851446730'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/10/new-challenges.html' title='New challenges.'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8420758913971424846</id><published>2007-09-18T18:34:00.000-03:00</published><updated>2007-09-22T12:18:13.358-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='vista'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Minor db4o tutorial problem</title><content type='html'>&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;Some time ago I started playing with &lt;a href="http://www.db4o.com/"&gt;db4objects&lt;/a&gt;, an object oriented database for Java and .Net.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;After installing db4o it started this tutorial &lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;(&lt;span style="font-family:courier new;"&gt;C:\Program Files (x86)\Db4objects\db4o-6.3\doc\tutorial\Db4objects.Db4o.Tutorial.exe&lt;/span&gt;, on my 64 bits Windows Vista Box)&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt; and everything went as smooth as possible but, when I tried to restarted it &lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;in the n&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;ext day, it failed and the following dialog was shown:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JjJXM4oi98I/RvBcwvR9YLI/AAAAAAAAAAc/2J52NTAWc00/s1600-h/TutorialException.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JjJXM4oi98I/RvBcwvR9YLI/AAAAAAAAAAc/2J52NTAWc00/s320/TutorialException.png" alt="" id="BLOGGER_PHOTO_ID_5111687569460781234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;Looking at this dialog we can see that the program failed to delete a file called &lt;span style="font-style: italic;"&gt;formula1.yap&lt;/span&gt; under &lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span style="font-family:courier new;"&gt;C:\Program Files (x86)\Db4objects\db4o-6.3\doc\tutorial\&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt; folder; so I launched &lt;a href="http://www.microsoft.com/technet/sysinternals/utilities/processmonitor.mspx"&gt;Process Monitor&lt;/a&gt; and pushed &lt;span style="font-style: italic;"&gt;Reset&lt;/span&gt; button in tutorial program again.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JjJXM4oi98I/RvBxlye5cdI/AAAAAAAAAA8/PbcbSjwdHRE/s1600-h/TutorialReset.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JjJXM4oi98I/RvBxlye5cdI/AAAAAAAAAA8/PbcbSjwdHRE/s400/TutorialReset.png" alt="" id="BLOGGER_PHOTO_ID_5111710471085978066" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JjJXM4oi98I/RvBjIvR9YOI/AAAAAAAAAA0/u0Xy1URVSv4/s1600-h/TutorialExceptionProcessExplorer.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JjJXM4oi98I/RvBjIvR9YOI/AAAAAAAAAA0/u0Xy1URVSv4/s400/TutorialExceptionProcessExplorer.png" alt="" id="BLOGGER_PHOTO_ID_5111694578847408354" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;It just confirms that the tutorial is failing to delete the file but why? Worse, why have it worked when we started it for the first time?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;The .Net tutorial that comes with db4&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;o has some minor bugs related to the way&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt; Windows Vista x64 handles writes to some specific paths, more specifically to &lt;span style="font-weight: bold;font-family:courier new;" &gt;%ProgramFiles%&lt;/span&gt; and &lt;span style="font-weight: bold;font-family:courier new;" &gt;%ProgramFiles(x86)%&lt;/span&gt; folders.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;It's a Windows Vista&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt; feature called &lt;a href="http://technet2.microsoft.com/WindowsVista/en/library/0d75f774-8514-4c9e-ac08-4c21f5c6c2d91033.mspx?mfr=true"&gt;UAC&lt;/a&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;for detailed information about this topic please refer to this &lt;a href="http://www.microsoft.com/technet/technetmag/issues/2007/06/UAC/default.aspx"&gt;technet article&lt;/a&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt; that prevents standard users (non administrators) from writing  to some folders/registry keys, basically to keep the system more stable and secure. Actually it worked in the first time because&lt;br /&gt;&lt;br /&gt;Ok, so how to fix this problem?&lt;br /&gt;&lt;br /&gt;Basically there are 3 different approaches that can be applied:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;The &lt;span style="font-style: italic;"&gt;"Quick and Dirty" &lt;/span&gt;way (probably the easiest and fastest one) is to run the tutorial as an administrator. To do this just right click on the tutorial program and select &lt;span style="font-style: italic;"&gt;"run as administrator".&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JjJXM4oi98I/RvB1oCe5ceI/AAAAAAAAABE/kBCZB3kbX2k/s1600-h/TutorialRunAsAdministrator.png"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_JjJXM4oi98I/RvB1oCe5ceI/AAAAAAAAABE/kBCZB3kbX2k/s320/TutorialRunAsAdministrator.png" alt="" id="BLOGGER_PHOTO_ID_5111714907787194850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;The second one consists in adding a manifest next to the tutorial program ( (warning: Windows Vista/.Net will cache the tutorial program and will not pick you fresh manifest :(. In this case you can just "touch" the tutorial program &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;-- or move it to another folder -- &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;and Windows will load the manifest in the next time you start it as &lt;a href="http://blogs.msdn.com/vistacompatteam/archive/2006/11/13/manifest-and-the-fusion-cache.aspx"&gt;explained here&lt;/a&gt;). This simply instructs Windows to start the program with administrator rights.&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;&lt;br /&gt;&amp;lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0"&amp;gt;&lt;br /&gt;&amp;lt;assemblyidentity version="1.0.0.0" name="Db4objects.Db4o.Tutorial.exe" type="win32"&amp;gt;&lt;br /&gt;&amp;lt;trustinfo xmlns="urn:schemas-microsoft-com:asm.v3"&amp;gt;&lt;br /&gt;&amp;lt;security&amp;gt;&lt;br /&gt;&amp;lt;requestedprivileges&amp;gt;&lt;br /&gt;&amp;lt;requestedexecutionlevel level="requireAdministrator"&amp;gt;&lt;br /&gt;&amp;lt;/requestedprivileges&amp;gt;&lt;br /&gt;&amp;lt;/security&amp;gt;&lt;br /&gt;&amp;lt;/trustinfo&amp;gt;&lt;br /&gt;&amp;lt;/assembly&amp;gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;The last one (and in my opinion the correct one) consists in fixing the tutorial in order to  save this file under &lt;span style="font-weight: bold;font-family:courier new;" &gt;%LocalAppData%&lt;/span&gt; (or &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;%AppData%&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;) instead of its installation folder (thats the recommended action by Microsoft).&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="c-sharp"&gt;&lt;br /&gt;private void UseDatabase()&lt;br /&gt;{&lt;br /&gt;   string databaseFile = Path.Combine(&lt;br /&gt;                              Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), &lt;br /&gt;                              "Books.yap");&lt;br /&gt;&lt;br /&gt;   using (IObjectContainer db = InitializeDatabase(databaseFile))&lt;br /&gt;   {&lt;br /&gt;      // use the database...&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span&gt;That's all folks ;)&lt;br /&gt;&lt;br /&gt;In a future post I'll discuss a bit more about a UAC feature called &lt;span style="font-style: italic;"&gt;File System  &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Registry Virtualization &lt;/span&gt;and why it wasn't applied in this case.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8420758913971424846?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8420758913971424846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8420758913971424846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8420758913971424846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8420758913971424846'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/09/minor-db4o-tutorial-problem.html' title='Minor db4o tutorial problem'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JjJXM4oi98I/RvBcwvR9YLI/AAAAAAAAAAc/2J52NTAWc00/s72-c/TutorialException.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6663196217391069715</id><published>2007-09-10T21:06:00.000-03:00</published><updated>2007-09-10T21:41:08.444-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Another post in the series RTFM :)</title><content type='html'>&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;As I've said in my last post, I'm reading C#  3.0 specification.&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;Well, it's amazing what you can learn when you do take the time to learn more about the tools (in this case, the language) you use all day long :). &lt;/span&gt;

&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;This time I've find out that it's possible to use &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 102);font-family:verdana;" &gt;reserved words&lt;/span&gt;&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt; as &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 102);font-family:verdana;" &gt;identifiers&lt;/span&gt;&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;! &lt;/span&gt;

&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;Amazing! (and of course, dangerous as it make it harder to read your code.)  &lt;/span&gt;

&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;But this isn't a new feature of C# 3.0; it works with C# 2.0 (.Net Framework 2.0)!&lt;/span&gt;

&lt;span style="color: rgb(0, 51, 51);font-family:verdana;" &gt;&lt;span style="color: rgb(0, 0, 102);"&gt;Just copy the following sample and compile it using CSharp compiler from .Net Framework  2.0!&lt;/span&gt;&lt;/span&gt;
&lt;pre name="code" class="c-sharp"&gt;
public class @class
{
   private static void Main()
   {
      int @int = 10;
      int @delegate = @int + 30;;
      System.Console.WriteLine("Values {0} {1}", @int, @delegate);
   }
}
&lt;/pre&gt;
&lt;span style="color: rgb(0, 0, 102);font-family:verdana;" &gt;What do you think about using &lt;span style="font-style: italic;"&gt;reserved&lt;/span&gt; words as identifiers? Let the world know your opinion! :)

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6663196217391069715?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6663196217391069715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6663196217391069715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6663196217391069715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6663196217391069715'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/09/another-post-in-series-rtfm.html' title='Another post in the series RTFM :)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2240193574202741088</id><published>2007-09-04T23:39:00.002-03:00</published><updated>2008-04-25T07:49:58.000-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>?? Operator.. What is it good for?</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Hi,

Other day I was poking around C# 2.0 documentation and noted a different operator I had never seen before, &lt;span style="font-weight: bold;"&gt;?? &lt;/span&gt;so I thought with myself: what is it good for?

Well, after reading the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms173224%28VS.80%29.aspx"&gt;documentation&lt;/a&gt; (remember, &lt;span style="font-style: italic;"&gt;&lt;a href="http://en.wikipedia.org/wiki/RTFM"&gt;RTFM&lt;/a&gt; :) &lt;/span&gt;I couldn't believe I didn't known this before!

The &lt;span style="font-weight: bold;"&gt;??&lt;/span&gt; operator is a binary operator that checks the left operand against null. If it is null, the expression result is the &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;right operand &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;value otherwise (left operand is not null) it will be the left operand value.

See a sample:
&lt;pre name="code" class="c-sharp"&gt;
string name = null;
Console.WriteLine("Value: {0}", name ?? "(null)"); // Writes: Value: (null)

name = "Adriano";
Console.WriteLine("Value: {0}", name ?? "(null)"); // Writes: Value: Adriano

&lt;/pre&gt;Also, it is useful when used in conjunction to &lt;span style="font-style: italic;"&gt;nullable value types&lt;/span&gt;.

&lt;pre name="code" class="c-sharp"&gt;
int? i = null;
Console.WriteLine("Value: {0}", i ?? -1); // Writes: Value: (null)

i = 20;
Console.WriteLine("Value: {0}", i ?? -1); // Writes: Value: 20
&lt;/pre&gt;
PS: I've just started to play with &lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;&lt;a href="http://msdn2.microsoft.com/en-us/vcsharp/aa336809.aspx"&gt;C# 3.0&lt;/a&gt; (&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Visual Studio 2008 beta 2) and it seams to be a very strong language.

&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;PS2: Finally I managed to get &lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;SyntaxHighlighter&lt;/a&gt; to work with blogger (thanks to this &lt;a href="http://developertips.blogspot.com/2007/08/syntaxhighlighter-on-blogger.html"&gt;post&lt;/a&gt;)

As soon as I got more information I'll post my impressions here :)

See you soon!

&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2240193574202741088?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2240193574202741088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2240193574202741088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2240193574202741088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2240193574202741088'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/09/operator-what-is-it-good-for.html' title='?? Operator.. What is it good for?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6216514619018411303</id><published>2007-09-04T08:31:00.000-03:00</published><updated>2007-09-04T08:55:21.015-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geral'/><title type='text'>Mudanças</title><content type='html'>&lt;span style="color: rgb(102, 51, 51);font-size:85%;" &gt;&lt;span style="font-family: verdana;"&gt;Depois de ponderar algum tempo sobre o assunto estou considerando utilizar o inglês nos próximos posts.

Porque esta decisão?
&lt;/span&gt;&lt;/span&gt;&lt;ul style="font-family: verdana; color: rgb(102, 51, 51);"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Basicamente entendo que a maioria das pessoas que possam vir a se interessar pelo conteúdo deste blog não teriam problemas para ler conteúdo (pelo menos técnico) em inglês.

&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Escrever em inglês me ajudaria a melhorar meus conhecimentos neste idioma.

&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Adotar o inglês tornaria este blog mais acessível a outras pessoas que não conhecem o português&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 51);font-size:85%;" &gt;&lt;span style="font-family: verdana;"&gt;Se você acompanha este blog e prefere que o conteúdo continue em português deixe um comentário. Dependendo do número de pessoas posso não mudar para o inglês ou então posso postar nos dois idiomas :)

Adriano.
&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6216514619018411303?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6216514619018411303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6216514619018411303' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6216514619018411303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6216514619018411303'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/09/mudanas.html' title='Mudanças'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1250053619184839598</id><published>2007-08-28T00:48:00.000-03:00</published><updated>2007-10-06T18:05:25.651-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db4o'/><category scheme='http://www.blogger.com/atom/ns#' term='vista'/><category scheme='http://www.blogger.com/atom/ns#' term='geral'/><title type='text'>Silencio...</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Já faz algum tempo que não posto nada...

o motivo, como todos já devem saber, é a absoluta falta de tempo, afinal de contas, tenho que me dedicar à obra de Deus, minha esposa, filha e aos jogos (need for speed rules!) ;)

Como estou um pouco sem tempo para escrever um post mais interessante vou apenas listar algumas coisas com a qual tenho me envolvido atualmente:
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Object Mocking em .Net (comecei a utilizar o &lt;a href="http://ayende.com/projects/rhino-mocks.aspx"&gt;Rhino.Mocks&lt;/a&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;OODB, ou seja, Object Oriented Databases (estou estudando o &lt;a href="http://www.db4o.com/"&gt;DB4O&lt;/a&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Estou escrevendo um artigo sobre um dos novos recursos do Windows Vista (e também do Windows Server 2008), o &lt;a href="http://msdn2.microsoft.com/en-us/library/aa366295.aspx"&gt;KTM&lt;/a&gt;, ou, gerenciador de transações do Kernel, para uma revista sobre .Net.
&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Lendo alguns livros, principalmente um sobre &lt;a href="http://wcf.netfx3.com/"&gt;WCF&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Etc.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;É mais ou menos isso :)

[]'s

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1250053619184839598?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1250053619184839598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1250053619184839598' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1250053619184839598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1250053619184839598'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/08/silencio.html' title='Silencio...'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-961354960798533819</id><published>2007-06-15T14:16:00.001-03:00</published><updated>2007-06-22T14:20:46.358-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='segurança'/><title type='text'>Stream de dados alternativas</title><content type='html'>&lt;p&gt;Para muitos usuários (e mesmo desenvolvedores) do Windows o conceito de arquivo esta tão sedimentado que muitas vezes melhorias significativas no sistema de arquivos deste sistema operacional (no caso o NTFS) são ignoradas.&lt;/p&gt; &lt;p&gt;Neste post apresento um dos recursos mais desconhecidos, &lt;strong&gt;stream alternativas de dados&lt;/strong&gt; ou &lt;strong&gt;ADS&lt;/strong&gt; (do inglês, &lt;em&gt;Alternate Data Stream&lt;/em&gt;).&lt;/p&gt; &lt;p&gt;Para compreendermos este recurso é necessário primeiro definirmos (ou relembrarmos) alguns conceitos:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Uma &lt;strong&gt;stream &lt;/strong&gt;de dados nada mais é que um &lt;em&gt;conjunto de bytes&lt;/em&gt; arranjados de forma seqüencial.  &lt;/li&gt;&lt;li&gt;Um arquivo é composto por uma ou mais &lt;strong&gt;streams&lt;/strong&gt; de dados.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Streams&lt;/strong&gt; de dados possuem um nome associado através do qual a mesma é referenciada. A regra básica para formação do nome de &lt;strong&gt;streams&lt;/strong&gt; é:

&lt;strong&gt;&lt;em&gt;nome-arquivo.ext:nome-stream:tipo-stream&lt;/em&gt;&lt;/strong&gt;

&lt;/li&gt;&lt;li&gt;O nome da stream pode conter qualquer caracter válido para um nome de arquivo.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Como o Windows não possui meios (tanto no Explorer quanto no console) para detectar / mostrar arquivos que possuem &lt;strong&gt;ADS,&lt;/strong&gt; abaixo listei algumas ferramentas úteis para tal finalidade: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a title="http://www.heysoft.de/Frames/f_sw_la_en.htm" href="http://www.heysoft.de/Frames/f_sw_la_en.htm"&gt;http://www.heysoft.de/Frames/f_sw_la_en.htm&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a title="http://www.merijn.org/programs.php#adsspy" href="http://www.merijn.org/programs.php#adsspy"&gt;http://www.merijn.org/programs.php#adsspy&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a title="http://www.gorvin.net/en/download.shtml" href="http://www.gorvin.net/en/download.shtml"&gt;http://www.gorvin.net/en/download.shtml&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="font-family:Tahoma;"&gt;Usando ADSs&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;A forma mais simples para demonstrarmos este conceito é através do console do Windows. Abra o console (&lt;strong&gt;cmd.exe&lt;/strong&gt;) e digite:&lt;/p&gt; &lt;p&gt;&lt;span style=";font-family:Courier New;font-size:100%;"  &gt;&lt;strong&gt;  echo teste de streams &amp;gt; teste.txt:dados&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;p align="left"&gt;Simples assim! O comando acima cria uma stream chamada &lt;strong&gt;dados&lt;/strong&gt; com o conteúdo &lt;strong&gt;teste de streams&lt;/strong&gt;.&lt;/p&gt; &lt;p align="left"&gt;Agora você pode conferir que o arquivo teste.txt foi criado mas o comando &lt;strong&gt;dir&lt;/strong&gt; reporta o mesmo com &lt;strong&gt;0 (zero)&lt;/strong&gt; bytes.&lt;/p&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;p&gt;Finalmente, para visualisar o conteúdo da stream digite&lt;/p&gt; &lt;p&gt;&lt;span style=";font-family:Courier New;font-size:100%;"  &gt;&lt;strong&gt;  more &amp;lt; teste.txt:dados&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt; &lt;/p&gt; &lt;p&gt;Abaixo apresento um pequeno programa de exemplo para criar ADSs (note que o mesmo não possui nenhum tratamento especial, ou seja, a forma de acessar data streams alternativas é idêntica à utilizada para acessar a &lt;em&gt;data stream default).&lt;/em&gt;&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;#include &lt;span class="str"&gt;"stdio.h"&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;#include &lt;span class="str"&gt;"Windows.h"&lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; main(&lt;span class="kwrd"&gt;int&lt;/span&gt; argc, &lt;span class="kwrd"&gt;char&lt;/span&gt; *argv[])&lt;/pre&gt;&lt;pre class="alt"&gt;{&lt;/pre&gt;&lt;pre&gt;    HANDLE handle;&lt;/pre&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (argc &amp;lt; 3)&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class="alt"&gt;        printf(&lt;span class="str"&gt;"Nome da stream (formato: arquivo.ext:stream) ou dados nao especificados.\r\nUso: ads.exe nome-stream dados"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt;;&lt;/pre&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;pre&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;    &lt;/pre&gt;&lt;pre class="alt"&gt;    {&lt;/pre&gt;&lt;pre&gt;        printf(&lt;span class="str"&gt;"\r\nGravando dados em %s"&lt;/span&gt;, argv[1]);&lt;/pre&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;pre&gt;    &lt;/pre&gt;&lt;pre class="alt"&gt;    handle = CreateFile(argv[1], &lt;/pre&gt;&lt;pre&gt;                        GENERIC_WRITE, &lt;/pre&gt;&lt;pre class="alt"&gt;                        0, &lt;/pre&gt;&lt;pre&gt;                        NULL, &lt;/pre&gt;&lt;pre class="alt"&gt;                        OPEN_ALWAYS, &lt;/pre&gt;&lt;pre&gt;                        0, 0);&lt;/pre&gt;&lt;pre class="alt"&gt;                        &lt;/pre&gt;&lt;pre&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (handle != INVALID_HANDLE_VALUE)&lt;/pre&gt;&lt;pre class="alt"&gt;    {&lt;/pre&gt;&lt;pre&gt;        DWORD numberOfBytesWritten;&lt;/pre&gt;&lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;int&lt;/span&gt; n = WriteFile(  handle, &lt;/pre&gt;&lt;pre&gt;                            argv[2], &lt;/pre&gt;&lt;pre class="alt"&gt;                            strlen(argv[2]), &lt;/pre&gt;&lt;pre&gt;                            &amp;numberOfBytesWritten, &lt;/pre&gt;&lt;pre class="alt"&gt;                            NULL);&lt;/pre&gt;&lt;pre&gt;                            &lt;/pre&gt;&lt;pre class="alt"&gt;        printf(&lt;span class="str"&gt;"\r\n%ld bytes gravados"&lt;/span&gt;, numberOfBytesWritten);&lt;/pre&gt;&lt;pre&gt;        &lt;/pre&gt;&lt;pre class="alt"&gt;        CloseHandle(handle);&lt;/pre&gt;&lt;pre&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class="alt"&gt;        printf(&lt;span class="str"&gt;"Não foi possivel criar a stream de dados."&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;span style="font-family: verdana;"&gt;[Editado: Correção de um erros de português]&lt;/span&gt;
&lt;p&gt;experimente executar o programa com alguns parâmetros como por exemplo:&lt;/p&gt;
&lt;p&gt;    &lt;span style="font-family:Courier New;"&gt;&lt;strong&gt;ads teste.txt:dados "Teste de streams"&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;É isso ai. &lt;/p&gt;
&lt;p&gt;Até a próxima.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-961354960798533819?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/961354960798533819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=961354960798533819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/961354960798533819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/961354960798533819'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/06/stream-de-dados-alternativas.html' title='Stream de dados alternativas'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-463319605296774202</id><published>2007-05-15T11:31:00.001-03:00</published><updated>2007-05-15T11:43:13.804-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='livros'/><title type='text'>Boa leitura</title><content type='html'>&lt;span style="color: rgb(102, 0, 0); font-family: verdana;font-size:100%;" &gt;&lt;span style="color: rgb(51, 0, 0);"&gt;Em se tratando de informática, ou mais especificamente de desenvolvimento de software, existem algumas ótimas publicações que podem ser lidas online (algumas delas podem ser baixadas), e o melhor,  gratuitamente.

&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li style="color: rgb(102, 0, 0); font-family: verdana;"&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/"&gt;MSDN Magazine&lt;/a&gt;&lt;/li&gt;&lt;li style="color: rgb(102, 0, 0); font-family: verdana;"&gt;&lt;a href="http://www.microsoft.com/technet/technetmag/default.aspx"&gt;Technet Magazine&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ddj.com/"&gt;&lt;span style="color: rgb(102, 0, 0); font-family: verdana;"&gt;Dr. Dobb's Journal&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 0, 0); font-family: verdana;font-size:100%;" &gt;&lt;span style="color: rgb(51, 0, 0);"&gt;É claro, que leio pelo menos uma dúzia de blogs e outras publicações (sem contar livros :) além destas!

Adriano


&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-463319605296774202?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/463319605296774202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=463319605296774202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/463319605296774202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/463319605296774202'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/05/boa-leitura.html' title='Boa leitura'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5327563235635662348</id><published>2007-05-11T10:05:00.000-03:00</published><updated>2007-10-08T20:17:54.761-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='COM+'/><category scheme='http://www.blogger.com/atom/ns#' term='utilitário'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>"COM" não esta morto (pelo menos eu espero)</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;Assim como a &lt;span style="font-style: italic;"&gt;morte&lt;/span&gt; de linguagens de programação como  Cobol, Fortram, Basic, etc. e &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;também a extinção dos programadores &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt; já foram anunciadas várias vezes, mas nunca se concretizaram ,graças a Deus, muitos já anunciaram a morte do COM (Component Object Model), uma tecnologia da MS para a componentização de soluções.

Infelizmente (para estes &lt;span style="font-style: italic;"&gt;"gurus" !&lt;/span&gt;) isso não aconteceu (preciso dizer: &lt;span style="font-style: italic;"&gt;"eu já sabia que isso não aconteceria mesmo"&lt;/span&gt;) ? Pelo contrário, se você observar o número de &lt;span style="font-style: italic;"&gt;sub-sistemas&lt;/span&gt; do Windows Vista implementado usando esta tecnologia você irá notar um aumento razoável no número de componentes neste SO.

Como grande parte da minha carreira foi dedicada a esta tecnologia é natural que eu tenha interesse nesta :). Assim, a alguns anos atrás (para ser mais preciso, entre 2002 e 2004), eu escrevi (e disponibilizei gratuitamente) um utilitário (ao qual chamei de &lt;a href="http://sourceforge.net/projects/typelibwizard/"&gt;Typelib Wizard&lt;/a&gt;) que, entre outras coisas, permite fazer &lt;span style="font-style: italic;"&gt;Browse &lt;/span&gt;do conteúdo de &lt;span style="font-style: italic;"&gt;TLBs &lt;/span&gt;(quer estas TLBs estejam isoladas ou incluídas como recurso de um executável) mais ou menos nos moldes dos browsers de classes encontrados nos ambientes de desenvolvimento atuais.

Se você desenvolve componentes COM (ou se utiliza &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;ambientes tais como &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;ASP (não ASP.NET),  VB 6, VBA, Power Builder, etc., &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;em que a chance de estar utilizando componentes COM, mesmo sem saber, é grande) &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;esta ferramenta é de &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;grande utilidade.
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;A algum tempo eu não realizo nenhuma manutenção no projeto mas tenho algumas idéias e seria um prazer adicionar outros desenvolvedores para que os mesmos possam atualizar o repositório de código (que aliás, vou passar para o &lt;span style="font-weight: bold;"&gt;subversion&lt;/span&gt;) e ajudar a manter o projeto "andando".

Para saber mais sobre o projeto visite os sites abaixo:
&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://typelibwizard.sourceforge.net/"&gt;http://typelibwizard.sourceforge.net/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="linkification-ext" href="http://sf.net/projects/typelibwizard" title="Linkification: http://sf.net/projects/typelibwizard"&gt;http://sf.net/projects/typelibwizard&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 0, 0);font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;
Abraços.

Adriano


&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5327563235635662348?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/5327563235635662348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=5327563235635662348' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5327563235635662348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5327563235635662348'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/05/com-no-esta-morto-pelo-meno-eu-espero.html' title='&quot;COM&quot; não esta morto (pelo menos eu espero)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4478742605055465336</id><published>2007-04-10T14:06:00.000-03:00</published><updated>2007-04-10T22:14:13.208-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>Links sobre GC!</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Aqui estão alguns ótimos artigos (em ingles) sobre o Garbage Collector do .Net:

&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;&lt;a class="linkification-ext" href="http://blogs.msdn.com/tess/archive/2007/04/10/net-garbage-collector-popquiz-followup.aspx" title="Linkification: http://blogs.msdn.com/tess/archive/2007/04/10/net-garbage-collector-popquiz-followup.aspx"&gt;http://blogs.msdn.com/tess/archive/2007/04/10/net-garbage-collector-popquiz-followup.aspx&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="linkification-ext" href="http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=86c71425-57bc-4fcb-b34b-3262812f12cf" title="Linkification: http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=86c71425-57bc-4fcb-b34b-3262812f12cf"&gt;http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=86c71425-57bc-4fcb-b34b-3262812f12cf&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="linkification-ext" href="http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae" title="Linkification: http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae"&gt;http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="linkification-ext" href="http://vineetgupta.spaces.live.com/blog/cns%218DE4BDC896BEE1AD%211104.entry" title="Linkification: http://vineetgupta.spaces.live.com/blog/cns!8DE4BDC896BEE1AD!1104.entry"&gt;http://vineetgupta.spaces.live.com/blog/cns!8DE4BDC896BEE1AD!1104.entry&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;     &lt;span style="font-family:verdana;"&gt;[Editado: Inclusão do link]&lt;/span&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/1100/gci/"&gt;http://msdn.microsoft.com/msdnmag/issues/1100/gci/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;
Abraços,

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4478742605055465336?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/4478742605055465336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=4478742605055465336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4478742605055465336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4478742605055465336'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/04/links-sobre-gc.html' title='Links sobre GC!'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2487525036599470863</id><published>2007-02-28T23:43:00.000-03:00</published><updated>2007-02-28T23:55:16.629-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='utilitário'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>SerialWizard: Uau! 1649 Downloads (1 Gb!)</title><content type='html'>&lt;span style="color: rgb(102, 51, 0);font-family:verdana;" &gt;Quando comparado com outros aplicativos pode não parecer muito, mas para mim realmente é um número expressivo: o SerialWizard já foi baixado 1649 vezes totalizando 1 Gb !

Se tiver curiosidade para saber como o SerialWizard esta neste momento &lt;a href="http://sourceforge.net/project/stats/detail.php?group_id=171621&amp;ugn=serialwizard&amp;amp;type=prdownload&amp;mode=alltime&amp;amp;package_id=0"&gt;click aqui&lt;/a&gt;.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2487525036599470863?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2487525036599470863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2487525036599470863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2487525036599470863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2487525036599470863'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/02/serialwizard-uau-1649-downloads-1-gb.html' title='SerialWizard: Uau! 1649 Downloads (1 Gb!)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-8217287018407530069</id><published>2007-02-28T08:40:00.000-03:00</published><updated>2007-02-28T13:28:26.166-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='divertido'/><title type='text'>Descubra mais sobre você !</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:georgia;" &gt;Hoje (como de costume) estava lendo alguns blogs e me deparei com um site muito interessante; neste site você responde algumas perguntas e ele lhe diz qual "&lt;span style="font-style: italic;"&gt;super heroi/vilão&lt;/span&gt;" você é! :).

Veja os meus resultados:
&lt;pre&gt;
&lt;b&gt;You are &lt;span style="font-size:6;"&gt;Mr. Freeze&lt;/span&gt;&lt;/b&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Mr. Freeze&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="50"&gt;&lt;/td&gt;&lt;td&gt; 50%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;The Joker&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="48"&gt;&lt;/td&gt;&lt;td&gt; 48%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dr. Doom&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="44"&gt;&lt;/td&gt;&lt;td&gt; 44%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Apocalypse&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="41"&gt;&lt;/td&gt;&lt;td&gt; 41%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lex Luthor&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="39"&gt;&lt;/td&gt;&lt;td&gt; 39%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Magneto&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="38"&gt;&lt;/td&gt;&lt;td&gt; 38%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Riddler&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="37"&gt;&lt;/td&gt;&lt;td&gt; 37%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Juggernaut&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="36"&gt;&lt;/td&gt;&lt;td&gt; 36%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Venom&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="33"&gt;&lt;/td&gt;&lt;td&gt; 33%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mystique&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="32"&gt;&lt;/td&gt;&lt;td&gt; 32%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dark Phoenix&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="26"&gt;&lt;/td&gt;&lt;td&gt; 26%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Kingpin&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="26"&gt;&lt;/td&gt;&lt;td&gt; 26%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Green Goblin&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="24"&gt;&lt;/td&gt;&lt;td&gt; 24%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Catwoman&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="23"&gt;&lt;/td&gt;&lt;td&gt; 23%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Two-Face&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="12"&gt;&lt;/td&gt;&lt;td&gt; 12%&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Poison Ivy&lt;/td&gt;
&lt;td&gt;&lt;hr align="left" noshade="noshade" size="4" width="12"&gt;&lt;/td&gt;&lt;td&gt; 12%&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;
&lt;td width="250"&gt;You are cold and you think everyone else should be also, literally.

&lt;img src="http://www.thesuperheroquiz.com/villain/pics/freeze.jpg" /&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;a href="http://www.thesuperheroquiz.com/villain"&gt;
Click here to take the "Which Super Villain are you?" quiz...&lt;/a&gt;
&lt;/pre&gt;

&lt;pre&gt;
&lt;BR&gt;&lt;B&gt;You are &lt;FONT SIZE=6&gt;Green Lantern&lt;/FONT&gt;&lt;/B&gt;
&lt;TABLE&gt;&lt;TR&gt;&lt;TD&gt;&lt;TABLE&gt;&lt;TR&gt;&lt;TD&gt;Green Lantern&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=50&gt;&lt;/TD&gt;&lt;TD&gt; 50%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Iron Man&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=45&gt;&lt;/TD&gt;&lt;TD&gt; 45%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Robin&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=37&gt;&lt;/TD&gt;&lt;TD&gt; 37%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spider-Man&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=35&gt;&lt;/TD&gt;&lt;TD&gt; 35%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Superman&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=35&gt;&lt;/TD&gt;&lt;TD&gt; 35%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Catwoman&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=35&gt;&lt;/TD&gt;&lt;TD&gt; 35%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;The Flash&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=35&gt;&lt;/TD&gt;&lt;TD&gt; 35%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Batman&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=25&gt;&lt;/TD&gt;&lt;TD&gt; 25%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Wonder Woman&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=20&gt;&lt;/TD&gt;&lt;TD&gt; 20%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Hulk&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=20&gt;&lt;/TD&gt;&lt;TD&gt; 20%&lt;/TD&gt;
&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Supergirl&lt;/TD&gt;
&lt;TD&gt;&lt;HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=15&gt;&lt;/TD&gt;&lt;TD&gt; 15%&lt;/TD&gt;
&lt;/TR&gt;&lt;/TABLE&gt;&lt;/TD&gt;
&lt;TD&gt;Hot-headed.  You have strong &lt;BR&gt;will power and a good imagination.&lt;BR&gt;
&lt;IMG SRC="http://www.thesuperheroquiz.com/pics/lantern2.jpg"&gt;&lt;/TD&gt;
&lt;/TR&gt;&lt;/TABLE&gt;&lt;A HREF="http://www.thesuperheroquiz.com/"&gt;
Click here to take the "Which Superhero am I?" quiz...&lt;/A&gt;&lt;BR&gt;
&lt;/pre&gt;
&lt;pre&gt;
Neste site você pode descobrir qual SO você é :)&lt;br/&gt;
&lt;a href="http://bbspot.com/News/2003/01/os_quiz.php"&gt;
&lt;img src="http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg" width="300" height="90" border="0" alt="You are Debian Linux. People have difficulty getting to know you. Once you finally open your shell they're apt to love you."&gt;&lt;br&gt;Which OS are You?&lt;/a&gt;
Neste site você pode descobrir qual linguagem de programação você é :)&lt;br/&gt;
&lt;a href="http://www.bbspot.com/News/2006/08/language_quiz.php"&gt;&lt;img src="http://www.bbspot.com/Images/News_Features/2006/08/language/python.jpg" width="300" height="90" border="0" alt="You are Python You are slower than others, but easier to understand. You are a minimalist, who doesn't like clutter."&gt;&lt;br&gt;Which Programming Language are You?&lt;/a&gt;
&lt;br/&gt;
Finalmente qual extensão de arquivo você é!&lt;br/&gt;
&lt;a href="http://www.bbspot.com/News/2004/10/extension_quiz.php"&gt;&lt;img src="http://www.bbspot.com/Images/News_Features/2004/10/file_extensions/exe.jpg" width="300" height="90" border="0" alt="You are .exe When given proper orders, you execute them flawlessly. You're familiar to most, and useful to all."&gt;&lt;br&gt;Which File Extension are You?&lt;/a&gt;
&lt;br/&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-8217287018407530069?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/8217287018407530069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=8217287018407530069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8217287018407530069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/8217287018407530069'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/02/hoje-como-de-costume-estava-lendo.html' title='Descubra mais sobre você !'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-9195238604298116712</id><published>2007-02-22T08:48:00.000-02:00</published><updated>2007-02-22T09:13:46.246-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='COM+'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>COM/COM+ ? Alguém ta afim?</title><content type='html'>&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;Você desenvolve, ou conhece alguém que desenvolva, componentes COM/COM+? Integrando com o SNA/HIS server?

A algum tempo atras eu já não encontrava muitas pessoas que conhecessem e/ou desenvolvessem usando COM/COM+; agora parece mais difícil ainda! Bom, pelo menos a MS ainda utiliza estas tecnologias de forma extensiva, visto que no Windows Vista o número de componentes COM aumentou :).


No meu último emprego (em uma instituição financeira) utilizávamos muito componentes COM+ integrados com o HIS Server. Motivado pela instabilidade do nosso ambiente de testes (e outras coisas mais) iniciei o desenvolvimento de um mecanismo que nos permitisse "&lt;span style="font-style: italic;"&gt;simular&lt;/span&gt;" a interação com o mainframe (ou seja, passar pelo SNA/HIS server) que acabou por tomar formas mais genéricas e permitir que uma grande gama de componentes COM/COM+ fossem passíveis de ser simulados.

Abaixo apresento algumas das vantagens que este mecanismo apresenta:
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;Independência do mainframe (poderíamos continuar nossos testes mesmo que nosso ambiente de testes do mainframe estivesse parado)

&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;Flexibilidade para realizar &lt;span style="font-style: italic;"&gt;unit tests &lt;/span&gt;uma vez que, dado um conjunto de dados de entrada, poderíamos retornar qualquer valor desejado.

&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;Simplicidade de configuração&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;Infelizmente não tive tempo hábil para terminar este projeto (que basicamente é dividido em dois módulos: &lt;span style="font-style: italic;"&gt;i) &lt;/span&gt;um componente COM/COM+ cuja responsabilidade é &lt;span style="font-style: italic;"&gt;simular&lt;/span&gt; outros componente; &lt;span style="font-style: italic;"&gt;ii)&lt;/span&gt; um aplicativo GUI  responsável por configurar/monitorar a utilização do componente) antes de me desligar desta instituição financeira e, no momento, não estou utilizando tanto componentes COM/COM+ para justificar o investimento necessário para finalizar o projeto junto a empresa que trabalho atualmente.

O objetivo deste post é definir se há pessoas interessadas em continuar o projeto; eu poderia colocar o fonte no &lt;a href="http://www.sf.net/"&gt;sourceforge&lt;/a&gt; (qualquer um poderia baixar os fontes) e &lt;/span&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;incluir os interessados como desenvolvedores do projeto (estas pessoas poderiam fazer "&lt;span style="font-style: italic;"&gt;commit"&lt;/span&gt;, ou seja, atualizar os fontes no &lt;/span&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;&lt;a href="http://www.sf.net/"&gt;sourceforge&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 0, 0);font-family:verdana;" &gt;.

É claro que eu daria suporte :)

Se alguém tiver interesse comente neste post e podemos discutir melhor como seria o processo.

Até mais.

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-9195238604298116712?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/9195238604298116712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=9195238604298116712' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/9195238604298116712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/9195238604298116712'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/02/comcom-algum-ta-afim.html' title='COM/COM+ ? Alguém ta afim?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6052859632827964612</id><published>2007-01-24T08:14:00.000-02:00</published><updated>2007-01-25T11:49:08.405-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='livros'/><title type='text'>User Interface Design</title><content type='html'>&lt;span style="COLOR: rgb(102,51,0);font-family:verdana;" &gt;Se você participa do design, desenvolvimento, teste, documentação, etc. de programas não deixe de ver esta &lt;a href="http://www.joelonsoftware.com/uibook/chapters/fog0000000057.html"&gt;série de artigos&lt;/a&gt; (na realidade os capítulos do livro do autor do blog) sobre design de user interfaces.

Mesmo que estando incompleto (o autor disponibilizou alguns capítulos apenas) eu recomendo a leitura do texto.

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6052859632827964612?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6052859632827964612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6052859632827964612' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6052859632827964612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6052859632827964612'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2007/01/user-interface-design.html' title='User Interface Design'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1181964244502984563</id><published>2006-12-15T09:49:00.000-02:00</published><updated>2006-12-15T10:25:01.434-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virus'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='segurança'/><title type='text'>Não custa nada tentar...</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Ao chegar hoje no trabalho carreguei o firefox e abri minha conta de email do &lt;a href="http://gmail.com/"&gt;gmail&lt;/a&gt; (como faço usualmente) e qual não foi minha surpresa ao ver o seguinte email:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JjJXM4oi98I/RYKNG1gAiBI/AAAAAAAAAAM/2g-N0ruUARY/s1600-h/Detran.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JjJXM4oi98I/RYKNG1gAiBI/AAAAAAAAAAM/2g-N0ruUARY/s320/Detran.png" alt="" id="BLOGGER_PHOTO_ID_5008720884169476114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Uhm.... mais um &lt;span style="font-style: italic;"&gt;hacker&lt;/span&gt; tentando instalar um cavalo de tróia (ou qualquer coisa parecida) em minha máquina.&lt;br /&gt;&lt;br /&gt;Certo. &lt;span style="font-style: italic;"&gt;Nice try Mr. hacker!&lt;/span&gt; Mas não vai ser desta vez :)&lt;br /&gt;&lt;br /&gt;Fico imaginando o número de usuários que ao receber um email como este (ou outro qualquer, por exemplo convidando o usuário a ver as últimas fotos nuas de uma atriz bonitona qualquer) se desesperam, ou ingenuamente, e acabam por clicar no link (observe bem, é um executável).  Certamente não deve ser um número pequeno :(.&lt;br /&gt;&lt;br /&gt;Não sou especialista em segurança, mas de qualquer forma aqui vão algumas dicas de segurança:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Não acredite em propostas fantásticas (que normalmente o  induzem a fazer algo impensado  pois  a tal proposta é &lt;span style="font-style: italic;"&gt;"válida apenas para hoje"&lt;/span&gt;; como minha esposa diz: &lt;span style="font-style: italic;"&gt;"Negócio da China? deixa para o chines!"&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Via de regra as instituições financeiras (bancos) não enviam emails com links. Se você receber algum email em nome de um banco e este possuir links e você tiver dúvida se o mesmo foi realmente enviado pelo banco ou não, entre em contato com o Banco, ou entre no site do banco.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;&lt;span style="font-weight: bold;"&gt;NUNCA &lt;/span&gt;click em links dentro de emails supostamente enviados por  instituições financeiras, órgãos públicos, etc. Procure sempre verificar o &lt;span style="font-style: italic;"&gt;destino&lt;/span&gt; do link (no email que eu recebi o destino era um executável!!! &lt;span style="font-weight: bold;"&gt;NUNCA MESMO CLICK EM LINKS CUJO DESTINO SÃO PROGRAMAS EXECUTÁVEIS&lt;/span&gt;. Nem mesmo se você conheçe a pessoa que enviou o email pois é possível enviar emails se passando por uma pessoa qualquer)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Procure utilizar o computador com um usuário com poucos privilégios.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Mantenha um bom antivirus sempre atualizado em seu computador.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Apesar de algumas pessoas não verem como essencial, eu prefiro manter um bom firewall instalado também&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Instale também um bom programa para verificação de &lt;span style="font-style: italic;"&gt;rootkits&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;spyware&lt;/span&gt; e comania.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Utilize senhas fortes (nada de utilizar a data de nascimento, nome do cachorro ou informações facilmente deduzíveis e/ou suscetíveis a ataques de dicionário).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Mantenha seu SO (Windows, Linux, Mac OS X, etc.) sempre atualizado.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Esta dica é derivada da anterior mas considero a mesma tão importante que vou ser explícito: Mantenha seu &lt;span style="font-style: italic;"&gt;Web Browser&lt;/span&gt; (Firefox, IE, Opera, etc) sempre atualizado.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Acho desnecessário dizer que não é seguro anotar senhas em agendas, papéis (principalmente debaixo do teclado), etc. Se for necessário armazenar várias senhas (para evitar esquecê-las) utilize um programa que guarde as mesmas de forma segura.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Não acesse sites duvidosos.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Se realmente for necessário acessar algum site duvidoso procure fazê-lo a partir de uma &lt;span style="font-style: italic;"&gt;virtual machine&lt;/span&gt; (VM) (a Microsof distribui gratuitamente o &lt;span style="font-style: italic;"&gt;Virtual PC&lt;/span&gt;; a VMWare distribui o &lt;span style="font-style: italic;"&gt;VMWare Player&lt;/span&gt; de graça, mas neste caso você terá que criar a &lt;span style="font-style: italic;"&gt;Virtual Machine&lt;/span&gt; de alguma forma [existem vários programas gratuítos que podem criar &lt;span style="font-style: italic;"&gt;VMs &lt;/span&gt;para o VMWare]). Ok, reconheço que apenas usuários mais avançados possuem condições técnicas para fazer isto)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Cuidado com programas baixados de redes P2P (Kazza, Bit Torrent, etc.). Hackers estão utilizando estas redes para espalhar vírus, cavalos de tróia, etc.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Bom, espero que isso o ajude a tornar mais seguro seu computador ;)&lt;br /&gt;&lt;br /&gt;Adriano.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1181964244502984563?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1181964244502984563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1181964244502984563' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1181964244502984563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1181964244502984563'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/12/no-custa-nada-tentar.html' title='Não custa nada tentar...'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JjJXM4oi98I/RYKNG1gAiBI/AAAAAAAAAAM/2g-N0ruUARY/s72-c/Detran.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6751109217608543825</id><published>2006-12-13T08:59:00.000-02:00</published><updated>2006-12-13T09:10:44.950-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='divertido'/><title type='text'>Problema de gases?</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;" &gt;Outro dia minha esposa me enviou um email com este vídeo; não costumo promover este tipo de email mas como achei muito engraçado aqui esta....
&lt;div style="text-align:center"/&gt;
&lt;object height="350" width="425"&gt;
   &lt;param name="movie" value="http://www.youtube.com/v/LobtyNrtqLs" /&gt;
   &lt;param name="wmode" value="transparent" /&gt;

    &lt;embed src="http://www.youtube.com/v/LobtyNrtqLs" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;

&lt;/object&gt;
&lt;/div&gt;

&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6751109217608543825?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6751109217608543825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6751109217608543825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6751109217608543825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6751109217608543825'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/12/problema-de-gases.html' title='Problema de gases?'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-2329637208528929059</id><published>2006-12-11T15:24:00.000-02:00</published><updated>2006-12-11T15:55:33.448-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='livros'/><category scheme='http://www.blogger.com/atom/ns#' term='geral'/><title type='text'>Lista de livros atualizada....</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(0, 0, 102);"&gt;Este posto é apenas para informar que atualizei a &lt;a href="http://www.amazon.com/gp/registry/registry.html/ref=wlem-si-html_viewall/104-9547256-5032718?id=333WJE16FP06F"&gt;lista de livros&lt;/a&gt; comentada &lt;a href="http://accessviolation.blogspot.com/2005_11_20_accessviolation_archive.html"&gt;neste post&lt;/a&gt;.&lt;/span&gt;

&lt;span style="font-family: verdana; color: rgb(0, 0, 102);"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-2329637208528929059?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/2329637208528929059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=2329637208528929059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2329637208528929059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/2329637208528929059'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/12/lista-de-livros-atualizada.html' title='Lista de livros atualizada....'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-526912190500775754</id><published>2006-12-08T14:10:00.000-02:00</published><updated>2006-12-08T15:29:14.172-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virus'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Sinais dos tempos....</title><content type='html'>&lt;span style="color: rgb(102, 0, 0);font-family:verdana;font-size:100%;"  &gt;Eu não pretendia postar hoje mas um fato inusitado me fez mudar de idéia...

Bom, hoje é sexta feira, e como sempre, eu e o pessoal da empresa, almoçamos mais rápido para jogar Counter Strike (CS).

Chegando à lan-house que sempre jogamos o atendente nos informou que um vírus havia infectado as máquinas e que justamente  o &lt;span style="font-style: italic;"&gt;CS&lt;/span&gt; poderia não funcionar. Para evitar prejuízos financeiros aos clientes  o atendente estava liberando 10 minutos para testarmos se o &lt;span style="font-style: italic;"&gt;CS&lt;/span&gt; iria funcionar na máquina que cada um escolheu para jogar.

Até aqui tudo bem.

Então lá fui eu; escolhi uma máquina e liguei a mesma; alguns instantes depois dou um click no menu do windows, seleciono o &lt;span style="font-style: italic;"&gt;CS&lt;/span&gt; e....

Bum!

&lt;span style="font-style: italic;"&gt;Este programa executou uma instrução ilegal e será finalizado!&lt;/span&gt;

Droga! Tudo bem, pensei comigo; desliguei a máquina, me dirigi a outro computador, liguei o mesmo e....

Bum!

Mesma coisa.

Quando já estava quase desistindo um adolescente de uns 13 anos (compadecido com meu desespero :) virou e disse:


&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;"Eu sei como fazer para funcionar! Quer que eu te ensine?"


&lt;/blockquote&gt;&lt;/span&gt;Ótimo, pensei comigo mesmo! Posso ser orgulhoso e dizer que não (afinal de contas, sou mais capacitado para resolver problemas com computadores que um adolescente de 13 anos) e tentar resolver o problema (ou tentar outro computador) ou responder &lt;span style="font-style: italic;"&gt;sim&lt;/span&gt; e ver no que dava.

Bom, depois de infindáveis 3 segundos, respondi que &lt;span style="font-style: italic;"&gt;sim&lt;/span&gt;; então o adolescente abriu um sorriso, pediu licença, pegou o teclado da minha mão e saiu pressionando o mesmo como louco (na realidade de forma ordenada :).

É claro que eu entendi o que ele estava fazendo (abrindo o Windows Explorer e copiando o executável do jogo de uma pasta compartilhada na rede, que supostamente estava livre do vírus).

Algumas teclas pressionadas depois e pronto! Ele vira novamente para mim e diz:

&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;"Pronto, pode jogar!"&lt;/blockquote&gt;&lt;/span&gt;
Eu conversei um pouco mais com ele, agradeci e tentei executar o jogo novamente...

Bum!

O mesmo problema! Comentei que não havia funcionado e o adolescente disse que ele havia se deparado com o mesmo problema e que este procedimento havia funcionado para ele.

Pensei por alguns instantes e comentei que o vírus poderia ter infectado o programa novamente (enquanto conversávamos).

Então copiei o executável do jogo novamente (é claro que ele me ajudou a encontrar a pasta da rede onde eu poderia encontrar o executável) e tentei novamente...

Agora sim o jogo carregou e pude me divertir :)

O que mais me chamou a atenção neste acontecimento?

Um adolescente me auxiliando a solucionar problemas em um computador :)

é...  &lt;span style="font-style: italic;"&gt;sinais dos tempos!!!!!&lt;/span&gt;

Adriano


&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-526912190500775754?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/526912190500775754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=526912190500775754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/526912190500775754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/526912190500775754'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/12/sinais-dos-tempos.html' title='Sinais dos tempos....'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1224305574393969537</id><published>2006-12-01T13:28:00.000-02:00</published><updated>2006-12-01T14:26:04.133-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='utilitário'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Aplicativo (útil) da Semana - Parte 2</title><content type='html'>&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;Como sempre a falta de tempo tem me impedido de postar mais frequentemente :(&lt;/span&gt;

&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;De qualquer forma, hoje pretendo apresentar um aplicativo bastante útil que usuários do Unix/Linux já estam bastante acostumados mas, por motivos que não importam, a marioria dos usuários do Windows desconhecem.&lt;/span&gt;
&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;
Quando comecei a trabalhar na empresa que me encontro atualmente me deparei com a seguinte situação: todos os desenvolvedores criavam uma estrutura de diretórios fixa (por exemplo: &lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;c:\Projetos\NomeProjeto&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;, &lt;/span&gt;ou algo parecido&lt;span style="font-style: italic;"&gt;)&lt;/span&gt; e algumas ferramentas dependiam destes caminhos (pois usavam caminhos&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt; absolutos).&lt;/span&gt;
&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;
Como sempre tive o habito de particionar meus HDs em pelo menos duas partições (uma para dados e a outra para programas) o drive &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; ficou para o SO (sistema operacional) e a partição de dados acabou ficando como &lt;span style="font-weight: bold;"&gt;E&lt;/span&gt; (ok, eu sei que posso mudar este mapeamento, mas eu não queria fazer isto por outros&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt; motivos).&lt;/span&gt;

&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;Para resolver este impasse (eu desejava colocar o diretório de projetos no drive &lt;span style="font-weight: bold;"&gt;E&lt;/span&gt;, mas algumas ferramentas esperavam que o mesmo se encontrasse no drive &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt;) eu criei um &lt;a href="http://en.wikipedia.org/wiki/NTFS_junction_point"&gt;&lt;span style="font-style: italic;"&gt;Junction Point&lt;/span&gt;&lt;/a&gt; (ou &lt;span style="font-weight: bold;"&gt;ponto de junção&lt;/span&gt;) no drive &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; apontando para o drive &lt;span style="font-weight: bold;"&gt;E&lt;/span&gt;.
&lt;/span&gt;
&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;Junction Points permitem que sejam criados &lt;span style="font-style: italic;"&gt;links&lt;/span&gt; para diretórios em qualquer volume (por exemplo o diretório &lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;c:\projetos&lt;/span&gt;&lt;/span&gt; pode ser um Junction Point, ou seja, pode apontar, para o diretório &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;c:\meus documentos\projetos&lt;/span&gt;&lt;/span&gt;).
&lt;/span&gt;
&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;Assim, para solucionar o impasse fiz o seguinte:&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;Criei a estrutura de diretórios no drive &lt;span style="font-weight: bold;"&gt;E&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;E&lt;/span&gt;&lt;span style="font-style: italic;"&gt;:\Projetos\Nome Projeto&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;No drive &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; eu criei um &lt;span style="font-style: italic;"&gt;Junction Point&lt;/span&gt; chamado &lt;span style="font-style: italic; font-weight: bold;"&gt;Projetos&lt;/span&gt; apontando para &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;E:\Projetos&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;desta forma ao acessar o diretório &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;c:\Projetos&lt;/span&gt; na realidade estou acessando &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;E&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;:\Projetos&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;O resultado pode ser visto na seguinte imagem:

&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/2008/424723157921384/1600/35264/HardLink.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/2008/424723157921384/320/42140/HardLink.png" alt="" border="0" /&gt;&lt;/a&gt;
&lt;span style="color: rgb(0, 102, 0);font-family:verdana;" &gt;Observe que o &lt;span style="font-weight: bold;"&gt;c:\Projetos&lt;/span&gt; aparece no console como &lt;span style="font-weight: bold;"&gt;JUNCTION &lt;/span&gt;(e não como &lt;span style="font-weight: bold;"&gt;DIR&lt;/span&gt; como os demais diretórios) enquando &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;e:\Projetos&lt;/span&gt; &lt;/span&gt;é apresentado (como era de se esperar) como &lt;span style="font-weight: bold;"&gt;DIR&lt;/span&gt;, indicando que o mesmo é um diretório comum.

Agora, todas as operações que forem realizadas em &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;c:\projetos&lt;/span&gt;&lt;/span&gt; na realidade estarão sendo realizadas em &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;e:\projetos&lt;/span&gt;&lt;/span&gt;.

E como criamos (manipulamos) Junction Points?

A resposta rápida é que apesar do Windows suportar Junction Points desde  o Windows 2000, por algum motivo que desconheço, a MS não possui uma forma simples para manipular Junction Points (&lt;a href="http://support.microsoft.com/kb/205524"&gt;aqui&lt;/a&gt; você pode encontrar explicações [em inglês] de como criar Junction Points com ferramentas da própria MS).

Porém nem tudo esta perdido :).  Você pode encontrar utilitários (gratuítos) que manipulam Junction Points &lt;a href="http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html"&gt;aqui&lt;/a&gt;, &lt;a href="http://www.sysinternals.com/Utilities/Junction.html"&gt;aqui&lt;/a&gt; e &lt;a href="http://www.elsdoerfer.info/ntfslink/"&gt;aqui&lt;/a&gt;.

Eu, particularmente, uso a &lt;a href="http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html"&gt;primeira delas&lt;/a&gt; pois a mesma permite criar também &lt;span style="font-style: italic;"&gt;Hard Links e Symbolik Links (no Windows Vista)&lt;/span&gt; além de possuir versões para &lt;span style="font-style: italic;"&gt;x86 &lt;/span&gt;e &lt;span style="font-style: italic;"&gt;x64&lt;/span&gt;.



&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1224305574393969537?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/1224305574393969537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=1224305574393969537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1224305574393969537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1224305574393969537'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/12/aplicativo-til-da-semana-parte-2.html' title='Aplicativo (útil) da Semana - Parte 2'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-5823380514943184227</id><published>2006-10-24T22:45:00.000-03:00</published><updated>2006-10-24T22:58:57.165-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='editor textos'/><title type='text'>Aplicativo (útil) da Semana - Parte 1</title><content type='html'>&lt;span style="font-family:verdana;color:#006600;"&gt;O primeiro aplicativo que eu gostaria de sugerir é o&lt;strong&gt; &lt;/strong&gt;&lt;a href="http://prdownloads.sourceforge.net/notepad-plus/npp.3.9.Installer.exe?download"&gt;Notepad++&lt;/a&gt;, um ótimo editor de &lt;/span&gt;&lt;span style="font-family:verdana;color:#006600;"&gt;&lt;strong&gt; &lt;/strong&gt;textos (e o que é melhor, gratuito!) com vários recursos úteis, entre os quais gostaria de citar: tabbed editing, syntax highlighting, folding/undolding (para tipos de arquivos que suportam este conceito), seleçao de blocos, entre outros.&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;Já faz algum tempo que uso este aplicativo; o mesmo é bastante estável e não possui muitos bugs.&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;Não deixe de testar o Notepad++! &lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;Abraços.&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#006600;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-5823380514943184227?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5823380514943184227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/5823380514943184227'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/10/aplicativo-til-da-semana-parte-1.html' title='Aplicativo (útil) da Semana - Parte 1'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-7755691974937011827</id><published>2006-10-09T08:41:00.000-03:00</published><updated>2006-10-09T08:45:14.215-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vista'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows Vista RC2</title><content type='html'>&lt;span style="font-family: verdana; color: rgb(51, 0, 0);"&gt;A Microsoft liberou o &lt;span style="font-style: italic;"&gt;Release Candidate 2&lt;/span&gt; (RC2) (build 5744) do Windows Vista para o público.

Tanto a versão 32 bits (x86) quanto a 64 (x64) podem ser baixadas em:

&lt;a href="http://download.windowsvista.com/preview/rc2/en/download.htm"&gt;http://download.windowsvista.com/preview/rc2/en/download.htm&lt;/a&gt;

Se você tem interesse baixe logo pois o download público será por tempo limitado (eu já baixei :).

Adriano
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-7755691974937011827?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7755691974937011827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/7755691974937011827'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/10/windows-vista-rc2.html' title='Windows Vista RC2'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-1989977901814897413</id><published>2006-09-30T11:13:00.000-03:00</published><updated>2006-09-30T11:25:55.760-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programing'/><category scheme='http://www.blogger.com/atom/ns#' term='multithread'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='dotnet'/><title type='text'>O que esta errado com esta código (Parte X)</title><content type='html'>&lt;span style="font-family:verdana;color:#000066;"&gt;Infelizmente, por motivo de tempo, já faz algum tempo que não posto neste blog :(. &lt;/span&gt;
&lt;span style="font-family:verdana;color:#000066;"&gt;&lt;/span&gt;
&lt;span style="font-family:verdana;color:#000066;"&gt;Infelizmente ao postar &lt;a href="http://accessviolation.blogspot.com/2006/07/o-que-h-de-errado-com-este-cdigo.html"&gt;a última entrada &lt;/a&gt;desta série (Oque esta errado com este código?) não inclui um número. Assim sendo, vou atribuir o valor X para o mesmo.&lt;/span&gt;

&lt;span style="font-family:Verdana;color:#000066;"&gt;Com relação ao post referido, o problema esta relacionado ao acesso de propriedades de controles da UI em uma thread diferente daquela que o componente. &lt;/span&gt;
&lt;p&gt;&lt;span style="font-family:Verdana;color:#000066;"&gt;Observe novamente o código abaixo:&lt;/span&gt;&lt;/p&gt;&lt;pre style="BORDER-RIGHT: rgb(0,68,68) thin dashed; BORDER-TOP: rgb(0,68,68) thin dashed; PADDING-LEFT: 10px; BACKGROUND: rgb(255,255,217) 0% 50%; BORDER-LEFT: rgb(0,68,68) thin dashed; COLOR: rgb(0,0,0); BORDER-BOTTOM: rgb(0,68,68) thin dashed; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-family:Courier New,Courier,Monospace;font-size:14px;"  &gt;Created with colorer-take5 library. Type 'csharp'

0: &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;using&lt;/span&gt; System&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
1: &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;using&lt;/span&gt; System&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Windows&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Forms&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
2: &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;using&lt;/span&gt; System&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Threading&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
3:
4: &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;namespace&lt;/span&gt; TestWinForm
5: &lt;span style="COLOR: rgb(128,0,128)"&gt;{&lt;/span&gt;
6:     &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;public&lt;/span&gt; partial &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;class&lt;/span&gt; TestCallBackFromDiferentThread &lt;span style="COLOR: rgb(128,128,48)"&gt;:&lt;/span&gt; Form
7:     &lt;span style="COLOR: rgb(128,0,128)"&gt;{&lt;/span&gt;
8:         &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;private&lt;/span&gt; System&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Threading&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Thread workerThread&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
9:
10:         &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;public&lt;/span&gt; TestCallBackFromDiferentThread&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;
11:         &lt;span style="COLOR: rgb(128,0,128)"&gt;{&lt;/span&gt;
12:             InitializeComponent&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
13:         &lt;span style="COLOR: rgb(128,0,128)"&gt;}&lt;/span&gt;
14:
15:         &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;private&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;void&lt;/span&gt; button1_Click&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;object&lt;/span&gt; sender&lt;span style="COLOR: rgb(128,128,48)"&gt;,&lt;/span&gt; EventArgs e&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;
16:         &lt;span style="COLOR: rgb(128,0,128)"&gt;{&lt;/span&gt;
17:             ThreadStart ts &lt;span style="COLOR: rgb(128,128,48)"&gt;=&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;new&lt;/span&gt; ThreadStart&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;AddNewLine&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
18:             workerThread &lt;span style="COLOR: rgb(128,128,48)"&gt;=&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;new&lt;/span&gt; Thread&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;ts&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
19:             workerThread&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Start&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
20:         &lt;span style="COLOR: rgb(128,0,128)"&gt;}&lt;/span&gt;
21:
22:         &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;private&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold; COLOR: rgb(128,0,0)"&gt;void&lt;/span&gt; AddNewLine&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;
23:         &lt;span style="COLOR: rgb(128,0,128)"&gt;{&lt;/span&gt;
24:             listBox1&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Items&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Add&lt;span style="COLOR: rgb(128,128,48)"&gt;(&lt;/span&gt;textBox1&lt;span style="COLOR: rgb(128,128,48)"&gt;.&lt;/span&gt;Text&lt;span style="COLOR: rgb(128,128,48)"&gt;)&lt;/span&gt;&lt;span style="COLOR: rgb(128,0,128)"&gt;;&lt;/span&gt;
25:         &lt;span style="COLOR: rgb(128,0,128)"&gt;}&lt;/span&gt;
26:     &lt;span style="COLOR: rgb(128,0,128)"&gt;}&lt;/span&gt;
27: &lt;span style="COLOR: rgb(128,0,128)"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family:verdana;color:#000066;"&gt;Nas linhas # 17 ~ 19 criamos uma thread e iniciamos a execução da mesma; esta thread chama a função &lt;span style="font-family:courier new;"&gt;AddNewLine()&lt;/span&gt; que por sua vez tenta incluir um item em uma listbox.
&lt;/span&gt;&lt;span style="font-family:verdana;color:#000066;"&gt;
O problema (como explicado &lt;a href="http://msdn2.microsoft.com/en-us/library/ms171728.aspx"&gt;aqui&lt;/a&gt;) é que o acesso a controles em WinForms não são &lt;em&gt;thread safe&lt;/em&gt; automaticamente, ou seja, se duas threads modificarem o estado de um controle simultaneamente o mesmo pode ficar em um estado inconsistente ou mesmo gerar exceções (oque seria melhor que a primeira possibilidade).

Crie uma aplicação WinForm, adicionar os controles listbox, textbox e um botão e copie o código acima para o formulário da aplicação.

Se você executar esta aplicação a partir do explorer pode lhe parecer que a mesma não possui problema nenhum; ou seja, aparentemente a mesma funcionou.

Contudo execute a mesma a partir do Visual Studio; se a opção "&lt;em&gt;enable&lt;/em&gt; &lt;em&gt;exception assistence" &lt;/em&gt;estiver habilitada uma exceção será gerada quando a thread tentar acessar o listbox na linha 24.

Ok, e como solucionar o problema? Simples, usando a propriedade &lt;span style="font-family:courier new;"&gt;InvokeRequerid&lt;/span&gt; do controle...

No método &lt;span style="font-family:courier new;"&gt;AddNewLine&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;()&lt;/span&gt;, antes de incluir o item no listbox consulte a propriedade &lt;span style="font-family:courier new;"&gt;InvokeRequired&lt;/span&gt;; se a mesma for &lt;em&gt;true&lt;/em&gt; então execute o método Invoke() passando um delegate que irá executar o mesmo método (&lt;span style="font-family:courier new;"&gt;AddNewLine&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;()&lt;/span&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;color:#000066;"&gt;Veja no exemplo abaixo:&lt;/span&gt;

&lt;/p&gt;&lt;pre style="BORDER-RIGHT: rgb(0,68,68) thin dashed; BORDER-TOP: rgb(0,68,68) thin dashed; PADDING-LEFT: 10px; BACKGROUND: rgb(255,255,217) 0% 50%; BORDER-LEFT: rgb(0,68,68) thin dashed; COLOR: rgb(0,0,0); BORDER-BOTTOM: rgb(0,68,68) thin dashed; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initialfont-family:Courier New,Courier,Monospace;font-size:14px;"  &gt;Created with colorer-take5 library. Type 'csharp'

&lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;using&lt;/span&gt; System&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
&lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;using&lt;/span&gt; System&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Windows&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Forms&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
&lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;using&lt;/span&gt; System&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Threading&lt;span style="color:#800080;"&gt;;&lt;/span&gt;

&lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;namespace&lt;/span&gt; TestWinForm
&lt;span style="color:#800080;"&gt;{&lt;/span&gt;
    &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;public&lt;/span&gt; partial &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;class&lt;/span&gt; TestCallBackFromDiferentThread &lt;span style="color:#808030;"&gt;:&lt;/span&gt; Form
    &lt;span style="color:#800080;"&gt;{&lt;/span&gt;
        &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;private&lt;/span&gt; System&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Threading&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Thread workerThread&lt;span style="color:#800080;"&gt;;&lt;/span&gt;

         &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;public&lt;/span&gt; TestCallBackFromDiferentThread&lt;span style="color:#808030;"&gt;(&lt;/span&gt;&lt;span style="color:#808030;"&gt;)&lt;/span&gt;
         &lt;span style="color:#800080;"&gt;{&lt;/span&gt;
             InitializeComponent&lt;span style="color:#808030;"&gt;(&lt;/span&gt;&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
         &lt;span style="color:#800080;"&gt;}&lt;/span&gt;

         &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;private&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;void&lt;/span&gt; button1_Click&lt;span style="color:#808030;"&gt;(&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;object&lt;/span&gt; sender&lt;span style="color:#808030;"&gt;,&lt;/span&gt; EventArgs e&lt;span style="color:#808030;"&gt;)&lt;/span&gt;
         &lt;span style="color:#800080;"&gt;{&lt;/span&gt;
             ThreadStart ts &lt;span style="color:#808030;"&gt;=&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;new&lt;/span&gt; ThreadStart&lt;span style="color:#808030;"&gt;(&lt;/span&gt;AddNewLine&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
             workerThread &lt;span style="color:#808030;"&gt;=&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;new&lt;/span&gt; Thread&lt;span style="color:#808030;"&gt;(&lt;/span&gt;ts&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
             workerThread&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Start&lt;span style="color:#808030;"&gt;(&lt;/span&gt;&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
         &lt;span style="color:#800080;"&gt;}&lt;/span&gt;

         &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;private&lt;/span&gt; &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;void&lt;/span&gt; AddNewLine&lt;span style="color:#808030;"&gt;(&lt;/span&gt;&lt;span style="color:#808030;"&gt;)&lt;/span&gt;
         &lt;span style="color:#800080;"&gt;{&lt;/span&gt;
             &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;if&lt;/span&gt; &lt;span style="color:#808030;"&gt;(&lt;/span&gt;listBox1&lt;span style="color:#808030;"&gt;.&lt;/span&gt;InvokeRequired&lt;span style="color:#808030;"&gt;)&lt;/span&gt;
             &lt;span style="color:#800080;"&gt;{&lt;/span&gt;
                listbox1&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Invoke&lt;span style="color:#808030;"&gt;(&lt;/span&gt;&lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;new&lt;/span&gt; MethodInvoker&lt;span style="color:#808030;"&gt;(&lt;/span&gt;AddNewLine&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
             &lt;span style="color:#800080;"&gt;}&lt;/span&gt;
             &lt;span style="FONT-WEIGHT: bold;color:#800000;" &gt;else&lt;/span&gt;
             &lt;span style="color:#800080;"&gt;{&lt;/span&gt;
                listBox1&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Items&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Add&lt;span style="color:#808030;"&gt;(&lt;/span&gt;textBox1&lt;span style="color:#808030;"&gt;.&lt;/span&gt;Text&lt;span style="color:#808030;"&gt;)&lt;/span&gt;&lt;span style="color:#800080;"&gt;;&lt;/span&gt;
             &lt;span style="color:#800080;"&gt;}&lt;/span&gt;
         &lt;span style="color:#800080;"&gt;}&lt;/span&gt;
     &lt;span style="color:#800080;"&gt;}&lt;/span&gt;
 &lt;span style="color:#800080;"&gt;}&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-family:verdana;color:#000066;"&gt;Você pode encontrar mais informações (em inglês) sobre o assunto &lt;a href="http://weblogs.asp.net/justin_rogers/articles/126345.aspx"&gt;aqui&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana;color:#000066;"&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;color:#000066;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana;color:#000066;"&gt;A partir do próximo post irei iniciar uma série onde em cada post falarei sobre um aplicativo/site que uso com frequência e que acho interessante. Fique atento.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana;color:#000066;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#000066;"&gt;Adriano&lt;/span&gt; &lt;p&gt;
&lt;/p&gt;&lt;span style="font-family:verdana;color:#000066;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-1989977901814897413?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1989977901814897413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/1989977901814897413'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/09/o-que-esta-errado-com-esta-cdigo-parte.html' title='O que esta errado com esta código (Parte X)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-4870538784464526330</id><published>2006-09-20T00:01:00.000-03:00</published><updated>2006-09-20T00:12:55.924-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virus'/><category scheme='http://www.blogger.com/atom/ns#' term='computador'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Eficiência dos antivirus gratuitos...</title><content type='html'>&lt;span style="font-family:verdana;color:#990000;"&gt;Estou escrevendo este post a partir do Windows Vista RC1; não porque eu pretendia fazer desta forma mas sim porque meu Windows XP foi &lt;em&gt;contaminado&lt;/em&gt; com o &lt;strong&gt;&lt;a href="http://www.f-secure.com/v-descs/bagle_ge.shtml"&gt;bagle_ge&lt;/a&gt;&lt;/strong&gt;; e a pobre da minha esposa foi quem sofreu as primeiras consequências :(.&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;Então, enquanto baixo as novas versões da bios, drivers do chipset etc eu aproveitei para escrever este post. &lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;Em parte o fato ocorrido foi bom pois não tenho mais dúvida que a qualidade das versões &lt;em&gt;personal&lt;/em&gt; de alguns antivirus deixa bastante a desejar; por outro lado este problema também me fez considerar ainda mais passar a utilizar o Windows Vista (RC1) como meu SO primário. &lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;Mas para isto antes necessito fazer alguns testes (principalmente com a impressora já que a mesma já completou 7 anos de vida e o fabricante não me parece muito empolgado com a idéia de escrever um driver de 64 bits para a mesma [ps: o Windows reconheceu a impressora mas não sei se a mesma esta funcionando corretamente pois ainda não imprimi nada nela])&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;&lt;/span&gt;
&lt;span style="font-family:Verdana;color:#990000;"&gt;Adriano&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-4870538784464526330?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4870538784464526330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/4870538784464526330'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/09/eficincia-dos-antivirus-gratuitos.html' title='Eficiência dos antivirus gratuitos...'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3479332109691979736.post-6124582537833526220</id><published>2006-09-06T20:24:00.000-03:00</published><updated>2006-09-06T20:28:33.590-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geral'/><title type='text'>Apresentação (novamente)</title><content type='html'>&lt;span style="COLOR: rgb(102,51,0);font-family:verdana;" &gt;Este é meu primeiro post neste &lt;a href="http://www.tfd.com/computer+programing"&gt;novo blog&lt;/a&gt; :) &lt;/span&gt;&lt;span style="COLOR: rgb(102,51,0);font-family:verdana;" &gt;
&lt;/span&gt;&lt;span style="COLOR: rgb(102,51,0);font-family:verdana;" &gt;
Antes de mais nada gostaria de dizer que não vou abandonar meu blog antigo (&lt;a href="http://accessviolation.blogspot.com/"&gt;AccessViolation&lt;/a&gt;); só mudei para este novo blog para poder usar alguns recursos que ainda estão na versão beta (a que mais me interessou foi a possibilidade de incluir "labels" mas tem muito mais :)

Assim que estes recursos estiverem disponíveis para meu blog antigo devo voltar para o mesmo.

&lt;/span&gt;&lt;span style="COLOR: rgb(102,51,0)"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3479332109691979736-6124582537833526220?l=programing-fun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://programing-fun.blogspot.com/feeds/6124582537833526220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3479332109691979736&amp;postID=6124582537833526220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6124582537833526220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3479332109691979736/posts/default/6124582537833526220'/><link rel='alternate' type='text/html' href='http://programing-fun.blogspot.com/2006/09/apresentao-novamente.html' title='Apresentação (novamente)'/><author><name>Adriano Verona</name><uri>https://profiles.google.com/107247741624256287339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Ze6-vhrDIkw/AAAAAAAAAAI/AAAAAAAAAAA/x7bSEw6xL8s/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
