Software engineering

Confluences, filesystems and such...

I added two confluences to my list. Victor 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 50 N 85 W and 49 N 83 W. We are planning more confluence visits, some of them may involve quite a bit of snowshoeing.

On unrelated note, I'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.

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.

One of the most interesting reads lately were answers of several famous programmers to a Polish student's questions, published on student's blog. Torvalds, Stroustrup, Norvig, Bray, Gosling and others share their thoughts on next big things, best books, most useful skills forprogrammers, and many other topics.

Posted in Personal | Software engineering frolov's blog | add new comment

Submitted by frolov on Sun, 2006-10-15 22:03.

On day-to-day Software Development

GNU linker on Fedora Core 5 is horribly slow on moderately large C++ projects with debug information. Apparently, this is a known problem. 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 yum update but that did not solve the problem - and package download was very slow. I watch this PR and wait for the patch.

New glibc 2.4 now has a detection of mulitply freed memory. While this is not a full-blown Purify or my favourite Valgrind but this introduces almost no overhead in runtime and is constantly on. Nice work!

Posted in Software engineering frolov's blog | add new comment

Submitted by frolov on Wed, 2006-09-13 11:16.

Shooting the troubles

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 front page.

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.

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 spaces to LD_PRELOAD environment variable or Coloured bash prompt screwing multiline input in a terminal.

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.

In near future I am going to post a couple of entries explaining problems related to GNU C library application binary interface (ABI) revisions and incompatibilities and problems with C++ language ABI.

Posted in Software | Software engineering | Web frolov's blog | add new comment

Submitted by frolov on Wed, 2006-02-08 23:30.

How to specify library name with spaces in LD_PRELOAD

Recently several of my colleagues bumped into an interesting problem.

We use LD_PRELOAD environment variable in couple of places. For those of you not familiar with it: LD_PRELOAD 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).

As other variables like PATH or LD_LIBRARY_PATH, this variable may contain list of library namesseparated by colons. But... for compatibility with legacy systems it is possible to separate LD_PRELOAD elements by spaces. And older systems did not understand escaping so it turns oout it is impossible to put full library paths into LD_PRELOAD if they contain spaces.

But here is the trick. You may put library directory name(s) with spaces into LD_LIBRARY_PATH (which is kind of a PATH but for dynamically linked/loaded libraries) and put short library name(s) into LD_PRELOAD. Of course, short library file name must not contain spaces but this is less of a limitation.

Posted in Software | Software engineering frolov's blog | add new comment

Submitted by frolov on Mon, 2005-09-19 16:30.

My submission to Slashdot got accepted.

Now that's kinda cool!!

Slashdot editors accepted my submission about Ulrich Drepper's post that I blogged about recently. It spawned fierce and interesting discussion.

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).

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's code is a complete mess due to the fact that it supports so many platforms.

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.

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.

Posted in Software engineering frolov's blog | 1 comment

Submitted by frolov on Mon, 2005-05-30 23:21.

Supporting of non mainstream platforms considered harmful?

Ulrich Drepper, RedHat employee, wrote 2 extremely interesting posts: first, titled "Users and complexity vs Bugs", and second tilted "Dictatorship of minorities". 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.

read more

Posted in Software engineering frolov's blog | add new comment | read more

Submitted by frolov on Sun, 2005-05-29 11:44.

<sstream> documentation

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++ <sstream> header.

* MSDN page
* Apple Developer or GNU Standard C++ library.
* Overview of iostream classes

Hope this helps.

Posted in Software engineering add new comment

Submitted by frolov on Sat, 2005-05-28 17:36.

Why Microsoft compilers decorate variable names

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 extern "C". 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):

#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
EXTERN_C void c_style_function(void);

You need extern "C" 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).

However I was very surprised when I found that Microsoft C/C++ compiler mangles data symbols. Back then I though: "Why on Earth, they do that? You cannot overload variables!".
read more

Posted in Software engineering frolov's blog | add new comment | read more

Submitted by frolov on Wed, 2005-04-13 11:07.

Essential books for Software Engineering/Computer Science student

Some time ago I came across Josh Kaufmann's Personal MBA progam which is basically a list of books and blogs that are kind of a substitute of an MBA program, and you don't have to spent so much money on it.

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 "THE" books on its subject matter, "classic" I would say.
read more

Posted in Software engineering frolov's blog | add new comment | read more

Submitted by frolov on Sun, 2005-04-10 17:32.

Defects in the Linux Kernel found by Klocwork defect detection tools

I am working on improving Klocwork'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.

Recently I posted a couple of potential defects to Linux kerenel mailing list, and OSDL developer Randy Dunlap acknowledged that these are real defects, impact is very limited though. You have to have sysadmin capabilities in order to have a possibility to crash the application.

However that was just a "foot in the door". Expect tread more

Posted in Software engineering frolov's blog | add new comment

Submitted by frolov on Thu, 2005-03-17 14:50.

XML feed

Subscribe





Enter your Email





Powered by FeedBlitz

Navigation

Browse archives

« August 2008  
Mo Tu We Th Fr Sa Su
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Syndicate

XML feed

User login