<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Thoughts on Software and Computers</title>
	
	<link>http://software.tulentsev.com</link>
	<description>.NET, OO and functional programming, software reviews...</description>
	<lastBuildDate>Mon, 18 May 2009 17:15:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ThoughtsOnSoftwareAndComputers" /><feedburner:info uri="thoughtsonsoftwareandcomputers" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Intuitive behaviour</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/L5A4wCuxVP0/</link>
		<comments>http://software.tulentsev.com/2009/05/intuitive-behaviour/#comments</comments>
		<pubDate>Mon, 18 May 2009 15:19:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[RubyMine]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=176</guid>
		<description><![CDATA[Today I was looking at exception stack trace. One of suspicious places was &#8216;&#8230;\reports_controller.rb:129&#8243;. Okay, navigating to this location using RubyMine is a piece of cake. Ctrl+Shift+N to get to reports_controller.rb, then Ctrl+G to position caret at specified line. But hey, that&#8217;s two actions. I hit Ctrl+Shift+N, put &#8216;reports_controller.rb:129&#8242; in and voila! It worked just [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was looking at exception stack trace. One of suspicious places was &#8216;&#8230;\reports_controller.rb:129&#8243;. Okay, navigating to this location using RubyMine is a piece of cake. Ctrl+Shift+N to get to reports_controller.rb, then Ctrl+G to position caret at specified line. But hey, that&#8217;s two actions. I hit Ctrl+Shift+N, put &#8216;reports_controller.rb:129&#8242; in and voila! It worked just as I expected!<br />
RubyMine: +1 to intuitivity, +1 to overall impression. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=L5A4wCuxVP0:BmIkF1ty7gQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=L5A4wCuxVP0:BmIkF1ty7gQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?i=L5A4wCuxVP0:BmIkF1ty7gQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=L5A4wCuxVP0:BmIkF1ty7gQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/L5A4wCuxVP0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/05/intuitive-behaviour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/05/intuitive-behaviour/</feedburner:origLink></item>
		<item>
		<title>Advanced default parameters</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/miK4Y0Mt8o8/</link>
		<comments>http://software.tulentsev.com/2009/03/advanced-default-parametes/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 02:20:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=162</guid>
		<description><![CDATA[Today I was quite amazed by one of Ruby features. It is about default values of method parameters. For example you can do something like this:

def get_current_actions(project_id, status_id = params[:status_id] &#124;&#124; DEFAULT_STATUS_ID)
    # implementation goes here
end

The code is saying basically this: &#8220;if status_id is not passed explicitly, try to take its value [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was quite amazed by one of Ruby features. It is about default values of method parameters. For example you can do something like this:</p>
<pre class="brush: ruby">
def get_current_actions(project_id, status_id = params[:status_id] || DEFAULT_STATUS_ID)
    # implementation goes here
end
</pre>
<p>The code is saying basically this: &#8220;if status_id is not passed explicitly, try to take its value from <strong>params</strong> array. If it doesn&#8217;t contain specified key, then fall back to a constant&#8221;. This feature (as almost all the rest of Ruby magic) made avaiable by Ruby&#8217;s nature: it is interpreted language. This type of code is totally unusual to guys like me, who come from the world of static typing and compiled languages. But I think I&#8217;m gonna get used to it <img src='http://software.tulentsev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=miK4Y0Mt8o8:QMIfVUkDbog:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=miK4Y0Mt8o8:QMIfVUkDbog:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?i=miK4Y0Mt8o8:QMIfVUkDbog:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=miK4Y0Mt8o8:QMIfVUkDbog:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/miK4Y0Mt8o8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/03/advanced-default-parametes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/03/advanced-default-parametes/</feedburner:origLink></item>
		<item>
		<title>Iterations are good</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/dhJfQG07_Kk/</link>
		<comments>http://software.tulentsev.com/2009/03/iterations-are-good/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:11:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Agile]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=155</guid>
		<description><![CDATA[Iterations in software development. Tried to implement proper solution on the first try? I bet you failed. It’s like in Google Earth zooming in your house from the planet view. To achieve your goal, you&#8217;ve got to advance a little bit, adjust your position, advance further… Iterate until done.
]]></description>
			<content:encoded><![CDATA[<p>Iterations in software development. Tried to implement proper solution on the first try? I bet you failed. It’s like in Google Earth zooming in your house from the planet view. To achieve your goal, you&#8217;ve got to advance a little bit, adjust your position, advance further… Iterate until done.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=dhJfQG07_Kk:zQfiSC0pkiI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=dhJfQG07_Kk:zQfiSC0pkiI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?i=dhJfQG07_Kk:zQfiSC0pkiI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=dhJfQG07_Kk:zQfiSC0pkiI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/dhJfQG07_Kk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/03/iterations-are-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/03/iterations-are-good/</feedburner:origLink></item>
		<item>
		<title>Making more mockups</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/8YPN1mT5ZQg/</link>
		<comments>http://software.tulentsev.com/2009/03/making-more-mockups/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 19:29:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software reviews]]></category>
		<category><![CDATA[mockups]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=142</guid>
		<description><![CDATA[Today Elen, my manager, approached me and asked to make a prototype of a new functionality in our project management system. This is a reimbursement management module: employees spend some money (taxi from airport, for example), then they create requests for reimbursements and if they are lucky and management approves the requests, they get the [...]]]></description>
			<content:encoded><![CDATA[<p>Today Elen, my manager, approached me and asked to make a prototype of a new functionality in our project management system. This is a reimbursement management module: employees spend some money (taxi from airport, for example), then they create requests for reimbursements and if they are lucky and management approves the requests, they get the money back <img src='http://software.tulentsev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, prototype it is. <span id="more-142"></span>I fired up my <a title="Balsamiq Mockups for Desktop" href="http://balsamiq.com/products/mockups/desktop">Balsamiq for Desktop </a>and in under ten minutes mockups of two pages were ready. This is one of them:</p>
<p style="text-align: center;"><a href="http://software.tulentsev.com/wp-content/uploads/2009/03/manager_view.png"><img class="aligncenter size-full wp-image-144" title="manager_view" src="http://software.tulentsev.com/wp-content/uploads/2009/03/manager_view.png" alt="manager_view" width="579" height="385" /></a></p>
<p style="text-align: left;">But when I sent them to Elen, I thought that maybe she meant some real code, or HTML stubs in real system, because there was a mockup attached to her original email. Here it is:</p>
<p style="text-align: left;"><a href="http://software.tulentsev.com/wp-content/uploads/2009/03/reembolso.jpg"><img class="aligncenter size-medium wp-image-145" title="reembolso" src="http://software.tulentsev.com/wp-content/uploads/2009/03/reembolso-300x159.jpg" alt="reembolso" width="300" height="159" /></a>According to her, she made it in Paint (<strong>duh!</strong>). And it took her approximately 30 minutes to make this one, because she had to printscreen some real pages and cut pieces from them. What a tedious work! <img src='http://software.tulentsev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  And it must be a hell to modify such mockup!</p>
<p style="text-align: left;">When I told her about <a href="http://balsamiq.com/">Balsamiq Mockups</a>, she became very interested and decided to give it a try. Another happy story. Thank you, Peldi <img src='http://software.tulentsev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p style="text-align: left;">Related posts: <a href="http://software.tulentsev.com/2008/12/creating-ui-mockups-with-balsamiq/">Creating UI mockups with Balsamiq</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=8YPN1mT5ZQg:k78rgFJkhbE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=8YPN1mT5ZQg:k78rgFJkhbE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?i=8YPN1mT5ZQg:k78rgFJkhbE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?a=8YPN1mT5ZQg:k78rgFJkhbE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ThoughtsOnSoftwareAndComputers?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/8YPN1mT5ZQg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/03/making-more-mockups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/03/making-more-mockups/</feedburner:origLink></item>
		<item>
		<title>SugarCRM: More colors!</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/yUcli0aEbyU/</link>
		<comments>http://software.tulentsev.com/2009/02/sugarcrm-more-colors/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 18:24:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=120</guid>
		<description><![CDATA[When I was implementing previous issue, my manager asked me: &#8220;Can we also mark meetings with colors, corresponding to users?&#8221;. This way it becomes somewhat easier to identify originator of an event. &#8220;Yeah, it would be cool, but it can be tricky and difficult to implement&#8221;,  I said, rejecting the feature request. I said so [...]]]></description>
			<content:encoded><![CDATA[<p>When I was implementing <a title="SugarCRM: Really shared calendar" href="http://software.tulentsev.com/2009/02/sugarcrm-really-shared-calendar/">previous issue</a>, my manager asked me: &#8220;Can we also mark meetings with colors, corresponding to users?&#8221;. This way it becomes somewhat easier to identify originator of an event. &#8220;Yeah, it would be cool, but it can be tricky and difficult to implement&#8221;,  I said, rejecting the feature request. I said so just to save my ass from potentially frustrating project. Just the day before Marcelo had told me that he has a friend who was working with SugarCRM for a year and he hadn&#8217;t quite enjoyed the experience.<span id="more-120"></span></p>
<p>But later at home I was thinking about it and decided that it may not be as hard as it looks. We can divide the task into two subtasks:</p>
<ul>
<li>provide a unique color for each user</li>
<li>use this color when generating markup for an event</li>
</ul>
<p>The latter subtask was quite easy to implement, I already knew a place where the markup was generated. I was more scared by the former one. If done in &#8220;enterprisey&#8221; way, it could involve new property in User entity, new configuration screens, database alterations, etc. But there is a solution almost as good as abovementioned and much more simple. Let&#8217;s define a function that maps user name to color. md5() is a good candidate <img src='http://software.tulentsev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre class="brush: php">function get_color_by_name($name)
{
    $html_color_string = substr(md5($name), 0, 6);
    return $html_color_string;
}</pre>
<p>I also used RGB&lt;=&gt;HSV transformation functions, because I wanted to get lighter colors. Initially I wanted to highlight event&#8217;s name with the color, but it turned out that text is not always readable. I decided not to write functions that calculate good contrasting colors and put a small color rectangle instead of highlight. This rectangle is essentially a span with several &amp;nbsp; &#8217;s as a body.</p>
<p>So, final result looks like this:<a href="http://software.tulentsev.com/wp-content/uploads/2009/02/sugar_colors.png"><img class="aligncenter size-full wp-image-123" title="sugar_colors" src="http://software.tulentsev.com/wp-content/uploads/2009/02/sugar_colors.png" alt="sugar_colors" width="577" height="616" /></a></p>
<p>Here is <a title="colors.patch" href="http://software.tulentsev.com/wp-content/uploads/2009/02/colors.patch">complete patch</a> (it has too big lines to look good on this page)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=by1vvwLE"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=tiwTl5lv"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?i=tiwTl5lv" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=7KUC6JWV"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=52" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/yUcli0aEbyU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/02/sugarcrm-more-colors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/02/sugarcrm-more-colors/</feedburner:origLink></item>
		<item>
		<title>SugarCRM: really shared calendar</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/Qq1ZHKip4rs/</link>
		<comments>http://software.tulentsev.com/2009/02/sugarcrm-really-shared-calendar/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 17:42:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shared]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=108</guid>
		<description><![CDATA[SugarCRM is a decent piece of software. At least, it doesn&#8217;t look bad and source code is not as scary as it could be. However, it could have better documentation (I realized that when I was adding some custom fields to built-in entities). But this is another topic.
And today I am going to tell you [...]]]></description>
			<content:encoded><![CDATA[<p>SugarCRM is a decent piece of software. At least, it doesn&#8217;t look bad and source code is not as scary as it could be. However, it could have better documentation (I realized that when I was adding some custom fields to built-in entities). But this is another topic.</p>
<p>And today I am going to tell you about its Calendar feature. My colleagues were wishing it could be easier to share a meeting with others. Yes, sharing is theoretically (and practically) possible. All you have to do is to add selected individuals to your event and they will see it on their calendars in &#8220;Shared&#8221; section. This sounds like sensible behavior for large companies. However, for a small company like us it is more desirable to have zero-friction sharing. It will bring some informational noise (meetings that don&#8217;t really relate to certain individuals), but since we are small company, we can live with it.  So, I started looking into the sources and here are my findings. SugarCRM stores association between users and meetings (and other entities, like calls) in join tables, usually named like &#8220;meetings_users&#8221;. And it uses these tables, when showing calendar. The easiest solution for our problem (zero friction sharing) would be to take that join table out of queries and show ALL meetings. And we will do just that.<span id="more-108"></span></p>
<p>Go into &lt;sugarcrm_path&gt;/include/utils/activity_utils.php. In the beginning of the file there will be a function <em>build_related_list_by_user_id</em>. It is used by all calendar routines to extract related events. Find strings:</p>
<div style="overflow: auto">
<pre class="brush: php">$select = "SELECT {$bean-&gt;table_name}.* from {$bean-&gt;rel_users_table},{$bean-&gt;table_name} ";
$auto_where .= " {$bean-&gt;rel_users_table}.{$bean_id_name}={$bean-&gt;table_name}.id AND {$bean-&gt;rel_users_table}.user_id='{$user_id}' AND {$bean-&gt;table_name}.deleted=0 AND {$bean-&gt;rel_users_table}.deleted=0";</pre>
</div>
<p>And replace them with something like this:</p>
<div style="overflow:auto">
<pre class="brush: php">$select = '';
$auto_where = ' WHERE ';
if(!empty($where)) {
    $auto_where .= $where. ' AND ';
}

// Use a simpler query in case of meetings.
if($bean-&gt;table_name == "meetings") {
    $select = "SELECT {$bean-&gt;table_name}.* from {$bean-&gt;table_name} ";
    $auto_where .= " {$bean-&gt;table_name}.deleted=0 ";
}
else {
    $select = "SELECT {$bean-&gt;table_name}.* from {$bean-&gt;rel_users_table},{$bean-&gt;table_name} ";
    $auto_where .= " {$bean-&gt;rel_users_table}.{$bean_id_name}={$bean-&gt;table_name}.id AND {$bean-&gt;rel_users_table}.user_id='{$user_id}' AND {$bean-&gt;table_name}.deleted=0 AND {$bean-&gt;rel_users_table}.deleted=0";
}</pre>
</div>
<p>Voila! Thas was easy, wasn&#8217;t it? And here is <a title=".patch file" href="http://software.tulentsev.com/wp-content/uploads/2009/02/allmeet.patch">unified diff fil</a>e  for your convenience.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=q2FPN0lN"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=j60MmbOF"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?i=j60MmbOF" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=COrSwCIU"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=52" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/Qq1ZHKip4rs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/02/sugarcrm-really-shared-calendar/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/02/sugarcrm-really-shared-calendar/</feedburner:origLink></item>
		<item>
		<title>Unmount this drive… Please?</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/yy3aMdPnkQE/</link>
		<comments>http://software.tulentsev.com/2009/01/unmount-this-drive-please/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 13:58:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/2009/01/unmount-this-drive-please/</guid>
		<description><![CDATA[One thing I dislike in my current Vista installation is how it behaves while trying to unmount USB harddrive. I have a 320 gig external drive, which serves as a storage for my backups, torrents and videos. Also I store and run different virtual machines from it.
This morning I was about to go to the [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I dislike in my current Vista installation is how it behaves while trying to unmount USB harddrive. I have a 320 gig external drive, which serves as a storage for my backups, torrents and videos. Also I store and run different virtual machines from it.</p>
<p>This morning I was about to go to the office. I shut down <a href="http://www.utorrent.com/">µTorrent</a> and clicked &#8220;Safely remove&#8221; on my drive. &#8220;This disk cannot be removed right now. I don&#8217;t know who uses it, but someone surely is.&#8221; was the response. I tried again. The same result. Hmm, maybe some program or explorer window is indeed hanging around. I double-checked all icons on a taskbar, then running processes in Task Manager. Nothing.</p>
<p><span id="more-96"></span></p>
<p>&#8220;What&#8217;s wrong with you?&#8221;, I said to the laptop and tried once again. &#8220;Now you can safely remove the hardware&#8221;. Oh, thank you so much! Why couldn&#8217;t you do it the first time I asked you? (And this happens to me on a regular basis, daily. Sometimes, two or three times a day).</p>
<p>As a tech guy I can guess what&#8217;s happening. µTorrent opens a lot of files and it probably takes some time to close them and flush all buffers to the drive (which is not very fast, it is external tiny box). Ok, no problem with that. But couldn&#8217;t it be done synchronously? I think, Windows can easily recognize situations when some program has open file handles on the drive, or just some file buffers need to be flushed. In the latter case it could show a popup &#8220;Removing the drive, please wait&#8230;&#8221; and do its work. That would leave no space for speculations.</p>
<p>In the other case (when a program uses a disk): is it too difficult to point at the culprit? Some installers can do this. And I am pretty sure there is a 3rd party software that does this. This is pure usability issue. I hope they&#8217;ll take care of it in Windows 7.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=L7y2SOuV"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=sEFXYqxx"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?i=sEFXYqxx" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=Q966P2Xk"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=52" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/yy3aMdPnkQE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/01/unmount-this-drive-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/01/unmount-this-drive-please/</feedburner:origLink></item>
		<item>
		<title>Formatting with named parameters</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/RUF1IZPKZho/</link>
		<comments>http://software.tulentsev.com/2009/01/formatting-with-named-parameters/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 13:45:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nemerle]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[named formatting]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/?p=76</guid>
		<description><![CDATA[Problems with formatting
The &#8220;official&#8221; way to format strings in .NET BCL is to use String.Format method (and wrappers for it, like Console.Write).

This is not very reliable method. You can forget to include parameter into the format string or confuse one parameter with another. And your IDE does not offer any help here.
We want better way!
People [...]]]></description>
			<content:encoded><![CDATA[<h3>Problems with formatting</h3>
<p>The &#8220;official&#8221; way to format strings in .NET BCL is to use <a href="http://msdn.microsoft.com/en-us/library/system.string.format.aspx" target="_blank">String.Format</a> method (and wrappers for it, like <a href="http://msdn.microsoft.com/en-us/library/system.string.format.aspx" target="_blank">Console.Write</a>).</p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2009/01/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://software.tulentsev.com/wp-content/uploads/2009/01/image-thumb.png" border="0" alt="image" width="584" height="129" /></a></p>
<p>This is not very reliable method. You can forget to include parameter into the format string or confuse one parameter with another. And your IDE does not offer any help here.<span id="more-76"></span></p>
<h3>We want better way!</h3>
<p>People feel that this is not right and try to invent some more convenient methods. One of which is formatting with named parameters (using names instead of ordinals). Yesterday I read <a href="http://haacked.com/archive/2009/01/04/fun-with-named-formats-string-parsing-and-edge-cases.aspx" target="_blank">this blog post</a>. There are several implementations of formatting with named parameters and author makes more reliable and efficient implementation just for fun. But you know what? It still doesn&#8217;t seem right.</p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2009/01/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://software.tulentsev.com/wp-content/uploads/2009/01/image-thumb1.png" border="0" alt="image" width="593" height="97" /></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb397696.aspx" target="_blank">Anonymous type</a> here is supposed to protect us from renaming issue, but it clutters the code. And again, we do not get any help from IDE (warnings about non-existing elements, highlighting, etc).</p>
<h3>But how can it be done even better?</h3>
<p>Let&#8217;s look at <a href="http://en.wikipedia.org/wiki/Nemerle" target="_blank">Nemerle</a>. It borrows &#8220;spliced string&#8221; syntax from languages like PHP (&#8220;hello, $username&#8221;). But it has several advantages over PHP and Perl. All expressions are resolved and typed at compile-time. And if you use <a href="http://nemerle.org/Download" target="_blank">VS package</a>, then you&#8217;ll get development-time checks (on-the-fly) and highlighting.</p>
<p>One picture is worth a thousand words. So look at these code samples</p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2009/01/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://software.tulentsev.com/wp-content/uploads/2009/01/image-thumb2.png" border="0" alt="image" width="556" height="51" /></a></p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2009/01/image3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://software.tulentsev.com/wp-content/uploads/2009/01/image-thumb3.png" border="0" alt="image" width="547" height="107" /></a></p>
<p>Feel the difference! What can possibly go wrong here (except for <a href="http://msdn.microsoft.com/en-us/library/system.nullreferenceexception.aspx" target="_blank">NullReferenceException</a>, but <a href="http://msdn.microsoft.com/en-us/library/system.string.format.aspx" target="_blank">string.Format</a> is also vulnerable to it). Also, this code is very efficient. Essentially it is transformed to a series of <a href="http://msdn.microsoft.com/en-us/library/system.string.concat.aspx" target="_blank">string.Concat</a> or <a href="http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.append.aspx" target="_blank">StringBuilder.Append</a> calls.</p>
<p>P.S.: One more thousand-words-picture.</p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2009/01/image4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://software.tulentsev.com/wp-content/uploads/2009/01/image-thumb4.png" border="0" alt="image" width="507" height="95" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=i6JTXqum"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=PElJAHkp"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?i=PElJAHkp" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=ApuStOOJ"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=52" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/RUF1IZPKZho" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2009/01/formatting-with-named-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2009/01/formatting-with-named-parameters/</feedburner:origLink></item>
		<item>
		<title>Case sensitivity and tools</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/CbpgyX-VE88/</link>
		<comments>http://software.tulentsev.com/2008/12/case-sensitivity-and-tools/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 13:37:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/2008/12/case-sensitivity-and-tools/</guid>
		<description><![CDATA[I want to say again that decision to make identifiers case-insensitive is one of the worst design decisions a language author can make. Along with that goes &#8220;declare on first usage&#8221; decision, but more on this later.
Why is it bad? Because you either have to have proper development tools that support this decision, or assume [...]]]></description>
			<content:encoded><![CDATA[<p>I want to say again that decision to make identifiers case-insensitive is one of the worst design decisions a language author can make. Along with that goes &#8220;declare on first usage&#8221; decision, but more on this later.</p>
<p>Why is it bad? Because you either have to have proper development tools that support this decision, or assume high professionalism of the developers, letting them use conventional tools. Good professional developer will be consistent with casing of identifiers, because he sticks to some naming convention and case means something there (this is wild assumption, but I believe it is true, hehe).<span id="more-61"></span></p>
<p>Recently I had to fix some ancient program. It is written in Turbo Pascal 5. The IDE is even more useless than even Windows Notepad (can you imagine this?), that&#8217;s why I used <a href="http://notepad-plus.sourceforge.net/uk/about.php" target="_blank">Notepad++</a> to edit sources and launch compilation script.</p>
<p>In some recent versions it acquired so-called &#8220;smart highting&#8221;. This feature highlights all occurrences of a word when you select one of them. Very handy. BUT! it is case sensitive.</p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2008/12/image3.png"><img src="http://software.tulentsev.com/wp-content/uploads/2008/12/image-thumb3.png" border="0" alt="image" width="565" height="328" /></a></p>
<p>Take a look at the screenshot. You can see two occurrences of <em>valor</em> highlighted with green color, but another occurrence is not highlighted, it has different casing. This makes analysis of this source code somewhat harder.</p>
<p>Well, we could blame two sides here: lack of &#8220;case sensitivity&#8221; options for Notepad++ and this design decision of Niklaus Wirth. I tend to do the latter <img src='http://software.tulentsev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=fh0xpnAW"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=oTFB6KBZ"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?i=oTFB6KBZ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=5YPjVwnw"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=52" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/CbpgyX-VE88" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2008/12/case-sensitivity-and-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2008/12/case-sensitivity-and-tools/</feedburner:origLink></item>
		<item>
		<title>Creating UI mockups with Balsamiq</title>
		<link>http://feedproxy.google.com/~r/ThoughtsOnSoftwareAndComputers/~3/xl2RSKHIc-U/</link>
		<comments>http://software.tulentsev.com/2008/12/creating-ui-mockups-with-balsamiq/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 18:53:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software reviews]]></category>
		<category><![CDATA[mockups]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://software.tulentsev.com/2008/12/creating-ui-mockups/</guid>
		<description><![CDATA[Virtually in every project you have to do some UI mockups. I mean, if you have some methodology, you are a team and you are serious about your project.
In my past experience I have tried different ways of creating mockups:

hand-drawn pictures;
hand-drawn pictures, photographed with digital camera and inserted into requirement doc;
Visio documents (duh!);
some actual code. [...]]]></description>
			<content:encoded><![CDATA[<p>Virtually in every project you have to do some UI mockups. I mean, if you have some methodology, you are a team and you are serious about your project.</p>
<p>In my past experience I have tried different ways of creating mockups:</p>
<ol>
<li>hand-drawn pictures;
<li>hand-drawn pictures, photographed with digital camera and inserted into requirement doc;
<li>Visio documents (duh!);
<li>some actual code. </li>
</ol>
<p><span id="more-55"></span>While the last way serves some extra purposes (other than creating mockup itself), it takes a lot of time. And sometime you just need to share with others a picture you have in your head. Ways #1 and #2 serve very well, but have one <strong>major</strong> disadvantage: if you want to modify a picture, you have to redraw it from scratch (or make a mess from the original one). And yeah, Visio way does more harm than good: it takes enormous time to create a picture and then you often &#8220;forget&#8221; to update a mockup, because you don&#8217;t want to launch that app again.
</p>
<p>So, what options do we have?</p>
<p>Recently I discovered an excellent piece of software, called Balsamiq Mockups. It is simple, effective and nice looking. It requires zero learning time. For example, I tried to create something for my personal project, yet another photo gallery. And I got this mockup ready in exactly 6 minutes after I started the demo:</p>
<p><a href="http://software.tulentsev.com/wp-content/uploads/2009/01/image5.png"><img height="347" alt="image" src="http://software.tulentsev.com/wp-content/uploads/2009/01/image-thumb5.png" width="591" border="0"></a></p>
<p>Impressions: product &#8211; great, support &#8211; fast and fully satisfying, overall &#8211; have to get one.</p>
<p>Also I want to quote <a href="http://www.facebook.com/s.php?k=100000080&amp;id=1162968534">Charles William Stanton</a> here:</p>
<blockquote><p>Before, I was doing far too little GUI &#8220;prototyping&#8221; because either the results weren&#8217;t reusable or the effort took too long; now I fear I may be doing too much because it&#8217;s just that much fun.</p>
</blockquote>
<p>Go to the <a href="http://www.balsamiq.com/products/mockups" target="_blank">product web site</a> and see it for yourself.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=ndssQKeD"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=41" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=YnLhpJ8E"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?i=YnLhpJ8E" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?a=4PDCNU2q"><img src="http://feeds.feedburner.com/~f/ThoughtsOnSoftwareAndComputers?d=52" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ThoughtsOnSoftwareAndComputers/~4/xl2RSKHIc-U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://software.tulentsev.com/2008/12/creating-ui-mockups-with-balsamiq/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://software.tulentsev.com/2008/12/creating-ui-mockups-with-balsamiq/</feedburner:origLink></item>
	</channel>
</rss>
