<?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; WPF</title>
	<atom:link href="http://khason.net/tag/wpf/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>Sun, 08 Nov 2009 18:24:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Real singleton approach in WPF application</title>
		<link>http://khason.net/dev/read-singleton-approach-in-wpf-application/</link>
		<comments>http://khason.net/dev/read-singleton-approach-in-wpf-application/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 20:19:35 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[DEV]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/dev/read-singleton-approach-in-wpf-application/</guid>
		<description><![CDATA[One of the most common problems in WPF is memory/processor time consumption. Yes, WPF is rather greedy framework. It become even greedier when using unmanaged resources, such as memory files or interop images. To take care on it, you can implement singleton pattern for the application and share only one unmanaged instance among different application [...]


Related posts:<ol><li><a href='http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/' rel='bookmark' title='Permanent Link: INotifyPropertyChanged auto wiring or how to get rid of redundant code'>INotifyPropertyChanged auto wiring or how to get rid of redundant code</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One of the most common problems in WPF is memory/processor time consumption. Yes, WPF is rather greedy framework. It become even greedier when using unmanaged resources, such as memory files or interop images. To take care on it, you can implement singleton pattern for the application and share only one unmanaged instance among different application resources. So today we’ll try to create one large in-memory dynamic bitmap and share it between different instances of WPF controls. Let’s start</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="The Singleton" border="0" alt="The Singleton" src="http://khason.net/images/2009/08/image2.png" width="206" height="520" /> </p>
<p>First of all let’s create our single instance source. The pattern is straight forward. Create a class derived from INotifyPropertyChanged, create private constructor and static member returns the single instance of the class.</p>
<blockquote><p>public class MySingleton : INotifyPropertyChanged { </p>
<p>&#160;&#160; #region Properties     <br />&#160;&#160; public BitmapSource Source { get { return _source; } }      <br />&#160;&#160; public static MySingleton Instance {      <br />&#160;&#160;&#160;&#160;&#160; get {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (_instance == default(MySingleton)) _instance = new MySingleton();      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return _instance;      <br />&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160; }      <br />&#160;&#160; #endregion </p>
<p>&#160;&#160; #region ctor     <br />&#160;&#160; private MySingleton() { _init(); }      <br />&#160;&#160; #endregion</p>
</blockquote>
<p>Now we need to create this single instance of this class inside our XAML program. To do this, we have great extension x:Static</p>
<blockquote><p>&lt;Window.DataContext&gt;     <br />&#160;&#160;&#160; &lt;x:StaticExtension Member=&quot;l:MySingleton.Instance&quot; /&gt;      <br />&lt;/Window.DataContext&gt;</p>
</blockquote>
<p>Now we need to find a way to do all dirty work inside MySingleton and keep classes using it as simple is possible. For this purpose we’ll register class handler to catch all GotFocus routed events, check the target of the event and rebind the only instance to new focused element. How to do this? Simple as 1-2-3</p>
<p>Create class handler</p>
<blockquote><p>EventManager.RegisterClassHandler(typeof(FrameworkElement), FrameworkElement.GotFocusEvent, (RoutedEventHandler)_onAnotherItemFocused);</p>
</blockquote>
<p>Check whether selected and focused item of the right type</p>
<blockquote><p>private void _onAnotherItemFocused(object sender, RoutedEventArgs e) {     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DependencyPropertyDescriptor.FromProperty(ListBoxItem.IsSelectedProperty, typeof(ListBoxItem)).AddValueChanged(sender, (s, ex) =&gt; {}</p>
</blockquote>
<p>and reset binding </p>
<blockquote><p>var item = s as ListBoxItem;     <br />var img = item.Content as Image;      <br />if (_current != null &amp;&amp; _current.Target is Image &amp;&amp; _current.Target != img) {      <br />&#160;&#160; ((Image)_current.Target).ClearValue(Image.SourceProperty);      <br />}       <br />if (img != null) {      <br />&#160;&#160; _current = new WeakReference(img);      <br />&#160;&#160; img.SetBinding(Image.SourceProperty, _binding);      <br />}</p>
</blockquote>
<p>We almost done. a bit grease to make the source bitmap shiny </p>
<blockquote><p>var count = (uint)(_w * _h * 4);     <br />var section = CreateFileMapping(new IntPtr(-1), IntPtr.Zero, 0&#215;04, 0, count, null);      <br />_map = MapViewOfFile(section, 0xF001F, 0, 0, count);      <br />_source = Imaging.CreateBitmapSourceFromMemorySection(section, _w, _h, PixelFormats.Bgr32, (int)(_w * 4), 0) as InteropBitmap;      <br />_binding = new Binding {      <br />&#160;&#160; Mode = BindingMode.OneWay,      <br />&#160;&#160; Source = _source      <br />};      <br />CompositionTarget.Rendering += (s, e) =&gt; { _invalidate(); };</p>
</blockquote>
<blockquote><p>private void _invalidate() {     <br />&#160;&#160; var color = (uint)((uint)0xFF &lt;&lt; 24) | (uint)(_pixel &lt;&lt; 16) | (uint)(_pixel &lt;&lt; <img src='http://khason.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> | (uint)_pixel;      <br />&#160;&#160; _pixel++; </p>
<p>&#160;&#160; unsafe {     <br />&#160;&#160;&#160;&#160;&#160; uint* pBuffer = (uint*)_map;      <br />&#160;&#160;&#160;&#160;&#160; int _pxs = (_w * _h);      <br />&#160;&#160;&#160;&#160;&#160; for (var i = 0; i &lt; _pxs; i++) {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pBuffer[i] = color;      <br />&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160; }      <br />&#160;&#160; _source.Invalidate();      <br />&#160;&#160; OnPropertyChanged(&quot;Source&quot;);      <br />}</p>
</blockquote>
<p>And we done. The usage of this approach is very simple – there is no usage at all. All happens automagically inside MySingleton class, all you need is to set static data context and add images</p>
<blockquote><p>&lt;StackPanel&gt;     <br />&#160;&#160;&#160; &lt;Button Click=&quot;_addAnother&quot;&gt;Add another&#8230;&lt;/Button&gt;      <br />&#160;&#160;&#160; &lt;ListBox Name=&quot;target&quot; /&gt;      <br />&lt;/StackPanel&gt;      <br />…      <br />private void _addAnother(object sender, RoutedEventArgs e) {      <br />&#160;&#160; var img = new Image { Width=200, Height=200, Margin=new Thickness(0,5,0,5) };      <br />&#160;&#160; target.Items.Add(img);      <br />&#160;&#160; this.Height += 200;      <br />}</p>
</blockquote>
<p>To summarize: in this article we learned how to use singletons as data sources for your XAML application, how to reuse it across WPF, how to connect to routed events externally and also how to handle dependency property changed from outside of the owner class. Have a nice day and be good people. </p>
<p><a href="http://khason.net/images/2009/08/ReuseSingleton.zip" target="_blank">Source code for this article (21k) &gt;&gt;</a></p>
<p>To make it works press number of times on “Add another…” button and then start selecting images used as listbox items. Pay attention to the working set of the application. Due to the fact that only one instance is in use it is not growing.</p>


<p>Related posts:<ol><li><a href='http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/' rel='bookmark' title='Permanent Link: INotifyPropertyChanged auto wiring or how to get rid of redundant code'>INotifyPropertyChanged auto wiring or how to get rid of redundant code</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/dev/read-singleton-approach-in-wpf-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>INotifyPropertyChanged auto wiring or how to get rid of redundant code</title>
		<link>http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/</link>
		<comments>http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 19:43:41 +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[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/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/</guid>
		<description><![CDATA[For the last week most of WPF disciples are discussing how to get rid of hardcoded property name string inside INotifyPropertyChanged implementation and how to keep using automatic properties implementation but keep WPF binding working. The thread was started by Karl Shifflett, who proposed interesting method of using StackFrame for this task. During this thread [...]


Related posts:<ol><li><a href='http://khason.net/dev/read-singleton-approach-in-wpf-application/' rel='bookmark' title='Permanent Link: Real singleton approach in WPF application'>Real singleton approach in WPF application</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For the last week most of <a title="RSS feed of all disciples" href="http://pipes.yahoo.com/pipes/pipe.run?_id=Jp_ob_fn3RGFP6DnBRNMsA&amp;_render=rss" rel="rss" target="_blank">WPF disciples</a> are discussing how to get rid of hardcoded property name string inside <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx" target="_blank">INotifyPropertyChanged</a> implementation and how to keep using automatic properties implementation but keep WPF binding working. The thread was started by Karl Shifflett, <a href="http://karlshifflett.wordpress.com/2009/08/02/inotifypropertychanged-how-to-remove-the-property-name-string-code-smell/" target="_blank">who proposed interesting method</a> of using <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stackframe.aspx" target="_blank">StackFrame</a> for this task. During this thread other methods were proposed including code snippets, R#, <a href="http://ayende.com/Blog/archive/2009/08/08/an-easier-way-to-manage-inotifypropertychanged.aspx" target="_blank">Observer Pattern</a>, <a href="http://www.codeproject.com/KB/WPF/CinchII.aspx#Better_INPC" target="_blank">Cinch framework</a>, <a href="http://mbrownchicago.spaces.live.com/blog/cns!2221DC39E0C749A4!1285.entry" target="_blank">Static Reflection</a>, <a href="http://danielvaughan.orpius.com/post/Property-Change-Notification-using-a-Weak-Referencing-Strategy.aspx" target="_blank">Weak References</a> and others. I also proposed the method we’re using for our classes and promised to blog about it. So the topic today is how to use <a href="http://www.postsharp.org" target="_blank">PostSharp</a> to wire automatic implementation of INotifyPropertyChanged interface based on automatic setters only.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="My 5 ¢" border="0" alt="My 5 ¢" src="http://khason.net/images/2009/08/image1.png" width="483" height="337" /> </p>
<p>So, I want my code to looks like this:</p>
<blockquote><p>public class AutoWiredSource {      <br />&#160;&#160; public double MyProperty { get; set; }       <br />&#160;&#160; public double MyOtherProperty { get; set; }       <br />}</p>
</blockquote>
<p>while be fully noticeable about any change in any property and makes me able to bind to those properties.</p>
<blockquote><p>&lt;StackPanel DataContext=&quot;{Binding Source={StaticResource source}}&quot;&gt;      <br />&#160;&#160;&#160; &lt;Slider Value=&quot;{Binding Path=MyProperty}&quot; /&gt;       <br />&#160;&#160;&#160; &lt;Slider Value=&quot;{Binding Path=MyProperty}&quot; /&gt;       <br />&lt;/StackPanel&gt;</p>
</blockquote>
<p>How to achieve it? How to make compiler to replace my code with following?:</p>
<blockquote><p>private double _MyProperty;      <br />public double MyProperty {       <br />&#160;&#160; get { return _MyProperty; }       <br />&#160;&#160; set {       <br />&#160;&#160;&#160;&#160;&#160; if (value != _MyProperty) {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _MyProperty = value; OnPropertyChanged(&quot;MyProperty&quot;);       <br />&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160; }       <br />}       <br />public event PropertyChangedEventHandler PropertyChanged;       <br />internal void OnPropertyChanged(string propertyName) {       <br />&#160;&#160; if (string.IsNullOrEmpty(propertyName)) throw new ArgumentNullException(&quot;propertyName&quot;); </p>
<p>&#160;&#160; var handler = PropertyChanged as PropertyChangedEventHandler;      <br />&#160;&#160; if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));       <br />}</p>
</blockquote>
<p>Simple: to use aspect oriented programming to inject set of instructions into pre-compiled source.</p>
<p>First of all we have to build some attribute will be used for marking classes requires change tracking. This attribute should be combined (compound) aspect to include all aspects used for change tracking. All we’re doing here is to get all set methods to add composition aspect to</p>
<blockquote><p>[Serializable, DebuggerNonUserCode, AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = false, Inherited = false),      <br />MulticastAttributeUsage(MulticastTargets.Class, AllowMultiple = false, Inheritance = MulticastInheritance.None, AllowExternalAssemblies = true)]       <br />public sealed class NotifyPropertyChangedAttribute : CompoundAspect {       <br />&#160;&#160; public int AspectPriority { get; set; } </p>
<p>&#160;&#160; public override void ProvideAspects(object element, LaosReflectionAspectCollection collection) {      <br />&#160;&#160;&#160;&#160;&#160; Type targetType = (Type)element;       <br />&#160;&#160;&#160;&#160;&#160; collection.AddAspect(targetType, new PropertyChangedAspect { AspectPriority = AspectPriority });       <br />&#160;&#160;&#160;&#160;&#160; foreach (var info in targetType.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(pi =&gt; pi.GetSetMethod() != null)) {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; collection.AddAspect(info.GetSetMethod(), new NotifyPropertyChangedAspect(info.Name) { AspectPriority = AspectPriority });       <br />&#160;&#160;&#160;&#160;&#160; }       <br />&#160;&#160; }       <br />}</p>
</blockquote>
<p>Next aspect is change tracking composition aspect. Which is used for marking only</p>
<blockquote><p>[Serializable]      <br />internal sealed class PropertyChangedAspect : CompositionAspect {       <br />&#160;&#160; public override object CreateImplementationObject(InstanceBoundLaosEventArgs eventArgs) {       <br />&#160;&#160;&#160;&#160;&#160; return new PropertyChangedImpl(eventArgs.Instance);       <br />&#160;&#160; } </p>
<p>&#160;&#160; public override Type GetPublicInterface(Type containerType) {      <br />&#160;&#160;&#160;&#160;&#160; return typeof(INotifyPropertyChanged);       <br />&#160;&#160; } </p>
<p>&#160;&#160; public override CompositionAspectOptions GetOptions() {      <br />&#160;&#160;&#160;&#160;&#160; return CompositionAspectOptions.GenerateImplementationAccessor;       <br />&#160;&#160; }       <br />}</p>
</blockquote>
<p>And the next which is most interesting one, we will put onto method boundary for tracking. There are some highlights here. First we do not want to fire PropertyChanged event if the actual value did not changed, thus we’ll handle the method on it entry and on it exit for check.</p>
<blockquote><p>[Serializable]      <br />internal sealed class NotifyPropertyChangedAspect : OnMethodBoundaryAspect {       <br />&#160;&#160; private readonly string _propertyName; </p>
<p>&#160;&#160; public NotifyPropertyChangedAspect(string propertyName) {      <br />&#160;&#160;&#160;&#160;&#160; if (string.IsNullOrEmpty(propertyName)) throw new ArgumentNullException(&quot;propertyName&quot;);       <br />&#160;&#160;&#160;&#160;&#160; _propertyName = propertyName;       <br />&#160;&#160; } </p>
<p>&#160;&#160; public override void OnEntry(MethodExecutionEventArgs eventArgs) {      <br />&#160;&#160;&#160;&#160;&#160; var targetType = eventArgs.Instance.GetType();       <br />&#160;&#160;&#160;&#160;&#160; var setSetMethod = targetType.GetProperty(_propertyName);       <br />&#160;&#160;&#160;&#160;&#160; if (setSetMethod == null) throw new AccessViolationException();       <br />&#160;&#160;&#160;&#160;&#160; var oldValue = setSetMethod.GetValue(eventArgs.Instance,null);       <br />&#160;&#160;&#160;&#160;&#160; var newValue = eventArgs.GetReadOnlyArgumentArray()[0];       <br />&#160;&#160;&#160;&#160;&#160; if (oldValue == newValue) eventArgs.FlowBehavior = FlowBehavior.Return;       <br />&#160;&#160; } </p>
<p>&#160;&#160; public override void OnSuccess(MethodExecutionEventArgs eventArgs) {      <br />&#160;&#160;&#160;&#160;&#160; var instance = eventArgs.Instance as IComposed&lt;INotifyPropertyChanged&gt;;       <br />&#160;&#160;&#160;&#160;&#160; var imp = instance.GetImplementation(eventArgs.InstanceCredentials) as PropertyChangedImpl;       <br />&#160;&#160;&#160;&#160;&#160; imp.OnPropertyChanged(_propertyName);       <br />&#160;&#160; }       <br />}</p>
</blockquote>
<p>We almost done, all we have to do is to create class which implements INotifyPropertyChanged with internal method to useful call</p>
<blockquote><p>[Serializable]      <br />internal sealed class PropertyChangedImpl : INotifyPropertyChanged {       <br />&#160;&#160; private readonly object _instance; </p>
<p>&#160;&#160; public PropertyChangedImpl(object instance) {      <br />&#160;&#160;&#160;&#160;&#160; if (instance == null) throw new ArgumentNullException(&quot;instance&quot;);       <br />&#160;&#160;&#160;&#160;&#160; _instance = instance;       <br />&#160;&#160; } </p>
<p>&#160;&#160; public event PropertyChangedEventHandler PropertyChanged; </p>
<p>&#160;&#160; internal void OnPropertyChanged(string propertyName) {      <br />&#160;&#160;&#160;&#160;&#160; if (string.IsNullOrEmpty(propertyName)) throw new ArgumentNullException(&quot;propertyName&quot;); </p>
<p>&#160;&#160;&#160;&#160;&#160; var handler = PropertyChanged as PropertyChangedEventHandler;      <br />&#160;&#160;&#160;&#160;&#160; if (handler != null) handler(_instance, new PropertyChangedEventArgs(propertyName));       <br />&#160;&#160; }       <br />}</p>
</blockquote>
<p>We done. The last thing is to reference to PostSharp Laos and Public assemblies and mark compiler to use Postsharp targets (inside your project file (*.csproj)</p>
<blockquote><p>&lt;Import Project=&quot;$(MSBuildToolsPath)\Microsoft.CSharp.targets&quot; /&gt;      <br />&lt;PropertyGroup&gt;       <br />&#160; &lt;DontImportPostSharp&gt;True&lt;/DontImportPostSharp&gt;       <br />&lt;/PropertyGroup&gt;       <br />&lt;Import Project=&quot;PostSharp\PostSharp-1.5.targets&quot; /&gt;</p>
</blockquote>
<p>Now we done. We can use clear syntax like following to make all our properties has public setter to be traceable. The only disadvantage is that you’ll have to drag two Post Sharp files with your project. But after all it much more convenience than manual notify change tracking all over your project.</p>
<blockquote><p>[NotifyPropertyChanged]      <br />public class AutoWiredSource {       <br />&#160;&#160; public double MyProperty { get; set; }       <br />}</p>
</blockquote>
<p>Have a nice day and be good people. Also try to thing what other extremely useful things can be done with PostSharp (or any other aspect oriented engine)</p>
<p><a href="http://khason.net/images/2009/08/AutoPropertyChangedWiring.zip" rel="enclosure" target="_blank">Source code for this article (1,225 KB)&gt;&gt;</a></p>


<p>Related posts:<ol><li><a href='http://khason.net/dev/read-singleton-approach-in-wpf-application/' rel='bookmark' title='Permanent Link: Real singleton approach in WPF application'>Real singleton approach in WPF application</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to pass technical interview in Better Place</title>
		<link>http://khason.net/blog/how-to-pass-technical-interview-in-better-place/</link>
		<comments>http://khason.net/blog/how-to-pass-technical-interview-in-better-place/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 22:39:03 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[Better Place]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/blog/how-to-pass-technical-interview-in-better-place/</guid>
		<description><![CDATA[If you following me on Twitter, you probably know that we’re looking for developers. However those who was in interview here become a little bit shocked. It is not very standard interview for software houses. So how does it works?
Step zero – requirements and open positions
Even before somebody send us his/her resume there are requirements [...]


Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you <a href="http://twitter.com/tamir" target="_blank">following me on Twitter</a>, you probably know that we’re looking for developers. However those who was in interview here become a little bit shocked. It is not very standard interview for software houses. So how does it works?</p>
<h3>Step zero – requirements and open positions</h3>
<p>Even before somebody send us his/her resume there are requirements and open positions. Those requirements are very straight forward: “We need a developer for servers” or “we need somebody to build UI” or “we need GIS guy” etc. All open positions (at least for Israel) you can always find in <a href="http://www.betterplc.co.il/category/career" target="_blank">our local website</a>. Those days we have two open positions for our team: <a href="http://www.betterplc.co.il/default.asp?catid={6A67D492-DBC7-44ED-A7EF-B315D4493C74}&amp;details_type=1&amp;itemid={12DABDD2-DB09-4077-91CA-7B06F04E9179}" target="_blank"><strong>super-fantastic developer</strong></a> and <a href="http://www.betterplc.co.il/default.asp?catid={6A67D492-DBC7-44ED-A7EF-B315D4493C74}&amp;details_type=1&amp;itemid={1AB37274-AF15-45D8-B652-E7961574B406}" target="_blank"><strong>chronic headache reliever</strong></a>.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="work in betterplace" src="http://khason.net/images/2009/07/image.png" border="0" alt="Tal who is our real time software integration engineers, learns Hebrew and looking for new girlfriend" title="Tal who is our real time software integration engineers, learns Hebrew and looking for new girlfriend" width="592" height="434" /></p>
<p>Now a bit about candidates. I had some developers hired during my career and it always worked following way: there are only 10 kinds of developers – developers and not. It never worked for me to hire somebody just because I have to hire somebody. Also it did not worked to hire mythological “average” or “rather good” developer. So for me the segmentation here is very binary- can write code or can not.</p>
<h3>Step one – CV</h3>
<p>Somebody told me that the only chance to hire good developer via CV is if the developer is student. However, and in spite of this the very first station is HR department, they get a ton of CVs each day and filter it out by using strange and mysterious heuristics. In most of cases it works like in bad search engine – by using keywords. So my very basic requirement from our HR team, please do not filter it this way because I’m working like SEO filter with those CVs by lowering rating of “<em>multi-threaded Design Patterns</em>”, “.NET 1,1.1,1.2,1.3,2.1.2.2.3.4.3.4.5.6.5.4.3 and dot.Net Remounting for Agile Ajax(tm) Web Services”, “deep knowledge and application of MFC, GUI, WinForms, C++, C#, HASP, SQL, ADO, OOP, ODP, IRC, TCP, HDTV, AX, DX, COM, VC++, API” and “Windows 3.11, 95, ME, 98, 98 SE, 2000, NT 3, NT 4.2, 2001, XP, XP SP1, SP2, SP3, 2008, 2010, Vista SP3 and DOS”.</p>
<p>Also candidate which “<em>management responsibility for the 26 software engineers (6 teams) located at India (Bangalore). Resources allocation for $1M budget and restructuring planning based on defined priorities</em>” probably won&#8217;t be developer, but want to be finance controller, because we was able to make 26 developers (even in India) to work for $38K a year including materials, living, facilities, etc.</p>
<p>So a small tip for your CV, please write what you did (yes, it is not shame if you never heard about OOP/ODP, but knows how and when it should be <em>virtual</em> and when <em>abstract</em>).This way you’ll not waste your and your future employer time.</p>
<h4>Step two – Phone call</h4>
<p>If CV is readable and clear for me, I’m calling the person. Usually it takes under 5 minutes to invite him/her or not for frontal interview. However sometimes it can take even half an hour. I am not asking the same questions, this because it is impossible to ask the same somebody who write smart client applications and those from web planet. I almost never ask a candidate to repeat what he/she just told. The only exception is when I am not understand the answer. However when the candidate asks relevant questions it is big plus for him.</p>
<p>The general set of questions contains of three main sections: what exactly you did (even if it clear from CV), what are you looking for and whether you want to work in Better Place.</p>
<p>The phone call ends by taking one of four direction: invite for frontal interview (jump to step 3.1), invite for technical exam (jump to step 3.2), send home work to prepare (non-blocking wait for a year or two) or “we’ll be in touch” by transferring the candidate with mark “negative” to HR (end of the process). They know how to tell them.</p>
<h4>Step three point one – Frontal interview</h4>
<p>Frontal interview is usually takes between an hour and an hour and a half. It contains of general CS questions like <a href="http://khason.net/tech/brilliant-yet-simple-technical-questions-can-be-used-for-work-interview/" target="_blank">those</a>. Also question to understand whether the candidate is developer or “code-monkey” &#8211; one who does not know what the difference between scalar and vector or how to convert float to int faster then using “corporate frameworks developed by other team”. The thumb rule is simple &#8211; if each question takes more then 10 seconds to answer the candidate does not really knows the topic. In spite of this, I allow about a minute for each answer.</p>
<p>Next section is related to specific domain of the candidate. It might be architectural overview of one of his/her solutions, all he/she knows about inheritance (why, how, multiple, virtual, public, etc). Constructors/destructors/templates/generics/allocations/virtual inheritance is a next part. What is “new” and why we need it. How to cleanup remindings and how it works in real life (even if you thought that it should be done automagically). Special bonus for those who knows what interrupts and registers are and how it really works under the hood.</p>
<p>If the candidate good enough we keep going toward data structures. This includes linear/random access, hash, trees (with different colors), search vs seek vs lookup with yield return bonus. What is special about “string”. Lazy invocation vs evaluation, alloc/malloc (if relevant), lifetime.</p>
<p>If the candidate is especially good we can start speaking the target language (sometimes it’s assembler and sometimes is C# or even Python [I can speak some <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ]).</p>
<h4>Step three point two – Technical exam</h4>
<p>Sometimes, when it is not very clear whether the candidate is programmer, I’m asking for write a small program from scratch without using standard libraries. For less developer position I’m asking to find a number of bugs in real code (which includes required bugs <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). Code is different for different levels of programmers. Also in most cases a candidate can use any computer language he/she wants.</p>
<p>To prepare such exam we need to work very hard. First of all (and before it comes to candidates) we’re sending it to all developers in similar positions and asking them to do it. Then we are measuring time and multiply it by 2. Also we’re writing down all question, asked by developers and trying to fix description to answer all commons.</p>
<p>Candidate got new clean machine, empty silent room with air conditioner and can use any information sources he/she wants in order to do the exam. It can be internet, friends, books, etc. However it is not so simple as it looks. Each candidate has final time to write the program. It takes longer to find the “similar” solution and adopt, rather then do it yourself.</p>
<p>We are require three hours to finish current exam (it took about an hour to finish it for me, and hour and a half in average for the company). If the candidate finished it before the time he/she got a bonus point. If he/she wrote “almost the same code” – failed, “almost finished” or “almost works” – failed, “has not enough time” – failed, two significant bugs – failed, “the question was not clear” – failed, “did not know who to ask” – failed, etc.</p>
<p>It’s amazing how hard for some code-monkeys not to use standard libraries. Sometimes it is too hard for bad programmers to understand that not all computer languages has arrays and collections, sometimes, it’s too hard to realize that if you not really understand what inheritance is you have to write the same procedure more then once.</p>
<p>But not only the exam determinates the future of the candidate. Sometimes (in very rare cases) we’re wrong with this test and do not filter out bad programmer. It is very hard to lay out him later, but because of such person you will not finish project at time, or will do it overbudget. Thus we prefer not to hire, then to fire. This why we have additional step.</p>
<h4>Step three point three – Another interview</h4>
<p>It is very important to emphasize that we have about 0.05% of those who where at stage three point one. This interview can take upto full day. You should come ready for this. Plan and watch each of your steps. Also you should be ready to speak with number of people near flip charts, whiteboards, calculators, computers and other hardware things. Also you should be ready to assert your opinion.</p>
<p>Most of people you’ll speak with will be very smart (this is not restricted to your direct manager or future colleague only). Sometimes you’ll speak with two or three people at simultaneously. Each person will have his own very special opinion. Also the questions may wary from base calculations to mechanical and electronic schematics or references of your vehicle.</p>
<p>You can take timeout, however take into account that people speaking with your sacrificing their time and projects, so you should consider it.</p>
<h4>Step four – final</h4>
<p>If you passed all three previous steps – you can consider yourself as our future employee. There were only once, when we had not hire developer because of financial/welfare issue. This because of our stances of good developers. If you did not hire them – you and all company will loose, not the developer. Each of those will find his/her place very soon. Even if the good developer has no CV at all or he/she is a student or foreign resident. Because the only chance for this company to produce good results is to have good human resources.</p>
<h3>Send me your CV or contact me <span style="text-decoration: underline;"><span style="color: #000080; font-size: large;">tamir [AT] khason.biz</span></span> to tell that you are the one I’m looking for &gt;&gt;</h3>
<p><em>Please do not send me your CV if it passes the regex of the first step – just send a message with list of what you did for last 7 years.</em></p>


<p>Related posts:<ol><li><a href='http://khason.net/blog/windows-7-dry-run-or-how-things-should-be-done-to-correct-old-mistakes/' rel='bookmark' title='Permanent Link: Windows 7 &ndash; dry run or how things should be done to correct old mistakes'>Windows 7 &ndash; dry run or how things should be done to correct old mistakes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/how-to-pass-technical-interview-in-better-place/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Some new in-mix downloads</title>
		<link>http://khason.net/tech/some-new-in-mix-downloads/</link>
		<comments>http://khason.net/tech/some-new-in-mix-downloads/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 14:19:18 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[TECH]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://khason.net/tech/some-new-in-mix-downloads/</guid>
		<description><![CDATA[There are some very cool downloads suddenly appear on MSDN download site due to all new technologies, presented at Mix ‘09. So let’s start

Silverlight 3 SDK beta 1 
If you do not want to install full SDK, you can install only runtime for Windows or Mac. Then, you can read documentation online. You do not [...]


Related posts:<ol><li><a href='http://khason.net/tech/zone-of-pain-vs-zone-of-uselessness-or-code-analysis-with-ndepend/' rel='bookmark' title='Permanent Link: &ldquo;Zone of Pain vs. Zone of Uselessness&rdquo; or code analysis with NDepend'>&ldquo;Zone of Pain vs. Zone of Uselessness&rdquo; or code analysis with NDepend</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There are some very cool downloads suddenly appear on MSDN download site due to all new technologies, presented at Mix ‘09. So let’s start</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=d09b6ecf-9a45-4d99-b752-2a330a937bc4#tm" target="_blank">Silverlight 3 SDK beta 1</a> </li>
<li>If you do not want to install full SDK, you can install only runtime for <a href="http://go.microsoft.com/fwlink/?LinkID=143433" target="_blank">Windows</a> or <a href="http://go.microsoft.com/fwlink/?LinkID=143434" target="_blank">Mac</a>. Then, you can <a href="http://go.microsoft.com/fwlink/?LinkId=111305" target="_blank">read documentation online</a>. You do not need it, if you’re going to install </li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=11dc7151-dbd6-4e39-878f-5081863cbb5d#tm" target="_blank">Silverlight 3 tools beta 1 for VS2008 SP1</a>. After you have all this, go to <a href="http://silverlight.net/getstarted/silverlight3/default.aspx" target="_blank">the official Silverlight web site</a> and start working. </li>
<li>If you re “in” .NET RIA Services, you can <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce#tm" target="_blank">download March ‘09 preview of it</a> also to use with new Silverlight. It also makes sense to read about what is it <a href="http://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx" target="_blank">in Brad’s blog</a>. </li>
<li>Also <a href="http://silverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=20430" target="_blank">new Silverlight toolkit was released</a> with SL3 support and a bunch of new up/down controls, LayoutTransformer, Accordion and TransitioningContentControl. </li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=a04aa0ae-87be-4201-a65e-e792859122fc#tm" target="_blank">Microsoft Expression Blend 3 Preview</a>. It includes SL3 and WPF3.5 SP1 support, but excludes SketchFlow by now. </li>
</ul>
<p>To learn more about Silverlight 3.0 and Blend 3.0, you can see <a href="http://sessions.visitmix.com/MIX09/KEY01" target="_blank">first day keynotes at mix 09</a>, Rollup of <a href="http://sessions.visitmix.com/MIX09/T14F" target="_blank">what’s new in Silverlight 3</a> by <a href="http://blogs.msdn.com/jstegman/" target="_blank">Joe Stegman</a>. This includes <a href="http://sessions.visitmix.com/MIX09/T45F" target="_blank">offline mode support</a> by <a href="http://blogs.msdn.com/mharsh/" target="_blank">Mike Harsh</a>. I’ll write another separate post for this topic, due to the fact, that I’m a desktop guy, so wary about the future of WPF. </p>
<p>To learn more about how to use new Expression Blend, it worth to see <a href="http://sessions.visitmix.com/MIX09/C27M" target="_blank">this session</a> by <a href="http://blois.us/blog/" target="_blank">Pete Blois</a>. Another good sessions are also <a href="http://www.hanselman.com/blog/Mix09FirstHalfRollupAndSessionVideos.aspx" target="_blank">wrapped for you by Scott Hanselman</a>. </p>
<p>After we done with all web stuff, let’s speak about a client</p>
<ul>
<li><a href="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=f851122a-4925-4788-bc39-409644ce0f9b" target="_blank">Microsoft MultiPoint SDK</a>. Do you want to use multitouch in your application? This SDK provides you with ability to use up to 250 individual mouse devices simultaneously. And yes, it works with Windows XP SP2 too <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </li>
<li>Internet Explorer 8 for Windows <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=341c2ad5-8c3d-4347-8c03-08cdecd8852b#tm" target="_blank">XP x32</a>, <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=d044402c-84ce-472e-b3ac-9531f4feef47#tm" target="_blank">XP x64</a>, <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=79154fb4-c610-4a1e-811d-dfe0f1dd84d1&amp;displaylang=en" target="_blank">Vista x32</a>, <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=3aeda9db-b318-408a-860b-bc37bd6ab70c#tm" target="_blank">Vista x64</a> </li>
<li>In case, that you do no have Windows Vista or Windows Server 2008, you can <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=c2c27337-d4d1-4b9b-926d-86493c7da1aa#tm" target="_blank">download 30-day evaluation virtual hard disk of Windows Vista</a> or <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=86fa1bda-763b-4a1b-8e88-426228ed5c81#tm" target="_blank">Windows Server 2008 Enterprise</a> and see how it works <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </li>
<li>Also a small present for my old friends (from my <a href="http://khason.net/blog/im-leaving-consulting-field-joined-new-project-for-full-time/" target="_blank">military consulting era</a>) – <a href="http://resources.esri.com/arcgisserver/apis/silverlight/" target="_blank">WPF and Silverlight APIs for GIS engine of ESRI</a>. Have a fun!</li>
</ul>
<p>That’s all by now, going to write a review for new book and will publish it soon (probably even before, you’ll finish with all those downloads and readings). So, stay tuned and be good people.</p>


<p>Related posts:<ol><li><a href='http://khason.net/tech/zone-of-pain-vs-zone-of-uselessness-or-code-analysis-with-ndepend/' rel='bookmark' title='Permanent Link: &ldquo;Zone of Pain vs. Zone of Uselessness&rdquo; or code analysis with NDepend'>&ldquo;Zone of Pain vs. Zone of Uselessness&rdquo; or code analysis with NDepend</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/tech/some-new-in-mix-downloads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WPF Line-Of-Business labs and Silverlight vs. Flash</title>
		<link>http://khason.net/tech/wpf-line-of-business-labs-and-silverlight-vs-flash/</link>
		<comments>http://khason.net/tech/wpf-line-of-business-labs-and-silverlight-vs-flash/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 10:27:50 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[TECH]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/tech/wpf-line-of-business-labs-and-silverlight-vs-flash/</guid>
		<description><![CDATA[Small update today (mostly interesting links)… During my last “Smart Client” session I was asked about WPF LOB application development labs. So, there are two full labs, I noticed about:

Southridge, which comes from Redmond team 
Order Manager, which comes from Swiss DPE team 

Both labs include WPF ribbon and DataGrid, Southridge also come with M-VV-M [...]


Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Small update today (mostly interesting links)… During my last “<a href="http://khason.net/blog/slides-and-desks-from-smart-client-development-session/" target="_blank">Smart Client</a>” session I was asked about WPF LOB application development labs. So, there are two full labs, I noticed about:</p>
<ul>
<li><a href="http://www.codeplex.com/wpf/Wiki/View.aspx?title=Southridge%20Lab" target="_blank">Southridge</a>, which <a href="http://codeplex.com/wpf" target="_blank">comes from Redmond team</a> </li>
<li><a href="http://www.microsoft.com/switzerland/msdn/de/presentationfinder/detail.mspx?id=106160" target="_blank">Order Manager</a>, which <a href="http://blogs.msdn.com/swiss_dpe_team/archive/2009/02/18/windows-presentation-foundation-line-of-business-hands-on-lab-material.aspx" target="_blank">comes from Swiss DPE team</a> </li>
</ul>
<p>Both labs include <a href="http://www.codeplex.com/wpf/Wiki/View.aspx?title=WPF%20Ribbon%20Preview" target="_blank">WPF ribbon</a> and <a href="http://windowsclient.net/wpf/wpf35/wpf-35sp1-toolkit-datagrid-feature-walkthrough.aspx" target="_blank">DataGrid</a>, Southridge also come with <a href="http://marlongrech.wordpress.com/2008/03/20/more-than-just-mvc-for-wpf/" target="_blank">M-VV-M design</a> sample and some other interesting features. As for me, it seemed, like some parts of those labs can be easily used “as-is” for production level applications, like it was done with <a href="http://windowsclient.net/wpf/starter-kits/sce-get-started.aspx" target="_blank">SCE starter</a>, which turned into <a href="http://select.nytimes.com/gst/timesreader.html?trial=1#" target="_blank">TimesReader</a> (by the way, it has free version again). </p>
<p><img title="Line of Business Hands-On-Lab Material" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="400" alt="Line of Business Hands-On-Lab Material" src="http://khason.net/images/2009/02/image3.png" width="606" border="0" /> </p>
<p>For those, who still trying to consider what to use for their next killer app, I propose to read <a href="http://blog.webjak.net/2009/02/11/evangelising-silverlight/" target="_blank">following article</a> from Jordan, which compares between Silverlight and Flash. And then see <a href="http://msdn.microsoft.com/en-us/library/dd458809.aspx" target="_blank">composite application guidance to use Prism for Silverlight development</a>. <a href="http://channel9.msdn.com/shows/Continuum/Prismv2/" target="_blank">Here the video</a> of it usage by Adam Kinney from Channel 9</p>
<p><img title="Prism for Silverlight" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="385" alt="Prism for Silverlight" src="http://khason.net/images/2009/02/image4.png" width="573" border="0" /> </p>
<p>Have a nice day and be good people</p>


<p>Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/tech/wpf-line-of-business-labs-and-silverlight-vs-flash/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Finally I can reveal stuff I working for last half year!</title>
		<link>http://khason.net/blog/finally-i-can-reveal-stuff-i-working-for-last-half-year/</link>
		<comments>http://khason.net/blog/finally-i-can-reveal-stuff-i-working-for-last-half-year/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 17:19:39 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[My tools]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[Work process]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/blog/finally-i-can-reveal-stuff-i-working-for-last-half-year/</guid>
		<description><![CDATA[A couple of days ago WordFocus exposed one of our (frankly old   ) WPF prototypes for in-car energy assistant system, so today I can exclusively show you some of screens from this state of art WPF work. Real time performance of WPF touch screen application, running on low power automotive grade PC, which [...]


Related posts:<ol><li><a href='http://khason.net/blog/how-to-pass-technical-interview-in-better-place/' rel='bookmark' title='Permanent Link: How to pass technical interview in Better Place'>How to pass technical interview in Better Place</a></li>
<li><a href='http://khason.net/blog/book-review-c-2008-and-2005-threaded-programming/' rel='bookmark' title='Permanent Link: Book review: C# 2008 and 2005 Threaded Programming'>Book review: C# 2008 and 2005 Threaded Programming</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago <a href="http://worldfocus.org/blog/2009/02/09/israeli-company-builds-infrastructure-for-worlds-electric-cars/3977/" target="_blank">WordFocus exposed</a> one of <a href="http://www.betterplace.com/" target="_blank">our</a> (frankly old <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) <a title="See all WPF related posts" rel="tag" href="http://khason.net/tag/wpf/" target="_blank">WPF</a> prototypes for in-car energy assistant system, so today I can exclusively show you some of screens from this state of art WPF work. Real time performance of WPF touch screen application, running on low power automotive grade PC, which <a href="http://khason.net/blog/what-boots-faster-%e2%80%93-netbook-powered-windows-xp-or-nokia-e71-mobile-phone/" target="_blank">boots faster, then Nokia phone</a>. Huge respect for all developers and P-defs.</p>
<p><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Map overview" src="http://khason.net/images/2009/02/c1.jpg" border="0" alt="Map overview" width="640" height="432" /></p>
<p><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Planning screen" src="http://khason.net/images/2009/02/c2.jpg" border="0" alt="Planning screen" width="640" height="434" /> <img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Navigation draving state" src="http://khason.net/images/2009/02/c9.jpg" border="0" alt="Navigation draving state" width="640" height="430" /></p>
<p><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Applications" src="http://khason.net/images/2009/02/c6.jpg" border="0" alt="Applications" width="640" height="436" /></p>
<p>Full video report by <a href="http://worldfocus.org/" target="_blank">WorldFocus.org</a></p>


<p>Related posts:<ol><li><a href='http://khason.net/blog/how-to-pass-technical-interview-in-better-place/' rel='bookmark' title='Permanent Link: How to pass technical interview in Better Place'>How to pass technical interview in Better Place</a></li>
<li><a href='http://khason.net/blog/book-review-c-2008-and-2005-threaded-programming/' rel='bookmark' title='Permanent Link: Book review: C# 2008 and 2005 Threaded Programming'>Book review: C# 2008 and 2005 Threaded Programming</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/finally-i-can-reveal-stuff-i-working-for-last-half-year/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Slides and desks from Smart Client Development session</title>
		<link>http://khason.net/blog/slides-and-desks-from-smart-client-development-session/</link>
		<comments>http://khason.net/blog/slides-and-desks-from-smart-client-development-session/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 09:59:57 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/?p=2104</guid>
		<description><![CDATA[Great thank to everybody attended yesterday at &#8220;Smart Client development&#8221; session. As promises, please see slides and desks from this session
Smart Client Development
View more presentations from tamirk. (tags: wpf israel)



Related posts:Some new in-mix downloads



Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Great thank to everybody attended yesterday at <a href="http://khason.net/blog/action-required-smart-client-development-present-and-future/">&#8220;Smart Client development&#8221; session</a>. As promises, please see slides and desks from this session</p>
<div id="__ss_1019853" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Smart Client Development" href="http://www.slideshare.net/tamirk/smart-client-development?type=presentation">Smart Client Development</a><object width="425" height="355" data="http://static.slideshare.net/swf/ssplayer2.swf?doc=0802-smart-client-development-1234429782979672-1&amp;stripped_title=smart-client-development" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=0802-smart-client-development-1234429782979672-1&amp;stripped_title=smart-client-development" /><param name="allowfullscreen" value="true" /></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/tamirk">tamirk</a>. (tags: <a style="text-decoration:underline;" href="http://slideshare.net/tag/wpf">wpf</a> <a style="text-decoration:underline;" href="http://slideshare.net/tag/israel">israel</a>)</div>
</div>


<p>Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/slides-and-desks-from-smart-client-development-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick how to: Reduce number of colors programmatically</title>
		<link>http://khason.net/dev/quick-how-to-reduce-number-of-colors-programmatically/</link>
		<comments>http://khason.net/dev/quick-how-to-reduce-number-of-colors-programmatically/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 18:46:50 +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[DirectX]]></category>
		<category><![CDATA[Interop]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Work process]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPF crossbow]]></category>

		<guid isPermaLink="false">http://khason.net/dev/quick-how-to-reduce-number-of-colors-programmatically/</guid>
		<description><![CDATA[My colleague just asked me about how to reduce a number of colors in image programmatically. This is very simple task and contains of 43   steps:

First of all, you have to read a source image
using (var img = Image.FromFile(name)) {
var bmpEncoder = ImageCodecInfo.GetImageDecoders().FirstOrDefault(e =&#62; e.FormatID == ImageFormat.Bmp.Guid);
Then create your own encoder with certain [...]


Related posts:<ol><li><a href='http://khason.net/dev/read-singleton-approach-in-wpf-application/' rel='bookmark' title='Permanent Link: Real singleton approach in WPF application'>Real singleton approach in WPF application</a></li>
<li><a href='http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/' rel='bookmark' title='Permanent Link: INotifyPropertyChanged auto wiring or how to get rid of redundant code'>INotifyPropertyChanged auto wiring or how to get rid of redundant code</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>My colleague just asked me about how to reduce a number of colors in image programmatically. This is very simple task and contains of 43 <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  steps:</p>
<p><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Simple color matrix" src="http://khason.net/images/2009/02/image2.png" border="0" alt="Simple color matrix" width="383" height="366" /></p>
<p>First of all, you have to read a source image</p>
<blockquote><p>using (var img = Image.FromFile(name)) {<br />
var bmpEncoder = ImageCodecInfo.GetImageDecoders().FirstOrDefault(e =&gt; e.FormatID == ImageFormat.Bmp.Guid);</p></blockquote>
<p>Then create your own encoder with certain color depth (32 bits in this case)</p>
<blockquote><p>var myEncoder = System.Drawing.Imaging.Encoder.ColorDepth;<br />
var myEncoderParameter = new EncoderParameter(myEncoder, 32L);<br />
var myEncoderParameters = new EncoderParameters(1) { Param = new EncoderParameter[] { myEncoderParameter } };</p></blockquote>
<p>Then save it</p>
<blockquote><p>img.Save(name.Replace(&#8220;.png&#8221;, &#8220;.bmp&#8221;), bmpEncoder, myEncoderParameters);</p></blockquote>
<p>It it enough? Not really, because if you’re going to loose colors (by reducing color depth), it makes sense to avoid letting default WIX decoder to do this, thus you have to find nearest base colors manually. How to do this? By using simple math</p>
<blockquote><p>Color GetNearestBaseColor(Color exactColor) {<br />
Color nearestColor = Colors.Black;<br />
int cnt = baseColors.Count;<br />
for (int i = 0; i &lt; cnt; i++) {<br />
int rRed = baseColors[i].R &#8211; exactColor.R;<br />
int rGreen = baseColors[i].G &#8211; exactColor.G;<br />
int rBlue = baseColors[i].B &#8211; exactColor.B;</p>
<p>int rDistance =<br />
(rRed * rRed) +<br />
(rGreen * rGreen) +<br />
(rBlue * rBlue);<br />
if (rDistance == 0.0) {<br />
return baseColors[i];<br />
} else if (rDistance &lt; maxDistance) {<br />
maxDistance = rDistance;<br />
nearestColor = baseColors[i];<br />
}<br />
}<br />
return nearestColor;<br />
}</p></blockquote>
<p>Now, you can either change colors on base image directly</p>
<blockquote><p>unsafe {<br />
uint* pBuffer = (uint*)hMap;<br />
for (int iy = 0; iy &lt; (int)ColorMapSource.PixelHeight; ++iy)<br />
{<br />
for (int ix = 0; ix &lt; nWidth; ++ix)<br />
{<br />
Color nc = GetNearestBaseColor(pBuffer[0].FromOle());</p>
<p>pBuffer[0] &amp;= (uint)((uint)nc.A &lt;&lt; 24) | //A<br />
(uint)(nc.R &lt;&lt; 16 ) | //R<br />
(uint)(nc.G &lt;&lt; 8 ) | //G<br />
(uint)(nc.B ); //B<br />
++pBuffer;<br />
}<br />
pBuffer += nOffset;<br />
}<br />
}</p></blockquote>
<p>Or, if you’re in WPF and .NET 3.5 <a title="HLSL (Pixel shader) effects tutorial" href="http://khason.net/blog/hlsl-pixel-shader-effects-tutorial/" target="_blank">create simple pixel shader effect</a> to do it for you in hardware. Now, my colleague can do it himself in about 5 minutes <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . Have a nice day and be good people.</p>


<p>Related posts:<ol><li><a href='http://khason.net/dev/read-singleton-approach-in-wpf-application/' rel='bookmark' title='Permanent Link: Real singleton approach in WPF application'>Real singleton approach in WPF application</a></li>
<li><a href='http://khason.net/dev/inotifypropertychanged-auto-wiring-or-how-to-get-rid-of-redundant-code/' rel='bookmark' title='Permanent Link: INotifyPropertyChanged auto wiring or how to get rid of redundant code'>INotifyPropertyChanged auto wiring or how to get rid of redundant code</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/dev/quick-how-to-reduce-number-of-colors-programmatically/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bootstrapper for .NET framework version detector</title>
		<link>http://khason.net/tech/bootstrapper-for-net-framework-version-detector/</link>
		<comments>http://khason.net/tech/bootstrapper-for-net-framework-version-detector/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 17:22:26 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[TECH]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DEV]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Interop]]></category>
		<category><![CDATA[My tools]]></category>
		<category><![CDATA[promo]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[VSTS]]></category>
		<category><![CDATA[Work process]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://khason.net/tech/bootstrapper-for-net-framework-version-detector/</guid>
		<description><![CDATA[You wrote your .NET program, that can be used as stand alone portable application (such as it should be for Smart Client Apps), however you have to be sure, that necessary prerequisites (such as .NET framework) are installed on client’s machine. What to do? How to detect .NET framework version installed on target machine before [...]


Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You wrote your .NET program, that can be used as stand alone portable application (such as it should be for Smart Client Apps), however you have to be sure, that necessary prerequisites (such as .NET framework) are installed on client’s machine. What to do? How to detect .NET framework version installed on target machine before running .NET application. The answer is – to use unmanaged C++ bootstrapper, that invoke your application if correct version of framework is installed.</p>
<p><a title=".NET Framework Detector" href="http://khason.net/images/2009/02/whoooot.exe" target="_blank" rel="enclosure"><img title=".NET framework vrsion detector" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="212" alt=".NET framework vrsion detector" src="http://khason.net/images/2009/02/image.png" width="310" border="0" /></a> </p>
<p>Until now there are 15 possible .NET frameworks can be installed on client’s machine. Here the table of possible and official supported versions, <a href="http://support.microsoft.com/kb/318785" target="_blank">as appears in Q318785</a></p>
<table cellspacing="0" cellpadding="2" width="400" border="1">
<tbody>
<tr>
<td valign="top" width="200">.NET version</td>
<td valign="top" width="200">Actual version</td>
</tr>
<tr>
<td valign="top" width="200">3.5 SP1</td>
<td valign="top" width="200">3.5.30729.1</td>
</tr>
<tr>
<td valign="top" width="200">3.5</td>
<td valign="top" width="200">3.5.21022.8</td>
</tr>
<tr>
<td valign="top" width="200">3.0 SP2</td>
<td valign="top" width="200">3.0.4506.2152</td>
</tr>
<tr>
<td valign="top" width="200">3.0 SP1</td>
<td valign="top" width="200">3.0.4506.648</td>
</tr>
<tr>
<td valign="top" width="200">3.0</td>
<td valign="top" width="200">3.0.4506.30</td>
</tr>
<tr>
<td valign="top" width="200">2.0 SP2</td>
<td valign="top" width="200">2.0.50727.3053</td>
</tr>
<tr>
<td valign="top" width="200">2.0 SP1</td>
<td valign="top" width="200">2.0.50727.1433</td>
</tr>
<tr>
<td valign="top" width="200">2.0</td>
<td valign="top" width="200">2.0.50727.42</td>
</tr>
<tr>
<td valign="top" width="200">1.1 SP1</td>
<td valign="top" width="200">1.1.4322.2032</td>
</tr>
<tr>
<td valign="top" width="200">1.1 SP1 (in 32 bit version of Windows 2003)</td>
<td valign="top" width="200">1.1.4322.2300</td>
</tr>
<tr>
<td valign="top" width="200">1.1</td>
<td valign="top" width="200">1.1.4322.573</td>
</tr>
<tr>
<td valign="top" width="200">1.0 SP3</td>
<td valign="top" width="200">1.0.3705.6018</td>
</tr>
<tr>
<td valign="top" width="200">1.0 SP2</td>
<td valign="top" width="200">1.0.3705.288</td>
</tr>
<tr>
<td valign="top" width="200">1.0 SP1</td>
<td valign="top" width="200">1.0.3705.209</td>
</tr>
<tr>
<td valign="top" width="200">1.0</td>
<td valign="top" width="200">1.0.3705.0</td>
</tr>
</tbody>
</table>
<p>All of those versions are detectible by queering specific registry keys. However, in some cases, you need to load mscoree.dll and call “GETCOREVERSION” API to determine whether specific version of .NET is installed. You can read more about it <a href="http://msdn2.microsoft.com/library/ydh6b3yb.aspx" target="_blank">in MSDN</a>.</p>
<p>So it’s really simple to write small C++ application (or PowerShell applet), that queries registry and invoke your managed application. How to do this? You can either read about it in outstanding blog of <a href="http://blogs.msdn.com/astebner/archive/2009/01/31/9387659.aspx" target="_blank">Aaron Stebner</a>, who is Project Manager in XNA platform deployment team or <a href="http://khason.net/blog/action-required-smart-client-development-present-and-future/" target="_blank">attend my session next week</a> to learn do it yourself. We’ll speak about nifty ways to do it also. </p>
<p>Anyway, by now, you can use small stand alone program, I wrote a while ago, that will tell you all versions of .NET frameworks installed in target machine without any prerequisites. It can be run even from shared network location <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://khason.net/images/2009/02/whoooot.exe" target="_blank"><strong>Download whoooot.exe (13K) &gt;&gt;</strong></a></p>
<p>See you next week. </p>
<p>PS: Do not forget to <a href="http://www.codeplex.com/SnippetEditor/" target="_blank">download and install the new version</a> of <a href="http://khason.net/blog/visual-studio-snippet-designer/" target="_blank">Visual Studio Snippet Designer</a>, which is extremely useful tool by MVP <a href="http://msmvps.com/blogs/bill/" target="_blank">Bill McCarthy</a>, you’ll need it later next week…</p>
<p>Have a nice day and be good people.</p>


<p>Related posts:<ol><li><a href='http://khason.net/tech/some-new-in-mix-downloads/' rel='bookmark' title='Permanent Link: Some new in-mix downloads'>Some new in-mix downloads</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/tech/bootstrapper-for-net-framework-version-detector/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Line-Of-Business vs. Beautifulness or two dogmas comparison as exemplified by two Twitter applications</title>
		<link>http://khason.net/blog/line-of-business-vs-beautifulness-or-two-dogmas-comparison-as-exemplified-by-two-twitter-applications/</link>
		<comments>http://khason.net/blog/line-of-business-vs-beautifulness-or-two-dogmas-comparison-as-exemplified-by-two-twitter-applications/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 08:03:48 +0000</pubDate>
		<dc:creator>Tamir</dc:creator>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[blogging general]]></category>
		<category><![CDATA[blogging tools]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Windows Gadgets]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://khason.net/blog/line-of-business-vs-beautifulness-or-two-dogmas-comparison-as-exemplified-by-two-twitter-applications/</guid>
		<description><![CDATA[Today I want to speak about two dogmas: design and functional driven programming. As the example of those two approaches, I want to introduce two Twitter clients: *Chirp by thirteen23 and TwitterFox by Naan Studio
 
As you can see, *Chirp is state of art application with outstanding user interface, and well-defined usability studies. While TwitterFox [...]


Related posts:<ol><li><a href='http://khason.net/blog/book-review-c-2008-and-2005-threaded-programming/' rel='bookmark' title='Permanent Link: Book review: C# 2008 and 2005 Threaded Programming'>Book review: C# 2008 and 2005 Threaded Programming</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today I want to speak about two dogmas: design and functional driven programming. As the example of those two approaches, I want to introduce two Twitter clients: <a href="http://www.thirteen23.com/experiences/desktop/chirp/" target="_blank">*Chirp by thirteen23</a> and <a href="http://twitterfox.net/" target="_blank">TwitterFox by Naan Studio</a></p>
<p><img title="Chirp and TwitterFox comparision" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="651" alt="Chirp and TwitterFox comparision" src="http://khason.net/images/2009/01/image26.png" width="664" border="0" /> </p>
<p>As you can see, *Chirp is state of art application with outstanding user interface, and well-defined usability studies. While TwitterFox is wacky grey boring kind-of-grid only. However, you cannot judge app by only how it looks like. Let’s try to understand first what’s for you need twitter client?</p>
<h3>Defining application goals by user story</h3>
<p><a href="https://twitter.com/tamir" target="_blank">I’m using twitter</a> as quick and handy business tool to write my thought, feelings and everyday events. It is not my main (not even secondary) task during the day, so I want to be able to open, write and forget. Thus, I need an application, that can be invoked by one click and dismissed after writing. Also, I do not want background application to gasp valuable space in my screen, when not in use. Thus it should be background process with reduced workset and one textarea, to be focused when the main window become active. Also the application should hide itself when unfocus, yet be able to notify me about events without disturbing. </p>
<p>Let’s see how it done in *Chirp:</p>
<ul>
<li>140MB workset</li>
<li>No ability to hide</li>
<li>Bouncing thingy at left upper corner to disturb you – it designed as you main desktop beautifier.</li>
<li>No ability to know that new twittes arrived without showing main window</li>
<li>Twit process required to click additional button (named “Update” for some reason)</li>
<li>If you not finished typing, you can either dismiss all text of post it.</li>
<li>Strange 140 characters countdown on background absolutely esthetical, yet very disturbing.</li>
<li>You cannot type more, then 140 characters – this restricted by textbox. If pasted bigger text all additional characters truncated.</li>
<li>You need mouse to operate an application</li>
</ul>
<p>Now TwitterFox:</p>
<ul>
<li>10MB workset</li>
<li>You can hide it by hitting escape or clicking X button</li>
<li>Small and portable without disturbing elements – it not designed as your main everyday app.</li>
<li>New twits counter over small icon in browser tray, all other notifications can be disabled</li>
<li>Once focused text are become active, expanded automatically and ready to write</li>
<li>If you’re hiding it without clearing area, all un write text remains – you can clear it by one click</li>
<li>Small 140 characters countdown which is visible only when typing</li>
<li>You can type more, then 140 characters – counter becomes red, and you cannot post, however you’re able to fix, by dismissing unnecessary spaces or characters.</li>
<li>Can be operated by only keyboard.</li>
</ul>
<p><strong>Bottom line</strong>: *Chirp designed to show how good it looks, while TwitterFox to twit only. Thus for my specific user story TwitterFox won!</p>
<h3>Defining functional specifications</h3>
<p>Next task defined for Twitter is read other twits. I used to read all my following and followers when I have free minute. Sometimes I retwit things, rather often reply followers and read replies and rarely send direct messages. </p>
<p>*Chirp provides twit area without scrollbar, yet not restricted to number of twits. Other words, you can scroll with mouse wheel only or by holding somewhere inside and dragging unlimited up and down. When the mouse is over specific twit, it fades and show three buttons: reply, direct and retwit. Also each twit contains the name of the client was used (just like in regular web interface). When clicking user avatar it brings to special internal screen with last twit of the user, information and statistics about him, three functional buttons: UnFollow, Fave and Block and huge button Get User’s Tweets. When clicking the line displays the time of the twit it puts twit url into clipboard.</p>
<p>Also *Chirp contains five main functional buttons: Faves, Home, Direct, Update and Refresh. When Home tab unfocused (for example you’re on other screen), it also displays a number of new twits. </p>
<p>Error screen of *Chirp is really odd. It contains everything you not really need to know and beautiful whales moving on screen.</p>
<p><img title="WTF?" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="458" alt="WTF?" src="http://khason.net/images/2009/01/image27.png" width="305" border="0" /> </p>
<p>TwitterFox is much simpler. It contains two buttons on mouse/keyboard over – reply and fave. When clicking on user’s avatar it opens it’s page in Twitter with all necessary information. Main TwitterFox window contains three buttons: Recent, Replies, Messages.</p>
<p>No doubt, that *Chirp provides much richer functional spec, but wait, am I really need all this? I told earlier, that I used to read twits and replies, while *Chirp has no such view at all. You can easy copy twit url into clipboard, but what for? Also, you can read&#160; bio and statistics of people you following whenever you want without opening browser window. But how often you’re doing that?</p>
<p>TwitterFox concentrated on functionality – twit, read, reply, read replies (and direct messages) – base tasks , Twitter designed for. It also marks replies with contrast color in public timeline, while *Chirp has inline reply functionality with threaded discussions support (which is very odd for Twitter)</p>
<p><strong>Bottom line</strong>: *Chirp is enriched with not useful features, while TwitterFox contains only things, you’re use. Thus for my specific functional requirements TwitterFox won again!</p>
<h3>Developers vs. Designers final round</h3>
<p>So, we already understand, that *Chirp is an application, designed to show how skilled <a href="http://www.thirteen23.com/" target="_blank">thirteen23</a> designers are. And it achieved this goal. The application is state-of-art, looks and designed very well with taking into account even small details, however it huge, unusable for everyday twittering and extremely slow. This is a general example about Designers’ doctrine.</p>
<p>TwitterFox is very ugly, but concentrated on functionality, tiny and reactive. It includes only features are necessary for twittering and has no other goals. So, this is a general example about Developers’ doctrine.</p>
<p>Is it possible to messmate those doctrines? Probably it is. And it is really simple. Each one of actors should do his own work. Designers should design and Developers – develop. I spoke about it a lot during my lectures, I’ll speak about it also at <a href="http://khason.net/blog/action-required-smart-client-development-present-and-future/" target="_blank">11th February in user group meeting</a>. By now, when you know how I see Twitter, <a href="https://twitter.com/tamir" target="_blank">you can start following me</a>. Also, I’m interesting to hear your ideas about Designer-Developer intercommunication. It is not just about Microsoft way <img src='http://khason.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img title="Designer and Developer - Microsoft way" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="207" alt="Designer and Developer - Microsoft way" src="http://khason.net/images/2009/01/image28.png" width="419" border="0" /> </p>
<p>Have a nice day and be good people.</p>


<p>Related posts:<ol><li><a href='http://khason.net/blog/book-review-c-2008-and-2005-threaded-programming/' rel='bookmark' title='Permanent Link: Book review: C# 2008 and 2005 Threaded Programming'>Book review: C# 2008 and 2005 Threaded Programming</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://khason.net/blog/line-of-business-vs-beautifulness-or-two-dogmas-comparison-as-exemplified-by-two-twitter-applications/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
