Category: Programming

Scrambling BASH Script Contents

BASH SCRIPTS HAS the inherit property of script languages of being readable by the users. Sometimes it is desireable to at least attempt to hide the inner details of a script. There are a few possibilities to do at least a bit of scrambling of the contents of a script for the viewing end user….


Interruption At Work Created A Mishap

INTERRUPTIONS AT WORK is a frequent occurrence but generally its not a big problem. This time however the unavoidable loss of focus on what you was doing before, gave an unpleasant surprise. I was adding some new functionality and had just written the following: switch (state) { case Step3: configuration.length = 10; break; } Next…


Upgraded From WordPress 2.2.2 to WordPress 2.7

WORDPRESS 2.7 UPGRADE from WordPress 2.2.2 done with no problems. I was somewhat worried that my old theme would break on the upgrade, but It appears to be working. Well, I got at little issue with the Wp-Syntax plugin. I upgraded the plugin and now my GeShi style overrides do not work anymore – guess…


Numbers To Strings And Back Again – Standard C++ vs. Boost

CONVERTING NUMBERS TO strings or the opposite of converting strings to numbers, is an operation that is far from as trivial as one would expect from such an obvious task – at least when it comes to C++ programming using standard libraries. The converting can be performed by the iostringstream classes in the standard library….


Why Lambda?

I HAVE BEEN reading up on Python programming lately (more on that in a later post). I’ve now been introduced to anonymous functions. In Python, anonymous functions are available using the lambda keyword. Anonymous functions are great, but I think the Lua syntax for anonymous functions is superior to the syntax adopted in Python. A…


What GUI Toolkit To Use?

GUI PROGRAMMING IS not something I’ve done in quite a while. At work I do embedded programming and that’s mainly also what I’ve been doing for my own personal projects. Except for some small utility applications I really haven’t done large GUI projects since MFC 6.0 was cool (if such a time ever was) ]:->….


Incomprehensive Hexdump Man Page

THE HEXDUMP MAN page, I find, is not the best written example of an applications manual. I recently had a task of finding the addresses of filename encounters generated when a bunch of files were written to an uncompressed jffs2 partition. Normally I’ve been sticking to the simple hexdump -C <device> use, but grepping filenames…


C++ Function Hidden, Not Overloaded Nor Overridden

THE C++ INHERITANCE model can be unintuitive some times – or perhaps more correctly, its easy to get tricked by C++ in some circumstances. When having an existing code base the need sometimes comes up, that an often used class is needed with a few additional features. Not to mess with any of existing code,…


Help On Python Regular Expressions

REGULAR EXPRESSIONS ARE a powerful friend, but the friendship doesn’t come easy. Regular expressions can be somewhat baffling getting a grasp on, but when finally understood, the possibilities are almost endless. When developing the searching expression used in HTML Parsing With Beautiful Soup I realized that my regular expression knowledge had gotten a bit rusty….


HTML Parsing With Beautiful Soup

BEAUTIFUL SOUP IS an HTML/XML parser written in Python. Beautiful Soup excels as an easy to use parser that requires no knowledge of actual parsing theory and techniques. And thanks to the excellent documentation with many code examples, it is easy to fabricate some working code very quickly. On Debian, Beautiful Soup can be install…