<?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>blinnov's blog</title>
	<atom:link href="http://www.blinnov.com/feed/en/" rel="self" type="application/rss+xml" />
	<link>http://www.blinnov.com</link>
	<description>another brilliant mind poisoned by c++</description>
	<lastBuildDate>Sun, 29 Jan 2012 15:09:44 +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>Would you mind getting real or why online С++ tests suck</title>
		<link>http://www.blinnov.com/2010/10/27/would-you-mind-getting-real-or-why-online-%d0%a1-tests-suck/en/</link>
		<comments>http://www.blinnov.com/2010/10/27/would-you-mind-getting-real-or-why-online-%d0%a1-tests-suck/en/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 14:54:04 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Software design]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[interviews]]></category>
		<category><![CDATA[job]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/?p=1177</guid>
		<description><![CDATA[Dear Madam/Sir,
I appreciate you going into the trouble actually visiting this page.  This post represents this blog owner&#8217;s point of view on so-called &#8220;Online C++ tests&#8221; that are used by recruitment agents to select candidates and explains why its author does not take any of these tests anymore. The sole purpose of the post is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left; font-size: x-small;">Dear Madam/Sir,</p>
<p style="text-align: left; font-size: x-small;">I appreciate you going into the trouble actually visiting this page.  This post represents this blog owner&#8217;s point of view on so-called &#8220;Online C++ tests&#8221; that are used by recruitment agents to select candidates and explains why its author does not take any of these tests anymore. The sole purpose of the post is to be referred to when he is asked to sit one of these to save him the time explaining his position on this issue over and over again. By writing this post, the author did not intend to insult anyone nor pay revenge of any kind to anyone.</p>
<p>Almost every good software developer can find themselves discussing a new exciting career™ opportunity with the potential employer or their agent. Nine from ten, the candidate will be asked to sit a test. A very easy one, should not be too much trouble, person of such experience will not have any problems completing it in no time, they are told. And this is what is terribly wrong about it. You will have problems. No matter how good you are.</p>
<p>I agree that some initial screening may be required. For example, company needs a junior software developer and they need to be sure that candidates understand basic concepts of certain programming language. In this case test will help. It simply must be <em>well prepared, 100% accurate, 100% correct, 100% meaningful</em> and also short, if not too much trouble. The problem is that most of the tests out there don&#8217;t have any of this characteristics. The bigger problem is that they are usually put together by those who have never worked in the software development. And the killer problem is that these tests are filled with inconsistencies, discrepancies or simply full of errors (I wanted to use more colorful language here, but this post is going to be a part of my CV, so I better don&#8217;t).</p>
<p>About a year ago I was asked to sit an online C++ test.  I had no objections then. I also was interested in the position. The first question was quite obvious. The second had 4 answers and three of them were correct, but according to the question, only one of them was supposed to be correct. I lost all the interest momentarily. I wanted to stop it right then, but I decided to continue. I don&#8217;t regret. At least, now I have the proof how bad these tests are . That&#8217;s what question number 4 was:</p>
<p><span id="more-1177"></span></p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1184" title="C++ test - question is incorrect" src="http://www.blinnov.com/wp-content/plugins/image-shadow/cache/1ed293764c9372f59bcec0e790535302.jpg" alt="" width="620" height="517" /></p>
<p style="text-align: left;">Anyone who knows C++ will see immediately that everything here is totally screwed. At first, Box::returnpointer() returns <em>reference</em>. But the question is &#8220;how to return the address&#8221;, which means <em>pointer</em>. I don&#8217;t know how this rubbish got into the test and I don&#8217;t really care, the fact is that the person who really knows C++ will never ever mistake reference for pointer and vice versa. The question makes no sense nor any of the answers is correct.</p>
<p style="text-align: left;">The next question brought me a joy of guessing what did they really had in mind. The question that came after that, was a masterpiece. Obviously, somebody simply copied and paste the code directly into HTML, so all template definitions simply disappeared.</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1186" title="C++ tests suck" src="http://www.blinnov.com/wp-content/plugins/image-shadow/cache/edf481649b87db4e8dd0a7f1c54a0e5c.jpg" alt="" width="620" height="451" /></p>
<p style="text-align: left;">It&#8217;s so screwed I don&#8217;t even want to explain anything. Of course, this is a technical error, but what I was supposed to do? Made a guess? Click randomly? Thank you very much, If I wanted to gamble, I&#8217;d go and play pokies.</p>
<p class="brush:cpp">In fact, I did a nice thing. I took those pictures, randomly clicked through the rest of questions (what was the point answering if the test was already compromised?), expectantly failing it. Then I went into the trouble of putting a big email together with those &#8220;screen shots&#8221; and detailed explanations what was wrong with the test. Surprisingly enough, I was invited to an interview, but at the end of the day it did not work out, but it is an entirely different story.</p>
<p style="text-align: left;">You may disagree with me &#8211; there are a lot of tests that are checked thoroughly. And you will be correct, well known Brainbench tests don&#8217;t usually have stuff-ups like above in them. But they are still stuffed, just in different way. They are still made by people who obviously don&#8217;t quite understand what software engineer job is about, and half of questions have no relations to how programming language is used in the real life. The second half of Brainbench questions are &#8220;find what&#8217;s wrong with this piece of shit code&#8221;. As a developer, I have to deal with not-so-great code on a regular basis, but what you&#8217;ll see in BB tests is beyond any reasonable limits. When commercial software is considered, such code just does not get checked in into the repository. The code review simply stops at the sight of it and the author gets a chance to get rid of it. To top it off, BB has a bad habit of giving code snippets in images. In which code is printed using proportional font. Like this:</p>
<p style="font-family: times;">int z= (*(pPtr))(i+m/k);</p>
<p style="text-align: left;">In programming, any single symbol matters. That&#8217;s why all programming IDEs use monospace fonts:</p>
<pre class="brush:cpp">int z= (*(pPtr))(i+m/k);</pre>
<p>The first snippet is much harder to read. Also, it is not the case of &#8220;it is just the test, it worth the effort, so stop bitching and read the bloody code&#8221;. It does not worth the effort. In the industry, only monospace fonts are used for the code. Every symbol matters, therefore all symbols must be of exactly the same width. To read the code the is printed in proportional font, you really have to look so hard it hurts.</p>
<p>I should also mention meaningless questions. Such as when you are asked something like &#8220;what is the standard name for basic_filebuf&lt;char&gt;&#8221;. No C++ guru will be able to answer this, except by accident. As it is not something you have to remember to be a C++ programmer. And chances are, you&#8217;ll never have deal with that basic_filebuf template.</p>
<p>There also is another type of questions that their authors tried used to evaluate something completely irrelevant. For example, some time ago I did that BB test and I was asked the question above. It was the only question (of 40) that had any C++ templates in them. At the end of the test I was told that I did not have enough competence in templates. How could they figure this out I don&#8217;t know? Trust me, I know C++ templates. My colleagues sometimes tell me I know them a little bit too well.</p>
<p>I could go for ages (I did not even mention virtual inheritance questions yet!), but I think I have already said enough. It&#8217;s time to summarize.</p>
<p>Imagine yourself in my shoes. You are not a graduate. You are a professional that uses this programming language since you can&#8217;t even remember when. You speak that language. You know its tricks. You know its best practices. And you are required to take a test, which:</p>
<ul>
<li>Created by people that are far less competent then you are</li>
<li>Created by people that, probably, never worked in software development</li>
<li>Has no relation to the real job you are doing <em>now</em></li>
<li>Is unrelated to what you will be doing on <em>that </em>job</li>
<li>Is inconclusive</li>
<li>Contains errors in either questions or answers. Or both</li>
<li>Has bugs in implementation</li>
</ul>
<p>All it means that you have pretty good chances of failing this test, no matter how brilliant you are. Simply because you click on the answer that you know is correct, but test thought it was incorrect.</p>
<p>Your time is wasted, and your application is marked &#8220;incompetent in C++&#8221;. And this mark is set by someone who doesn&#8217;t event know the difference between a reference and a pointer! And, in most cases, you have no chances to prove your innocence, because nobody listens to you.</p>
<p>I can&#8217;t speak up for everyone, but I don&#8217;t want to risk my reputation in that way. I don&#8217;t want to watch my experience and my knowledge being flushed down the toilet. This is why I don&#8217;t take any online tests.</p>
<p>If you are an agent who get here by the link in my resume, please note: if sitting such test is your requirement or your customer requires it, I will not be interested. I know my business. The software I developed works in a lot of places. It is unlikely that you will ever notice  it, but you have pretty good chances of being served by some of the systems I build. I won&#8217;t name them here (you have my resume, it is all there). I am not afraid of challenge. I love challenge. I desire challenges. That&#8217;s what I love most in my work. But the test that you are likely to offer is not a challenge. It&#8217;s a Russian roulette. And I won&#8217;t play it. Chances of losing playing it do not depend on how good I am, and I do not take such risks. I better lose this exciting opportunity this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2010/10/27/would-you-mind-getting-real-or-why-online-%d0%a1-tests-suck/en/feed/en/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>\Microsoft was unexpected at this time</title>
		<link>http://www.blinnov.com/2010/06/04/microsoft-was-unexpected-at-this-time/en/</link>
		<comments>http://www.blinnov.com/2010/06/04/microsoft-was-unexpected-at-this-time/en/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:10:05 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/?p=933</guid>
		<description><![CDATA[I just spent two days tracking this problem down.
I received my new development machine with Windows7 x64 only a week ago. It all was just pefect &#8211; quad core CPU could compile the world in almost no time, and brand new Visual Studio 2010 was just as good as it gets. By the way, I [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent two days tracking this problem down.</p>
<p>I received my new development machine with Windows7 x64 only a week ago. It all was just pefect &#8211; quad core CPU could compile the world in almost no time, and brand new Visual Studio 2010 was just as good as it gets. By the way, I am the Linux guy and prefer vim, automake and gcc any other IDE, so if I call Visual Studio perfect, it means something.</p>
<p>Neverthless, everything good has an end. Yesterday I tried to build bcp.exe tool I needed to dissect boost, and I faced very nasty and very unclear problem. I simply could not. Every time I started the build process, it would fail with the most weird message I ever seen:</p>
<blockquote><p>\Microsoft was unexpected at this time</p></blockquote>
<p>Well, I mentioned I am the Linux guy, but I am not a religious fanatic. I just thought that there was a problem of some sort in the boost&#8217;s build script and used another machine to build bcp.</p>
<p>Next day I became really concerned. I realized that I could not use &#8220;Visual Studio Prompt&#8221; from VS 2010 and VS 2008. Every time I tried to start them, they would have that message about unexpected microsoft on them; and environment variables were not set. So I could not build anything! Sadly, this was rather a major problem for me as we had quite a few makefile projects and not being able to set the correct environment for build process was that kind of present I could happily live without.</p>
<p>I spent next four hours to find that this or similar problem was already mentioned several times; but nobody offered a solution that would work and nobody explained what was causing that. Some said that Windows SDK installation <a href="http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/ccb680b7-d205-4f39-b2a2-a4cf1de91e1c/">could break</a> the batch file vcvars32.bat; some thought there was a bug in the batch file itself. Strangely,  it all worked perfectly on the the neighbor&#8217;s machine. I even compared the files and found no difference at all.</p>
<p>The solution came at the end of the day when all my hopes were gone. <a href="http://weblogs.sqlteam.com/mladenp/archive/2008/05/28/Serious-Visual-Studio-2008-install-bug-that-can-break-your.aspx">One guy mentioned</a> that the problem was caused by the parentheses in vcvars32.bat:</p>
<pre class="brush:shell">@if not "%WindowsSdkDir%" == "" (
	@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"
	@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
	@set "LIB=%WindowsSdkDir%lib;%LIB%"
)
</pre>
<p>He mentioned that as he found out, one of the directories where SDK was had braces in the name as well, and that broke the statement above completely as batch processor would find nested parentheses in the folder&#8217;s name and consider them as the end of the statement.</p>
<p>Needless to mention, may machine had some paths that had braces in them. C:\Program Files (x86). And, needless to mention, it is exactly where Visual Studio is installed. And it also exists in %PATH% environment variable.</p>
<p>By itself, it does not break the script. As I mentioned, it worked perfectly on the other machine which was the biological twin of my PC. But, what if one of the PATH&#8217;s members is encolsed in double quotes? (to check how your PATH looks like, type echo %PATH% in command prompt). I checked and that&#8217;s what I found:</p>
<pre class="brush:shell">c:\winutils;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
c:\Program Files (x86)Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
<strong>"C:\Program Files (x86)Microsoft Visual Studio 9.0\Common7\IDE\"</strong>;
C:\Program Files (x86)Microsoft Team Foundation Server 2010 Power Tools\;
C:\Program Files (x86)Microsoft Team Foundation Server 2010 Power Tools\Best Practices Analyzer\;
c:\cygwin\bin
</pre>
<p>Bingo! I found that one entry of PATH was indeed enclosed in double quotes. And, not surprisingly, it had that nasty (x86) in it. It was pointing somewhere inside VS 2008 installation tree, so I think one of VS 2008 tools I have installed recently indeed screwed this up.</p>
<p>So, I simply removed those double quotes. Immediately after that, both VS 2010 and VS 2008 command prompts were fixed.</p>
<p><strong>So, the fist thing you should do if you&#8217;re having the same problem: look at your %PATH% environment variable and check if anything is enclosed in double quotes.</strong></p>
<p>Finding this just cost me two days of work, and I hope it it helps you sorting it out much faster.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 39px; width: 1px; height: 1px; overflow: hidden;">\<em>Microsoft was unexpected at this time</em></div>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2010/06/04/microsoft-was-unexpected-at-this-time/en/feed/en/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Plenty of rocks, not so much water</title>
		<link>http://www.blinnov.com/2010/05/31/plenty-of-rocks-not-so-much-water/en/</link>
		<comments>http://www.blinnov.com/2010/05/31/plenty-of-rocks-not-so-much-water/en/#comments</comments>
		<pubDate>Mon, 31 May 2010 14:44:04 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[Australia]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Central Coast]]></category>
		<category><![CDATA[photo]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/?p=915</guid>
		<description><![CDATA[Somersby falls in autumn ]]></description>
			<content:encoded><![CDATA[<p>I was hoping there would be more water in Somersby falls.</p>
<p>But this is nice anyway</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-912" title="Somersby falls" src="http://www.blinnov.com/wp-content/plugins/image-shadow/cache/813f782de0a28008c0935217b8d66f4f.jpg" alt="Somersby falls" width="620" height="418" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2010/05/31/plenty-of-rocks-not-so-much-water/en/feed/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010: Not so nice improvements in TR1</title>
		<link>http://www.blinnov.com/2010/05/30/visual-studio-2010-not-so-nice-improvements-in-tr1/en/</link>
		<comments>http://www.blinnov.com/2010/05/30/visual-studio-2010-not-so-nice-improvements-in-tr1/en/#comments</comments>
		<pubDate>Sun, 30 May 2010 09:48:14 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/?p=881</guid>
		<description><![CDATA[Just moments after installing VS 2010 I found very nasty bug in its implementation of TR1 libraries:
            typedef struct sTestStruct
            {
             [...]]]></description>
			<content:encoded><![CDATA[<p>Just moments after installing VS 2010 I found very nasty bug in its implementation of TR1 libraries:</p>
<pre class="brush:cpp">            typedef struct sTestStruct
            {
                char* pName;
                char* pOtherName;
                sTestStruct* pNext;
            } sTestStruct;

            sTestStruct Struct1 = {"blah", "mlah", 0};

            char* pChar = bind(&amp;sTestStruct::pName, _1)(&amp;Struct1);            // Compiler is happy here

            bind(_stricmp, "blah", bind(&amp;sTestStruct::pName, _1))(&amp;Struct1);  // bang happens here</pre>
<p>The error message is simply astonishing:</p>
<blockquote><p><span><span style="font-size: x-small;">\microsoft visual studio 10.0\vc\include\functional(447):  error C2440: &#8216;return&#8217; : cannot convert from &#8216;char *&#8217; to &#8216;char *&amp;&#8217;</span></span></p></blockquote>
<p>What is interesting, should I switch C++ toolset to version 9.0 (essentially switching back to VS 2008), the problem went away.</p>
<p>If I could I would suggest that something went horribly wrong when MS were working on rvalues (or were they lvalues?) references business, but there is simply no point guessing around. I just wonder how long will it take MS to fix the problem. Obviously, problems like this could mean that this new version of VS 2010 is not ready to be used in production yet.</p>
<p>Also, reporting bugs to MS has always been not so easy quest.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2010/05/30/visual-studio-2010-not-so-nice-improvements-in-tr1/en/feed/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use boost to implement inter-class callbacks or delegates</title>
		<link>http://www.blinnov.com/2010/04/23/use-boost-to-implement-inter-class-callbacks-or-delegates/en/</link>
		<comments>http://www.blinnov.com/2010/04/23/use-boost-to-implement-inter-class-callbacks-or-delegates/en/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 07:57:01 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[Software design]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/?p=799</guid>
		<description><![CDATA[In the software development, the pattern when one object has send a message to another object, where the object that has to be called is given to the first class somehow (usually in constructor), is quite common. In C#, the delegates serve exactly this purpose, but in C++ it is a different story.
The most common [...]]]></description>
			<content:encoded><![CDATA[<p>In the software development, the pattern when one object has send a message to another object, where the object that has to be called is given to the first class somehow (usually in constructor), is quite common. In C#, the delegates serve exactly this purpose, but in C++ it is a different story.</p>
<p>The most common way of implementing the class-to-class callback in C++ is to define an interface, which the class that receives the event must implement:</p>
<pre name="code" class="c++">class IInterface
{
public:
virtual void CallbackMethod() = 0;
}

class MyClass:
public IInterface
{
public:
virtual void CallbackMethod()
{
// do something useful
}

class Publisher
{
private:
IInterface* m_pCallee;
public:
Publisher(IInterface* pCallee):
m_pCallee(pCallee)
{
}

private:
void SomeMethod()
{
m_pCallee-&gt;CallbackMethod();
}
}
}</pre>
<p>It isn&#8217;t exactly rocket science, but this method has some downsides, and some of them are quite nasty and not obvious at all. Those are:</p>
<ul>
<li>You may need to define a new interface every time you need a callback function with new signature. Could partly be solved by making the interface class template</li>
<li>Each class that interested in callbacks needs to implement corresponding interface(s)</li>
<li>In some situations you may end up with a single object that can receive callbacks from many different publishers.</li>
</ul>
<p>The last one could make you wish you never become a software programmer. The architecture, which seemed so beautiful just moments before, starts to fall into pieces once you find yourself in situation when you realize that your class-subscriber needs to receive same callbacks from different sources and act differently depending on who the caller is.</p>
<p>Let me explain it on the example. Imagine you have a class that implements that callback interface. You also have a lot of providers that take that interface to inform the subscribers, for example, about quote changes. But in your class, you need to track changes on, say, 10 quotes, and depending on which of those 10 changes, take different actions. So, what &#8217;s your options?</p>
<p>Of course,  you could just add an additional  parameter to callback method that  specifies the sender, but it is not pretty at all, as the subscriber class now faces a new challenge of keeping track of all publishers it is subscribed too. Not mentioning the mess in the callback method needed to get all stuff to work!</p>
<p>Ideally, you want each of those providers to call different methods of your subscriber class, but in a general case it would mean 10 different interfaces and changes in all publishers, which may not be possible and I don&#8217;t even want to talk about it. The other option would be to write the proxy, which implements the basic callback interface, subscribes to the only provider and then re-routes the call to certain method on your class.</p>
<p>Thankfully, there is the far better option. boost::bind and boost::function are here to help.</p>
<pre name="code" class="c++">class Publisher{
public:
typedef boost::function&lt;void (int)&gt; typeCallbackType;

void Subscribe(typeCallbackType cb)
{
m_cb = cb;
}

private:
typeCallbackType m_cb;

void SomeDataProcessingMethod()
{
// ....
m_cb(currentPrice);
}

}</pre>
<p>And here is a good thing: your subscriber class does not have to implement any custom interface anymore:</p>
<pre name="code" class="c++">class MySubscriber
{
public:
void CalledWhenPriceChanges(int newPrice)
{
// make profit here
}
}</pre>
<p>to establish a subscription, simply use boost::bind:</p>
<pre name="code" class="c++">Publisher* pPublisher = GetPublisherFor("someTicker");
MySubscriber Subscriber;

pPublisher-&gt;Subscribe(boost::bind(&amp;MySubscriber::CalledWhenPriceChanges, &amp;Subscriber, _1));</pre>
<p>That&#8217;s all, folks!</p>
<p>Now, once the pPublisher has a new data, a CalledWhenPriceChanged() method of Subscriber instance of a class MySubscriber will be called. It is easy to see how additional publisher could be added if you want to monitor two tickers.</p>
<p>It would not only help solving the problem of multiple publishers-one subscriber. This approach will also do a great job saving you time from not having to define numbers of callback interfaces for different types of data that needs to be passed from publisher to subscriber.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2010/04/23/use-boost-to-implement-inter-class-callbacks-or-delegates/en/feed/en/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Petrol tanker on F3: epic FAIL</title>
		<link>http://www.blinnov.com/2010/04/13/petrol-tanker-on-f3-epic-fail/en/</link>
		<comments>http://www.blinnov.com/2010/04/13/petrol-tanker-on-f3-epic-fail/en/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 01:04:38 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[Australia]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Central Coast]]></category>
		<category><![CDATA[goverment]]></category>
		<category><![CDATA[sux]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/?p=756</guid>
		<description><![CDATA[I am officially pissed off.
Did not think that I will ever go on the wrong side on a freeway. Driving on the opposite site of F3 isn&#8217;t clearly the best way to get to feel yourself like being in Europe. In any case, the way officials handled the accident wasn&#8217;t quite European too.
I left Gordon [...]]]></description>
			<content:encoded><![CDATA[<p>I am officially pissed off.</p>
<p>Did not think that I will ever go on the wrong side on a freeway. Driving on the opposite site of F3 isn&#8217;t clearly the best way to get to feel yourself like being in Europe. In any case, the way officials handled the accident wasn&#8217;t quite European too.</p>
<p>I left Gordon yesterday at 10:00 pm  only to hit the tail of the most giant traffic queue I ever seen at 10:15. And, I am sure, traffic just started to barely move then. There were plenty of cars with people sleeping in them at the side of the road &#8211; they obviously decided not to bother for some more hours.</p>
<p>An guess what? Today&#8217;s morning TV news only said that contra-flow was implemented &#8220;several hours later&#8221;. Please note &#8211; it is the true, but there is a catch. This truth is short of some interesting details like while accident happened before noon, the contra-flow was opened only at 8:30 pm. And it was the working Monday. And all peak-hour traffic was in standstill for I don&#8217;t even want to know how many hours. See the difference? Most online news sites were citing the same bullshit, at least in the morning. Like nothing serious happened, just a bit of slow traffic on one local country road. Now, when shit finally hit the fan, they all screaming loud that &#8220;<a href="http://www.smh.com.au/nsw/blame-game-begins-over-f3-traffic-chaos-20100413-s4np.html">blame game has started</a>&#8220;. Good timing, guys!</p>
<p>So, the F3 was still pretty much the carpark 10 hours after the accident. I would call it &#8220;<strong>The </strong>incompetence&#8221;. Obviously, someone also just did not want to take a decision.</p>
<p>What should have been done? I reckon, after an hour or two when it became obvious that there is no way they could move the tanker without unloading it, they should have left it alone for time being. I assume, the tanker itself was safe, but in today&#8217;s &#8220;news&#8221; they said there actually <a href="http://www.dailytelegraph.com.au/news/more-traffic-choas-on-the-f3/story-e6freuy9-1225852952915">was a small leak</a>!  The peak hour was approaching, and with huge delays already in place, opening the freeway for traffic should be their priority number one. They should have isolated the accident,  put temporary barriers and open as many lines as possible (according to photos, the tanker was only taking one line!), just to let people trough.  Also, the contra-flow had to be operational at 3:00pm the latest!</p>
<p>That would not only help bringing people home, it would also leave them with the whole night to do whatever they were going to do to remove the tanker without having thousands of angry and tired motorists around.</p>
<p>Why it did not happen &#8211; I don&#8217;t know yet. But, mind you, every incident has the first name and the last name.</p>
<p>P.S. I wonder if everyone who lost money because of the accident (late childcare fees,  extra petrol, you name it) should send the invoices to the RTA.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2010/04/13/petrol-tanker-on-f3-epic-fail/en/feed/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Linux. No DMA on CD/DVD drive</title>
		<link>http://www.blinnov.com/2009/08/01/ubuntu-linux-no-dma-on-cddvd-drive/en/</link>
		<comments>http://www.blinnov.com/2009/08/01/ubuntu-linux-no-dma-on-cddvd-drive/en/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 15:46:29 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/2009/08/01/ubuntu-linux-no-dma-on-cddvd-drive/ru/</guid>
		<description><![CDATA[Some time ago I built myself home media center on MythBuntu 8.04. It works exceptionally well&#8230; well, with one exception, if I may be excused. I could not watch my absolutely legally purchased DVDs at all &#8211; playback was choppy and jumpy, making watching movies anything but enjoyable.
If you found this post on google, you, [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I built myself home media center on MythBuntu 8.04. It works exceptionally well&#8230; well, with one exception, if I may be excused. I could not watch my absolutely legally purchased DVDs at all &#8211; playback was choppy and jumpy, making watching movies anything but enjoyable.</p>
<p>If you found this post on google, you, probably, are about to give up. I was too. But I found a solution that worked for me. So, if you, like me, have seen zillions of webpages discussing the problem but none of solutions worked for you, keep reading (and please comment if this post helps you to solve your problem).</p>
<p>So the problem was that CD or DVD driver has no DMA enabled and hdparm would report an error:</p>
<pre> HDIO_SET_DMA failed: Operation not permitted</pre>
<p>when trying to enable DMA.</p>
<p>I have Intel-based HP desktop with SATA HDD and IDE DVD combo drive. No problem with HDD, but DVD got stuck in PIO mode and hdparm is no help anymore. I have modules ata_piix and libata loaded.</p>
<p>After scanning though many discussions and FAQs, I finally <a href="http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux#No_DMA_on_DVD_drive">found the most accurate description</a> of the problem that offered a way to fix it. So I did exactly what they told:</p>
<pre># echo options libata atapi_enabled=1&gt;/etc/modprobe.d/atapienable
# update-initramfs -u</pre>
<p>and added</p>
<pre>combined_mode=libata</pre>
<p>option to kernel line in grub&#8217;s menu.lst</p>
<p>After reboot DVD drive was finally in UDMA mode!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2009/08/01/ubuntu-linux-no-dma-on-cddvd-drive/en/feed/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MuthTV sluggish when buttons pressed on remote?</title>
		<link>http://www.blinnov.com/2009/06/12/muthtv-sluggish-when-buttons-pressed-on-remote/en/</link>
		<comments>http://www.blinnov.com/2009/06/12/muthtv-sluggish-when-buttons-pressed-on-remote/en/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 13:49:13 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[MythTV]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/2009/06/12/muthtv-sluggish-when-buttons-pressed-on-remote/en/</guid>
		<description><![CDATA[Recently I built myself a media center of old HP/Compaq computer and MythBuntu. It all worked as a top and I spent weeks learning about great features it has.
This week I was hoping to put some finishing touches on it. The last missing piece arrived &#8211; so-called &#8220;Vista Rock Remote&#8221;.

According to MythBunty HOWTO, this MCE-compatible [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I built myself a media center of old HP/Compaq computer and MythBuntu. It all worked as a top and I spent weeks learning about great features it has.</p>
<p>This week I was hoping to put some finishing touches on it. The last missing piece arrived &#8211; so-called &#8220;Vista Rock Remote&#8221;.</p>
<div style="text-align: center;"><img src="http://www.blinnov.com/wp-content/plugins/image-shadow/cache/75df08afeddd6aa4c362cfe446275a77.jpg" alt="7.jpg" /></div>
<p>According to MythBunty HOWTO, this MCE-compatible remote should work out of box, despite <a href="http://www.pcworld.idg.com.au/review/home_entertainment/rock/remote_control_for_windows_vista_rm-vr1/221206">some reviews</a> saying it would only work with Vista. Don&#8217;t know if it works with Vista though, but it worked in MythBunty just fine. I only had to enable it in Mythbuntu control center. And restart MythTV frontend, of course.</p>
<p>Funnily enough, I noticed the big problem straight away. Every time I put recorded TV show on and tried to use volume up/down buttons on remote, the picture was getting sluggish and jumpy for noticeable time. Actually, it felt so weird I even thought that I might be only one who had that problem. I was not right &#8211; there were plenty of similar reports on Internet. And there was a workaround proposed also.</p>
<p>The root cause of the problem is that MythTV pokes X screensaver every time button on remote is pressed. It does not have to do so when you use keyboard, but must do it when you use remote as screensaver has no idea about it. MythTV kicks the screensaver by invoking &#8220;gnome-screensaver-command&#8221; with parameter &#8211;poke, and there are reports it does it twice every time you press the button. It isn&#8217;t itself a problem, the problem is that when this command is called often (and it exactly what happens when you try to put volume up or down) XOrg CPU usage jumps to 100%, which causes that unwanted &#8220;special effect&#8221; in your video.</p>
<p>This bug, however, has already been reported (<a href="https://bugs.launchpad.net/mythtv/+bug/311772">here </a>and <a href="http://ubuntuforums.org/archive/index.php/t-1013688.html">here</a>)  and the fix will probably be included in next MythTV release. For now, the only workaround was to disable screensaver and create a symbolic link to /bin/true with name gnome-screensaver-command somwehre in one of PATH&#8217;s directories that comes in front of where the original program resides. Say, if your PATH looks like</p>
<p>/usr/sbin;/usr/bin;/usr/local/bin</p>
<p>and gnome-screensaver-command is in /usr/local/bin, you can stop it from being called by creating link to /bin/true in either/usr/sbin or /usr/bin:</p>
<p>ln -s /bin/true /usr/bin/gnome-screensaver-command</p>
<p>But it would only work if you decide to disable the screensaver. You can try not to, but once display goes to sleep, you won&#8217;t be able to wake it up by using remote. So I decided to invent something more sophisticated.</p>
<p>Of course, I could  download sources, fix the bug and build MythTV myself, but I decided to leave it to mythbuntu team. Instead, I written small program that simply does not allow screensaver to be poked more often than once in a minute, which fixed the problem.</p>
<p>The good news: you can download it from this site: <a title="Mythtv screensaver proxy" href="http://www.blinnov.com/wp-content/uploads/2009/06/myth-screensaver-proxy.cpp">Mythtv screensaver proxy</a></p>
<p>The bad news: you must build it yourself. So, installing build-essentials first would be a good idea.</p>
<p>Download cpp file above somewhere in your home directory and then follow simple steps described in file header:</p>
<pre class="c++">/*
 * Usage:
 *      1. execute "which gnome-screensaver-comand"
 *      If output is different from what you find below in
 *      DEF_PROGRAM, modify this macro accordingly.
 *
 *      2. build the program:
 *      g++ myth-screensaver-proxy.cpp -o gnome-screensaver-command
 *
 *      3. Find what directory original gnome-screensaver-command is in
 *              (/usr/bin/ by default).
 *
 *      4. Look at your PATH settings (printenv | grep PATH).
 *
 *      5. copy binary buld on step 2 to any of the directories that
 *      come in PATH before original gnome-screensaver-command directory.
 *
 */</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2009/06/12/muthtv-sluggish-when-buttons-pressed-on-remote/en/feed/en/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A coolest gadget I ever heard of.</title>
		<link>http://www.blinnov.com/2009/01/14/a-coolest-gadget-i-ever-heard-of/en/</link>
		<comments>http://www.blinnov.com/2009/01/14/a-coolest-gadget-i-ever-heard-of/en/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 12:58:28 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[netbook]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/2009/01/14/a-coolest-gadget-i-ever-heard-of/en/</guid>
		<description><![CDATA[It seems ViewSonic wants to grab some of the pie already shared by Asus, Acer and MSI. They just announced a new netbook

I bet this computer will not leave any chances to competitiors in Russia. Its name &#8220;VieBook&#8221; sounds somewhat between &#8220;I will rock you book&#8221; and funny statement of intentions of sexual character.
Another example [...]]]></description>
			<content:encoded><![CDATA[<p>It seems ViewSonic wants to grab some of the pie already shared by Asus, Acer and MSI. They just announced a new netbook</p>
<p align="center"><img src="http://www.blinnov.com/wp-content/plugins/image-shadow/cache/1ba08f83cc77855dbe6fccd7fa5a04f9.jpg" width="480" height="338" /></p>
<p align="left">I bet this computer will not leave any chances to competitiors in Russia. Its name &#8220;<a href="http://www.viewsonic.com/company/news/vs_press_release_62042.htm"><strong>VieBoo</strong>k&#8221;</a> sounds somewhat between &#8220;I will rock you book&#8221; and funny statement of intentions of sexual character.</p>
<p align="left">Another example why global market can be a pain in the ass for marketologists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2009/01/14/a-coolest-gadget-i-ever-heard-of/en/feed/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New airport for Sydney in Somersby. Is it for real?</title>
		<link>http://www.blinnov.com/2009/01/14/new-airport-for-sydney-in-somersby-is-it-for-real/en/</link>
		<comments>http://www.blinnov.com/2009/01/14/new-airport-for-sydney-in-somersby-is-it-for-real/en/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 12:50:18 +0000</pubDate>
		<dc:creator>vital</dc:creator>
				<category><![CDATA[Australia]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Central Coast]]></category>
		<category><![CDATA[NSW]]></category>

		<guid isPermaLink="false">http://www.blinnov.com/2009/01/14/new-airport-for-sydney-in-somersby-is-it-for-real/en/</guid>
		<description><![CDATA[A few years ago we became proud owners of a book called &#8220;Sydney Region Outline Plan&#8221;. The book, printed in 1968 is nothing else but a large 111-page report about what Sydney and surroundings looked like back then and how they were expected to look today. Surprisingly enough, that was rather interesting reading.
In &#8220;Transport&#8221; chapter [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago we became proud owners of a book called &#8220;Sydney Region Outline Plan&#8221;. The book, printed in 1968 is nothing else but a large 111-page report about what Sydney and surroundings looked like back then and how they were expected to look today. Surprisingly enough, that was rather interesting reading.</p>
<p>In &#8220;Transport&#8221; chapter a few paragraphs were focused on that by 2000&#8242; a second airport should be built in Sydney. No doubts it should have already happened. But it did not. I remember how amused I was when I learnt that the largest and busyiest air hub in southern hemisphere is closing for any flights every night. Well, to be honest, I could hardly imagine a modern city with the airport nearly in its center before!</p>
<p>Anyway, that book pointed a few options where second airport could have had been built. Of course, we already heard of options like &#8220;somewhere on West&#8221; or &#8220;in Richmond&#8221; but there was another interesting option &#8211; they were also talking about Wyong shire and even considered it as one of the prefferred options. Never happened though. Yet (?).</p>
<p>Well, this is all about a front cover of today&#8217;s &#8220;Central Coast Sun Weekly&#8221; &#8211; it says that the government is once again revisiting plans to build a new airport for Sydney and there  are &#8220;many feasible reasons&#8221; why it should be build in Somersby. Not far away from Wyong, but nothing new &#8211; they already shortlisted in in 1969 and there was a 500-people demonstration against it back in 1971 (see <a href="http://www.aph.gov.au/library/pubs/bp/1997-98/98bp20.htm">aph.gov.au</a>).</p>
<p>I am not quite sure how feasible is it really &#8211; from my impression landscape here on Central Coast is anything but suitable for airports. I am not airport architect and I don&#8217;t know all the details &#8211; may be Somersby plateau is large enough for long runways required for A380, but that besides the point. Even the fact that some businesses have already backed the proposal (which is understandable) so as that it is not know yet how would it change the face of Central coast and affect the enfironment are not important yet. I rather curious about whether they decide or not finally? This discussion already seems to last for over 50 years.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blinnov.com/2009/01/14/new-airport-for-sydney-in-somersby-is-it-for-real/en/feed/en/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

