betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

Entries : Category [ digital ]
Things having to do with digital world items go in here.
[digital]  [language]  [life]  [security]  [media]  [zope]  [tourism]  [limnos]  [mac]  [athens]  [travel]  [montage]  [food]  [fire]  [zwiki]  [schnipsel]  [music]  [culture]  [shellfun]  [photography]  [hiking]  [pyramid]  [politics]  [bicycle]  [naxos]  [swim] 

04 September 2010

Playing around with jQuery

Back to Athens

The working week on Naxos was quite successful. I had put myself under pressure at the start of the week, feeling that there is lots to do and a few big open questions in the code.

My task was to feature up a part of one of my apps, where a heavy form requires lots of user interaction. Some more interactive toys would actually make things more useful. The problem was that the underlying data provider is a piece of PDF (at the lowest base). That's sometimes a weird bit of tech to deal with. It took me a while to wrangle the data I need out of it and put it into shape. Then there came the task of juicing it up. On the web, JavaScript is still the toy for this. A toy I never really liked. Nowadays we don't use "JavaScript" any more. We use libraries that use JavaScript. One of them is jQuery.

Turns out it's quite easy to use. I got a book (thanks Wu!) about it, which gave me a start. Then you just string stuff together. A good knowledge of HTML and CSS helps a lot, obviously, since most of the time you mess with these things. It's still JavaScript for one simple reason though: when you get stuck, debugging in the browser is the same pain as it always was. There were some moments, where I just wondered if my browser had stopped working and got stuck. One little semicolon left out and everything sticks its little feet in the air and plays dead.

In the end, I got something together. The nice part is that it's not only something that has moved forward somewhere deep in the code, but actually that you can see and play around with. So I'm relaxed on the way back to Athens.

Posted by betabug at 11:37 | Comments (1) | Trackbacks (0)
17 September 2010

Why Comments and Documentation Matter on 1-Person-Projects too

It's been some time...

Thought of the (still young) day: Comments and documentation matter... even if it's a 1-person project you're working one. Right now, I'm working on one of my older apps, one that I did on and off for a couple of years. I see some area on one of the pages in my browser, right in front of me. I want to "copy" (well, reuse actually) that part in another, new page. Just can't seem to find the code behind it though, been searching for 10 minutes. The code isn't that complicated or messy... I just wish I had given myself a hint somewhere.

(Addendum, just as I wrote this: There is a comment saying "pagecode u:preview" right at the top of the page... grepping the source for this string indeed gave my gray cells the needed kick. QED.)

Posted by betabug at 10:55 | Comments (0) | Trackbacks (0)
19 October 2010

Upper Case Crash

Nokia/Ovi Maps vs. Mac OSuX

Now that I've changed phone providers I unslacked enough to upgrade my phone firmware. Cue Arnie's voice (in "Last Action Hero"}... "Big Mistake." Well, my excuse is that I wanted free navigation with Nokia/Ovi Maps. Somehow ironic that it's now mainly the Maps application that is crashing.

The reason is quite simple: when I try to transfer the map files, I fail. My first try was to download the files using this link page (the download is actually still from Nokia's site}. Then I'd unpack the zip and transfer the files to the phone's memory card. But for some unknown reason (likely to make fun of me}, Mac OS X uppercased the file names. Result: Maps crashes once it tries to access the parts of the map on those files.

Next try was the official Map Loader application. Argh, what a crappy piece of software! Besides, it chokes on some files and crashes. I'll try the windows version next or maybe hooking up the memory card to an OpenBSD system.

Apart from Maps crashing, various apps and some settings disappeared. Most missed so far is the Wellness Tracker app.

Posted by betabug at 22:07 | Comments (0) | Trackbacks (0)
29 October 2010

Abstimmen per Internet

Frisch eingetroffen

Als Auslandschweizer darf ich ja bekanntlich bei Bundes-Abstimmungen mitstimmen. Neuerdings gibt es da einen Versuch zur Abstimmung über das Internet. Vorgestern sind bei mir die Abstimmungs-Unterlagen eingetroffen. Ich habe bis jetzt nur einen ganz kurzen Blick drauf geworfen, aber das sieht schon mal sehr interessant aus.

Da gibt es zum Beispiel einen abgedeckten Code, den man zum Abstimmen verwenden muss. Man kann weiterhin brieflich oder aber per Internet abstimmen - aber natürlich nicht beides zusammen. Das wird scheints erkannt falls es passiert und ist natürlich strafbar.

Ich muss das ganze Paket mal genauer studieren und auseinandernehmen. Die Problematik bei diesen Geschichten ist ja immer, dass es entweder nicht sicher ist (d.h. z.B. Stimmen könnten mehrfach abgegeben werden oder geändert werden) oder aber es kann nachverfolgt werden, wie jemand gestimmt hat. Digitale Abstimmungen wirklich sicher zu organisieren ist seeeehr schwer. Es wird spannend.

Posted by betabug at 09:58 | Comments (0) | Trackbacks (0)
30 November 2010

hackfest Athens

Some more old news
Some of the guys (and gals) at the 2nd hackfest in Athens

Saturday I developed the film, yesterday evening I scanned it. That's why this photo (and associated blog post) is a bit late. 10 days ago, 2010-11-21 I was for a short time at the 2nd hackfest in Athens. I didn't have my laptop with me, nor any project to hack on. But I met some cool people and funked with graffic and the well known "ruby guy" (now where do I have that link to his blog?) around with firesheep, ssh tunnels, VPN and all that.

Also had to leave early, because together with graffic we were invited over to Panos place for BBQ. I guess the next time I'll bring my laptop, reserve more time and get to hack on something myself. Either I could do some Zwiki bugfixing or just see who else has an interesting problem to solve, hacking in company is fun!

Posted by betabug at 10:14 | Comments (0) | Trackbacks (0)
21 February 2011

Hybrid HD update, Weekend Fun Hacking Project

It Rolls and it Rocks

This weekend I was hax0ring along on a new fun project. I'm coding up a new skin on COREBlog. I could do that fast and easy by adapting an existing skin, but this time I'm doing a skin almost from scratch using ZPT from start to end. No more DTML on this one. Much cleaner. Worked on it on Saturday and Sunday. I had lots of fun doing this. There are still bits and pieces left to do, I guess till the next weekend I can have it rolling.

The new "hybrid" hard disk in the old Macbook performs quite well. There are no more of those small moments of lag when opening applications. Could be that this is just from doing a clean install, but given that I've installed a system that does much more in the background, I'm ready to give the disk some credit.

Posted by betabug at 11:14 | Comments (0) | Trackbacks (0)
20 March 2011 again

Going out for coffee and code

This Sunday was another installment of the meeting. This is a loose get-together of all kinds of people who come together in a cafe somewhere to hack on whatever project they happen to work on. Or they might as well be there to socialize and have a coffee. This time I took my laptop with me and continued going through the tutorials of the pyramid framework.

Also at this hackfest there were a couple of talks given. Most important of these is probably that the guys from are trying to get a hackerspace going, which is a permanent place to hack on hardware and software and generally have a geeky time. I wasn't so hot about the talks, as I was busy chatting with Javier and Dan and going through the tutorial at the same time. But I had a good time anyway.

Posted by betabug at 18:29 | Comments (2) | Trackbacks (0)
12 April 2011

I'm a Freelancer now/soon

Python, Zope, Pyramid, whatever comes along

After 6 years at the Graphics Garage, my big projects there seems to be done. I've written three big systems there: Two of them to administrate every bit of the company, including organizing all the communication with the clients into an Extranet solution. It's time to move on... I'll start working on my own as a freelancer now.

I have on and off worked with Python and Zope since 2002. I've also worked with other web based systems of all kinds (and some not-web-based ones), so I guess I'll stay in the web based programming area for now. I've worked on big and small projects, in teams and alone. Some of my stuff is open source and can be admired from my pro page (with links to my resume too), some is proprietary client stuff and will stay hidden in their code vaults forever.

With all that Zope experience, I'm obviously there for any ol' Zope site in need of an overhaul or extension. For the "new" stuff that's not Zope, right now I've started a little fun project with Pyramid and I've got some Django and Ruby scheduled too. Whatever comes along though, if the tool does the job, it's fine for me.

For starters I continue supporting the projects of the Garage of course, putting my projects there into "maintenance mode". I also have the first project coming along from a customer in Switzerland. I've got some leads from France, so I might be having fun soon as an "international enterprise".

I don't want to hurry it in the beginning (starting too many things at once is as bad as starting nothing), but I've still got some capacity free. So, service announcement: If you need some good programming done, drop me a line!

Posted by betabug at 10:09 | Comments (1) | Trackbacks (0)
05 May 2011

60 Minutes Free Wifi at Athens Airport

Hey, that's something

So, it's been a while since the last time I traveled. One thing I found out, they give you 60 minutes of free wifi at Athens airport now. Nice! All you do is surf to any website, have your connection "captured" and redirected to the airport site (flash needed, if you don't have that, try this url: or some alteration, it's where I end up when I "get through"). Then you click around two or three times on the obvious links for "free wifi" and at some point it tells you that you are on. Not even a captcha.

They seem to block my IPsec VPN, it connects, but no traffic runs. Not in the mood to debug that, but ssh -D works.

Posted by betabug at 15:17 | Comments (1) | Trackbacks (0)
07 November 2011

Welcome to Betabug Sirius

My new Company Site

It has been quite some time that I announced that I'd be working as a freelancer. Lots of stuff had to be done in that time, but finally things are ready. I've founded my own little company and set up a small website: Welcome to Betabug Sirius!

For once this isn't a "ZWiki-As-A-CMS" site (which is what I usually do when I want a site to go up fast), but a plain, static html site, done in vi. I know it won't scale when I'll want to expand it, but I had fun coding it up in the old style.

So far I already have a few customers, working with Zope (mostly in bugfixing and maintenance of existing / legacy sites) and with Pyramid (building a brand new web application). There is also a project to build something unique and "our own" on a longer horizon, involving technology and art.

There has been and still is a lot of bureaucracy, but so far the ride has been smooth and sometimes even fun. Part of the strategy is to work together with other companies to form flexible teams for each project. That's something that has worked real well so far, giving me fun and inspiration to work with others.

Posted by betabug at 10:26 | Comments (7) | Trackbacks (0)
17 November 2011

Instapaper on eBook reader

Just the text, please
Finding the epub download link on my instapaper page

Yesterday I gave Instapaper another try. I hadn't previously really warmed up to it, but maybe using a different reading device would help? The most relaxed reading device I have is my crummy, cheap eBook reader (Bookeen Cybook Opus). My first try was with using calibre, as described in this post by Justin Pot, basically it's going from instapaper to calibre's "news download" feature, to the ebook reader. It's convenient because of calibre's autosyncing. But then, I don't use that.

Looking at the instapaper "overview" page, I noticed something else though: Instapaper will package your unread articles into an ePub to download. Now that was just what I needed. Now all I need to do is to click on that, then hook up the reader to the computer, and drag-n-drop the epub file over.

Later I gave that epub a test-reading. It's well done, there is an index to jump to the various articles. Almost all of the extra-stuff on the page is cut off, sometimes some links are left over, sometimes the start of the text was repeated at the end of the article (clearly separated though). All in all it worked really well.

Posted by betabug at 13:14 | Comments (2) | Trackbacks (0)
23 November 2011

Bragging on AppleScript

Looking at some stuff I did waaaay back

Yesterday while "surfing here and there" (as my friend Panos likes to put it), I came across a post that had a snippet of AppleScript, which triggered fond memories. You see, a looong time ago I did a lot of AppleScript. Those were the days when I was using Claris Emailer and writing various Emailerscripts to extend it. We are talking about 1997 here. Now AppleScript doesn't have such an affection to text wrangling like perl (which I started using a bit later). It especially lacked afast way to search and replace in strings. So one winter evening I was sitting in my home office, turning this problem around in my head.

At some point I had an idea, a flash, a serious spell of "thinking outside the box". I came up with a fast way to search and replace, by abusing a built-in feature of the language. I made some simple tests and the thing was 600 times faster than the usual way of going through the text one character at a time. Now, I come from a culture where you shouldn't brag. When I grew up in Switzerland, little children learn that it's not really OK to insist that you're better than other children or that you did something soooo great. I was constantly hitting against that, but something must have stuck. Well, I still don't really like to brag, I prefer a tone of understatement, even when I think I did something great. On the other hand, I had included a quite braggy comment in the little subroutine that I wrote. The human ego is a confusing thing.

Back then, I should have published my find right away (there was even a discussion about search+replace on the AppleScript mailing list a week or two later). It would have been cool for me and it would have helped my fellow scripters. What I did was to write some more scripts for Emailer and publish those and together with announcing some of them, I wrote about my find. Much time later I also made a page about the thing called "austauschen", together with a snippet from that mail to the Claris Emailer mailing list (dated december 24th, 1997).

The way to do this has spread around, everybody in the AppleScript world is now using it and that's fine with me. Myself I'm not using AppleScript any more really. When I need something scripted I reach for a shell script much faster these days. So yesterday when I saw that post, I remembered all that story fondly: Yeah, I did that thing.

Posted by betabug at 10:36 | Comments (0) | Trackbacks (0)
26 November 2011

Installing psycopg2 on Mac OS X 10.6 with a 64bit Python

Balance Postgres, Python, and bits

While installing a Django application that uses Postgres on my MacBook with Mac OS X 10.6 (Snow Leopard), I ran into some problems that were all over the net. The symptom was that when I tried to pip install the app's requirements, I got a traceback with something like this for psycopg2:

dlopen([...]/psycopg2/, 2): Symbol not found: _PQbackendPID
Expected in: flat namespace

Searching the web for this found lots of things, but they didn't seem to work for me... because of some dead bodies in my Mac's basement. Basically this errors happens due to a mismatch of 32 or 64 bitness of Python, psycopg2, and Postgres. I had installed Postgres from the official installer (9.1.1), Python 2.7 was standard from the system (which is 64bit). First attempt to fix the mess, following a tipp from Anna Vester, I tried to recompile psycopg2:

pip uninstall psycopg2
env ARCHFLAGS="-arch x86_64" pip install psycopg2

I'm not using sudo, because I'm in a virtualenv and also I didn't dual install for i386 as suggested in the blog post. There were a lot of posts out there telling me simply to reinstall psycopg2, which didn't get me anywhere.

But... even with this it didn't work for me. I found some other hints out there that got me looking in the right direction. The second problem was that I had an old version of Postgres around, from when my MacBook was running 10.4. The pg_config from that old version didn't like the psycopg2, even in 64bit. Pointing my path to the new postgres bin directory instead of the old one solved that too.

Posted by betabug at 19:33 | Comments (2) | Trackbacks (0)
05 December 2011

Doing my own accounting

ledger and hledger to the rescue

Now that I am running my own business, there arises the question of accounting. Actually that question had been posed way before the business was there and I've thought a lot about it. There are three strategies:

  1. Do your own bookkeeping
  2. Do your own bookkeeping, get help from an accountant for closing the books and doing the tax papers
  3. Give it all to an accountant

So far I've chosen strategy 1, with an option to switch to strategy 2. I've had to learn a lot, despite having done double entry accounting in the past and despite having coded lots of business software in my life (hey, if you need anything like that, we're here to help!) But having to learn so much is exactly why I consider strategy 1 to be a major win for me. You see, the stuff that I'm learning about, often means that there are decisions made. You can do stuff one way or another. Or it means that you have to beware of things you might be doing "in real business life", which have an outcome on what happens in your books (and therefore in your taxes).

So if I go with option 1, it means that I have to learn a lot about stuff that I have to know anyway. If I give my receipts and all that to an accountant, then I have to have a lot of trust in that person. What's more, I need a very good communication with that person, because I will have to consult her on a lot of my business decisions. I might readily switch to option 2, because doing it all alone has risks too, but then I will be already on a base of knowledge that lets me work around some pitfalls. Even when my company gets so big (and I'll get so philthy rich) that doing my accounting is no longer an option, the knowledge will serve me well.

As for the software for accounting... you can spend a lot on that. Depending on where you (or your business) is located, you will have to spend a lot, because in some countries they allow only certain "certified" accounting programs. In my companie's case (Switzerland), any reliable software will do. Being a true geek, I found ledger and hledger, which are command line accounting programs. "ledger" (also called "ledger-cli" sometimes) is the original version, coded in C++ (so it's also called "c++ ledger" sometimes). I had some trouble getting it installed, but finally got version 2.6.3 up and running using "homebrew" on Mac OS X. As for "hledger", the "h" is an indication that it's writtin in Haskell. There is a (slightly older) binary on the site, which was enough to get me up and running fast. I've since managed to compile my own hledger too.

These CLI ledger programs basically work by entering "entries" into a "journal" file in a simple format. This approach was very welcome for me, since it allowed me to play around until I had reactived my memory about how double entry accounting works. While I was reading up I could try things out and check with various reports how it all worked together. For a while I had one category of entries "the wrong way around" and it was easy to correct once I figured it out. Even from the most flexible GUI accounting programs, I remember this kind of thing to be much more complicated.

These two programs share a (more or less) common file format, so with a little care it's possible to use both of them in parallel. Which I do now, because there are some features that hledger doesn't have yet, while it feels more comfortable in other respects. The features I miss most (and for which I turn to "c++ ledger") are the --wide and --related options for showing a "register" of an account. Gotta really learn Haskell now, so I can contribute that stuff myself! :-)

Posted by betabug at 18:43 | Comments (0) | Trackbacks (0)
17 February 2012

Got a new ebook reader: Cybook Odyssey

Replacement due to breakage

My old ebook reader (Bookeen Cybook Opus) fell down some time ago, the screen cracked. It wasn't really an excellent product, but it did the job, so I don't think I would have replaced it anytime soon if I had had a choice. But with this turn of events, I had to look around. The "big" offerings from Amazon and the like were out of the question for "political" reasons, no way am I going to tie myself into those corporate orwellian worlds. Besides, I'm mostly reading the classics, which I get from Project Gutenberg.

In the end I decided to look for Bookeen's latest product, the "Odyssey". (Someone should examine my psychology for buying again from a company that I bought a rather shaky product from before.) To my defense, I must say that this time I checked some reviews through the mobileread forum, and those reviews looked satisfactory. So, how have I been faring?

I'm happy with the new device. It's a bit heavier (one big advantage of the Opus was that it was really incredibly light, totally made for one-hand reading). The software is much stabler, it hasn't crashed on me even once. The screen appears to be a bit better - I can't compare them side by side, since my Opus' screen is crashed. The screen is certainly much, much faster, page turns are not noticeable any more. In fact the screen is so fast that they waste time by animating opening a book, which becomes annoying quick. (Even more annoying when I tapped the wrong book on the touch screen and when that books is from Project Gutenberg, with no meaningful title page.)

The Odyssey has a touch screen, which is fancy in some respects, but then it also leads to a smudgy screen in need of cleaning all the time. I would have been fine with a couple of more buttons and the button interface of the Opus.

There are some extra software features, like the "Home" screen that allows access to the last 5 books opened ("Now Reading"). Also the last 25 added books - but since they are shown only with the "cover", and much too small, this is useless. On my friend Saad's "nook", they use a text list for these things, which is much more usefull. The "slide" on the touch screen for moving between "last read" books is a "hit and miss" business, for me it often opens the wrong book instead of showing me another choice.

There is also on the "Home" screen a huge link to the online shop of the company where I bought the reader, which I can't seem to get rid of. Well, I bought it for 130 EUR at the Virgin Megastore in Paris (including the cover, which would have cost 23 EUR or so normally), instead of paying 180 EUR for it here in Greece. So that "ad" on the Home screen is the price for my money saved.

The Odyssey lets you set bookmarks and annotate books. Some people may like this, for me it doesn't play a big role. This is one feature where they needed the touch screen, for the on screen keyboard. There's a french lexicon too - useful when I read Jules Vernes, and lexica in other languages are in the works apparently. More high tech is in wifi and a web browser. Now I can load books directly from (works very well), look stuff up in wikipedia and read the news. The browser is a bit of a hack though, don't expect too much.

What's weirdly missing is a search feature. Can't search neither inside a book nor through all books. Not really in the class of features that I totally miss myself, but in the list of "kind of obvious features to put in an electronic reader device". The PDF support is still the same, not being able to "reflow" PDFs. So this works only for PDF documents made for the format - what I do is to converto PDFs to ePUB.

What else? Battery live seems to be much better than on the Opus, but the battery isn't replaceable any more. (The replaceable battery of the Opus was something that I was very fond of.) I never switch the device off totally, yet I haven't gotten stuck with an empty battery yet. The on/off/standby button is oddly placed and tricky to use.

In the end what matters for me is a good screen, because I really, really use the device to read books. I'm enjoying the faster page turn speed. Also the battery life and lack of crashes (the Opus often crashed when the battery reached 40%). Everything else is a bit of a game to me, nice to have to waste a bit of time sometimes.

Posted by betabug at 18:23 | Comments (2) | Trackbacks (0)
23 February 2012

Caecilia Font for ebook readers

Caeciiiiiiilia... !

Somewhere on the MobileRead forum (where I'm only lurking), I found a recommendation for the Caecilia font for use on ebook readers. The poster said that the font has thicker serifs, which would work better on e-ink displays. You can download the font on the FontYükle site. I got the "Roman" version, tried it out on my Bookeen Cybook Odyssey, and I think it's working fine - I still use it since I loaded it.

I don't think that it's a matter of "thicker serifs" though - I think the font just draws a bit "fatter" and wider, which works better on the display if there is lower ambient light. It's not as fat as the "Emboldened Text" setting of the reader, just slightly fatter. On the downside, the text looks less like in a book now to me. So from an aesthetic point of view, I don't like the font so much - while from an utilistic point of view it works well for reading.

Posted by betabug at 20:03 | Comments (0) | Trackbacks (0)
Prev  ...  3   4   5   6   7   8   9   10   [11]   12   13   14   Next