<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Mind Washer</title><link>http://blogs.clearscreen.com/migs/category/6.aspx</link><description>a place to expose toughts with or without sense not related to any of the other categories and ready to wash your brain with 'em</description><managingEditor>Miguel Jiménez</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Miguel Jiménez</dc:creator><title>Using Expression Design and some .NET 3.0 training</title><link>http://blogs.clearscreen.com/migs/archive/2007/01/17/5976.aspx</link><pubDate>Wed, 17 Jan 2007 01:02:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2007/01/17/5976.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5976.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2007/01/17/5976.aspx#Feedback</comments><slash:comments>42</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5976.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5976.aspx</trackback:ping><description>&lt;p&gt;I've been up preparing &lt;a href="http://blogs.clearscreen.com/migs/files/Ilitia_Formacion_2007.pdf" target="_blank"&gt;the catalog of training courses for this year at Ilitia&lt;/a&gt;. I had to prepare a small A4 flyer to show up in events and clients, and I decided to give Microsoft Expression Design a try. Thus, I had to download and install it on my Vista laptop. Everything went fine.&lt;/p&gt; &lt;p&gt;The tool itself seems much better than previous beta's or ctp's and it ran flawlessly to create the sample flyer I needed. Anyway, I've seen some strange things that are more complicated or hidden than in other design suites (Freehand, Corel Draw, Illustrator or Fireworks):&lt;/p&gt; &lt;ul&gt; &lt;li&gt;It took me a lot of time to figure out how to create text inside a shape (rectangle in my case) because it's called Adapt Text To Path. To me that means to draw a path and put your text over it, adapting to the path. This was a bit hidden.  &lt;/li&gt;&lt;li&gt;Although it seems possible to export to EPS format, it's not available to import files in EPS format. This is a must!  &lt;/li&gt;&lt;li&gt;I had an strange error when using the drop tool to get a color from the screen. It completely crashed the application, but I was unable to repro it.  &lt;/li&gt;&lt;li&gt;Exporting your design as PDF has some errors... if you have some text layers over shape layers, it wouldn't raster your text into the PDF. To solve this I had to convert all the text to paths and then export to PDF.  &lt;/li&gt;&lt;li&gt;The fill tools are not intuitive. I need some time to figure how to create a gradient for a shape.  &lt;/li&gt;&lt;li&gt;The fill with texture tool is not really complete, there are not too much patterns to add as textures to shapes and I mean really used patterns like dots, lines, etc.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Anyway I think this tool would have a great potential, because it seems it's getting mature. Don't know when it's supposed to be released to market but I'll try to provide this feedback to Microsoft, so they can see if it's something they can improve. This is how it looked while designing the flyer I linked to before:&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/Expression1.jpg" /&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5976.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>I've been up preparing <a href="http://blogs.clearscreen.com/migs/files/Ilitia_Formacion_2007.pdf" target="_blank">the catalog of training courses for this year at Ilitia</a>. I had to prepare a small A4 flyer to show up in events and clients, and I decided to give Microsoft Expression Design a try. Thus, I had to download and install it on my Vista laptop. Everything went fine.</p> <p>The tool itself seems much better than previous beta's or ctp's and it ran flawlessly to create the sample flyer I needed. Anyway, I've seen some strange things that are more complicated or hidden than in other design suites (Freehand, Corel Draw, Illustrator or Fireworks):</p> <ul> <li>It took me a lot of time to figure out how to create text inside a shape (rectangle in my case) because it's called Adapt Text To Path. To me that means to draw a path and put your text over it, adapting to the path. This was a bit hidden.  </li><li>Although it seems possible to export to EPS format, it's not available to import files in EPS format. This is a must!  </li><li>I had an strange error when using the drop tool to get a color from the screen. It completely crashed the application, but I was unable to repro it.  </li><li>Exporting your design as PDF has some errors... if you have some text layers over shape layers, it wouldn't raster your text into the PDF. To solve this I had to convert all the text to paths and then export to PDF.  </li><li>The fill tools are not intuitive. I need some time to figure how to create a gradient for a shape.  </li><li>The fill with texture tool is not really complete, there are not too much patterns to add as textures to shapes and I mean really used patterns like dots, lines, etc.</li></ul> <p>Anyway I think this tool would have a great potential, because it seems it's getting mature. Don't know when it's supposed to be released to market but I'll try to provide this feedback to Microsoft, so they can see if it's something they can improve. This is how it looked while designing the flyer I linked to before:</p> <p><img src="http://blogs.clearscreen.com/migs/files/Expression1.jpg" /></p><img src ="http://blogs.clearscreen.com/migs/aggbug/5976.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>I'm Tagged</title><link>http://blogs.clearscreen.com/migs/archive/2007/01/03/5883.aspx</link><pubDate>Wed, 03 Jan 2007 21:52:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2007/01/03/5883.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5883.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2007/01/03/5883.aspx#Feedback</comments><slash:comments>30</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5883.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5883.aspx</trackback:ping><description>&lt;p&gt;&lt;a href="http://bloggingabout.net/blogs/dennis/archive/2007/01/03/tag-you-re-it.aspx" target="_blank"&gt;Denis van der Stelt tagged me&lt;/a&gt;. I knew this would reach me sooner or later, sooo as everybody is playing I'll keep growing it. So here is my list of five things that you'll probably won't know about me :&lt;/p&gt; &lt;ol&gt; &lt;li&gt;When I was younger I used to play in a local band. It was this kind of bands that go through the city in Easter or during special days. I played a series of instruments and the last one I was playing was an &lt;a href="http://en.wikipedia.org/wiki/Trombone" target="_blank"&gt;slide trombone&lt;/a&gt; :)  &lt;/li&gt;&lt;li&gt;I guess some people already know this. In fact, they've seen my reactions when exposed to a &lt;a href="http://en.wikipedia.org/wiki/Duck" target="_blank"&gt;Duck&lt;/a&gt;. I don't like them; people tend to say &lt;em&gt;poor ducks, poor ducks&lt;/em&gt; but I'm scared of them. When I was a child I had a fight with one of those aggressive animals; actually, the duck fought with me, I was just running and crying.  &lt;/li&gt;&lt;li&gt;I like to cook. I mean, I really love to do it. I use to invent all the food I cook. I cook my own food almost everyday and take it to the office. I would love to find a school here in Madrid where I can learn the right and appropriate techniques to improve my cooking. Anyway, I'm happy with my results, and lot of people are curious about how and when did I learnt to do it: it's just a matter of time doing it, since I was a child I've been raised as the older of three boys and I had to take care of the food most of the time when mum was working. So I learnt to love it.  &lt;/li&gt;&lt;li&gt;I really love graphic design, music and coding. To me, all of them are expressions of art; ways to express yourself. I consider myself good in all of them, but I'm more productive coding, then designing and the creating music. When people see other things I create, not related to code or programming, they get shocked because they don't understand how could it be. But it's quite simple, in my early teen age I joined an Spanish demogroup called Polygon and we started to create graphic routines, music and designs sync'ed together. This is the reason why I got my eyes educated in design and photography, my ears educated on music and my brain educated on coding. If you feel curious about it, go and check &lt;a href="http://www.demoscene.org"&gt;http://www.demoscene.org&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;Related to the above, after a couple of years living in Madrid, I was working around 6 months as a &lt;strong&gt;"cool hunter" &lt;/strong&gt;... I just walked through the streets with a camera and a notepad; taking notes and taking pictures of anything interesting in fashion, street art, events or similar that could be an upcoming trend. When I was almost finishing my report, I got my camera stolen while eating in a restaurant with my friends Kelly and Alex; I lost all the pictures in the roll inside the camera. And this kind of interest in street art makes me get involved with movements like &lt;a href="http://www.madridmobs.net"&gt;flashmobs&lt;/a&gt; or &lt;a href="http://www.abrazosgratis.org"&gt;freehugs&lt;/a&gt; (you can try to catch me in Madrid's streets doing it)&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;And now, let's spread this over the Spanish community... I tag to &lt;a href="http://blogs.msdn.com/tropezones/"&gt;David Carmona&lt;/a&gt;, &lt;a href="http://geeks.ms/blogs/rcorral"&gt;Rodrigro Corral&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/davidsalgado/" target="_blank"&gt;David Salgado&lt;/a&gt;, &lt;a href="http://phobeo.com/wordpress/" target="_blank"&gt;Ricardo Varela&lt;/a&gt; and &lt;a href="http://geeks.ms/blogs/pablo" target="_blank"&gt;Pablo Pelaez&lt;/a&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5883.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://bloggingabout.net/blogs/dennis/archive/2007/01/03/tag-you-re-it.aspx" target="_blank">Denis van der Stelt tagged me</a>. I knew this would reach me sooner or later, sooo as everybody is playing I'll keep growing it. So here is my list of five things that you'll probably won't know about me :</p> <ol> <li>When I was younger I used to play in a local band. It was this kind of bands that go through the city in Easter or during special days. I played a series of instruments and the last one I was playing was an <a href="http://en.wikipedia.org/wiki/Trombone" target="_blank">slide trombone</a> :)  </li><li>I guess some people already know this. In fact, they've seen my reactions when exposed to a <a href="http://en.wikipedia.org/wiki/Duck" target="_blank">Duck</a>. I don't like them; people tend to say <em>poor ducks, poor ducks</em> but I'm scared of them. When I was a child I had a fight with one of those aggressive animals; actually, the duck fought with me, I was just running and crying.  </li><li>I like to cook. I mean, I really love to do it. I use to invent all the food I cook. I cook my own food almost everyday and take it to the office. I would love to find a school here in Madrid where I can learn the right and appropriate techniques to improve my cooking. Anyway, I'm happy with my results, and lot of people are curious about how and when did I learnt to do it: it's just a matter of time doing it, since I was a child I've been raised as the older of three boys and I had to take care of the food most of the time when mum was working. So I learnt to love it.  </li><li>I really love graphic design, music and coding. To me, all of them are expressions of art; ways to express yourself. I consider myself good in all of them, but I'm more productive coding, then designing and the creating music. When people see other things I create, not related to code or programming, they get shocked because they don't understand how could it be. But it's quite simple, in my early teen age I joined an Spanish demogroup called Polygon and we started to create graphic routines, music and designs sync'ed together. This is the reason why I got my eyes educated in design and photography, my ears educated on music and my brain educated on coding. If you feel curious about it, go and check <a href="http://www.demoscene.org">http://www.demoscene.org</a>  </li><li>Related to the above, after a couple of years living in Madrid, I was working around 6 months as a <strong>"cool hunter" </strong>... I just walked through the streets with a camera and a notepad; taking notes and taking pictures of anything interesting in fashion, street art, events or similar that could be an upcoming trend. When I was almost finishing my report, I got my camera stolen while eating in a restaurant with my friends Kelly and Alex; I lost all the pictures in the roll inside the camera. And this kind of interest in street art makes me get involved with movements like <a href="http://www.madridmobs.net">flashmobs</a> or <a href="http://www.abrazosgratis.org">freehugs</a> (you can try to catch me in Madrid's streets doing it)</li></ol> <p>And now, let's spread this over the Spanish community... I tag to <a href="http://blogs.msdn.com/tropezones/">David Carmona</a>, <a href="http://geeks.ms/blogs/rcorral">Rodrigro Corral</a>, <a href="http://blogs.msdn.com/davidsalgado/" target="_blank">David Salgado</a>, <a href="http://phobeo.com/wordpress/" target="_blank">Ricardo Varela</a> and <a href="http://geeks.ms/blogs/pablo" target="_blank">Pablo Pelaez</a></p><img src ="http://blogs.clearscreen.com/migs/aggbug/5883.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Would a free Ferrari from Microsoft affect your objectivity? Would your ethic sway?</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/29/5807.aspx</link><pubDate>Fri, 29 Dec 2006 16:29:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/29/5807.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5807.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/29/5807.aspx#Feedback</comments><slash:comments>45</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5807.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5807.aspx</trackback:ping><description>&lt;p&gt;For those of you who are not up to this story, Microsoft and AMD decided to &lt;a href="http://www.istartedsomething.com/20061227/microsoft-free-ferrari/" target="_blank"&gt;give away 2000 free high-end Ferrari laptops to bloggers and influencers&lt;/a&gt; preloaded with Windows Vista Ultimate or even Media Centers. For free. That sounds pretty nice if you are one of the chosen bloggers. But this started to make &lt;a href="http://digg.com/hardware/Microsoft_bribing_bloggers_with_free_high_spec_laptops" target="_blank"&gt;clicking sounds and roars&lt;/a&gt; soon after it was announced over the blogsphere.&lt;/p&gt; &lt;p&gt;Some people thought they deserved also one free laptop, while others &lt;a href="http://www.mstechtoday.com/2006/12/23/my-new-laptop-acer-ferrari-5000/" target="_blank"&gt;didn't disclosed it was a gift&lt;/a&gt; from Microsoft. Some others started to talk about Microsoft buying good reviews of Vista and some readers started to blame bloggers about &lt;a href="http://scobleizer.com/2006/12/26/microsoft-sending-free-computers-to-bloggers/" target="_blank"&gt;not being objective in their reviews because they've been "paid" by Microsoft&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Wow!! This topic is completely &lt;a href="http://www.familyguy.com/" target="_blank"&gt;grinding its gears&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Microsoft has always gifted influencers and collaborators, just have a look to MVP and Regional Director programs. Lot of people was participating in the Windows Vista Beta Program, and they sponsored free Vista keys to some of the most active bug reporters. It's not a matter of buying good reviews. It's more a matter of providing a good Vista experience so you can express yourself freely about the real user experience. Of course, if I had to choose people to try Vista at it best they would be the most active Vista influencers.&lt;/p&gt; &lt;p&gt;So I think this doesn't seems too important... it seems more like a jealousy thing from people that didn't received one (and of course I didn't) ... I don't think anyone would change it's objectivity for this or would your ethic sway with such a gift?&lt;/p&gt; &lt;p&gt;Personally my ethic or objectivity never swayed when talking in Microsoft presentation or events, blogging about them, talking about bugs, productivity or any other issues... I think the main topic they are looking for while creating communities is people that are able to talk coherently about their experiences with their products, not someone you can buy with a gift.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5807.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>For those of you who are not up to this story, Microsoft and AMD decided to <a href="http://www.istartedsomething.com/20061227/microsoft-free-ferrari/" target="_blank">give away 2000 free high-end Ferrari laptops to bloggers and influencers</a> preloaded with Windows Vista Ultimate or even Media Centers. For free. That sounds pretty nice if you are one of the chosen bloggers. But this started to make <a href="http://digg.com/hardware/Microsoft_bribing_bloggers_with_free_high_spec_laptops" target="_blank">clicking sounds and roars</a> soon after it was announced over the blogsphere.</p> <p>Some people thought they deserved also one free laptop, while others <a href="http://www.mstechtoday.com/2006/12/23/my-new-laptop-acer-ferrari-5000/" target="_blank">didn't disclosed it was a gift</a> from Microsoft. Some others started to talk about Microsoft buying good reviews of Vista and some readers started to blame bloggers about <a href="http://scobleizer.com/2006/12/26/microsoft-sending-free-computers-to-bloggers/" target="_blank">not being objective in their reviews because they've been "paid" by Microsoft</a>.</p> <p>Wow!! This topic is completely <a href="http://www.familyguy.com/" target="_blank">grinding its gears</a>. </p> <p>Microsoft has always gifted influencers and collaborators, just have a look to MVP and Regional Director programs. Lot of people was participating in the Windows Vista Beta Program, and they sponsored free Vista keys to some of the most active bug reporters. It's not a matter of buying good reviews. It's more a matter of providing a good Vista experience so you can express yourself freely about the real user experience. Of course, if I had to choose people to try Vista at it best they would be the most active Vista influencers.</p> <p>So I think this doesn't seems too important... it seems more like a jealousy thing from people that didn't received one (and of course I didn't) ... I don't think anyone would change it's objectivity for this or would your ethic sway with such a gift?</p> <p>Personally my ethic or objectivity never swayed when talking in Microsoft presentation or events, blogging about them, talking about bugs, productivity or any other issues... I think the main topic they are looking for while creating communities is people that are able to talk coherently about their experiences with their products, not someone you can buy with a gift.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/5807.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Stuck in reverse. Playing with strings, bits and floating points</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/27/5712.aspx</link><pubDate>Wed, 27 Dec 2006 14:58:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/27/5712.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5712.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/27/5712.aspx#Feedback</comments><slash:comments>45</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5712.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5712.aspx</trackback:ping><description>&lt;p&gt;A couple of days ago my fellow friend &lt;a href="http://geeks.ms/blogs/programancia101/" target="_blank"&gt;Ricardo Varela started to blog in spanish&lt;/a&gt; (in parallel with &lt;a href="http://phobeo.com/wordpress/" target="_blank"&gt;his actual english blog&lt;/a&gt;). Former member of Microsoft communities, he is actually working at Google UK. The actual point is that on his new blog he started a &lt;a href="http://geeks.ms/blogs/programancia101/archive/2006/12/26/empezando-por-el-principio.aspx" target="_blank"&gt;post with some kind of coding teasers&lt;/a&gt;, going back to basics, to the principles of coding. This is going to be funny.&lt;/p&gt; &lt;p&gt;Well, this is my answer to his post. There were three questions regarding data structures and alternative thinking about reversing things.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Do you know how to reverse a string?&lt;/strong&gt; In example, if you get "abc" the returned string should be "cba"&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;This seemed pretty easy. In C# every string is represented as an array of chars, so you can use the indexers to get chars at any position and reverse them "manually" with something like:&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8c70f28c-5681-4087-a8de-ff301d4d1e49" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputString &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;abc&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; reversedString &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt;.Empty;

&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;for&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; c &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputString.Length; c &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;; c&lt;/span&gt;&lt;span style="color: #000000; "&gt;--&lt;/span&gt;&lt;span style="color: #000000; "&gt;)
{
    reversedString &lt;/span&gt;&lt;span style="color: #000000; "&gt;+=&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputString[c &lt;/span&gt;&lt;span style="color: #000000; "&gt;-&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt;];
}

Console.WriteLine(&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;Original String: &lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputString);
Console.WriteLine(&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;Reversed String: &lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; reversedString);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or you can use some of the features of the .NET Framework to do it in a more "elegant" way:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:0ced2329-88b6-40e2-b630-6c4361f65c91" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;char&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] chars &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputString.ToCharArray();
Array.Reverse(chars);

&lt;/span&gt;&lt;span style="color: #008000; "&gt;//&lt;/span&gt;&lt;span style="color: #008000; "&gt; Use the reversed array of chars&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Going deeper into data structures, &lt;strong&gt;do you know how to reverse the bits of a byte?&lt;/strong&gt; In example, if you get 1 the returned byte should be 128&lt;/li&gt;&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;I must admit this was a hard one. Although I perfectly know the concepts of bits and bitwise operations the C# language doesn't provide an easy or structured way to access those elementary elements of data structures. I finally managed to achieve it. The smallest numeric data structure available to represent a byte internals I found was a simple byte[8], so now I just have to fill it with the values for each byte:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:2d195fac-cd85-4079-8439-78090cd01cd9" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] getBits(&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputByte)
{
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bits &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[&lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;];

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;for&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; p &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;; p &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;; p&lt;/span&gt;&lt;span style="color: #000000; "&gt;++&lt;/span&gt;&lt;span style="color: #000000; "&gt;)
    {
        bits[&lt;/span&gt;&lt;span style="color: #000000; "&gt;7&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;-&lt;/span&gt;&lt;span style="color: #000000; "&gt; p] &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;)(&lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000; "&gt; (inputByte &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; p));
    }

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;return&lt;/span&gt;&lt;span style="color: #000000; "&gt; bits;
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Simple? Ok, I'll explain it a bit... the bitwise operator &amp;gt;&amp;gt; just shifts the bits in the byte to the right so if 01010101 is shifted one position to the right it becomes 00101010... then I perform a logical AND operation with the mask 00000001 to determine if the bit is setted. I just store the state of every bit in the output array and return it. As a quick note, the bit array could be directly reversed if I change the line inside the for loop to:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:7429306c-e08f-48b1-a2af-c6b27bd81e7a" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;bits[p] &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;)(&lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000; "&gt; (inputByte &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; p));&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But I wanted more generic methods to convert between byte and bits, so I didn't included reversing directly in that method. Once I have an array, it's simple to reverse it just with the previous method used with string arrays or via the .NET framework features:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:702b1ce0-0cf0-44ae-9362-9c90b0b0a0b3" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;Array.Reverse(bits);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;And know, we only have to be able to convert the bit array back to a byte structure:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:5a2dd212-1fec-4890-86b8-a49ba4476643" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt; setBits(&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bits)
{
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt; obyte &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; bits[&lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;];

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;for&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; p &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt;; p &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;; p&lt;/span&gt;&lt;span style="color: #000000; "&gt;++&lt;/span&gt;&lt;span style="color: #000000; "&gt;)
    {
        obyte &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;)((obyte &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt;) &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; bits[p]);
    }

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;return&lt;/span&gt;&lt;span style="color: #000000; "&gt; obyte;
}
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The method used is similar to the one I used to extract the bits, but this time the bitwise operator &amp;lt;&amp;lt; is shifting bits to the left, so I can increase the number til it reach to the desired value. A simple test program to test how it works would be:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8519a241-222d-4fe5-8714-7c1d32280bc2" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputByte &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt;;
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt; outputByte &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;;

&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bits &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; getBits(inputByte);
Array.Reverse(bits);
outputByte &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; setBits(bits);

Console.WriteLine(&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;Input Byte: &lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; inputByte);
Console.WriteLine(&lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt;Reversed Byte: &lt;/span&gt;&lt;span style="color: #000000; "&gt;"&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;+&lt;/span&gt;&lt;span style="color: #000000; "&gt; outputByte);
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;And a more complex one. Floating point numbers are represented usually by the standard IEEE 754, &lt;strong&gt;would you be able to reverse the bits of a floating point number?&lt;/strong&gt; In example, if you get 118.625f the output should be -17180580000f&lt;/li&gt;&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Wow! This is was a really hard one. I didn't know how the &lt;a href="http://en.wikipedia.org/wiki/IEEE_754" target="_blank"&gt;IEEE 754 standard&lt;/a&gt; worked so I read it at the wikipedia (&lt;a href="http://grouper.ieee.org/groups/754/" target="_blank"&gt;the IEEE page for this standard is under revision&lt;/a&gt; and there was no info available) and it seems pretty simple. The floating point its a 32bit data structured divided like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/en/7/7b/Float_example.PNG" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;So now it seems much simpler to me. It's just a bit reversing operation, in C# the two floating point structures are Float or Double, the former to store floating point numbers with 32bits precision and the last with 64bits; the problem is that those types don't allow bitwise operations, so I need to create a new set of methods to work with them using the BitConverter class. &lt;/p&gt;
&lt;p&gt;It's probably refactorizable so just a pair of methods suit all the needs of bit operations, but the goal was to reverse the floating point number, so here I go:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:284db004-068a-4dd4-8133-6cba57bc6d10" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] getFloatingBits(&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;double&lt;/span&gt;&lt;span style="color: #000000; "&gt; input)
{
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bytes &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; BitConverter.GetBytes(input);

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;if&lt;/span&gt;&lt;span style="color: #000000; "&gt; (BitConverter.IsLittleEndian)
    {
        Array.Reverse(bytes);
    }

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bits &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[&lt;/span&gt;&lt;span style="color: #000000; "&gt;64&lt;/span&gt;&lt;span style="color: #000000; "&gt;];

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;for&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; i &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;; i &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;; i&lt;/span&gt;&lt;span style="color: #000000; "&gt;++&lt;/span&gt;&lt;span style="color: #000000; "&gt;)
    {
        Array.Copy(getBits(bytes[i]), &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;, bits, i &lt;/span&gt;&lt;span style="color: #000000; "&gt;*&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;, &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;);
    }

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;return&lt;/span&gt;&lt;span style="color: #000000; "&gt; bits;
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I explain the method it...The float type can by divided into 4 bytes and the BitConverter.GetBytes method can give us an array of that four bytes, but unfortunately it doesn't include a method to turn back an array of four bytes to a float, so I created this method for the double type and used casting :(&lt;/p&gt;
&lt;p&gt;The method is pretty simple, I extract the 8 bytes of the double precision float number. Then, I verify if the processor is &lt;a href="http://en.wikipedia.org/wiki/Endianness"&gt;LittleEndian&lt;/a&gt; and in that case I reverse the byte order to reflect the actual value. Everything is copied to an array of bits, and we are done. Now we only need to reverse that array of bits:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:724037ef-8dd1-4267-803f-d84a8889fde8" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;Array.Reverse(bits);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And turn back to the method that reverse the process from a bit array to a double precision floating number:&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:85fb2bc3-d929-4b64-bfb4-8bf1c0e41000" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;double&lt;/span&gt;&lt;span style="color: #000000; "&gt; setFloatingBits(&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bits)
{
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] bytes &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[&lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;];

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;for&lt;/span&gt;&lt;span style="color: #000000; "&gt; (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;int&lt;/span&gt;&lt;span style="color: #000000; "&gt; i &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;; i &lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;; i&lt;/span&gt;&lt;span style="color: #000000; "&gt;++&lt;/span&gt;&lt;span style="color: #000000; "&gt;)
    {
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[] actualByte &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;byte&lt;/span&gt;&lt;span style="color: #000000; "&gt;[&lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;];
        Array.Copy(bits, i &lt;/span&gt;&lt;span style="color: #000000; "&gt;*&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;, actualByte, &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;, &lt;/span&gt;&lt;span style="color: #000000; "&gt;8&lt;/span&gt;&lt;span style="color: #000000; "&gt;);
        
        bytes[i] &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; setBits(actualByte);
    }

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;if&lt;/span&gt;&lt;span style="color: #000000; "&gt; (BitConverter.IsLittleEndian)
    {
        Array.Reverse(bytes);
    }

    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;return&lt;/span&gt;&lt;span style="color: #000000; "&gt; BitConverter.ToDouble(bytes, &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt;);
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The issue is that the expected floating number is not the one I got with this method that reverse the complete array of bits. In fact, I've also re-read the question and it said "are you able to reverse the order of the bits for the exponent and mantissa?" ... I actually did also that, reversing only bits for mantissa and exponent, obtaining the following bit arrays:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:3f8846f9-9b46-4cff-9f8e-26495884cfcd" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;Original: &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;10000000&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;10111011010100000000000&lt;/span&gt;&lt;span style="color: #000000; "&gt;
Reversed: &lt;/span&gt;&lt;span style="color: #000000; "&gt;0&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;00000001&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;00000000000101011011101&lt;/span&gt;&lt;span style="color: #000000; "&gt;
Expected: &lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;10000100&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #000000; "&gt;00100000000000000101011&lt;/span&gt;&lt;span style="color: #000000; "&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;But that reversed number doesn't represent the one that Ricardo stated in his post. What am I doing wrong? Is anything wrong in my point of view or is the expected number wrong? I'm really curious about why there is one bit less in the expected number and how the sign bit changed.&lt;/p&gt;&lt;/blockquote&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5712.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>A couple of days ago my fellow friend <a href="http://geeks.ms/blogs/programancia101/" target="_blank">Ricardo Varela started to blog in spanish</a> (in parallel with <a href="http://phobeo.com/wordpress/" target="_blank">his actual english blog</a>). Former member of Microsoft communities, he is actually working at Google UK. The actual point is that on his new blog he started a <a href="http://geeks.ms/blogs/programancia101/archive/2006/12/26/empezando-por-el-principio.aspx" target="_blank">post with some kind of coding teasers</a>, going back to basics, to the principles of coding. This is going to be funny.</p> <p>Well, this is my answer to his post. There were three questions regarding data structures and alternative thinking about reversing things.</p> <p> </p> <ul> <li><strong>Do you know how to reverse a string?</strong> In example, if you get "abc" the returned string should be "cba"</li></ul> <blockquote> <p>This seemed pretty easy. In C# every string is represented as an array of chars, so you can use the indexers to get chars at any position and reverse them "manually" with something like:</p> <div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8c70f28c-5681-4087-a8de-ff301d4d1e49" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">string</span><span style="color: #000000; "> inputString </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">"</span><span style="color: #000000; ">abc</span><span style="color: #000000; ">"</span><span style="color: #000000; ">;
</span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> reversedString </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; ">.Empty;

</span><span style="color: #0000FF; ">for</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">int</span><span style="color: #000000; "> c </span><span style="color: #000000; ">=</span><span style="color: #000000; "> inputString.Length; c </span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">0</span><span style="color: #000000; ">; c</span><span style="color: #000000; ">--</span><span style="color: #000000; ">)
{
    reversedString </span><span style="color: #000000; ">+=</span><span style="color: #000000; "> inputString[c </span><span style="color: #000000; ">-</span><span style="color: #000000; "> </span><span style="color: #000000; ">1</span><span style="color: #000000; ">];
}

Console.WriteLine(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Original String: </span><span style="color: #000000; ">"</span><span style="color: #000000; "> </span><span style="color: #000000; ">+</span><span style="color: #000000; "> inputString);
Console.WriteLine(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Reversed String: </span><span style="color: #000000; ">"</span><span style="color: #000000; "> </span><span style="color: #000000; ">+</span><span style="color: #000000; "> reversedString);</span></div></pre></div>
<p>Or you can use some of the features of the .NET Framework to do it in a more "elegant" way:</p>
<p></p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:0ced2329-88b6-40e2-b630-6c4361f65c91" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">char</span><span style="color: #000000; ">[] chars </span><span style="color: #000000; ">=</span><span style="color: #000000; "> inputString.ToCharArray();
Array.Reverse(chars);

</span><span style="color: #008000; ">//</span><span style="color: #008000; "> Use the reversed array of chars</span></div></pre></div></blockquote>
<ul>
<li>Going deeper into data structures, <strong>do you know how to reverse the bits of a byte?</strong> In example, if you get 1 the returned byte should be 128</li></ul>
<blockquote>
<p>I must admit this was a hard one. Although I perfectly know the concepts of bits and bitwise operations the C# language doesn't provide an easy or structured way to access those elementary elements of data structures. I finally managed to achieve it. The smallest numeric data structure available to represent a byte internals I found was a simple byte[8], so now I just have to fill it with the values for each byte:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:2d195fac-cd85-4079-8439-78090cd01cd9" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">static</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] getBits(</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; "> inputByte)
{
    </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bits </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[</span><span style="color: #000000; ">8</span><span style="color: #000000; ">];

    </span><span style="color: #0000FF; ">for</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">int</span><span style="color: #000000; "> p </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">0</span><span style="color: #000000; ">; p </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">8</span><span style="color: #000000; ">; p</span><span style="color: #000000; ">++</span><span style="color: #000000; ">)
    {
        bits[</span><span style="color: #000000; ">7</span><span style="color: #000000; "> </span><span style="color: #000000; ">-</span><span style="color: #000000; "> p] </span><span style="color: #000000; ">=</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">)(</span><span style="color: #000000; ">1</span><span style="color: #000000; "> </span><span style="color: #000000; ">&amp;</span><span style="color: #000000; "> (inputByte </span><span style="color: #000000; ">&gt;&gt;</span><span style="color: #000000; "> p));
    }

    </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> bits;
}</span></div></pre></div></blockquote>
<blockquote>
<p>Simple? Ok, I'll explain it a bit... the bitwise operator &gt;&gt; just shifts the bits in the byte to the right so if 01010101 is shifted one position to the right it becomes 00101010... then I perform a logical AND operation with the mask 00000001 to determine if the bit is setted. I just store the state of every bit in the output array and return it. As a quick note, the bit array could be directly reversed if I change the line inside the for loop to:</p>
<p></p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:7429306c-e08f-48b1-a2af-c6b27bd81e7a" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">bits[p] </span><span style="color: #000000; ">=</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">)(</span><span style="color: #000000; ">1</span><span style="color: #000000; "> </span><span style="color: #000000; ">&amp;</span><span style="color: #000000; "> (inputByte </span><span style="color: #000000; ">&gt;&gt;</span><span style="color: #000000; "> p));</span></div></pre></div>
<p></p>
<p>But I wanted more generic methods to convert between byte and bits, so I didn't included reversing directly in that method. Once I have an array, it's simple to reverse it just with the previous method used with string arrays or via the .NET framework features:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:702b1ce0-0cf0-44ae-9362-9c90b0b0a0b3" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">Array.Reverse(bits);</span></div></pre></div></blockquote>
<blockquote>
<p>And know, we only have to be able to convert the bit array back to a byte structure:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:5a2dd212-1fec-4890-86b8-a49ba4476643" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">static</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; "> setBits(</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bits)
{
    </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; "> obyte </span><span style="color: #000000; ">=</span><span style="color: #000000; "> bits[</span><span style="color: #000000; ">0</span><span style="color: #000000; ">];

    </span><span style="color: #0000FF; ">for</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">int</span><span style="color: #000000; "> p </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">1</span><span style="color: #000000; ">; p </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">8</span><span style="color: #000000; ">; p</span><span style="color: #000000; ">++</span><span style="color: #000000; ">)
    {
        obyte </span><span style="color: #000000; ">=</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">)((obyte </span><span style="color: #000000; ">&lt;&lt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">1</span><span style="color: #000000; ">) </span><span style="color: #000000; ">+</span><span style="color: #000000; "> bits[p]);
    }

    </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> obyte;
}
</span></div></pre></div></blockquote>
<blockquote>
<p>The method used is similar to the one I used to extract the bits, but this time the bitwise operator &lt;&lt; is shifting bits to the left, so I can increase the number til it reach to the desired value. A simple test program to test how it works would be:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8519a241-222d-4fe5-8714-7c1d32280bc2" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">byte</span><span style="color: #000000; "> inputByte </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">1</span><span style="color: #000000; ">;
</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; "> outputByte </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">0</span><span style="color: #000000; ">;

</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bits </span><span style="color: #000000; ">=</span><span style="color: #000000; "> getBits(inputByte);
Array.Reverse(bits);
outputByte </span><span style="color: #000000; ">=</span><span style="color: #000000; "> setBits(bits);

Console.WriteLine(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Input Byte: </span><span style="color: #000000; ">"</span><span style="color: #000000; "> </span><span style="color: #000000; ">+</span><span style="color: #000000; "> inputByte);
Console.WriteLine(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Reversed Byte: </span><span style="color: #000000; ">"</span><span style="color: #000000; "> </span><span style="color: #000000; ">+</span><span style="color: #000000; "> outputByte);
</span></div></pre></div></blockquote>
<ul>
<li>And a more complex one. Floating point numbers are represented usually by the standard IEEE 754, <strong>would you be able to reverse the bits of a floating point number?</strong> In example, if you get 118.625f the output should be -17180580000f</li></ul>
<blockquote>
<p>Wow! This is was a really hard one. I didn't know how the <a href="http://en.wikipedia.org/wiki/IEEE_754" target="_blank">IEEE 754 standard</a> worked so I read it at the wikipedia (<a href="http://grouper.ieee.org/groups/754/" target="_blank">the IEEE page for this standard is under revision</a> and there was no info available) and it seems pretty simple. The floating point its a 32bit data structured divided like this:</p>
<p><img src="http://upload.wikimedia.org/wikipedia/en/7/7b/Float_example.PNG" /></p></blockquote>
<blockquote>
<p>So now it seems much simpler to me. It's just a bit reversing operation, in C# the two floating point structures are Float or Double, the former to store floating point numbers with 32bits precision and the last with 64bits; the problem is that those types don't allow bitwise operations, so I need to create a new set of methods to work with them using the BitConverter class. </p>
<p>It's probably refactorizable so just a pair of methods suit all the needs of bit operations, but the goal was to reverse the floating point number, so here I go:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:284db004-068a-4dd4-8133-6cba57bc6d10" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">static</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] getFloatingBits(</span><span style="color: #0000FF; ">double</span><span style="color: #000000; "> input)
{
    </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bytes </span><span style="color: #000000; ">=</span><span style="color: #000000; "> BitConverter.GetBytes(input);

    </span><span style="color: #0000FF; ">if</span><span style="color: #000000; "> (BitConverter.IsLittleEndian)
    {
        Array.Reverse(bytes);
    }

    </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bits </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[</span><span style="color: #000000; ">64</span><span style="color: #000000; ">];

    </span><span style="color: #0000FF; ">for</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">int</span><span style="color: #000000; "> i </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">0</span><span style="color: #000000; ">; i </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">8</span><span style="color: #000000; ">; i</span><span style="color: #000000; ">++</span><span style="color: #000000; ">)
    {
        Array.Copy(getBits(bytes[i]), </span><span style="color: #000000; ">0</span><span style="color: #000000; ">, bits, i </span><span style="color: #000000; ">*</span><span style="color: #000000; "> </span><span style="color: #000000; ">8</span><span style="color: #000000; ">, </span><span style="color: #000000; ">8</span><span style="color: #000000; ">);
    }

    </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> bits;
}</span></div></pre></div>
<p>I explain the method it...The float type can by divided into 4 bytes and the BitConverter.GetBytes method can give us an array of that four bytes, but unfortunately it doesn't include a method to turn back an array of four bytes to a float, so I created this method for the double type and used casting :(</p>
<p>The method is pretty simple, I extract the 8 bytes of the double precision float number. Then, I verify if the processor is <a href="http://en.wikipedia.org/wiki/Endianness">LittleEndian</a> and in that case I reverse the byte order to reflect the actual value. Everything is copied to an array of bits, and we are done. Now we only need to reverse that array of bits:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:724037ef-8dd1-4267-803f-d84a8889fde8" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">Array.Reverse(bits);</span></div></pre></div>
<p>And turn back to the method that reverse the process from a bit array to a double precision floating number:</p></blockquote>
<blockquote>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:85fb2bc3-d929-4b64-bfb4-8bf1c0e41000" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #0000FF; ">static</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">double</span><span style="color: #000000; "> setFloatingBits(</span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bits)
{
    </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] bytes </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[</span><span style="color: #000000; ">8</span><span style="color: #000000; ">];

    </span><span style="color: #0000FF; ">for</span><span style="color: #000000; "> (</span><span style="color: #0000FF; ">int</span><span style="color: #000000; "> i </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">0</span><span style="color: #000000; ">; i </span><span style="color: #000000; ">&lt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">8</span><span style="color: #000000; ">; i</span><span style="color: #000000; ">++</span><span style="color: #000000; ">)
    {
        </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[] actualByte </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">byte</span><span style="color: #000000; ">[</span><span style="color: #000000; ">8</span><span style="color: #000000; ">];
        Array.Copy(bits, i </span><span style="color: #000000; ">*</span><span style="color: #000000; "> </span><span style="color: #000000; ">8</span><span style="color: #000000; ">, actualByte, </span><span style="color: #000000; ">0</span><span style="color: #000000; ">, </span><span style="color: #000000; ">8</span><span style="color: #000000; ">);
        
        bytes[i] </span><span style="color: #000000; ">=</span><span style="color: #000000; "> setBits(actualByte);
    }

    </span><span style="color: #0000FF; ">if</span><span style="color: #000000; "> (BitConverter.IsLittleEndian)
    {
        Array.Reverse(bytes);
    }

    </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> BitConverter.ToDouble(bytes, </span><span style="color: #000000; ">0</span><span style="color: #000000; ">);
}</span></div></pre></div></blockquote>
<blockquote>
<p>The issue is that the expected floating number is not the one I got with this method that reverse the complete array of bits. In fact, I've also re-read the question and it said "are you able to reverse the order of the bits for the exponent and mantissa?" ... I actually did also that, reversing only bits for mantissa and exponent, obtaining the following bit arrays:</p>
<div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:3f8846f9-9b46-4cff-9f8e-26495884cfcd" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #000000; ">Original: </span><span style="color: #000000; ">0</span><span style="color: #000000; "> </span><span style="color: #000000; ">10000000</span><span style="color: #000000; "> </span><span style="color: #000000; ">10111011010100000000000</span><span style="color: #000000; ">
Reversed: </span><span style="color: #000000; ">0</span><span style="color: #000000; "> </span><span style="color: #000000; ">00000001</span><span style="color: #000000; "> </span><span style="color: #000000; ">00000000000101011011101</span><span style="color: #000000; ">
Expected: </span><span style="color: #000000; ">1</span><span style="color: #000000; "> </span><span style="color: #000000; ">10000100</span><span style="color: #000000; "> </span><span style="color: #000000; ">00100000000000000101011</span><span style="color: #000000; ">
</span></div></pre></div></blockquote>
<blockquote>
<p>But that reversed number doesn't represent the one that Ricardo stated in his post. What am I doing wrong? Is anything wrong in my point of view or is the expected number wrong? I'm really curious about why there is one bit less in the expected number and how the sign bit changed.</p></blockquote><img src ="http://blogs.clearscreen.com/migs/aggbug/5712.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>2006.Dispose();</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/25/5693.aspx</link><pubDate>Mon, 25 Dec 2006 20:51:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/25/5693.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5693.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/25/5693.aspx#Feedback</comments><slash:comments>22</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5693.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5693.aspx</trackback:ping><description>&lt;p&gt;This year is touching its last days. It's been a funny and active year both in personal and professional sides of me. I hope you also got what you expected from it.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.mix-mas.com/?id=4837" target="_new"&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/xmas2007.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I wish you have a nice christmas and start the new 2007 full of energy and achievements.&lt;/p&gt; &lt;p&gt;Enjoy this season!&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5693.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>This year is touching its last days. It's been a funny and active year both in personal and professional sides of me. I hope you also got what you expected from it.</p> <p><a href="http://www.mix-mas.com/?id=4837" target="_new"><img src="http://blogs.clearscreen.com/migs/files/xmas2007.jpg" border="0" /></a></p> <p>I wish you have a nice christmas and start the new 2007 full of energy and achievements.</p> <p>Enjoy this season!</p><img src ="http://blogs.clearscreen.com/migs/aggbug/5693.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Sunday Geek #01: Turning 360. I've got Xbox'ed</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/18/5516.aspx</link><pubDate>Mon, 18 Dec 2006 13:40:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/18/5516.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5516.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/18/5516.aspx#Feedback</comments><slash:comments>30</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5516.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5516.aspx</trackback:ping><description>&lt;p&gt;Yesterday evening I just decided to go and get an Xbox 360 System. I was a bit reticent to get this console because I'm an active fan of PS2 because of the Final Fantasy series. Anyway, now I'm starting with the Xbox360 but actually I only own one game: Splinter Cell Double Agent.&lt;/p&gt; &lt;p&gt;Things I loved from my first eXperience: the user interface, Xbox live options, media center capabilities and the way my Vista Ultimate detected my Xbox and added it as an extender. I also love the chance I have to create XNA stuff from my computer and play them in the Xbox; let's see if this turns out to be a good idea :)&lt;/p&gt; &lt;p&gt;Things I didn't loved that much: is there any reason for such a big external power supply????&lt;/p&gt; &lt;p&gt;So if you are also on the 360 side of the life, go and join me to play something. My gamertag is:&lt;/p&gt; &lt;p&gt;&lt;iframe src="http://gamercard.xbox.com/Migs212.card" frameborder="0" width="204" scrolling="no" height="140"&gt;Migs212&lt;/iframe&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;PD: Sunday Geek stands for a category to post whatever a kindofgeek does on a typical Sunday.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5516.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>Yesterday evening I just decided to go and get an Xbox 360 System. I was a bit reticent to get this console because I'm an active fan of PS2 because of the Final Fantasy series. Anyway, now I'm starting with the Xbox360 but actually I only own one game: Splinter Cell Double Agent.</p> <p>Things I loved from my first eXperience: the user interface, Xbox live options, media center capabilities and the way my Vista Ultimate detected my Xbox and added it as an extender. I also love the chance I have to create XNA stuff from my computer and play them in the Xbox; let's see if this turns out to be a good idea :)</p> <p>Things I didn't loved that much: is there any reason for such a big external power supply????</p> <p>So if you are also on the 360 side of the life, go and join me to play something. My gamertag is:</p> <p><iframe src="http://gamercard.xbox.com/Migs212.card" frameborder="0" width="204" scrolling="no" height="140">Migs212</iframe></p> <p> </p> <p>PD: Sunday Geek stands for a category to post whatever a kindofgeek does on a typical Sunday.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/5516.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Why should I rewrite code?</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/16/5455.aspx</link><pubDate>Sat, 16 Dec 2006 04:07:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/16/5455.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5455.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/16/5455.aspx#Feedback</comments><slash:comments>66</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5455.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5455.aspx</trackback:ping><description>&lt;p&gt;I was reading a post by &lt;a href="http://geeks.ms/blogs/ozonicco/archive/2006/12/15/qu-hacen-realmente-los-desarrolladores-profesionales-con-su-tiempo.aspx" target="_blank"&gt;Perci Reyes (spanish link)&lt;/a&gt; inspired by a &lt;a href="http://www.codinghorror.com"&gt;Coding Horror&lt;/a&gt; post about &lt;a href="http://www.codinghorror.com/blog/archives/000684.html" target="_blank"&gt;understanding code&lt;/a&gt;. After reading it and all related links (&lt;a href="http://www.joelonsoftware.com/articles/fog0000000069.html"&gt;Joel's thoughts&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/peterhal/archive/2006/01/04/509302.aspx"&gt;Peter Hallam's post&lt;/a&gt;) I have something to add that it seems nobody thought about...&lt;/p&gt; &lt;p&gt;I agree we all of the authors about the current developer's activities statistics... and maybe it's true that we spend a lot of time trying to understand code. By default, programmers are so narcissist that they need to feel they created something, so they are prone to change anything they don't understand to a more suitable and personal solution, under their point of view. Everybody seems to argue about this narcissism and programmers willing to rewrite instead of understanding but I have some doubts about it being a programmer's problem instead of a code problem...&lt;/p&gt; &lt;p&gt;I mean... is the code too complex to understand it? Maybe it is. I've personally seen thousand of lines of code impossible to read and understand because the chosen architecture, data or business layers, presentation model or even UI layer where poorly and improperly designed, or even not present at all. That adds lot of complexity, but you should agree it's not related to the programmer modifying that code. It's related to the code itself. That code was once written by a developer that thought it was the best solution to the business problem (or maybe it was the best suitable solution possible that could be written with the project, developer and solution constraints present at that time; or maybe related to a lack of experience or knowledge in the side of the developer on how to write that code)&lt;/p&gt; &lt;p&gt;I guess that if a team of peers are developing a solution they do it the best way they can, using known patterns, decoupling code and user interface, and refactoring classes and methods. Following some simple rules you should be unable to find something like a 400 lines method or a class with only one method and 2000 lines of code. And I swear this kind of code exists, I've seen it lot of times. &lt;/p&gt; &lt;p&gt;In that case I would obviously replace and rewrite the smelly code. Not because I prefer it my way, just because it's so poorly designed that it will drive us mad while developing the solution; but most important, it will frustrate working hours of future developers maintaining that code. &lt;/p&gt; &lt;p&gt;So, my point about all that thread of posts was simply to include that developer's are narcissist but they are also able to read understandable code. The problem is introduce by poorly designed software, that actually is pretty common to find anywhere. We need to have in mind that any software we develop will hit production sometime, and it will be supported by a team of developers (maybe not the same team who wrote it) that will need to understand it.&lt;/p&gt; &lt;p&gt;So, my personal advice is (and this is what I actually do when I wrote code in a project) that every developer out there should write the code the best way possible but always making it perfectly readable and understandable. The code must talk by itself, not through the use of code comments, and you should refactor and simplify it until you get something readable and understandable by mere humans. It's not that hard. There are lot of practices to achieve this goal and it will also, under my point of view, make you a better developer; but my favorite statement about this is:&lt;/p&gt; &lt;p&gt;&lt;em&gt;"if you feel the need to add a comment, just refactor your code so it the comment seems superfluous; this way your code will be simpler and easier to understand"&lt;/em&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5455.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>I was reading a post by <a href="http://geeks.ms/blogs/ozonicco/archive/2006/12/15/qu-hacen-realmente-los-desarrolladores-profesionales-con-su-tiempo.aspx" target="_blank">Perci Reyes (spanish link)</a> inspired by a <a href="http://www.codinghorror.com">Coding Horror</a> post about <a href="http://www.codinghorror.com/blog/archives/000684.html" target="_blank">understanding code</a>. After reading it and all related links (<a href="http://www.joelonsoftware.com/articles/fog0000000069.html">Joel's thoughts</a> and <a href="http://blogs.msdn.com/peterhal/archive/2006/01/04/509302.aspx">Peter Hallam's post</a>) I have something to add that it seems nobody thought about...</p> <p>I agree we all of the authors about the current developer's activities statistics... and maybe it's true that we spend a lot of time trying to understand code. By default, programmers are so narcissist that they need to feel they created something, so they are prone to change anything they don't understand to a more suitable and personal solution, under their point of view. Everybody seems to argue about this narcissism and programmers willing to rewrite instead of understanding but I have some doubts about it being a programmer's problem instead of a code problem...</p> <p>I mean... is the code too complex to understand it? Maybe it is. I've personally seen thousand of lines of code impossible to read and understand because the chosen architecture, data or business layers, presentation model or even UI layer where poorly and improperly designed, or even not present at all. That adds lot of complexity, but you should agree it's not related to the programmer modifying that code. It's related to the code itself. That code was once written by a developer that thought it was the best solution to the business problem (or maybe it was the best suitable solution possible that could be written with the project, developer and solution constraints present at that time; or maybe related to a lack of experience or knowledge in the side of the developer on how to write that code)</p> <p>I guess that if a team of peers are developing a solution they do it the best way they can, using known patterns, decoupling code and user interface, and refactoring classes and methods. Following some simple rules you should be unable to find something like a 400 lines method or a class with only one method and 2000 lines of code. And I swear this kind of code exists, I've seen it lot of times. </p> <p>In that case I would obviously replace and rewrite the smelly code. Not because I prefer it my way, just because it's so poorly designed that it will drive us mad while developing the solution; but most important, it will frustrate working hours of future developers maintaining that code. </p> <p>So, my point about all that thread of posts was simply to include that developer's are narcissist but they are also able to read understandable code. The problem is introduce by poorly designed software, that actually is pretty common to find anywhere. We need to have in mind that any software we develop will hit production sometime, and it will be supported by a team of developers (maybe not the same team who wrote it) that will need to understand it.</p> <p>So, my personal advice is (and this is what I actually do when I wrote code in a project) that every developer out there should write the code the best way possible but always making it perfectly readable and understandable. The code must talk by itself, not through the use of code comments, and you should refactor and simplify it until you get something readable and understandable by mere humans. It's not that hard. There are lot of practices to achieve this goal and it will also, under my point of view, make you a better developer; but my favorite statement about this is:</p> <p><em>"if you feel the need to add a comment, just refactor your code so it the comment seems superfluous; this way your code will be simpler and easier to understand"</em></p><img src ="http://blogs.clearscreen.com/migs/aggbug/5455.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Water Inspector Gadget, a simple incursion into Sidebar Gadgets</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/04/4930.aspx</link><pubDate>Mon, 04 Dec 2006 22:01:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/04/4930.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4930.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/04/4930.aspx#Feedback</comments><slash:comments>85</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4930.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4930.aspx</trackback:ping><description>&lt;p&gt;A lot of people asked me about the percentage in my messenger nickname. Some of them thought it was the actual completion state of any of the project I'm involved, and they were wondering how in hell was I able to measure it so precisely.&lt;/p&gt; &lt;p&gt;In fact, the percentage in my nickname (actually 63,78%) is not related to technology, but to nature. It's the level of the water reserve in Madrid. I've been monitoring it during the last 5 or 6 weeks. Daily. Going to the local water company and checking it manually. It actually surprised me how we moved from a poor 27% to the actual reserve in such a little time frame. Amazing. And obviously, it's pretty welcomed.&lt;/p&gt; &lt;p&gt;But this task it's boring. Really boring. I wanted that info directly on my desktop. So, this seemed like a perfect place for &lt;a href="http://en.wikipedia.org/wiki/Inspector_Gadget"&gt;Inspector Gadget&lt;/a&gt; to play with Vista!!!&lt;/p&gt; &lt;p&gt;We first need a simple Html page to host all the gadget code. It's simple javascript + html, also know as the pretty famous dhtml. We then need a simple icon to show in the Gadget Library and of course bunch of nice javascript intervals, json, webservices, xml and xsl parsers to get all the data.&lt;/p&gt; &lt;p&gt;So I managed to get access to a &lt;a href="http://www.cyii.es/www/servlet/EmbalseServlet" target="_blank"&gt;webservice providing the percentage of water reserve for Madrid&lt;/a&gt; and wrote the code to embed it into a Gadget, dragged it to my Sidebar and &lt;em&gt;et voilá!&lt;/em&gt; it's doing the hard work for me.&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/Agua01VistaGadget.jpg" /&gt;&lt;/p&gt; &lt;p&gt;If you feel like curious about how it's done, download the actual Agua Gadget and inspect the code. It's pretty simple yet. I plan to upgrade it to support settings, nicer graphics and be able to monitor more areas of Spain (my current knowledge about water distribution is limited to Spain, but if you know any source of data to your region, don't hesitate to contact me and I would love to include it)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.clearscreen.com/migs/files/Agua_01_VistaGadget.zip"&gt;Download Agua Gadget 0.1&lt;/a&gt; for Windows Vista. To install, simply unzip it and double click de .gadget file. Windows Vista would install it for you :)&lt;/p&gt; &lt;p&gt;You can find more info on how to create a basic &lt;a href="http://msdn2.microsoft.com/en-us/library/ms723694.aspx" target="_blank"&gt;Sidebar Gadget at this step by step tutorial&lt;/a&gt; and more info at the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa965853.aspx"&gt;System.Gadget namespace reference&lt;/a&gt;.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4930.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>A lot of people asked me about the percentage in my messenger nickname. Some of them thought it was the actual completion state of any of the project I'm involved, and they were wondering how in hell was I able to measure it so precisely.</p> <p>In fact, the percentage in my nickname (actually 63,78%) is not related to technology, but to nature. It's the level of the water reserve in Madrid. I've been monitoring it during the last 5 or 6 weeks. Daily. Going to the local water company and checking it manually. It actually surprised me how we moved from a poor 27% to the actual reserve in such a little time frame. Amazing. And obviously, it's pretty welcomed.</p> <p>But this task it's boring. Really boring. I wanted that info directly on my desktop. So, this seemed like a perfect place for <a href="http://en.wikipedia.org/wiki/Inspector_Gadget">Inspector Gadget</a> to play with Vista!!!</p> <p>We first need a simple Html page to host all the gadget code. It's simple javascript + html, also know as the pretty famous dhtml. We then need a simple icon to show in the Gadget Library and of course bunch of nice javascript intervals, json, webservices, xml and xsl parsers to get all the data.</p> <p>So I managed to get access to a <a href="http://www.cyii.es/www/servlet/EmbalseServlet" target="_blank">webservice providing the percentage of water reserve for Madrid</a> and wrote the code to embed it into a Gadget, dragged it to my Sidebar and <em>et voilá!</em> it's doing the hard work for me.</p> <p><img src="http://blogs.clearscreen.com/migs/files/Agua01VistaGadget.jpg" /></p> <p>If you feel like curious about how it's done, download the actual Agua Gadget and inspect the code. It's pretty simple yet. I plan to upgrade it to support settings, nicer graphics and be able to monitor more areas of Spain (my current knowledge about water distribution is limited to Spain, but if you know any source of data to your region, don't hesitate to contact me and I would love to include it)</p> <p><a href="http://blogs.clearscreen.com/migs/files/Agua_01_VistaGadget.zip">Download Agua Gadget 0.1</a> for Windows Vista. To install, simply unzip it and double click de .gadget file. Windows Vista would install it for you :)</p> <p>You can find more info on how to create a basic <a href="http://msdn2.microsoft.com/en-us/library/ms723694.aspx" target="_blank">Sidebar Gadget at this step by step tutorial</a> and more info at the <a href="http://msdn2.microsoft.com/en-us/library/aa965853.aspx">System.Gadget namespace reference</a>.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4930.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>No sync with Windows Mobile Device Center included in Vista RTM?</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/30/4769.aspx</link><pubDate>Thu, 30 Nov 2006 13:36:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/30/4769.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4769.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/30/4769.aspx#Feedback</comments><slash:comments>43</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4769.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4769.aspx</trackback:ping><description>&lt;p&gt;Well, it seemed that Windows Vista didn't shipped with a full version of the Windows Mobile Device Center. It shipped with an standard RNDIS driver to make simple connections to mobile devices, but it's not able to sync with my Outlook 2007.&lt;/p&gt; &lt;p&gt;So after some web crawling, it ended up at a Windows Mobile Team's page where you can &lt;a href="http://www.microsoft.com/windowsmobile/devicecenter.mspx" target="_blank"&gt;download Windows Mobile Device Center Beta 3&lt;/a&gt; for Windows Vista. So I did it, and installed it.&lt;/p&gt; &lt;p&gt;I tried to sync my device but it didn't worked out. Frustration. I crawled again and found that there is an incompatibility between Windows Live One Care 1.5 Beta and Windows Mobile Device Center Beta 3, because One Care Firewall won't detect the needed applications and ports.&lt;/p&gt; &lt;p&gt;Hence, you have two options:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Disable Live One Care Firewall each time you need to sync your device. ouuuch.  &lt;/li&gt;&lt;li&gt;Configure the needed ports and applications manually within the Live One Care Firewall:  &lt;ul&gt; &lt;li&gt;Ports:  &lt;ul&gt; &lt;li&gt;port990: open inbound TCP  &lt;/li&gt;&lt;li&gt;port999: open inbound TCP  &lt;/li&gt;&lt;li&gt;port5678: open inbound TCP  &lt;/li&gt;&lt;li&gt;port5679: open outbound UDP  &lt;/li&gt;&lt;li&gt;port5721: open inbound TCP  &lt;/li&gt;&lt;li&gt;port26675: open inbound TCP&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;Applications  &lt;ul&gt; &lt;li&gt;C:\Windows\WindowsMobile\wmdc.exe  &lt;/li&gt;&lt;li&gt;C:\Windows\WindowsMobile\wmdHost.exe  &lt;/li&gt;&lt;li&gt;C:\Windows\WindowsMobile\wmdsyncman.dll&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And there we go. It's working perfectly now :)&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/wmdc.jpg" border="0" /&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4769.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>Well, it seemed that Windows Vista didn't shipped with a full version of the Windows Mobile Device Center. It shipped with an standard RNDIS driver to make simple connections to mobile devices, but it's not able to sync with my Outlook 2007.</p> <p>So after some web crawling, it ended up at a Windows Mobile Team's page where you can <a href="http://www.microsoft.com/windowsmobile/devicecenter.mspx" target="_blank">download Windows Mobile Device Center Beta 3</a> for Windows Vista. So I did it, and installed it.</p> <p>I tried to sync my device but it didn't worked out. Frustration. I crawled again and found that there is an incompatibility between Windows Live One Care 1.5 Beta and Windows Mobile Device Center Beta 3, because One Care Firewall won't detect the needed applications and ports.</p> <p>Hence, you have two options:</p> <ul> <li>Disable Live One Care Firewall each time you need to sync your device. ouuuch.  </li><li>Configure the needed ports and applications manually within the Live One Care Firewall:  <ul> <li>Ports:  <ul> <li>port990: open inbound TCP  </li><li>port999: open inbound TCP  </li><li>port5678: open inbound TCP  </li><li>port5679: open outbound UDP  </li><li>port5721: open inbound TCP  </li><li>port26675: open inbound TCP</li></ul> </li><li>Applications  <ul> <li>C:\Windows\WindowsMobile\wmdc.exe  </li><li>C:\Windows\WindowsMobile\wmdHost.exe  </li><li>C:\Windows\WindowsMobile\wmdsyncman.dll</li></ul></li></ul></li></ul> <p>And there we go. It's working perfectly now :)</p> <p><img src="http://blogs.clearscreen.com/migs/files/wmdc.jpg" border="0" /></p><img src ="http://blogs.clearscreen.com/migs/aggbug/4769.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>What am I reading...</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/21/4358.aspx</link><pubDate>Tue, 21 Nov 2006 19:37:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/21/4358.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4358.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/21/4358.aspx#Feedback</comments><slash:comments>23</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4358.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4358.aspx</trackback:ping><description>&lt;p&gt;In a recent conversation with &lt;a href="http://geeks.ms/blogs/rcorral" target="_blank"&gt;Rodrigo Corral&lt;/a&gt;, he asked me to publish what books am I reading now, because he is running out of book titles to read and this way we can use what others are reading as an inspirational light to choose new books.&lt;/p&gt;
&lt;p&gt;Firstly I want to state that I use a quite strange technique to read books where I have 3 active books in the pool and iterate them in terms of chapters. I explain this a bit: I read one chapter in book1 and then I switch to book2 to read a new complete chapter to continue a complete chapter in book3. This way, books are more readable to me, and make it more funny so I assimilate the new information better.&lt;/p&gt;
&lt;p&gt;Said this, this are the current books in my actual iteration:&lt;/p&gt;
&lt;div style="HEIGHT: 140px"&gt;
&lt;div style="PADDING-RIGHT: 16px; FLOAT: left"&gt;&lt;a href="http://www.amazon.com/gp/product/0596101325?ie=UTF8&amp;amp;tag=migueljimenez-20&amp;amp;link_code=as3&amp;amp;camp=211189&amp;amp;creative=373489&amp;amp;creativeASIN=0596101325" target="_new"&gt;&lt;img height="140" src="http://images.amazon.com/images/P/0596101325.01._AA_SCMZZZZZZZ_V36350536_.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 16px; FLOAT: left"&gt;&lt;a href="http://www.amazon.com/gp/product/0735621632?ie=UTF8&amp;amp;tag=migueljimenez-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0735621632"&gt;&lt;img height="140" src="http://images.amazon.com/images/P/0735621632.01._AA_SCMZZZZZZZ_.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 16px; FLOAT: left"&gt;&lt;a href="http://www.amazon.com/gp/product/0764556177?ie=UTF8&amp;amp;tag=migueljimenez-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0764556177"&gt;&lt;img height="140" src="http://images.amazon.com/images/P/0764556177.01._AA_SCMZZZZZZZ_.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4358.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>In a recent conversation with <a href="http://geeks.ms/blogs/rcorral" target="_blank">Rodrigo Corral</a>, he asked me to publish what books am I reading now, because he is running out of book titles to read and this way we can use what others are reading as an inspirational light to choose new books.</p>
<p>Firstly I want to state that I use a quite strange technique to read books where I have 3 active books in the pool and iterate them in terms of chapters. I explain this a bit: I read one chapter in book1 and then I switch to book2 to read a new complete chapter to continue a complete chapter in book3. This way, books are more readable to me, and make it more funny so I assimilate the new information better.</p>
<p>Said this, this are the current books in my actual iteration:</p>
<div style="HEIGHT: 140px">
<div style="PADDING-RIGHT: 16px; FLOAT: left"><a href="http://www.amazon.com/gp/product/0596101325?ie=UTF8&amp;tag=migueljimenez-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0596101325" target="_new"><img height="140" src="http://images.amazon.com/images/P/0596101325.01._AA_SCMZZZZZZZ_V36350536_.jpg" border="0" /></a></div>
<div style="PADDING-RIGHT: 16px; FLOAT: left"><a href="http://www.amazon.com/gp/product/0735621632?ie=UTF8&amp;tag=migueljimenez-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0735621632"><img height="140" src="http://images.amazon.com/images/P/0735621632.01._AA_SCMZZZZZZZ_.jpg" border="0" /></a></div>
<div style="PADDING-RIGHT: 16px; FLOAT: left"><a href="http://www.amazon.com/gp/product/0764556177?ie=UTF8&amp;tag=migueljimenez-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0764556177"><img height="140" src="http://images.amazon.com/images/P/0764556177.01._AA_SCMZZZZZZZ_.jpg" border="0" /></a> </div></div><img src ="http://blogs.clearscreen.com/migs/aggbug/4358.aspx" width = "1" height = "1" /></body></item></channel></rss>