Tuesday, April 14, 2009

New interesting "chimaera" programming language: Scala

Object oriented programming is currently (or rather: still) state of the art and most commonly found. Functional programming always has been a topic, too, but it never really got the break-through that many people think it deserves. Lisp is one pragmatic example of how object oriented and functional programming can go hand-in-hand, although it's not really clean or even pretty (except for it's S-Expression-based syntax).


There's a relatively new programming language on the field that recently even got attention on a spin-off of Germany's biggest IT news site heise Developer. You can read the german article here or learn more about Scala on it's official website or find news related to the language at scala-blogs.org.


Scala is mixing up object oriented and functional programming. The most important aspects of functional programming (at least to me) are closures and being (optionally) free of side-effects. Scala obviously meets both criteria. It is much more practical than most other functional programming languages because it's based on Java and/or .NET and therefore can use a huge amount of existing third-party libraries out of the box. The most annoying thing about Lisp and, let's say, Haskell, is the absence of existing, maintained libraries to actually do something useful without re-inventing the wheel. Well, there's L Sharp .NET, but well... it's not the real deal and it's not as mature as Scala seems to be. It's even rumored (on Slashdot) that Twitter is moving to Scala.

Friday, March 6, 2009

German community effort to create a good (tm) C++ Tutorial

I have started to gather people to help me write a C++ tutorial that will just blow away everything that's been around. It will be standards compliant, teaching clean, good coding style, fun to read and practical. We put emphasize on making C++ tasty to programming beginners by providing them the necessary tools to easily create graphical output. Our opinion is that tutorials that teach console programming are boring the read too fast, so we've created a "playground" that the reader can use to write graphical programs without first having to learn how to use complex GUI or graphics libraries. We believe that this approach will attract many readers and will make C++ more attractive to beginners (or maybe even advanced programmers that are tired of wading through a console tutorial).


The team currently consists of roughly 6 people from #c++.de on irc.quakenet.org, but I constantly try to recruit new writers. The tutorial's first version and initial draft are all done in German, because the team consists of Germans only and we'd like to keep the barrier to start helping and writing articles as small as possible. We hope that the final product will be completely available in English some time.

Thursday, March 5, 2009

Featured interview at FirebirdNews.org

Marius Popa from FirebirdNews.org interviewed me as a part of the "People around Firebird" series. I had a chance to talk about myself, my projects and my views on topics like Firebird and Qt.

It's an interesting read, don't miss it!

Thursday, February 26, 2009

fbsql: Clean client-libraries for Firebird and Interbase databases

I've written this quite some time ago (and it didn't receive much love since then, but it's functional and should be bug-free), but I just noticed I haven't mentioned it on my blog: fbsql is a clean C-API that can be used to create bindings for other languages (such as Python or Ruby). It's much simpler to use than the raw Interbase/Firebird API and it uses IBPP internally. So it's basically just forwarding the function calls to IBPP and abstracting the IBPP classes to a C interface that is straight forward and intuitive.


I have included a binding to Lisp, since this was my personal main goal with this project. I noticed that there is no way at all to access Interbase and/or Firebird from Lisp, and since I like toying around with Lisp, I thought that writing small database helper applications with it is a good way to get comfortable with it. The Lisp binding has two layers: First is the CFFI that is used to access the native C functions from the fbsql C-library and the second, more lispish layer is a bit more advanced and better to use. It includes thinks like


(with-statement (st database transaction)
(statement-prepare st "select * from table")
(statement-execute st)
(while-statement-fetch st
(format t "~a~%" (statement-get-short st 1))))
This little script creates a statement to the given database and transaction, executes "select * from test" and prints everything value in column 1 (which should be a short).
Lisp is so wonderfully compact. ;-)

Sunday, January 25, 2009

ZeroBUGS: Commercial C++ debugger for Linux

Whenever working with GDB on Linux you get the feeling that it does the basics pretty well (and sometimes even crashes on those basic tasks), but a few things are just missing or too complicated. While GDB is actually a very usable debugger and freely available on virtually any Linux box, it's not 100% stable and sometimes not as high quality as you'd like it to be.


I've just found out about ZeroBUGS, a commercial debugger for Linux (and Linux only!) that's targeted to be better where GDB is lacking. I learned about it from Andrei Alexandrescu's homepage (see the "Zero" link to the left). Although it is a commercial product, there's also a free version available, but it's limited in some ways. ZeroBUGs comes with a GUI and console interface out of the box.


Here's the feature-list, taken from the official site:

  • Command Line

  • Graphical Interface

  • Expression Evaluation

  • Conditional breakpoints

  • Memory watchpoints

  • Compatible with Intel Compiler

  • Works with GCC 2.95 through 4.3

  • Supports pthread applications

  • Debug events can be disabled by thread

  • Support for debugging forked processes

  • Scriptable with Python

  • Support for wide strings and Qt strings

  • Custom visualization of data structures (via Python script)

It does not support remote-debugging, though (but you can of course use SSH or X-Forwarding for this), but I especially like that it's scriptable in Python. It even works together with valgrind, see the FAQ.


The main difference between the free and the commercial version is that the free version is BETA with untested features. Additionally, some functionality is trimmed down (only the Python console is mentioned on the website) and the free version is not optimized for speed. There's no source code of the free version either, so it's only "free as in beer".


The price is as low as $39.95, so it's even affordable to hobbyists when the free version just is not enough. Unfortunately I've never used it (well, I've just found out about it a few minutes ago), but I'll surely try it out next time I'll be working on a bigger Linux-project. I hope I can provide some actual field-experiences with ZeroBUGs anytime soon.

Thursday, January 15, 2009

Bjarne's new book: Programming: Principles and Practice Using C++

I've reported about this book earlier last year. The original release-date was slated for august last year, but it seems it was delayed till last month.


It's in stock at amazon.com now. I think I'm gonna order a copy of it for our trainees at work. There's never enough of good C++ teaching books.

German translation of Firebird security article

There's an article on the Firebird Documentation web-page about Firebird File and Metadata Security. Since this is an interesting topic to our customers, I took the time to translate it to German.


The article describes the fundamental problems in securing network connections. One of the biggest problem is key management. Since the Firebird server is usually controlled by and installed at the client's site, you don't have any control over it. So, theoretically, someone could always build his own Firebird server to spy on the password. But that's only one of the problems discussed.


Many thanks to Geoff Worboys, the author of the original article, and Paul Vinkenoog for publishing it on the official web-site.