<?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>Code Improved</title>
	<atom:link href="http://blog.codeimproved.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codeimproved.net</link>
	<description></description>
	<lastBuildDate>Mon, 23 Aug 2010 11:09:53 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Learning from your users</title>
		<link>http://blog.codeimproved.net/2010/08/learning-from-your-users/</link>
		<comments>http://blog.codeimproved.net/2010/08/learning-from-your-users/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 11:09:53 +0000</pubDate>
		<dc:creator>razvanpetru</dc:creator>
				<category><![CDATA[Peopleware]]></category>
		<category><![CDATA[Software design]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://blog.codeimproved.net/?p=145</guid>
		<description><![CDATA[A couple of months ago, I conducted usability tests and did customer training for a software project.
I didn&#8217;t reach the ideal number of users for a usability study (only four in this case), but I got plenty of interesting information from  just watching and asking questions. Looking at people while they use your software [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of months ago, I conducted usability tests and did customer training for a software project.</p>
<p>I didn&#8217;t reach the <a href="http://www.useit.com/alertbox/20000319.html" target="_blank">ideal number of users</a> for a usability study (only four in this case), but I got plenty of interesting information from  just watching and asking questions. Looking at people while they use your software is very enlightening for a software engineer.</p>
<p>What surprised me the most was that even though I took special care in designing a user friendly interface and I had a pretty good guess about the users&#8217; computer know-how, I still overestimated their ability to work with the software and missed opportunities to make things simpler. A lot of software engineers are just like me I believe, they don&#8217;t have a good grasp about what happens when someone sits down and starts working with their software.</p>
<p>The number one recommendation that I can make is: <strong>do usability testing</strong>. Odds are that you&#8217;ll have an epiphany and find many ways to improve your project. In the mean time, maybe you&#8217;ll find the following thoughts useful:</p>
<ul>
<li>In order to do usability testing you need at least one user, preferably three or more. The trick is that it has to be a real user, someone that will use/is already using/is likely to use your software. You can&#8217;t just go to Bob the tester and ask him to allow you to watch him. Sure, watching Bob will help, but you won&#8217;t get any mind-blowing insights from him; he probably has a much too similar way of thinking to you.</li>
<li>Explain to your test partners that you&#8217;re not testing them, you are testing the software and they can&#8217;t do anything wrong or somehow break the computer. This should make them feel more comfortable and allow them to be as natural as possible.</li>
<li>Tell them why they&#8217;re there, what your software does and what you hope to achieve with your test. Ask them what they think about the software at first sight.</li>
<li>Try to be general with your instructions: for instance I wouldn&#8217;t say &#8220;Let&#8217;s open the invoice window and add three items by clicking the &#8216;Add item button&#8217;.&#8221;, I would say &#8220;Let&#8217;s try to create an invoice&#8221; or &#8220;Let&#8217;s do an invoice for three widgets. How do you think we could do that?&#8221;.</li>
<li>Watch carefully. Having the users think out loud helps, but I managed fine just by telling them to stop whenever they&#8217;d like to ask me questions or point out something that grabbed their attention.  <a href="http://www.sensible.com/index.html" target="_blank"> Steve Krug</a> recommends that the session should be recorded. Pen and paper are acceptable in my experience, even if you have to stop for a few moments while you&#8217;re writing.</li>
</ul>
<p>Having done more than ten usability sessions so far, I&#8217;ve made some general notes about what works and what doesn&#8217;t when it comes to UI. I&#8217;ll publish  those in a following post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeimproved.net/2010/08/learning-from-your-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s wrong with C++</title>
		<link>http://blog.codeimproved.net/2010/07/whats-wrong-with-c/</link>
		<comments>http://blog.codeimproved.net/2010/07/whats-wrong-with-c/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 21:37:50 +0000</pubDate>
		<dc:creator>razvanpetru</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://blog.codeimproved.net/?p=202</guid>
		<description><![CDATA[&#8230;from the point of view of someone that actually uses it? The bits from my last post haven&#8217;t even dried up yet, and  another fascinating rant about C++ has popped up, this time from Zed Shaw.
What&#8217;s interesting about these rants is that the ranter isn&#8217;t really using C++. They&#8217;re C hackers, or they program [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;from the point of view of someone that actually uses it? The bits from my last post haven&#8217;t even dried up yet, and  another fascinating rant about C++ has popped up, this time from Zed Shaw.</p>
<p>What&#8217;s interesting about these rants is that the ranter isn&#8217;t really using C++. They&#8217;re C hackers, or they program mostly in Python, or they used C++ at the beginning of the 90s. So I thought it would be interesting to write about my experience with C++.</p>
<p>First, a little background info&#8230;</p>
<p>I started learning C++ about 10 years ago, first the C part and then the ++ part. Nothing serious, just toying around with small projects to learn and have fun. I didn&#8217;t use it professionally until about four and a half years ago, when I started working on a large scale C++ project. Since then I&#8217;ve used it almost daily.</p>
<p>Two and a half years ago I came across Qt almost by accident: the large scale project that I was working on was being ported to Linux and the port was enabled by Qt. Since then, I&#8217;ve used Qt almost daily too.</p>
<p>Right now I&#8217;m working on a  Qt C++ project that&#8217;s about 25KLOC in size and growing. It&#8217;s a multi-platform, threaded client-server and it&#8217;s a line of bussiness app if you&#8217;d believe it. Working on it is fun, and I&#8217;m glad that I picked Qt and C++.</p>
<p>Okay, enough with the history, what about C++ and its warts?</p>
<h3>Issues that bother me in practice</h3>
<ul>
<li>Compile times and the include dependency specification: this is a problem that every C++ programmer will have sooner or later. It can be delayed and mitigated with a <a href="http://blog.codeimproved.net/2009/03/the-large-scale-c-software-design-rules-in-practice/" target="_blank">good physical design</a>, precompiled headers and distributed compilers/linkers, but it can&#8217;t be solved without throwing away compatibility to existing code completely.</li>
<li>The small standard library: not a big issue in itself, since you can find other libraries for anything you might want to do, but it&#8217;s unpleasant to install all those libraries and make sure that they work together nicely. Using more libraries instead of a large standard library also means that you have to wait on each library vendor to port the library to different OSes/compilers, upgrade it and so on.</li>
<li>lack of reflection: I like <a href="http://doc.trolltech.com/latest/moc.html">Qt&#8217;s moc</a> and I miss it in standard C++. I also wish it had more features.</li>
<li>lack of type inference: even with typedefs I&#8217;m typing more than I have to. C++0x will thankfully fix this.</li>
<li>localization &amp; internationalization support in the standard library: the implementation is complicated and difficult to use. After browsing through <a href="http://www.angelikalanger.com/iostreams.html" target="_blank">C++ IOstreams and locales</a> I&#8217;ve decided to just use Qt and not worry about it.</li>
<li>template error messages: they&#8217;re long and hard to understand. I usually  parse a template error message in about 10-20 seconds depending on the  difficulty. The worst offenders are metaprogramming-heavy libraries such  as Boost Spirit. In that case, I try to analyze the code first and see  what might be wrong. <a href="http://www.bdsoft.com/tools/stlfilt.html">STLFilt</a> can  help.</li>
<li>functional programming support: this will get better in C++0x, but I  can&#8217;t use C++0x now, at least not on all platforms and with the other  libraries I&#8217;m using. Functors and free functions are cumbersome to use with algorithms.</li>
<li>tools and parsing: C++ has access to solid, mature tools, but those  tools are much harder to develop than for other languages and generally  don&#8217;t have as many features.</li>
</ul>
<h3>Issues that don&#8217;t bother me at all, but are regularly brought up in rants</h3>
<ul>
<li>memory management: never a problem for me. The last time I&#8217;ve had a memory leak was about two years ago and it got caught at code review. C++ has good support for memory management and good tools that can be used for runtime debugging. It might as well have GC, I wouldn&#8217;t be able to tell the  difference.</li>
<li>memory corruption: memory corruption can be both exciting and scary. Exciting because you have to go down to the memory address level and do some sleuthing, scary because it can take days or weeks to find some bugs. I usually don&#8217;t sweat these bugs, they were very rare in the code I&#8217;ve worked on, and when they occurred they were easily found. e.g: the last one I&#8217;ve solved in maybe  30 seconds, the tools have gotten very good. The worst I&#8217;ve encountered was a problem with an embedded STL in a large project that took a week to figure out and only because of my lack of experience at that time. <a href="http://www.dumpanalysis.org/">Some people</a> love debugging.</li>
<li>multi-threading: it is hard in most languages. The trick is using higher-level libraries such as QtConcurrent, Intel&#8217;s TBB or OpenMP. Sure, if you&#8217;re doing PThreads it&#8217;s going to be painful.</li>
<li>string formatting and string support: I generally don&#8217;t use iostreams or std::string, but when I did I found them acceptable. Unicode support was the biggest issue, but &#8220;there&#8217;s a <span style="text-decoration: line-through">app</span>lib for that&#8221;. Now I use Qt&#8217;s strings and streams; they&#8217;re as easy to use as Python as far as I&#8217;m concerned. Don&#8217;t want Qt? Use boost::format or any other of the nice formatting libraries.</li>
<li>templates in general: I use them when needed to break dependencies, write generic code, etc. I try to keep template code manageable, without going into the metaprogramming stuff; they are one of my favourite C++ features.</li>
<li>exception rules: I don&#8217;t see any problem with exceptions in C++ as long as you&#8217;re using RAII. Other languages (e.g.: Python) use them extensively for error handling.</li>
<li>STL &amp; Boost: I&#8217;ve used both for a lot of time and I find them very useful. Contrary to popular belief, most templates don&#8217;t use metaprogramming techniques. You don&#8217;t have to install Boost, it&#8217;s mostly headers. A large part of Boost became TR1 so it should even ship with your compiler now.</li>
<li>const: This one came from Zed, I don&#8217;t think I&#8217;ve seen that many people complain about const. Personally, I constify everything that I can, even const type* const.</li>
<li>everybody learns a different 10% of C++: strange, because I use all of it and always have. It&#8217;s not that hard either, I&#8217;m not a genius&#8230; Sane projects have coding guidelines and architectural documents. If your teammate can waltz right in with a template metaprogram or is generally macro-happy and it doesn&#8217;t raise eyebrows at code review, you have bigger problems than using C++. I&#8217;ve had to fix two C++ projects so far; my only job was to do what it takes to make the programs work and ship them to the customer. Most problems were memory leaks, superfluous use of casts, functions that didn&#8217;t compile on all platforms and so on. Fixable. What I couldn&#8217;t fix &#8211; and had to patch up as best as possible &#8211; were issues with the program logic and architecture. Those were not caused by C++.</li>
</ul>
<h3>Ok, but what about&#8230;</h3>
<p>You probably have your favourite C++ misfeatures.  Odds are that they don&#8217;t matter than much in practice, or workarounds are available. Maybe I just got used to them and consider them a C++ tax.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeimproved.net/2010/07/whats-wrong-with-c/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>The Firefox password manager is leaking information</title>
		<link>http://blog.codeimproved.net/2010/07/the-firefox-password-manager-is-leaking-information/</link>
		<comments>http://blog.codeimproved.net/2010/07/the-firefox-password-manager-is-leaking-information/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 17:20:25 +0000</pubDate>
		<dc:creator>razvanpetru</dc:creator>
				<category><![CDATA[Software design]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://blog.codeimproved.net/?p=195</guid>
		<description><![CDATA[It&#8217;s very annoying to have the master password dialog pop up every time you visit a site that has its password stored by Firefox. Let&#8217;s say that I want to browse reddit: when I open a reddit page, the master password dialog pops up. I don&#8217;t want to login, so I cancel the dialog.
Then I [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s very annoying to have the master password dialog pop up every time you visit a site that has its password stored by Firefox. Let&#8217;s say that I want to browse reddit: when I open a reddit page, the master password dialog pops up. I don&#8217;t want to login, so I cancel the dialog.</p>
<p>Then I see an interesting story and open it in a new tab. Here comes the master password dialog and it gets killed again. Now I use the new tab to surf to /r/cpp. The master password dialog cheerfully strolls into view.</p>
<p>Popping a dialog when the user selects a user name filed would be better, as it avoids leaking membership information when visiting a web site. I would also like to see this dialog redesigned &#8211; right now it&#8217;s a simple application-modal message box with an editor widget in the middle. If you have ten tabs open and you open another tab to a site that has its password stored, you won&#8217;t be able to interact with any of the tabs until you either enter the master password or dismiss the master password dialog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeimproved.net/2010/07/the-firefox-password-manager-is-leaking-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ is thriving in 2010</title>
		<link>http://blog.codeimproved.net/2010/06/c-is-thriving-in-2010/</link>
		<comments>http://blog.codeimproved.net/2010/06/c-is-thriving-in-2010/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 16:11:33 +0000</pubDate>
		<dc:creator>razvanpetru</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://blog.codeimproved.net/?p=191</guid>
		<description><![CDATA[Another Linus Torvalds C++ post is making the rounds on the interwebs. Open any site like reddit or Hacker News and you&#8217;re bound to find someone cursing at C++.
Despite them &#8211; in the real world &#8211; more people are using C++ and the language  itself is getting better:

Compiler and tool support is better than [...]]]></description>
			<content:encoded><![CDATA[<p>Another Linus Torvalds C++ post is making the rounds on the interwebs. Open any site like reddit or Hacker News and you&#8217;re bound to find someone cursing at C++.</p>
<p>Despite them &#8211; in the real world &#8211; more people are using C++ and the language  itself is getting better:</p>
<ul>
<li>Compiler and tool support is better than ever.</li>
<li>The C++0x FC draft is out, and the big C++ compilers already implement a significant part of it. It brings a larger standard library, better performance, more functional programming, easier syntax for some operations and improves the type system.</li>
<li>With Qt, C++ has access to the equivalent of the .NET libraries or the Java class library. Free and open source.</li>
<li>It&#8217;s available on even more platforms: Symbian and Maemo/MeeGo, and even Android or iPhone.</li>
</ul>
<p>C++&#8217;ers gonna C++ and haters gonna hate&#8230; :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeimproved.net/2010/06/c-is-thriving-in-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: blog.codeimproved.net @ 2010-09-07 14:32:14 -->