Friday, December 25, 2009
Snow Leopard's "Finder" show sizes of all small network files as 1MB
Wednesday, December 23, 2009
Tuesday, December 22, 2009
OpenOffice 3.2 RC1 arrives
Friday, December 18, 2009
editing files with VI and enforcing certain editor settings
As long as you don't "globally" agree on this, it will at least help to add a setting with a "file-wide" scope. VI's feature supporting such options is called modeline. There are 2 related settings, that make the use of that feature possible resp. impossible: "[no]modeline", and "modelines=n". For further reading do a ":help modeline" in VIM! (I guess, there are not that many original UCB VI-s around nowadays any more) That shows you samples and the exact syntax for how to add modelines.
I saw Jürgen Gulbins using this feature like 25 years ago, found it useful then, but never applied it myself in the meantime. But now in my current project with mixed VIM and Eclipse usage it seems to make very good sense, but I wasn't able to recall the details. The article, that my Google enquiry pointed me to, was posted in December 2005 on the linux-il list: "vim inline :set". Thanks to Meir Kriheli for answering the question there!
Tuesday, December 15, 2009
bash version 4 and associative arrays
If you do an ''echo ${BASH_ALIASES[@]}" you see all the values, if you do a "set | fgrep BASH_ALIASES" you see, to what the indexes map.
Update:
In December, when I got aware of the new feature, I thought, there is no way to get the list of indexes.
But there is: ${!name[@]} and ${!name[*]} return the list of array keys. This gets explained in the section Parameter Expansion. I am sorry, if my former statements caused confusion.
Wednesday, December 9, 2009
my 1st steps in Java: extending a JasperReport sample program using Apache Commons CLI
I intended to extend jasperreports-3.6.2/demo/samples/text/TextApp.java, so that it would take "-Dname=value" style options. There was a need to make TextApp.java a little more flexible, and that was quite easily to achieve making use of getProperty calls.
A friend had given me the hint recently to have a look at "System.getProperty()", but it turned out to only provide the caller with properties like
"os.name"
, according to http://java.sun.com/docs/books/tutorial/essential/environment/sysprop.html. So that wasn't quite the route to follow.I started my day googling for "getopt java", found that nice package "Apache Commons CLI", made use of it within that JasperForge utility, and started scripting a batch run around that utility's targets named "fill..." resp. "text..." in bash, resp. their new sisters, that I derived from them today. Next step is to rewrite that shell script as Windows batch script file resp. as python script to be used in a Windows environment. This work is almost "production ready", but I am facing quite some necessary paperwork, so that the software developed can get made serious use of.
Looks like the Jasper guys had not expected their software to be used like that. The ".jrxml" gets designed using iReport on a Windows box or whatever; after that it is being made use of on any kind of server executing Java classes with access to a database. (I wonder, whether that approach would also work with JasperETL.)
I am quite satisfied with my 1st steps in Java in that JasperReport environment.
I really had no idea and also no perspective of getting thrown into Java development during a commercial project, and even in the context of JasperReport. I do like this.
Update / 2010-03-05:
The atomar production steps described within TextApp.java's build.xml are rather nice and instructive, but they make use of those routines within TextApp.java, where target file names (incl. directory path) get strictly derived from source file names. I added resp. derived productions steps, that make use of thoses methods of the API, that allow you to name the destiny's name explictily. And I also added chains of productions steps into the java source file, so that the calling shell resp. "whatever" script wouldn't have to deal with calling the chained steps one by one itself. So far there are chains starting at .jrxml and at .jasper, and chains that end at .txt and also at .pdf. The idea is to place intermediate files on local disks within temp. directories instead of close to the source resp. final target file (maybe) somewhere on a network file system.
Tuesday, November 24, 2009
python and class methods
classmethod = classmethod(classmethod)
Monday, November 23, 2009
my new book: Tarek Ziadé: Expert Python Programming
I think, it's a big marketing mistake, to print on the cover and certainly also elsewhere, that this book is targeted towards people with a "sound background in Python programming". I actually think, people with a serious background in computer science (maybe beyond the BSc/BA level) and some knowledge of the specifics of, how python implements the usual more or less "modernistic" (i.e. starting with Simula 67) progamming language features, certainly will gain good profit of enjoying this book. Do yourself a favour and get both, the paper book and the PDF! So maybe you can print one or the other page, and put it on your fellow project managers' desks.
(To be continued ...)
A note to my mates: yes, I got the PDF, and I also got the PDF of the PragProg book.
software documentation
You are not writing fiction, so keep the style as simple as possible.And with a few more words:
(Another author) made an analysis [...] to try to understand, why his books sold so well. He made a list of all best sellers in the marketing area and compared the average number of words per sentence in each one of them. He realized, that his books had the lowest numbers of words per sentence (thirteen words). This simple fact [...] proved that readers prefer short and simple sentences, rather than long and stylish ones.
using associative arrays in your code
How many lines of code does it take for your new piece of code, before you introduce a class?
Yes, I know, Bourne shell doesn't come with the concept of associative arrays, of course it also doesn't know classes or object orientation. Right, a simple 20 or 30 lines shell script for copying and renaming files may not have the need for associative arrays or classes. But if your script gets longer, pls rethink, whether Bourne shell is the right choice for your task, or whether you make really good use of ruby, perl, or python!
Your next steps may be writing unit testing and using continuous integration. It's not your customer, who should request it, it should be your serious professional style, your way to deliver proper services. If you are not familiar with the terms, look them up -- I provided you with proper links to interesting and informative articles.
how to abbreviate the word Character and how German programmers pronounce it
Saturday, November 21, 2009
Thursday, November 12, 2009
google.com/health
Conditions, Medications, Allergies; Medical Contacts.
Wednesday, November 11, 2009
Tuesday, November 10, 2009
how to use UNIX tee to send output to more than one pipe?
I like UNIX man pages, and I thought, I should give "$ man 1 tee" a try. That pointed me to "$ info coreutils 'tee invocation'", and that instructed me to use "process substitution", a feature of modern shells. The notation is different, but it's still piping: ">( PROCESS_READING_FROM_A_PIPE )". And you can use it more than once on the process, that you want to read output from.
Now, that is seriously slick enough for me. Read the example there, it's really nice!
Added a note on en.wikipedia.org mentioning this insight.
It is rather tempting to think, that using process substitution you don't even need tee itself anymore at all, but just try yourself, it doesn't work!
development of a child
I was pretty strict and harsh and serious with him (o, how cruel can a father be?! (but self-critical as well!!!)), and he showed pretty good "taking qualities" (german: Nehmerqualitäten), but he still started to show, how much my appreciation means to him: he showed us, he is able to pronounce words with "R" properly now in German, "rot, rot, rot!" he shouted all of a sudden (that's the colour "red" in English), because until very recently he (as a Portuguese native speaker) used to pronounce it "bot", and it took me endless repetitions pronouncing it properly to him, that looked quite unsuccessful to me -- until last weekend. I am very, very touched. I am very proud of him.
P.S. Suggestions for better English always appreciated.
Friday, November 6, 2009
strangers contacting me on Live Messenger
No, I didn't google for this phenomenon. Actually I'm not sure, how to express this with 3 to 5 words to be put in a Google search, so that I don't receive mostly irrelevant hits.
Actually I mostly don't use the Live Messenger client itself but pidgin. But of course: the client shouldn't make a difference there. (Actually it does, as I found out later during my research. See below!!)
Anybody any idea?
Update: now that I expressed this thing here, I was able to do a Google search (with the title of this story here), and found this. Didn't help me either, but maybe others will find it helpful.
Another update: looks like actually the client IM software needs to do the blocking, and I found the right settings in pidgin to do that. There is a privacy menu entry (Tools > Privacy), and you have to select "allow only the users on my buddy list" on every single account, if that's what you want -- and I certainly do.
Wednesday, November 4, 2009
traveling on public transport using an iPhone
For Berlin there also exists a very nice iPhone app by the name of fahrinfo, which I really make use of a lot.
how to log into your iPhone using the root resp. the mobile account with a well-known password
Sunday, November 1, 2009
sipgate's SIP client for the iPhone
Downloaded it, started it, nice.
It can of course make us of my address book on the iPhone.
I'm not sure, I would want to use SIP over UMTS (if they don't restrict that anyways as Skype does), but for telephone over WiFi, that's pretty nice.
Saturday, October 31, 2009
getting familiar with a Mac keyboard
Whatever I thought would be missing on the Mac keyboard, now I find it easily.
Thursday, October 29, 2009
creating phone book and diary entries from incoming calls on my router
Alright, "as you know" (so of course this article only applies to some sort of computer nerds), my router is a FRITZ!Box 7270, it's also the base station for my (wireless) phones, and a lot more ... -- certainly one of my most important toys or gadgets. And I have 2 of them, one for at home, one for anywhere outside, where I can only connect to the Internet through UMTS.
So alright, back to the title of this article!
- It's nice to record your incoming and outgoing calls in your diary, right? (my diary is emacs style)
- It's nice to get something descriptive displayed on your phone, when somebody calls, right?
- It's nice to extend your phone book through time as easily as possible, right?
Well, my router is running Linux as its operating system kernel, and BusyBox on top of it. On each incoming phone call it runs a shell script with a few parameters, of course the caller's phone# (if available) and also the callee's phone#. (I do have more than one phone#, and why not also record the called phone#, just for the record?) It tries to associate a name with the caller's phone#, if there is a matching entry in the phone book.
Quite a while ago I started implementing such a shell script, and obviously (as it is almost an ordinary (bash) shell script), I can develop and test it on any of my computers, that can run shell scripts, like any of my openSuSE computers, any WinXP computer running cygwin, a Mac running OS X, ... . Yes, I cannot create a full blown shell script, I will not pipe a lot through one-liner perl or ruby scripts on my router, but still: it's a handy and useful, not so tiny shell script.
So far it appears to me, as if no such executable gets called on the router for outgoing calls, but I can still mimic this behaviour by calling that script on my main development box.
Having said this, my script (fritz_box_calllog.sh) fulfills all the requirements, that I listed above in that bullet list.
For incoming calls without caller id and/or without a matching entry in the phone book it creates a piece of XML text, that I can paste into my FRITZ!Box XML phone book, and where I can fill in a phone# and a name or any descriptive text, so next time, I want to dial that phone# myself, I can select it from the phone book. And maybe another time that person will call you with caller id, and then you will be able to greet that person with her/his name. Wouldn't that be nice?
The implementation of this software also got inspired by Matthias Hühne's "Dial!Fritz", that I run on my iPhone. But of course his software is far completer and nicer, and it's well integrated.
Wednesday, October 28, 2009
a Mac keyboard is so different from a PC keyboard
the pidgin Facebook plugin
I am using pidgin 2.6.2 (libpurple 2.6.2) from fink on Mac OS X, Snow Leopard.
Update / 2010-12-28:
For quite a while Facebook chat has now been reachable through Jabber / XMPP.
Tuesday, October 27, 2009
the main Fink web site is down, there is an alternative though (UPDATE)
2009-10-28: You can fink again. The main Fink web site is still not available though.
Safari AdBlocker
Question is, how long it will take, until the iPhone's Safari can be made to block ads as well. I mean, an iPhone is an OS X derivative using Cocoa, so I wonder how hard that will be.
Well, now don't you complain here, if you find browsing without ads a poor experience!
Monday, October 26, 2009
how to print from my Mac OS X machine through a Netgear print server
Now my Mac is the UNIX-ish machine on my LAN with the richest printing capabilities:
- It can print through a 7270 AVM FRITZ!Box (my router++) on a Samsung CLP-315 colour laser printer attached via USB.
- It can also print through a Netgear PS110 (my print server) on a HP LJ1100A and a HP LJ4L, both pretty ancient but functional b&w laser printers, attached through parallel cables.
Just for the completeness of the presentation: Incoming fax documents get received by that FRITZ!Box, and that lovely devices creates PDF-s from them and forwards them as e-mail attachments to one of my IMAP mail boxes out there.
Sunday, October 25, 2009
CAVEAT: the Pill and antibiotics
What had happened? She had an abortion last week with twins in the 3rd month. No contraception? No, really not. But the Pill and antibiotics do not go together. She didn't know that, and she got pregnant.
We chatted quite long last night. I think, she felt a little better, when we said our "Good Nights".
pipe symbol at Apple keyboard
in short: System Preferences / Language + Text / Input Sources / Show Input menu in menu bar / Show Keyboard Viewer.
there you play a little with combinations of the shift key, the function key, and just try yourself!
alright, I actually completed this article -- at the cost of letting my SO wait for my call to the gym. sorry for that!
Thursday, October 22, 2009
how to copy an Audio-CD nowadays?
I tried to achieve this on my new Mac Book Pro, just with the software, that comes with it. Disk Utility does not seem to support exactly this, it leaves out especially the creation of an image of a CD-ROM. I would though burn a CD-ROM from an image.
Looks like openSuSE's Brasero does not have a problem with this task.
Tuesday, October 20, 2009
the UNIX hostname--where can you change it on Mac OS X?
Update 2013-06-15:
A: in Sharing you can change the computer name.
Sunday, October 18, 2009
[[RATHER OLD ARTICLE]] how to remove an app installed through "Installous"
I the meantime I also installed a few apps from those repositories, but I wasn't able to remove any of them.
Now I found a setting to get apps installed through Installous to appear under my iPhone's Applications on iTunes on my PC. Looks like that is a way to also remove them.
Yes, I read there is an issue with that "AppSync". So be sure, you know, what you do, before you also simply toggle that switch. Your "other apps" might get removed by iTunes next time you sync your iPhone.
I am now stuck in a huge sync, and I will interrupt it, as my SO keeps reminding me through the phone, that we have an appointment in the gym.
At least I do know now, how to get rid of that app, that I didn't find useful. It drives me nuts, if I can't find things like that out in a rather short time.
Oh, just a short extra note, before I leave for the gym: YES, that syncing DID remove a few apps, that I didn't want to get removed. Those were those navigation apps, that the guy thought I should get installed by him for quite some bucks. Well, not to worry, I shall poke him for that soon. Offfffffff for the gym!
Friday, October 16, 2009
my Mac now connects through my UMTS USB modem
Now I can also make use of it on my Mac Book Pro. Splendid.
Looks like 4g-systems.com now sell their current model (XS Stick W14) w/o branding and SIM-lock for EUR 100. Not bad, question is, whether the 7270 supports it.
my Mac now prints on the colour laser printer attached to the FRITZ!Box router
Alright, alright, I admit it: I vaguely remember already having successfully attached my ex's (i.e. "-1") Mac Mini (which isn't officially hers ...) my FRITZ!Box ..., so I knew it would work sooner or later.
Now this is really a nice CUPS printer set up underneath!!!
I wished my openSuSE-11.1 computers would accept the CLP-315 driver as well!
Until then I only create PDF-s on them and print them via Windows or OS X.
I really love this set up: the laser printer attached via USB to my 7270, acting as a network printer.
AVM's description on how to attach a printer to the 7270 through USB was actually very helpful.
24 hours with son#2 ahead starting at 15:00
Actually if somebody in Berlin invites us for welcoming Princess Shabbat, we will certainly go for it! Any Friday is nice, if you don't read this today.
a completer UNIX on Mac OS X
(If you hold an O'Reilly account, and if you register your Leopard paper version of this book by simply entering the right ISBN und My Account, then this month the PDF upgrade costs you only $4.99. Pragmatic Progammers also ask you a question like "what's the 1st word on page 203", which you can obviously also answer correctly, if you sit in the coffee corner of your book store with your computer on your lap. But you are an honest book owner, aren't you?)
Download fink from sourceforge! This opens a wide realm of extra UNIX utility to you. A very nice installer and repository!!
Tell fink to install emacs22-carbon for you! Yes, there is also a carbon native version of emacs. There is also an an emacs23-app (this is a carbon version!!) in the unstable area of the repository, but you don't want to start your UNIX life on OS X with unstable utilities, as I do, do you?!?
MacPorts is another nice installer and repository, that you may want to get hold on.
an X-Windows GNU emacs on Mac OS X
The emacs, that comes with Leopard's X11 optional package, seems to be an alphanum only one.
To be continued ...
how to press an HTML accesskey in Firefox on a Mac
I am just one of these traditional mouse haters, I know how to type with 10 fingers, and I type quite fast, and I don't want to keep moving my right hand from the keyboard to the mouse resp. touch pad and back. That's why I appreciate accesskeys. And I love using them on Linux, Windows and on Mac OS X.
Thursday, October 15, 2009
iPhone: "unlocked", "jailbreaking", Cydia, ...
A lot of useful information is actually descibed in the wikipedia article on the iPhone:
... "Jailbreaking" allows users to install apps not available on the App Store or modify basic functionality. SIM unlocking allows the iPhone to be used on a different carrier's network. ...
So, there are iPhones locked to the SIM-card, they were sold with, and there are ones, that are not locked to such a SIM-card. Apparently in Italy iPhones are available (October 2009), that are sold without such a SIM-lock. Obviously those pieces are also available sooner or later in Italy's neighbouring countries.
But there are also descriptions on the web, that show you, how to unlock your iPhone. Maybe those descriptions do not work for you and your current (latest) software on your iPhone.
Right now (2009-10-15) I am thinking about getting me such an Italian 3GS 36G thingie.
You do want to know about alternative installers and application repositories: read the article on Cydia, the application on wikipedia!
Afterwards you want to know, what Installous is ...
Wednesday, October 14, 2009
iPhone address book Group info blanked again
started my first Portuguese language course
Tuesday, September 29, 2009
must-have downloads for the iPhone
- $0.99 for "Camera Zoom"
- $2.99 Pano
- FREE Postino
- $9.99 RunKeeper Pro
Friday, September 18, 2009
tweet sheet
upgrading pidgin from SF.net instead of from openSuSE repositories
Wednesday, September 16, 2009
my iPhone twitter app: tweetie
Saturday, September 12, 2009
me on twitter
Jochen started tweeting ... -- yes, maybe that's not really, what the world was keeping its breath for ;-) but I thought, I give it a try.
No, I certainly don't want to have get SMSs at whatever time, I rather prefer a PC or iPhone multi-account application.
Monday, July 13, 2009
the Latin word "vindicare" and its descendants like "revanche" and "vengeance"
I was recently communicating with "somebody" on a revanche-seeking person, and "somebody" was creating the German word vingativ from the Portuguese word vingativo.
It actually took me a moment to find out, what it really means and where it derives from. Initially I had not clue at all, to be honest.
The English wiktionary entry on revanche did not help at all,
but the French one on vengeance
and the Portuguese on vingar did.
They both refer to the Latin vindicare (which is actually a pretty empty entry),
but that word in fact means going to justice
(maybe somebody wants to replace this English phrase).
So that word made quite a way from going to justice
to do-it-yourself justice
, didn't it? What dou you think?
Friday, July 10, 2009
I trust Tagged
There has been some news today that NY's Attorney General Andrew Cuomo will sue Tagged for doing bad things like identity theft.
I do care about my informational identy and privacy, but I frankly want to tell everybody, I have got not worries WRT this and Tagged.
Tuesday, June 30, 2009
the english hazard vs the portuguese azar
both the english word hazard and the portuguese word azar sounded so similar to me, when I first heard that word used by my Love, so that I considered them to mean the same. that's incorrect, as I had to find out very soon, when we looked up the dictionaries on Sunday evening. what a time for looking up dictionaries? but what else would adults do beyond 23:00 on Sunday evenings?
but me being a little strongheaded I finally found out, that both words go back to the same root, which is the arab word “az-zahr” resp. “al-zahr” meaning “the dice”. weird, isn't it?!? same root, opposite meanings. wow.
Tuesday, February 24, 2009
Asus developing Android netbook
bash version 4.0 released
After all these years bash finally got associative arrays implemented: bash version 4.0 got announced.
Needless to mention, that bash is my favourite shell, has been for almost 20 years now. I once had a period, when I used buggy zsh for scripts, where I was tempted to use associative arrays, because zsh introduced them long before I came across zsh.
Monday, January 19, 2009
Kurt Cagle's article "Tech Nomads"
Sunday, January 18, 2009
a weekend away from Berlin
The customer's project (the little lightweight green car) is a little delayed, and the boss wanted a few guys including me, to spend some time on Saturday on fixing a few problems and adding a few minimal features.
The customer's site is 400km away from Berlin, the family (version 2) is actually currently traveling in Brazil, so I spend the weekend in that fabulous town in Western Germany, facebooking, office working, listening to Frank Sinatra's music, shopping, working out in the gym, chatting with Rolf, ...
Actually, that music is copyright-cleared, I think, so if anyone is interested in it, I can put the MP3-s on a disk attached to my router, and you can download it from there.
My friends know how to contact me, and I am quite willing to give away the appropriate URL.
Can you imagine,
that Frank Sinatra's music is quite in conflict with pidgin, the instant messenger?
Well, both of them use harp chords,
So I keep wondering, who is entering and/or leaving ...