Featurecasts
Yesterday I've visited the Tokamak4 Sprint. I've attended the talks in the evening and then had dinner with some KDE hackers. Today I've looked at PlanetKDE and saw the KDE bluetooth screencast from Alex Fiestas. I liked the screencasts in the KDE 4.4 announcement, it should the users what's cool and new. Yesterday I've heard the first time about activities in KDE4. I wondered what Aaron is talking about.
Here comes the conclusion:
We need a Featurecast section on the KDE website with screencasts that shows all the cool hidden stuff!
This should be the first thing a user finds on the KDE website. The user normally hasn't installed KDE at all or doesn't have the latest version. So the first thing should be something which shows what you can do with it and how cool this stuff is.
Documenting the Source
As you maybe know I have a new job since last December and I'm working on
Samba4 now. Samba4 is a monster so I've asked for some simple tasks to get
started. The task was to migrate some code to a new Samba library called
tsocket. The problem was I didn't know what to do and how. Some functions
of the API were documented but not all. So I had to guess from the names
what the function is doing and read the code to understand it. Then I've
started to work with the interface and I had to look again the the code to
find out possible return values. In the end I spent a lot of time jumping
through the source code to find out the return values for the functions.
If the API would be completely documented I could get my work done a lot of
faster so I simply started to document it cause I had to understand it anyway.
I've decided to write the documentation with doxygen and put it in the header
file, so that people who use the PAI always have the documentation with them.
After I finished it, started to work on the source code again and got some
things working as I was able to understand the API of the library. Then I
crossed the next undocumented API of a library. Ok, it wasn't undocumented it
had a text file describing everything but having doxygen documentation is much
nicer than a text file. So I've started to document talloc from Samba4 with
doxygen.
The talloc API uses macros for a lot of things to make debugging easier or
to hide things you're doing from the user. However if you document a macro
than normally you want that it looks like a function. To be able to do that
with doxygen you have to use a little trick. As doxygen has a C preprocessor
built in you can create a define for a doxygen mode. That's what I've done in
the config file and all you need to do in the source code is to use it with
#ifdef.
#ifdef DOXYGEN
/**
* @brief Create a new talloc context.
*
* The talloc() macro is the core of the talloc library. It takes a memory
* context and a type, and returns a pointer to a new area of memory of the
* given type.
*
* The returned pointer is itself a talloc context, so you can use it as the
* context argument to more calls to talloc if you wish.
*
* The returned pointer is a "child" of the supplied context. This means that if
* you talloc_free() the context then the new child disappears as well.
* Alternatively you can free just the child.
*
* @param[in] ctx A talloc context to create a new reference on or NULL to
* create a new top level context.
*
* @param[in] type The type of memory to allocate.
*
* @return A type casted talloc context or NULL on error.
*
* @code
* unsigned int *a, *b;
*
* a = talloc(NULL, unsigned int);
* b = talloc(a, unsigned int);
* @endcode
*
* @see talloc_zero
* @see talloc_array
* @see talloc_steal
* @see talloc_free
*/
void *talloc(const void *ctx, #type);
#else
#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
void *_talloc(const void *context, size_t size);
#endif
So start to document your API. What you get well be something like this and other will love it!
csync at FOSDEM
I'm currently updating csync to work with libssh 0.4 and I will give a lightning talk about csync at FOSDEM next weekend. csync is a file synchronizer to keep two folders in sync. This can be local or remote. The main purpose of csync is to provide Roaming Home Directories.
I will work with Aris on libssh stuff and try to get some small features in KDE for kio_sftp. I heard that some KDE guys are around too. I hope to see you there.
If you're a Samba developer and go to FOSDEM, let me know
kio_sftp updates
openSUSE has backported the new kio_sftp implementation based on libssh to their KDE 4.3 packages. This increased the users and helped to find some bugs in kio_sftp and KDE. The current implementation is working fairly well.
As soon as libssh 0.4 will be released (hopefully soon) I will add more features. Users asked for ~/.ssh/config support and I've added openssh's statvfs extension to libssh. This means I can check if there is enough space on the server before I copy a file.
kio_sftp rewrite upstream
I've commited my kio_sftp rewrite to KDE trunk today. The patch for KDE 4.3 if you want to test it is available here. You need libssh 0.3.2 to get it working but I suggest to use the libssh v0-3 git branch which has fixes found by kio_sftp testers. Thanks to all of them!
Hack Week: kio_sftp in action!
The openSUSE Hackweek is over and I have a working kio_sftp implementation using libssh. There is still work which needs to be done. I have to cleanup the code and test all the features (resume of files, recursive deletion). Today I've copied successfully the first files to my webserver!
I've uploaded the two files to my webspace, here. Remeber that it's not finished yet! You need libssh's v0-3 git branch to get it working. I've found serveral bugs during the week. I will release libssh 0.3.2 next week.
Thanks to Dirk Müller who answered all my question and helped me with the KDE stuff.
Benchmarks will follow soon too.
