Mittwoch, 18. März 2009
Windows CE Remote File Viewer and Visual Studio 2005 SP1
I also had the problem that the Windows CE Remote File Viewer didn't work anymore after I had installed the SP1 for Visual Studio 2005. It should be solved by updating the files conmanclient.exe and CMAcept.exe by putting the new versions on the device that came with SP1. If, like me, you don't have that option because you don't own the device install, you can also save the directory c:/Program Files/Fichiers communs/Microsoft Shared/CoreCon before installing SP1 and putting it back afterwards. (I still got a question: Why is it still called Windows CE Remote File Viewer and not Windows for Mobile Remote File Viewer or something?)
Donnerstag, 2. Oktober 2008
Keyboard shortcut for "Show Offline Buddies" in Pidgin
I like to have fast access to the well-hidden function Show/Offline Buddies in Pidgin's Buddy List. To add a keyboard shortcut to it, you have to change the file ~/.purple/accels:
Change the line
to
(It is important to remove the semicolon at the beginning of the line which disables the whole line.)
I chose Ctrl-O (Conversation/Get Info gets still activated with the same shortcut in a conversation window.)
Change the line
;(gtk_accel_path "/Buddies/Show/Offline Buddies" "") to
(gtk_accel_path "/Buddies/Show/Offline Buddies" " o")(It is important to remove the semicolon at the beginning of the line which disables the whole line.)
I chose Ctrl-O (Conversation/Get Info gets still activated with the same shortcut in a conversation window.)
Donnerstag, 17. Mai 2007
Java is too terse (reading and writing)
I am glad that Obele pointed out the merits of the verbosity of Java.
Code like
But Java is not the first programming language ever invented, and not even the most readable. For instance, it is not explicit enough to express exactly were objects are in memory and were they go.
Sure, you can do something
every time you don't need the object anymore, but, unfortunately, that is just a hint to the garbage collector, you don't really know if your object will really disappear. What you want, is explicit memory management. And don't even get me started about exceptions which might jump at you out of knowhere!
Fortunately, in the old days, there was C, where you had to do the error code propagation and "Object-oriented Programming" by hand. No more calling of functions by accident which you didn't even know existed because they are in some super class! Unfortunately, Java and C have a terse way to do recursion, which looks just like a normal function call and hides stack handling from you, which is why I prefer with Fortran 77, where you have to be explicit about it.
Code like
DataSourceAdaptorWrapper dataSourceAdaptorWrapperhas just the right amount of verbosity to make it easy to read. No wonder Microsoft basically copied Java and even changed their own programming language to be nearly as verbose.
= new DataSourceAdaptorWrapper(
DataSourceAdaptorWrapper.DEFAULT_DATA_SOURCE_ADAPTOR_WRAPPER);
But Java is not the first programming language ever invented, and not even the most readable. For instance, it is not explicit enough to express exactly were objects are in memory and were they go.
Sure, you can do something
dataSourceAdaptorWrapper = null;
Runtime.getRuntime().gc();
every time you don't need the object anymore, but, unfortunately, that is just a hint to the garbage collector, you don't really know if your object will really disappear. What you want, is explicit memory management. And don't even get me started about exceptions which might jump at you out of knowhere!
Fortunately, in the old days, there was C, where you had to do the error code propagation and "Object-oriented Programming" by hand. No more calling of functions by accident which you didn't even know existed because they are in some super class! Unfortunately, Java and C have a terse way to do recursion, which looks just like a normal function call and hides stack handling from you, which is why I prefer with Fortran 77, where you have to be explicit about it.
Donnerstag, 10. Mai 2007
Merging CVS with conditionals
If you do
you will get a file with all differences merged, but depending on the preprocessor symbol NEWFEATURE (-D has a different meaning for CVS merge, you'll have to use the long form). So you'll get something like:
Is also cool if you want to wrap changes in if()-else, you just have to search and replace the preprocessor code. The only thing that I don't like is the fact that the test is negativ, I would prefer
since I don't like negative tests with else branches. But maybe it's just me. And it only works if you use C/C++ or their pre-processor, obviously.
cvs diff --ifdef=NEWFEATURE file.c
you will get a file with all differences merged, but depending on the preprocessor symbol NEWFEATURE (-D has a different meaning for CVS merge, you'll have to use the long form). So you'll get something like:
void f()
/* common code */
#ifndef NEWFEATURE
/* deleted code */
#else
/* added code */
#endif
/* more common code */
}
Is also cool if you want to wrap changes in if()-else, you just have to search and replace the preprocessor code. The only thing that I don't like is the fact that the test is negativ, I would prefer
#ifdef NEWFEATURE
/* added code */
#else
/* deleted code */
#endif
since I don't like negative tests with else branches. But maybe it's just me. And it only works if you use C/C++ or their pre-processor, obviously.
Dienstag, 8. Mai 2007
Command line arguments in Emacs
command-line-args
Variable: Args passed by shell to Emacs, as a list of strings.
Plist: variable-documentation
command-line-args-left
Variable: List of command-line args not yet processed.
Plist: variable-documentation
command-line-functions
Variable: List of functions to process unrecognized command-line arguments.
Plist: variable-documentation
Variable: Args passed by shell to Emacs, as a list of strings.
Plist: variable-documentation
command-line-args-left
Variable: List of command-line args not yet processed.
Plist: variable-documentation
command-line-functions
Variable: List of functions to process unrecognized command-line arguments.
Plist: variable-documentation
Abonnieren
Kommentare (Atom)