<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tamir Khason - Just code &#187; fun</title>
	<atom:link href="http://khason.net/tag/fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://khason.net</link>
	<description>Take care of the sense, and the sounds will take care of themselves.</description>
	<lastBuildDate>Mon, 02 Apr 2012 08:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>What the f***k code</title>
		<link>http://khason.net/blog/what-the-fk-code/</link>
		<comments>http://khason.net/blog/what-the-fk-code/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 08:58:46 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[OFFTOPIC]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Work process]]></category>

		<guid isPermaLink="false">http://khason.net/?p=2204</guid>
		<description><![CDATA[Recently I had to go over some code in one of systems. There I’ve found real gems of production code snippets, worth to share with developers community. Note, that most of this code is not “dead code” and perfectly working. READER ADVISORY: Following post contains objectionable code snippets and might not suitable for all individuals. [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>Recently I had to go over some code in one of systems. There I’ve found real gems of production code snippets, worth to share with developers community. Note, that most of this code is not “<a href="http://en.wikipedia.org/wiki/Dead_code" target="_blank">dead code</a>” and perfectly working.</p>
<p><strong>READER ADVISORY</strong>: Following post contains objectionable code snippets and might not suitable for all individuals.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="My code is compiling!" border="0" alt="My code is compiling!" src="http://khason.net/images/2012/04/image.png" width="399" height="298" /></p>
<p><em>Disclaimer: I changed some snippets to prevent possible authors’ punishment. </em></p>
<p>Let’s start from small unit tests. This one is really ultimate test!</p>
<blockquote><p>// if this works for this this works for sure!     <br />topic = typeof(TestRequest).FullName + &quot;.&quot; + &quot;2.2.2.2.2.2&quot;;</p>
</blockquote>
<p>Also this one is brutal.</p>
<blockquote><p>// Prevent the code from exiting before double the timeout time     <br />bool ok = wait.WaitOne(_bus.DefaultResponseTimeout * 2 * 1000);      <br />Assert.IsTrue(ok == true);      <br />Assert.IsNull(error ?? null);</p>
</blockquote>
<p>Sometimes, people need definitive and proven way to eliminate annoying <a href="http://en.wikipedia.org/wiki/File_URI_scheme" target="_blank">file URI scheme</a>.</p>
<blockquote><p>string emptyString = string.Empty;     <br />do {      <br />&#160;&#160;&#160; if (File.Exists(asmPath)) break;      <br />}      <br />while (asmPath.Replace(&quot;file&quot;, emptyString).Replace(&quot;:&quot;, emptyString).Replace(&quot;\\&quot;, emptyString).Replace(&quot;/&quot;, emptyString).Replace(&quot;//&quot;, emptyString) != emptyString);      <br />// now assembly name is clean and we can load it</p>
</blockquote>
<p>There are also cases of mistrustful <a href="http://en.wikipedia.org/wiki/Globally_unique_identifier" target="_blank">GUID</a></p>
<blockquote><p>message.AddField(FIELD_OWNER_ID, _ownerId);     <br />while (string.Compare(_ownerId, Guid.NewGuid().ToString()) == 0) _ownerId = Guid.NewGuid().ToString();      <br />message.AddField(FIELD_OWNER_ID, _ownerId);</p>
</blockquote>
<p>In certain cases, they need threads to sleep for 1 second anyway.</p>
<blockquote><p>try {     <br />&#160;&#160; Thread.Sleep(1000);      <br />} catch {      <br />&#160;&#160; try {      <br />&#160;&#160;&#160;&#160;&#160; Thread.Sleep(1000);      <br />&#160;&#160; } catch {      <br />&#160;&#160;&#160;&#160;&#160; try {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Thread.Sleep(1000);      <br />&#160;&#160;&#160;&#160;&#160; } catch {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Thread.Sleep(1000);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Gracefully exit the thread      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }// catch      <br />&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160; }      <br />&#160;&#160; // Gracefully exit the thread      <br />&#160;&#160; break;      <br />} // catch      </p>
</blockquote>
<p>Graceful shutdown and correct memory management is the key of successful programming.</p>
<blockquote><p>~Bus() {     <br />try {       <br />&#160; try { this.dispatcher.Destroy(); } catch (Exception) { }      <br />&#160; try { this.queue.Destroy(); } catch (Exception) { }      <br />&#160; try { this.transport.Destroy(); } catch (Exception) { }      <br />&#160; try { this.transport1.Destroy(); } catch (Exception) { }      <br />&#160; try { Environment.Close(); } catch (Exception) { }      <br />} catch (Exception) {      <br />&#160;&#160;&#160;&#160;&#160; // Avoid crashing the process..      <br />&#160;&#160; } // catch      <br />}</p>
<p>public void Dispose() {     <br />&#160;&#160; Dispose(true);      <br />&#160;&#160; GC.SuppressFinalize(this);      <br />}</p>
<p>protected virtual void Dispose(bool disposing) {     <br />try {       <br />&#160;&#160; try { this.dispatcher.Destroy(); } catch (Exception) { }      <br />&#160;&#160; try { this.queue.Destroy(); } catch (Exception) { }      <br />&#160;&#160; try { this.transport.Destroy(); } catch (Exception) { }      <br />&#160;&#160; try { this.transport1.Destroy(); } catch (Exception) { }      <br />&#160;&#160; try { Environment.Close(); } catch (Exception) { }      <br />} catch (Exception) {      <br />&#160;&#160;&#160;&#160;&#160; // Need to assure the process ends      <br />&#160;&#160; } // catch      <br />}</p>
</blockquote>
<p>I am not violent psychopath and not going to ask somebody to maintain this code, but this is for sure built by a lot of brut force and thousands of slaves, like Egyptian pyramids. </p>
<p>Happy Passover to everyone.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="gefilte fish hack" border="0" alt="gefilte fish hack" src="http://khason.net/images/2012/04/image1.png" width="399" height="300" /></p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/what-the-fk-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Math world, simple mental calculations or what&#8217;s going on with education?</title>
		<link>http://khason.net/blog/math-world-simple-mental-calculations-or-whats-going-on-with-education/</link>
		<comments>http://khason.net/blog/math-world-simple-mental-calculations-or-whats-going-on-with-education/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 13:07:55 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://khason.net/blog/math-world-simple-mental-calculations-or-whats-going-on-with-education/</guid>
		<description><![CDATA[Today, I want to write blog post which is absolutely not related to programming. It related to math and education in general those days. During work interviews, I see a lot of people, who was absolutely unable to calculate mentally. They just can’t understand, that it’s possible to do without calculators. When my kids (2nd, [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>Today, I want to write blog post which is absolutely not related to programming. It related to math and education in general those days. During <a href="http://khason.net/tech/brilliant-yet-simple-technical-questions-can-be-used-for-work-interview/" target="_blank">work interviews</a>, I see a lot of people, who was absolutely unable to calculate mentally. They just can’t understand, that it’s possible to do without calculators. When my kids (2nd, 6th and 7th grade) were small I taught them to play with numbers, and until 4th grade (bigger kids) they were able do it. but then school teachers “killed” this ability. Why people should use calculator for simple math operations, if he can do it mentally? Shame you, the modern educational system. Let’s go back and try to understand how people were able to live without devil devices, such as calculators…</p>
<p>Following the paint of <a href="http://en.wikipedia.org/wiki/Nikolai_Bogdanov-Belsky" target="_blank">Nikolai Bogdanov-Belsky</a> “Counting in their heads”. This painting is dated 1895.</p>
<p><img title="Богданов Бельский - Устный счёт" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="570" alt="Богданов Бельский - Устный счёт" src="http://khason.net/images/2009/02/image1.png" width="714" border="0" /> </p>
<p>As you can see at the painting, peasant kids trying to solve following exercise mentally:</p>
<blockquote><p>(10<sup>2</sup> + 11<sup>2</sup> + 12<sup>2</sup> + 13<sup>2</sup> + 14<sup>2</sup>) / 365</p>
</blockquote>
<p>This is not very simple exercise, especially when should be solved without your favorite calculator. However, when I was 4th grade I learned to square two-digit numbers mentally (my, and I think, yours too): <strong>First, find the nearest multiple of ten, by raising or lowering your number, then add and remove the rest to each of numbers and add the square of oddment</strong>. For example</p>
<blockquote><p>45 * 45 = (45+5) * (45-5) + (5 * 5) = 50 * 40 + 25 = (5 * 4) * 100 + 25 = 20 * 100 + 25 = 2000 + 25 = 2025      <br />14 * 14 = (14+4) * (14-4) + (4 * 4) = 18 * 10 + 16 = 180 + 16 = 196</p>
</blockquote>
<p>So, now it can be solved easily:</p>
<blockquote><p>10<sup>2</sup> = 100       <br />11<sup>2</sup>= (11+1) * (11-1) + 1 = 12 * 10 + 1 = 121      <br />12<sup>2</sup>= (12+2) * (12-2) + 4 = 14 * 10 + 4 = 144      <br />13<sup>2</sup>= (13+3) * (13-3) + 9 = 16 * 10 + 9 = 169      <br />14<sup>2</sup>= (14+4) * (14-4) + 16 = 18 * 10 + 16 = 196</p>
</blockquote>
<p>And so on… but wait, 100+121+144 already equals 365, which is our denominator. Next sequence will bring us 169+196, which is also 365. So the answer to this black board brain teaser is 2.</p>
<p>However, it can be rather complicated to calculate 86<sup>2</sup> for instance:</p>
<blockquote><p>86<sup>2</sup> = (86 + 4) * (86 – 4) + (4 * 4) = 90 * 82 + 16…</p>
</blockquote>
<p>Let’s try another way – <strong>multiple the difference between the number and 25 by 100, then add the square of the difference or excess of the number and 50</strong>. For example</p>
<blockquote><p>86<sup>2</sup> = (86 – 25) * 100 + (86 – 50)<sup>2</sup> = 61 * 100 +&#160; 36<sup>2</sup> = 6100 + (36 – 25) * 100 + (50 &#8211; 36)<sup>2</sup> = 6100 + 1100 + 14<sup>2</sup> = 7200 + 196 = 7396</p>
</blockquote>
<p>Isn’t it really simple and fun to calculate squares of numbers?</p>
<p><em>Bonus</em>: how to calculate multiple of two digit numbers with the sum of its unity digits equals to 10? </p>
<ol>
<li>Multiply first digit of the first number by 10</li>
<li>Add 1 to first digit of second number and multiply the result by 10</li>
<li>Multiply results of step 1 and step 2</li>
<li>Deduct second number and the result of step 1</li>
<li>Multiply second digit of the first number by the result of step 4</li>
<li>Add results of steps 3 and 5</li>
</ol>
<p>Looks complicated? Let’s make it easier. Assuming that first number is X = 10x + z and second number is Y = 10y + (10 – z), the formula for quick multiplication calculation is: <strong>100 * x * (y + 1) + z * (Y – 10 * x)</strong>. For example:</p>
<blockquote><p>96 * 84 = 100 * 9 * (8+1) + 6 * (84-10 * 9) = 100 * 9 * 9 + 6 * (84 – 90) = 8100 – 6 * 6 = 8100 – 36 = 8064     <br />37 * 93 = 100 * 3 * (9+1) + 7 * (93 – 10 * 3) = 3000 + 7 * 63 = 3000 + (100 * 6 * 1 + 3 * (7 – 60)) = 3000 + 600 – 3 * 53 = 3600 – 159 = 3441</p>
</blockquote>
<p>Have a nice day and be good people. Also, throw out all hardware calculators and uninstall all software <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/math-world-simple-mental-calculations-or-whats-going-on-with-education/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Brilliant, yet simple technical questions, can be used for work interview</title>
		<link>http://khason.net/tech/brilliant-yet-simple-technical-questions-can-be-used-for-work-interview/</link>
		<comments>http://khason.net/tech/brilliant-yet-simple-technical-questions-can-be-used-for-work-interview/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 12:24:21 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[TECH]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Work process]]></category>

		<guid isPermaLink="false">http://khason.net/tech/brilliant-yet-simple-technical-questions-can-be-used-for-work-interview/</guid>
		<description><![CDATA[Few days ago, a friend of mine, sent me set of demonstration questions for 11th grade computer science students from Russia. I throw eye on this exam and decided to use some of those questions to test candidates in my company for hardware engineer position (we’re looking for). If you’re good candidate for this position, [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>Few days ago, a friend of mine, sent me set of demonstration questions for <a href="http://www.fipi.ru/" target="_blank">11th grade computer science students from Russia</a>. I throw eye on this exam and decided to use some of those questions to test candidates in my company for hardware engineer position (we’re looking for). If you’re good candidate for this position, you should be able to answer all those questions without even think a minute.</p>
<p><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="image" src="http://khason.net/images/2009/01/image29.png" border="0" alt="image" width="374" height="255" /></p>
<p><em>Following those questions</em>:</p>
<p>Automatic system recoded informational message in Russian from Unicode (16-bit) into KOI-8 (8 bit). After recoding the length of the message decreased by 480 bits. What was the length of the original message in characters?<br />
1) 30          2) 60          3) 120          4) 480</p>
<p>There are 119 participants in bicycle race. Special designed system registers cyclers passing waypoint by writing his serial number with minimum possible number of bits. What will be the size of temporary message, recorded by the system after 70 cyclers passed the waypoint?<br />
1) 70 bits          2) 70 bytes          3) 490 bits          4) 119 bytes</p>
<p><strong>а</strong>=D7<sub>16</sub>, <strong>b</strong>=331<sub>8</sub>. What the value of <strong>c</strong> if <strong>a&lt;c&lt;b</strong>?<br />
1) 11011001          2) 11011100          3) 11010111          4) 11011000</p>
<p>Please calculate 43<sub>8</sub>+56<sub>16</sub>?<br />
1) 121<sub>8</sub> 2) 171<sub>8</sub> 3) 69<sub>16</sub> 4) 1000001<sub>2</sub></p>
<p>What logical expression equals to: &amp; !( !B | C ), while &amp;: logical AND, !: logical NOT and |:logical OR<br />
1) !A | !B | !C          2) A &amp; !B &amp; !C          3) A &amp; B &amp; !C          4) A &amp; !B &amp;C</p>
<p>F is a result of logical expression execution with arguments A, B and C</p>
<table border="1" cellspacing="0" cellpadding="2" width="102">
<tbody>
<tr>
<td width="21" valign="top">A</td>
<td width="26" valign="top">B</td>
<td width="27" valign="top">C</td>
<td width="26" valign="top">F</td>
</tr>
<tr>
<td width="21" valign="top">1</td>
<td width="26" valign="top">0</td>
<td width="27" valign="top">0</td>
<td width="26" valign="top">1</td>
</tr>
<tr>
<td width="21" valign="top">0</td>
<td width="26" valign="top">0</td>
<td width="27" valign="top">0</td>
<td width="26" valign="top">1</td>
</tr>
<tr>
<td width="21" valign="top">1</td>
<td width="26" valign="top">1</td>
<td width="27" valign="top">1</td>
<td width="26" valign="top">0</td>
</tr>
</tbody>
</table>
<p>What is the expression for F?<br />
1) !A &amp; !B &amp; !C          2) A &amp; B &amp; C         3) A | B | C         4) !A | !B | !C</p>
<p>For encoding characters A, B, C and D we decided to use two bits numbers sequence (from 00 to 11). What was the result of coding sequence <strong>BACD</strong> on base 16?<br />
1) 4A          2) 411          3) BACD          4) 1023</p>
<p>Led table contains of number of leds. Each led can be in one of following states: “On”, “Off”, “Blinking”. What is the minimal number of leds should be on table in order to display 18 difference signals?</p>
<p>Please calculate 25<sub>14</sub> + 11<sub>-4</sub> – 21<sub>10</sub>?</p>
<p>To calculator there are only two commands 1: “add 3”, 2: “multiply by 4”. Please write down the sequence of the calculator command in order to convert number <strong>3</strong> to number <strong>57</strong> while using not more, then <strong>6</strong> commands. For example to convert 2 into 50 you should write following: “21211” (X4,+3,X4,+3,+3)</p>
<p>The speed of data transfer over network is 128000 bits/sec. Please calculate the time (in seconds) will take to transfer 625 kBytes in this network.</p>
<p>Write a simple program (by using your favorite programming language) to convert the array of 30 integers into array of modulus of items from input array without using modulus calculation special function.</p>
<hr />Good luck!</p>
<p>For people, currently employed in my company (hardware devs) it took less, then10 minutes to solve all those questions. However, I was shocked, that at least half of new candidates, come to interview failed to solve it.</p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/tech/brilliant-yet-simple-technical-questions-can-be-used-for-work-interview/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>My favorite gadget arrived&#8230;</title>
		<link>http://khason.net/offtopic/my-favorite-gadget-arrived/</link>
		<comments>http://khason.net/offtopic/my-favorite-gadget-arrived/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 09:44:31 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[OFFTOPIC]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[Work process]]></category>

		<guid isPermaLink="false">http://khason.net/offtopic/my-favorite-gadget-arrived/</guid>
		<description><![CDATA[If you’re smoking, you know how it to flight more, then two hours when you cannot smoke. Also, you know hw it feels when outside is cold or rainy, but you should come outside to smoke. When you’re in pub with friends and a pint of good beer, but you cannot satisfy with your drink, [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>If you’re smoking, you know how it to flight more, then two hours when you cannot smoke. Also, you know hw it feels when outside is cold or rainy, but you should come outside to smoke. When you’re in pub with friends and a pint of good beer, but you cannot satisfy with your drink, when each 10 minutes you need to go outside to smoke. This why, I ordered <a href="http://gamucci.com/" target="_blank">electronic cigarette</a>, that so far become my favorite gadget.</p>
<p><img src="http://media.share.ovi.com/m1/large/0598/dce8916d90aa4d35a727e673698ae07a.jpg" /> </p>
<p>It’s absolutely perfect device. It produce odorless warm smoke and filled with real nicotine. It much healthier, then real cigarette, while you have a feeling of real smoke. And the most important thing, that you can smoke it in all places, where smoking prohibited. </p>
<p><img src="http://media.share.ovi.com/m1/large/0598/34467e19fa794cbcb99fc94972d4ec25.jpg" /> </p>
<p>The pack&#160; contains of two rechargeable batteries, charger, inhaler and nicotine cartridges. All you have to do it so mount cartridge and start smoking</p>
<p><img src="http://media.share.ovi.com/m1/large/0598/86d377fbb18542718f0762917795baa4.jpg" /> </p>
<p>It feels like regular cigarette, tastes like regular cigarette, smells (for smoker, not for all around) like regular cigarette, but it is not regular cigarette, thus you can smoke whenever you want and where ever you want.</p>
<p><img src="http://media.share.ovi.com/m1/large/0598/2fc9b8e8e72f49d2a39d65cf738f939e.jpg" /> </p>
<p>Absolutely incredible and very useful gadget. Happy smoking and thanks to <a href="http://gamucci.com/" target="_blank">Gamucci</a> for such innovation. Now I can smoke during 12 hours flight to <a href="http://mvp.support.microsoft.com/gp/MVPsummit" target="_blank">MVP summit</a>.</p>
<p><img src="http://media.share.ovi.com/m1/large/0598/584cec533806444499987f37f11206e0.jpg" /></p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/offtopic/my-favorite-gadget-arrived/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nifty time savers for WPF development</title>
		<link>http://khason.net/dev/nifty-time-savers-for-wpf-development/</link>
		<comments>http://khason.net/dev/nifty-time-savers-for-wpf-development/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 18:23:04 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[DEV]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Work process]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/dev/nifty-time-savers-for-wpf-development/</guid>
		<description><![CDATA[I just published an article on Code Project, that explains how to use my latest FM USB library for building real world software radio receiver with WPF. There I referenced to some nifty WPF time savers, I’m using for everyday development. So, today I want to share those code pieces with you. Binding time savers [...]
Related posts:<ol>
<li><a href='http://khason.net/dev/rsa-private-key-import-from-pem-format-in-c/' rel='bookmark' title='RSA private key import from PEM format in C#'>RSA private key import from PEM format in C#</a></li>
<li><a href='http://khason.net/dev/video-encoder-and-metadata-reading-by-using-windows-media-foundation/' rel='bookmark' title='Video encoder and metadata reading by using Windows Media Foundation'>Video encoder and metadata reading by using Windows Media Foundation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.codeproject.com/KB/WPF/fmradio.aspx">I just published an article</a> on Code Project, that explains how to use my latest <a target="_blank" href="http://www.codeplex.com/FM">FM USB library</a> for building real world software radio receiver with WPF. There I referenced to some nifty WPF time savers, I’m using for everyday development. So, today I want to share those code pieces with you.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Software radio reciever screenshot" border="0" alt="Software radio reciever screenshot" src="http://khason.net/images/2009/01/radio.jpg" width="500" height="199" /> </p>
<h3>Binding time savers</h3>
<p>Want to use following syntax for set binding in code?</p>
<blockquote><p>Presets.SetBinding(ListBox.ItemsSourceProperty, _device, &quot;Presets&quot;);</p>
</blockquote>
<p>This piece of code sets binding to Preset DependencyObject, which is Listbox and connects ListBox.ItemsSource dependency property with “Presets” property of CLR object _device. How it done? Simple, as usual</p>
<blockquote><p>[DebuggerStepThrough]     <br />public static BindingExpressionBase SetBinding(this DependencyObject target, DependencyProperty dp, object source, string path) {      <br />&#160;&#160; Binding b = new Binding(path);      <br />&#160;&#160; b.Source = source;      <br />&#160;&#160; return BindingOperations.SetBinding(target, dp, b);      <br />}</p>
</blockquote>
<p>But what to do when we need a converter? Simple:</p>
<blockquote><p>[DebuggerStepThrough]     <br />public static BindingExpressionBase SetBinding(this DependencyObject target, DependencyProperty dp, object source, string path, IValueConverter converter) {      <br />&#160;&#160; Binding b = new Binding(path);      <br />&#160;&#160; b.Source = source;      <br />&#160;&#160; b.Converter = converter;      <br />&#160;&#160; return BindingOperations.SetBinding(target, dp, b);      <br />}</p>
</blockquote>
<p>However to use this method, we need to create special object, which implements IValueConverter. Whey not to do it generically? Like this:</p>
<blockquote><p>SignalTransform.SetBinding(ScaleTransform.ScaleYProperty, _device.RDS,&quot;SignalStrength&quot;, new ValueConverter&lt;byte, double&gt;(b =&gt; { return 1-(b / 36d); }));</p>
</blockquote>
<p>But we need this special handy ValueConverter class. What’s the problem? Here come the king:</p>
<blockquote><p>public class ValueConverter&lt;TIN, TOUT&gt; : IValueConverter { </p>
<p>&#160;&#160; public ValueConverter(Func&lt;TIN, TOUT&gt; forwardConversion) {     <br />&#160;&#160;&#160;&#160;&#160; ForwardConversion = forwardConversion;      <br />&#160;&#160; } </p>
<p>&#160;&#160; public ValueConverter(Func&lt;TIN, TOUT&gt; forwardConversion, Func&lt;TOUT, TIN&gt; reverseConversion) {     <br />&#160;&#160;&#160;&#160;&#160; ForwardConversion = forwardConversion;      <br />&#160;&#160;&#160;&#160;&#160; ReverseConversion = reverseConversion;      <br />&#160;&#160; } </p>
<p>&#160;&#160; public Func&lt;TIN, TOUT&gt; ForwardConversion { get; set; } </p>
<p>&#160;&#160; public Func&lt;TOUT, TIN&gt; ReverseConversion { get; set; }     <br />&#160;&#160; public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {      <br />&#160;&#160;&#160;&#160;&#160; try {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var in1 = Object.ReferenceEquals(value, DependencyProperty.UnsetValue) ? default(TIN) : (TIN)value;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return ForwardConversion(in1);      <br />&#160;&#160;&#160;&#160;&#160; } catch {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return Binding.DoNothing;      <br />&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160; } </p>
<p>&#160;&#160; public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {     <br />&#160;&#160;&#160;&#160;&#160; try {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var out1 = Object.ReferenceEquals(value, DependencyProperty.UnsetValue) ? default(TOUT) : (TOUT)value;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return ReverseConversion(out1);      <br />&#160;&#160;&#160;&#160;&#160; } catch {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return Binding.DoNothing;      <br />&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160; } </p>
<p>}</p>
</blockquote>
<p>Isn’t it really simple? But what to do with ugly App.Current.Dispatcher.BeginInvoke((SendOrPostCallback)delegate(object o)…? Use dispatcher time savers. </p>
<h3>Dispatcher time savers</h3>
<p>Don’t you ever want to do this in order to make context switching between UI thread and other application thread in WPF?</p>
<blockquote><p>this.Dispatch(() =&gt; {… DO SOMETHING IN UI THREAD …};</p>
</blockquote>
<p>Now you can (with default and preset DispatcherPriority:</p>
<blockquote><p>public static DispatcherOperation Dispatch(this DispatcherObject sender, Action callback) { return sender.Dispatch(DispatcherPriority.Normal, callback); } </p>
<p>public static DispatcherOperation Dispatch(this DispatcherObject sender,&#160; DispatcherPriority priority, Action callback) {     <br />&#160;&#160; if (sender.Dispatcher == null) return null;      <br />&#160;&#160; if (sender.Dispatcher.CheckAccess()) {      <br />&#160;&#160;&#160;&#160;&#160; callback();      <br />&#160;&#160;&#160;&#160;&#160; return null;      <br />&#160;&#160; } else {      <br />&#160;&#160;&#160;&#160;&#160; return sender.Dispatcher.BeginInvoke(priority, callback);      <br />&#160;&#160; }      <br />}</p>
</blockquote>
<p>Nice, isn’t it? But what to do if we do not want to set binding, but we do want to be notified about property change of dependency objects? </p>
<h3>Bindingless handlers time saver</h3>
<p>Let’s assume, that we have “Tune” UIelement, which has Angle property, but not exposes PropertyChanged event (like it done with <a target="_blank" href="http://blogs.msdn.com/expression/archive/2007/10/13/rotary-custom-control.aspx">Rotary custom control by Expression Blend team</a>… Designers, you know… <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>However I want to be able to add handler for Angle dependency property changed event and do something when it changed. Like this:</p>
<blockquote><p>Tune.AddValueChanged(RotaryControl.RotaryControl.AngleProperty, (s, ex) =&gt; {     <br />&#160;&#160; _device.Tune(Tune.Angle &gt; _prevTune);      <br />&#160;&#160; _prevTune = Tune.Angle;      <br />});</p>
</blockquote>
<p>Here comes our time saver for this purpose:</p>
<blockquote><p>public static void AddValueChanged(this DependencyObject sender, DependencyProperty property, EventHandler handler) {     <br />&#160;&#160; DependencyPropertyDescriptor.FromProperty(property, sender.GetType()).AddValueChanged(sender, handler);      <br />}</p>
</blockquote>
<p>But if we add handler we should be able to remove it too.</p>
<blockquote><p>public static void RemoveValueChanged(this DependencyObject sender, DependencyProperty property, EventHandler handler) {     <br />&#160;&#160; DependencyPropertyDescriptor.FromProperty(property, sender.GetType()).RemoveValueChanged(sender, handler);      <br />}</p>
</blockquote>
<p>Now we done with some of my nifty helpers. And last, but not the least: </p>
<h3>All times question: how to scale ranges</h3>
<p>Here is how <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>public static double ToRange(this double value, double minSource, double maxSource, double minTarget, double maxTarget) {     <br />&#160;&#160; var sr = maxSource &#8211; minSource;      <br />&#160;&#160; var tr = maxTarget &#8211; minTarget;      <br />&#160;&#160; var ratio = sr / tr;      <br />&#160;&#160; return minTarget+(value / ratio);      <br />}</p>
</blockquote>
<p>Now we can connect them and get something like this:</p>
<blockquote><p>Volume.AddValueChanged(RotaryControl.RotaryControl.AngleProperty, (s, ex) =&gt; {     <br />&#160;&#160; DirectSoundMethods.Volume = (int)Volume.Angle.ToRange(Volume.CounterClockwiseMostAngle, Volume.ClockwiseMostAngle, -4000, 0);      <br />});</p>
</blockquote>
<p>Isn’t it brilliant? </p>
<p>Have a good day and <a target="_blank" href="http://www.codeproject.com/KB/WPF/fmradio.aspx">be sure to read and rate my last article on Code Project</a> <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Be good people.</p>
<p>Related posts:<ol>
<li><a href='http://khason.net/dev/rsa-private-key-import-from-pem-format-in-c/' rel='bookmark' title='RSA private key import from PEM format in C#'>RSA private key import from PEM format in C#</a></li>
<li><a href='http://khason.net/dev/video-encoder-and-metadata-reading-by-using-windows-media-foundation/' rel='bookmark' title='Video encoder and metadata reading by using Windows Media Foundation'>Video encoder and metadata reading by using Windows Media Foundation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/dev/nifty-time-savers-for-wpf-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Common phrases used by developers</title>
		<link>http://khason.net/offtopic/common-phrases-used-by-developers/</link>
		<comments>http://khason.net/offtopic/common-phrases-used-by-developers/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 16:08:56 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[OFFTOPIC]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://khason.net/offtopic/common-phrases-used-by-developers/</guid>
		<description><![CDATA[One of my partners (who is PM in global company) sent me his list of common phrases used by his developers. I also added some of phrases, commonly used by my developers. Here the list: It works on my machine That&#8217;s weird! But this was running before&#8230; Some minor stuff has to be fixed This [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>One of my partners (who is PM in global company) sent me his list of common phrases used by his developers. I also added some of phrases, commonly used by my developers. Here the list:</p>
<ul>
<li>It works on my machine</li>
<li>That&#8217;s weird!</li>
<li>But this was running before&#8230;</li>
<li>Some minor stuff has to be fixed</li>
<li>This must be a hardware problem</li>
<li>Someone tinkered with incoming data</li>
<li>But I didn&#8217;t touch that module</li>
<li>I&#8217;m almost finished</li>
<li>That&#8217;s will be done quickly</li>
<li>You can&#8217;t test everything.</li>
<li>It’s impossible that it will affect the other module</li>
<li>I remember that I fixed this bug already</li>
<li>Documentation is being written</li>
<li>This is not my program</li>
<li>I had lots of unexpected troubles</li>
<li>But the specification was always changing</li>
<li>I thought I found the bug</li>
<li>This change will be done in 5 minutes</li>
<li>I&#8217;m waiting for the others so I can test</li>
<li>Aside from the fact it is not working, what is your impression?</li>
<li>That&#8217;s not a bug &#8211; it&#8217;s a feature! (by <a href="http://dotmad.net/" target="_blank">dotmad</a>)</li>
<li>It works as coded (by <a href="http://learnwpf.com/" target="_blank">Joseph Cooney</a>)</li>
<li>Sorry, my code is compiling. I will get back to you in a few hours (by David)</li>
</ul>
<p>I’m inviting you to contribute your phrases in comments and if the phrase will be really interesting, I’ll update it in the post (with like to your blog/site)</p>
<p>So, let’s start creating ultimate developer’s phrases list.</p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/offtopic/common-phrases-used-by-developers/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Quick Silverlight (and WPF) tip: How to write program without XAML</title>
		<link>http://khason.net/blog/quick-silverlight-and-wpf-tip-how-to-write-program-without-xaml/</link>
		<comments>http://khason.net/blog/quick-silverlight-and-wpf-tip-how-to-write-program-without-xaml/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 18:51:00 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Work process]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/blog/quick-silverlight-and-wpf-tip-how-to-write-program-without-xaml/</guid>
		<description><![CDATA[From the moment, 10K MIX09 contest was launched, I got more, then 20 people, asking the same question: Is it possible to have Silverlight program up and running without XAML at all? The answer is “YES, IT IS”. Here is how: All you need for run WPF or Silverlight application is Class inherited from System.Windows.Application [...]
Related posts:<ol>
<li><a href='http://khason.net/dev/rsa-private-key-import-from-pem-format-in-c/' rel='bookmark' title='RSA private key import from PEM format in C#'>RSA private key import from PEM format in C#</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>From the moment, <a href="http://2009.visitmix.com/MIXtify/TenKGallery.aspx" mce_href="http://2009.visitmix.com/MIXtify/TenKGallery.aspx">10K MIX09 contest was launched</a>, I got more, then 20 people, asking the same question: <b>Is it possible to have Silverlight program up and running without XAML at all?</b></p>
<p><img src="http://khason.net/images/2008/12/image-5432fc95.png" style="border: 0px none ; display: inline;" title="image" alt="image" mce_src="http://khason.net/images/2008/12/image-5432fc95.png" width="315" border="0" height="289"/> </p>
<p>The answer is “<b>YES, IT IS</b>”. Here is how:</p>
<p>All you need for run WPF or Silverlight application is </p>
<ol>
<li>Class inherited from System.Windows.Application</li>
<li>Class inherited from System.Windows.Controls.UserControl</li>
</ol>
<p>So, Let’s create new WPF or Silverlight application and delete all files from the project directory. Then add one file, named App.cs (or Foo.cs or Whatever.cs – the length of the file name is not included <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and write there :</p>
<blockquote><p>using System.Windows.Controls;     <br />using System.Windows;</p>
<p>public class App : Application {public App() {this.Startup += (s, e) =&gt; { this.RootVisual = Foo.M; };}}&nbsp; <br />class Foo: UserControl {static Foo _b = new Foo();public static Board M { get { return _b; } }</p>
</blockquote>
<p>We done. F5, be happy. You just wrote first officially smallest Silverlight functional application. Good luck with Mix09 contest.</p>
<p>Related posts:<ol>
<li><a href='http://khason.net/dev/rsa-private-key-import-from-pem-format-in-c/' rel='bookmark' title='RSA private key import from PEM format in C#'>RSA private key import from PEM format in C#</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/quick-silverlight-and-wpf-tip-how-to-write-program-without-xaml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What boots faster – Netbook, powered Windows XP or Nokia E71 mobile phone?</title>
		<link>http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/</link>
		<comments>http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 14:08:42 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[ITPRO]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[VIDEO]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/</guid>
		<description><![CDATA[Some days ago, somebody from Microsoft was shocked, when I told him, that I’m planning to run Windows XP (and later Windows 7) as operation system for mission critical automotive device. He even checked with Windows XP embedded team boot times for XP. They told him, that the minimum can be achieved is about 40 [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>Some days ago, somebody from Microsoft was shocked, when I told him, that I’m planning to run Windows XP (and later Windows 7) as operation system for mission critical automotive device. He even checked with Windows XP embedded team boot times for XP. They told him, that the minimum can be achieved is about 40 seconds cold boot and 30 seconds from hibernate state. I was upset and decided to tweak my system for smallest possible boot time. Here the result video. This is not the limit. I believe, that I’ll be able to decrease Windows XP boot time to less, then 10 seconds with a bit more efforts.</p>
<p><strong>Note: </strong>This is absolutely authentic and non-touched video, recorded today by me, comparing boot time of Windows XP on unbranded weak netbook (Atom 1.6, 128MB and 8G SSD) and my Nokia E71 mobile phone. 15 seconds boot time of Windows XP achieved by tweaking only well known registry values and OS configuration values without special profundity of system settings. </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/FjFy_EwmVlg&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FjFy_EwmVlg&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Now the question: with todays’ devices, why we are not running XP for mobile and automotive mission critical devices?</p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Asus R50A UMPC review</title>
		<link>http://khason.net/blog/asus-r50a-umpc-review/</link>
		<comments>http://khason.net/blog/asus-r50a-umpc-review/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 13:26:00 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[OFFTOPIC]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Vista Battery Saver]]></category>

		<guid isPermaLink="false">http://khason.net/blog/asus-r50a-umpc-review/</guid>
		<description><![CDATA[So, I got new branded Asus R50A UMPC for test. This ultra mobile machine with 5.6&#8243; WSVGA (1024&#215;768) screen, based on Intel US15W chipset, comes with Intel Atom Z520 (1.33 Ghz, 533Mhz) processor, 1Gb of RAM and 20GB SSD. Also it has 3.5G mobile unit, integrated 802.11b/g network card and GPS. First impression was very [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>So, I got new branded <a href="http://www.asus.com/products.aspx?l1=5&amp;l2=25&amp;l3=722&amp;l4=0&amp;model=2295&amp;modelmenu=1" target="_blank" mce_href="http://www.asus.com/products.aspx?l1=5&amp;l2=25&amp;l3=722&amp;l4=0&amp;model=2295&amp;modelmenu=1">Asus R50A UMPC</a> for test. This ultra mobile machine with 5.6&#8243; WSVGA (1024&#215;768) screen, based on Intel US15W chipset, comes with Intel Atom Z520 (1.33 Ghz, 533Mhz) processor, 1Gb of RAM and 20GB SSD. Also it has 3.5G mobile unit, integrated 802.11b/g network card and GPS. First impression was very cool. Slick design, big screen build in fingerprint reader.</p>
<p>&nbsp;<a href="http://www.flickr.com/photos/dedjo/3027945780/" target="_blank" mce_href="http://www.flickr.com/photos/dedjo/3027945780/"><img src="http://farm4.static.flickr.com/3034/3027945780_697d7fff14.jpg" mce_src="http://farm4.static.flickr.com/3034/3027945780_697d7fff14.jpg"/></a> </p>
<p><a href="http://www.flickr.com/photos/dedjo/3027224451/" target="_blank" mce_href="http://www.flickr.com/photos/dedjo/3027224451/"><img src="http://farm4.static.flickr.com/3191/3027224451_296000114b.jpg" mce_src="http://farm4.static.flickr.com/3191/3027224451_296000114b.jpg"/></a> </p>
<p>What in the box? Power adapter (110/220V), compact keyboard, bunch of cables, extra stilus and handling strap.</p>
<p><a href="http://www.flickr.com/photos/dedjo/3027970572" target="_blank" mce_href="http://www.flickr.com/photos/dedjo/3027970572"><img src="http://farm4.static.flickr.com/3007/3027970572_feba1fdcc8.jpg" mce_src="http://farm4.static.flickr.com/3007/3027970572_feba1fdcc8.jpg"/></a> </p>
<p>What else this machine has? Microcard reader, three mini-usb sockets, one regular USB and camera. Looks like pretty fine machine, but not for €1K+ price tag. But who cares when we buy real good gadget? However, my euphoria disappears during 6 minutes startup (this was not first startup &#8211; first took more, then 15 minutes).</p>
<p>It was preinstalled with Windows Vista SP1 Ultimate (for this tiny machine) aside with huge amount of Asus junkware, so it was was even unable even to calculate Vista experience score</p>
<p><a href="http://www.flickr.com/photos/dedjo/3027956200/" target="_blank" mce_href="http://www.flickr.com/photos/dedjo/3027956200/"><img src="http://farm4.static.flickr.com/3140/3027956200_c13d658754.jpg" mce_src="http://farm4.static.flickr.com/3140/3027956200_c13d658754.jpg"/></a> </p>
<p>Also it has no drivers for strange device, named &#8220;Mini Card&#8221; (with factory branded Asus OS installation)</p>
<p><a href="http://www.flickr.com/photos/dedjo/3027130301/" target="_blank" mce_href="http://www.flickr.com/photos/dedjo/3027130301/"><img src="http://farm4.static.flickr.com/3026/3027130301_fb08e0b099.jpg" mce_src="http://farm4.static.flickr.com/3026/3027130301_fb08e0b099.jpg"/></a> </p>
<p>Well, it&#8217;s probably because I&#8217;m still not connected to internet&#8230; Let&#8217;s connect office WiFi&#8230; Err&#8230; It has some troubles with wireless network discovery &#8211; 2 bars for 12 feet distance from access point (my W500 has all 5) and no other networks (with 4 and less bars on another machine). Let&#8217;s connect it. Hm, &#8220;unable to connect&#8221;&#8230; Weird. Leave it by now. This is multimedia device, so, probably, video will play better? Well, it failed also with playback of Windows sample movie. So maybe it has great battery life? Not really. Without doing anything new 2 cells, 2600mAh battery enough for less, then two hours (with <a href="http://blogs.microsoft.co.il/blogs/tamir/archive/tags/Vista+Battery+Saver/default.aspx" target="_blank" mce_href="http://blogs.microsoft.co.il/blogs/tamir/archive/tags/Vista+Battery+Saver/default.aspx">vista battery saver</a> it extended to 3, while this device does not support aero interface).</p>
<p>But the final accord was this one (one again &#8211; this is branded Asus installation):</p>
<p>&nbsp;<img src="http://khason.net/images/2008/12/image-dcd4f35d-1091-4cd4-a3da-81d8da693e6d.png" alt="image" mce_src="http://khason.net/images/2008/12/image-dcd4f35d-1091-4cd4-a3da-81d8da693e6d.png" width="529" border="0" height="397"/> </p>
<p>Bottom line: 0<b>/5. I paid $360 for my wife&#8217;s pink <a href="http://www.amazon.com/gp/product/B001DL2BUM?ie=UTF8&amp;tag=israkniga-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001DL2BUM" mce_href="http://www.amazon.com/gp/product/B001DL2BUM?ie=UTF8&amp;tag=israkniga-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001DL2BUM">Acer Aspire One</a><img src="http://www.assoc-amazon.com/e/ir?t=israkniga-20&amp;l=as2&amp;o=1&amp;a=B001DL2BUM" style="border-style: none ! important; margin: 0px;" alt="" mce_src="http://www.assoc-amazon.com/e/ir?t=israkniga-20&amp;l=as2&amp;o=1&amp;a=B001DL2BUM" width="1" border="0" height="1"/> and got much better computer (it even has camera).</b></p>
<p><a href="http://twitpic.com/photos/tamir" mce_href="http://twitpic.com/photos/tamir"><img src="http://khason.net/images/2008/12/image-4.png" alt="image" mce_src="http://khason.net/images/2008/12/image-4.png" width="529" border="0" height="397"/></a> </p>
<p>The only thing remains enigma for me is <u>why, the hell, this piece of crap costs more, then €1,000</u><u>?</u></p>
<p>Have a nice day and be good people &#8211; do not buy this machine!</p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/asus-r50a-umpc-review/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>The Original Tetris on Windows Vista</title>
		<link>http://khason.net/blog/the-original-tetris-on-windows-vista/</link>
		<comments>http://khason.net/blog/the-original-tetris-on-windows-vista/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 22:12:07 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://khason.net/blog/the-original-tetris-on-windows-vista/</guid>
		<description><![CDATA[For last days I’m very busy with Bidi support for Silverlight development. Working a lot of hours in order to finish it until TechEd. So, I’m very tired and need relaxation. What can be better, then Tetris? But, there are millions of Tetrises. What to choose? What’s the question? The original one. This genius game [...]<p/>]]></description>
			<content:encoded><![CDATA[<p>For last days I’m very busy with <a href="http://blogs.microsoft.co.il/blogs/tamir/archive/tags/Work+process/default.aspx">Bidi support for Silverlight development</a>. Working a lot of hours in order to finish it until <a href="http://khason.net/blog/presenting-at-teched-developers-south-africa-2008-durban/">TechEd</a>. So, I’m very tired and need relaxation. What can be better, then Tetris? But, there are millions of Tetrises. What to choose? What’s the question? <a href="http://vadim.oversigma.com/Tetris.htm">The original one</a>. </p>
<p><img title="image" border="0" alt="image" src="http://khason.net/images/2008/12/image-a0fdc6d7-c89c-4ad2-bf3e-b909e181019d.png" width="600" height="480" /> </p>
<p>This genius game was developed by Vadim Gerasimov, Alexey Pajitnov and Dmitry Pavlovsky about 20 years ago and it still working on Windows PC (even in Vista). This how to <a href="http://khason.net/blog/software-is-sucks-probably-it-really-is/">build software</a>. As far as I know, today Vadim works in Google, Alexey in WildSnake and Vadim is commercial director somewhere in Russia.</p>
</p>
</p>
</p>
</p>
</p>
<p>So, <a href="http://vadim.oversigma.com/Tetris3.zip">download and play Tetris</a> now. Unfourchantely, 16 bit <a href="http://vadim.oversigma.com/Antix.zip">Antrix</a> requires full screen emulation, that is not supported on Vista.</p>
<p/>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/the-original-tetris-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

