<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.artemfrolov.com">
<channel>
 <title>sstream of consciousness - Software engineering</title>
 <link>http://www.artemfrolov.com/taxonomy/term/1/0</link>
 <description>Thoughts and rants related to Software Design, Development and Maintenance</description>
 <language>en</language>
<item>
 <title>Confluences, filesystems and such...</title>
 <link>http://www.artemfrolov.com/node/91</link>
 <description>&lt;p&gt;I added two confluences to &lt;a href=&quot;http://www.confluence.org/visitor.php?id=10672&quot;&gt;my list&lt;/a&gt;. &lt;a href=&quot;http://www.mozgin.net/&quot;&gt;Victor&lt;/a&gt; and I spent three days in the beginning of September in Northern Ontario and we logged two successful visits. You may read the full trip reports &lt;a href=&quot;http://www.confluence.org/confluence.php?visitid=12858&quot;&gt;50 N 85 W&lt;/a&gt; and &lt;a href=&quot;http://www.confluence.org/confluence.php?visitid=12855&quot;&gt;49 N 83 W&lt;/a&gt;. We are planning more confluence visits, some of them may involve quite a bit of snowshoeing.&lt;/p&gt;
&lt;p&gt;On unrelated note, I&#039;m starting to worry about future of some filesystems. Companies behind two brilliant filesystems - XFS and ReiserFS are going through hard times now. Hans Reiser - founder of Namesys and creator of namesake filesystem is arrested on suspicion of murder. SGI - sponsor of XFS - filed for bankruptcy.&lt;/p&gt;
&lt;p&gt;Unfortunately, there is not much going in filesystem world lately. Subject area is actually extremely complex and very conservative (it is your data at stake after all). Microsoft took  WinFS out of Vista and the only notable advancement I can think of is ZFS by Sun - not exactly new but it is getting a lot of traction lately.&lt;/p&gt;
&lt;p&gt;One of the most interesting reads lately were answers of several famous programmers to a Polish student&#039;s questions, &lt;a href=&quot;http://sztywny.titaniumhosting.com/2006/07/23/stiff-asks-great-programmers-answers/&quot;&gt;published on student&#039;s blog&lt;/a&gt;. Torvalds, Stroustrup, Norvig, Bray, Gosling and others share their thoughts on next big things, best books, most useful skills forprogrammers, and many other topics.&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/9">Personal</category>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Sun, 15 Oct 2006 21:03:32 -0600</pubDate>
</item>
<item>
 <title>On day-to-day Software Development</title>
 <link>http://www.artemfrolov.com/node/89</link>
 <description>&lt;p&gt;GNU linker on Fedora Core 5 is horribly slow on moderately large C++ projects with debug information. Apparently, this is a &lt;a href=&quot;http://sourceware.org/bugzilla/show_bug.cgi?id=3111&quot;&gt;known problem&lt;/a&gt;. This is frustrating to wait more than one minute for a linkage of a project that normally links n a matter of seconds. Tried to run &lt;code&gt;yum update&lt;/code&gt; but that did not solve the problem - and package download was very slow. I watch this PR and wait for the patch.&lt;/p&gt;
&lt;p&gt;New glibc 2.4 now has a detection of mulitply freed memory. While this is not a full-blown Purify or my favourite &lt;a href=&quot;http://valgrind.kde.org/&quot;&gt;Valgrind&lt;/a&gt; but this introduces almost no overhead in runtime and is constantly on. Nice work!&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Wed, 13 Sep 2006 10:16:36 -0600</pubDate>
</item>
<item>
 <title>Shooting the troubles</title>
 <link>http://www.artemfrolov.com/node/78</link>
 <description>&lt;p&gt;Probably the most interesting part of web log statistics for my site is a page with keywords that people use in search engines to come to my pages. The most popular search is for information about C++ string streams. Ironically, this blog does not provide much help here, though I put some useful links on my &lt;a href=&quot;http://www.artemfrolov.com/&quot;&gt;front page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Over the course of my career I bumped into many different technical problems. Often these problems required a lot of time or mental effort to investigate. Needless to say, web search engine made that task way easier, but sill there were problems I had to spend considerable time on. Once I had this blog I have started to put some results of my troubleshooting sessions, primarily as a sign of gratitude to all the people who do the same.&lt;/p&gt;
&lt;p&gt;So, when I look at search term statistics, I am always glad to find that people came to the solution at my site, using search keywords describing their problems, like the problem of putting &lt;a href=&quot;/node/61&quot;&gt;spaces to LD_PRELOAD environment variable&lt;/a&gt; or &lt;a href=&quot;/articles/coloured-bash-prompt&quot;&gt;Coloured bash prompt screwing multiline input in a terminal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Maybe separate articles or pages instead of blog entries is more appropriate for that kind of texts, but I am pretty happy with the present format now.&lt;/p&gt;
&lt;p&gt;In near future I am going to post a couple of entries explaining problems related to &lt;a href=&quot;http://www.gnu.org/software/libc/&quot;&gt;GNU C library application binary interface (ABI) revisions and incompatibilities&lt;/a&gt; and problems with C++ language ABI.&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/4">Software</category>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <category domain="http://www.artemfrolov.com/taxonomy/term/3">Web</category>
 <pubDate>Wed, 08 Feb 2006 21:30:35 -0700</pubDate>
</item>
<item>
 <title>How to specify library name with spaces in LD_PRELOAD</title>
 <link>http://www.artemfrolov.com/node/61</link>
 <description>&lt;p&gt;Recently several of my colleagues bumped into an interesting problem.&lt;/p&gt;
&lt;p&gt;We use &lt;code&gt;LD_PRELOAD&lt;/code&gt; environment variable in couple of places. For those of you not familiar with it: &lt;code&gt;LD_PRELOAD&lt;/code&gt; is an environment variable which allows you to specify dynamic libraries which will be loaded before all other libraries. This technique allows you to intercept calls to standard libraries is used by many debugging and analysis tools. Or you could alter behaviour of tsndard libraries for different purposes (e.g. fault injection).&lt;/p&gt;
&lt;p&gt;As other variables like &lt;code&gt;PATH&lt;/code&gt; or &lt;code&gt;LD_LIBRARY_PATH&lt;/code&gt;, this variable may contain list of library namesseparated by colons. But... for compatibility with legacy systems it is possible to separate &lt;code&gt;LD_PRELOAD&lt;/code&gt; elements by spaces. And older systems did not understand escaping so it turns oout it is impossible to put full library paths into &lt;code&gt;LD_PRELOAD&lt;/code&gt; if they contain spaces.&lt;/p&gt;
&lt;p&gt;But here is the trick. You may put library directory name(s) with spaces into &lt;code&gt;LD_LIBRARY_PATH&lt;/code&gt; (which is kind of a &lt;code&gt;PATH&lt;/code&gt; but for dynamically linked/loaded libraries) and put short library name(s) into &lt;code&gt;LD_PRELOAD&lt;/code&gt;. Of course, short library file name must not contain spaces but this is less of a limitation.&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/4">Software</category>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Mon, 19 Sep 2005 15:30:45 -0600</pubDate>
</item>
<item>
 <title>My submission to Slashdot got accepted.</title>
 <link>http://www.artemfrolov.com/node/51</link>
 <description>&lt;p&gt;Now that&#039;s kinda cool!!&lt;/p&gt;
&lt;p&gt;Slashdot editors accepted my submission about &lt;a href=&quot;http://www.livejournal.com/users/udrepper/7326.html&quot;&gt;Ulrich Drepper&#039;s post&lt;/a&gt; that &lt;a href=&quot;http://www.artemfrolov.com/node/50&quot;&gt;I blogged about recently&lt;/a&gt;. It spawned &lt;a href=&quot;http://developers.slashdot.org/article.pl?sid=05/05/30/2233251&amp;amp;tid=190&amp;amp;tid=8&quot;&gt;fierce and interesting discussion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many slashdotters point out that bugs showing up on specific platforms are hidden and hard to debug problems. That is why having code running on many platforms is a virtue. That is completely correct: I discovered several many memory-related bugs just because my code broke on Solaris (whereas it worked seemingly fine on Linux).&lt;/p&gt;
&lt;p&gt;Another valid point: if you have your code ported to many platforms you are better prepared to face new platforms rising in popularity, like MacOS X nowadays. Also, if developers care about portability, code usually tends to be more modular and clean. Funny enough, reverse is also true, one of slashdot readers pointed out that InfoZip&#039;s code is a complete mess due to the fact that it supports so many platforms.&lt;/p&gt;
&lt;p&gt;However, I believe Ulrich was not talking about this kind of bugs. At least this was not a main focus. I presume main complaint was about platform differences that are so hard to track. Starting from binary code, up to different kernels, up to different firmware, up to different peripheral hardware, up to varying implementations of C library and other interfaces like POSIX, up to different set of system utilities etc.&lt;/p&gt;
&lt;p&gt;Many efforts (finished and ongoing) was made to ensure at least an existance of some greatest common denominator (POSIX, standard C library, LSB etc), but situation is still far from ideal and unlikely will ever be.&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Mon, 30 May 2005 22:21:15 -0600</pubDate>
</item>
<item>
 <title>Supporting of non mainstream platforms considered harmful?</title>
 <link>http://www.artemfrolov.com/node/50</link>
 <description>&lt;p&gt;Ulrich Drepper, RedHat employee, wrote 2 extremely interesting posts: first, titled &lt;a href=&quot;http://www.livejournal.com/users/udrepper/6079.html&quot;&gt;&quot;Users and complexity vs Bugs&quot;&lt;/a&gt;, and second tilted &lt;a href=&quot;http://www.livejournal.com/users/udrepper/7326.html&quot;&gt;&quot;Dictatorship of minorities&quot;&lt;/a&gt;. To sum it up: these articles are about difficulties of cross-platfrom development. The latter post is especially interesting. To put it simply, Ulrich argues that it is unnecessary to support as many different platfroms as open source projects strive to. Moreover, it is even unfair to support proprietary platforms in free software.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;node/&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Sun, 29 May 2005 10:44:00 -0600</pubDate>
</item>
<item>
 <title>&lt;sstream&gt; documentation</title>
 <link>http://www.artemfrolov.com/sstream-documentation</link>
 <description>&lt;p&gt;A lot of people come to my webiste from Google and Yahoo. Some of them found my site using keywords related to C++ standard library header . Maybe they are just curious, but my site may not be what they want. For those people I created this page that contains some links to the actual documentation of C++ &amp;lt;sstream&amp;gt; header. &lt;/p&gt;
&lt;p&gt;* &lt;a href=&quot;http://msdn.microsoft.com/library/en-us/vcstdlib/html/vclrf_sstream_header.asp&quot;&gt;MSDN page&lt;/a&gt;&lt;br /&gt;
* &lt;a href=&quot;http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/libstdc++/27_io/howto.html#5&quot;&gt;Apple Developer&lt;/a&gt; or &lt;a href=&quot;http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html&quot;&gt;GNU Standard C++ library&lt;/a&gt;.&lt;br /&gt;
* &lt;a href=&quot;http://www.cplusplus.com/ref/iostream/&quot;&gt;Overview of iostream classes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Sat, 28 May 2005 16:36:53 -0600</pubDate>
</item>
<item>
 <title>Why Microsoft compilers decorate variable names</title>
 <link>http://www.artemfrolov.com/node/41</link>
 <description>&lt;p&gt;If you are a seasoned system programmer, it is very likely that you had to write or maintain mixed C/C++ application. And if you had, then you know that if you want to make functions in the translation unit compiled from C source available for C++ code, you must delcare them as &lt;code&gt;extern &quot;C&quot;&lt;/code&gt;. The same applies to functions implemented in C++, which you want to make available to C programs. Usually this is is done with preporcessor in that way (YMMV though):&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
#define EXTERN_C extern &quot;C&quot;&lt;br /&gt;
#else&lt;br /&gt;
#define EXTERN_C extern&lt;br /&gt;
#endif&lt;br /&gt;
EXTERN_C void c_style_function(void);&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You need &lt;code&gt;extern &quot;C&quot;&lt;/code&gt; in C++, because otherwise C++ compiler will mangle function symbol, so it will be iaccessible from code compiled from C. The rational behind C++ mangling is that you may overload functions (to put it simply, functions with the same name but different parameter lists may have different implementation).&lt;/p&gt;
&lt;p&gt;However I was very surprised when I found that Microsoft C/C++ compiler mangles &lt;em&gt;data symbols&lt;/em&gt;. Back then I though: &quot;Why on Earth, they do that? You cannot overload &lt;em&gt;variables!&lt;/em&gt;&quot;.&lt;br /&gt;
&lt;a href=&quot;node/41&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Wed, 13 Apr 2005 10:07:39 -0600</pubDate>
</item>
<item>
 <title>Essential books for Software Engineering/Computer Science student</title>
 <link>http://www.artemfrolov.com/computer-books</link>
 <description>&lt;p&gt;Some time ago I came across &lt;a href=&quot;http://www.joshkaufman.net/archives/2005/03/the_josh_kaufma_1.html&quot;&gt;Josh Kaufmann&#039;s Personal MBA progam&lt;/a&gt; which is basically a list of books and blogs that are kind of a substitute of an MBA program, and you don&#039;t have to spent so much money on it.&lt;/p&gt;
&lt;p&gt;Inspired by this list I decided to gather a list of most important books in Software Engineering and Computer Science. Almost all of these books I either read at whole or heavily used as a reference material. I studied mathematics with books by russian authors, so I tried to find kind of a substitute book for each subject. Many books in this list are &quot;THE&quot; books on its subject matter, &quot;classic&quot; I would say.&lt;br /&gt;
&lt;a href=&quot;computer-books&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Sun, 10 Apr 2005 16:32:06 -0600</pubDate>
</item>
<item>
 <title>Defects in the Linux Kernel found by Klocwork defect detection tools</title>
 <link>http://www.artemfrolov.com/node/29</link>
 <description>&lt;p&gt;I am working on improving Klocwork&#039;s defect detection tools and. During that process we use large open sourced codebases to test our performance, false positive rate etc. One of these codebases is a Linux kernel.&lt;/p&gt;
&lt;p&gt;Recently I posted a couple of potential defects to Linux kerenel mailing list, and OSDL developer Randy Dunlap &lt;a href=&quot;http://lkml.org/lkml/2005/3/16/252&quot;&gt;acknowledged that these are real defects&lt;/a&gt;, impact is very limited though. You have to have sysadmin capabilities in order to have a possibility to crash the application.&lt;/p&gt;
&lt;p&gt;However that was just a &quot;foot in the door&quot;. Expect t&lt;a href=&quot;node/29&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Thu, 17 Mar 2005 12:50:41 -0700</pubDate>
</item>
<item>
 <title>More Microsoft API weirdness.</title>
 <link>http://www.artemfrolov.com/node/17</link>
 <description>&lt;p&gt;Again, wandering through MSDN, I found interesting peculiarity of Microsoft&#039;s implementation of standart C functions.&lt;/p&gt;
&lt;p&gt;There are two functions, &lt;code&gt;wsprintf&lt;/code&gt; and &lt;code&gt;swprintf&lt;/code&gt;, that do pretty much the same - they perform formatted output of wide-character text to a string buffer. So, what is the difference, beside permutated letters?&lt;br /&gt;
&lt;a href=&quot;node/17&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Wed, 26 Jan 2005 09:32:15 -0700</pubDate>
</item>
<item>
 <title>What Microsoft documentation will not tell you</title>
 <link>http://www.artemfrolov.com/node/16</link>
 <description>&lt;p&gt;Recently I was exploring functions from WinAPI, namely &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/shlwapi/path/path.asp&quot;&gt;shell path handling functions&lt;/a&gt;, like &lt;code&gt;PathCombine&lt;/code&gt;, and &lt;code&gt;PathAppend&lt;/code&gt;. There is a limit on path length called &lt;code&gt;MAX_PATH&lt;/code&gt; and destination buffers for that functions must be at least &lt;code&gt;MAX_PATH+1&lt;/code&gt; characters in size (which is &lt;em&gt;not&lt;/em&gt; the same as MAX_PATH bytes, by the way!). Let&#039;s take for example &lt;code&gt;PathAppend&lt;/code&gt;. Basically, this function concatenates two paths, inserting backslash if necessary. So what if lengths of two arguments are greater than &lt;code&gt;MAX_PATH&lt;/code&gt; in total? I would expect that destination buffer would contain some trimmed version of concatenated path But this is not so! Destination buffer will have zero length.&lt;br /&gt;
&lt;a href=&quot;node/16&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Wed, 26 Jan 2005 07:58:40 -0700</pubDate>
</item>
<item>
 <title>Plugin infrastructure on Windows</title>
 <link>http://www.artemfrolov.com/node/5</link>
 <description>&lt;p&gt;I was busy building a plugin infrastructure. Here is a couple of tricks that may be useful for other developers.&lt;/p&gt;
&lt;p&gt;Plugin is basically a dynamically loaded library, loaded by main application at runtime. Then application gets and address of a library entry function. Library entry function may do whatever is needed but at the end of the day it should register callbacks - functions provided by extension(s) and hooked onto specific extension points. These are ABCs of plugin programmming.&lt;/p&gt;
&lt;p&gt;Now, the problem is that dynamically loaded library needs to use functions from the main application.&lt;/p&gt;
&lt;p&gt;On Unix, .so file was compiled without problems but &#039;dlopen&#039; function failed at runtime. Solution was simple: I just had to link main application with gcc&#039;s &#039;-export-dynamic&#039; option. That made all functions in the main application exposed for dynamic linking.&lt;br /&gt;
&lt;a href=&quot;node/5&quot; title=&quot;Read the rest of this posting.&quot; class=&quot;read-more&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://www.artemfrolov.com/taxonomy/term/1">Software engineering</category>
 <pubDate>Mon, 22 Nov 2004 15:18:44 -0700</pubDate>
</item>
</channel>
</rss>
