Older blog entries for etbe (starting at number 88)

Small PC for Creating Word Files

A friend recently asked for advice on a “REALLY small laptop/word processor thingy that would pretty much fit into a (big) pocket, and that only needs to write/word process“.

The first problem here is that most people associate “word processing” with desktop publishing and document management. Programs such as MS-Word are considered as having the features required of a word-processor (which includes spelling and grammer checking/correcting, annotations, colours, etc). Programs that have all those features take a lot of CPU power. A Pentium-4 system might be considered the minimum requirement for running a recent version of MS-Word. But a hand-held device can’t have such a powerful CPU (it’s too small to be able to dissipate the heat from such a CPU or contain batteries that can produce enough power to tun it).

The next problem is the issue of screen space. A VGA resolution screen (640×480) is regarded as high resolution in the PDA market. Such a resolution does not work with a word-processor that has three toolbars at the top of it’s screen and a paperclip taking up space at the bottom right! I’m sure that everyone who was using computers in the early 1990’s can recall the minimal word-processing programs. One thing to consider is that 640×480 in a 15 inch CRT screen is much more useful than 640×480 in a hand-held device as the larger screen can have fewer pixels per character and therefore display more text on the screen.

An added complication is that there are two methods of input for PDAs. One is to have a hardware keyboard (which may be a separate device or may be part of the PDA) and the other is to have a keyboard displayed on the screen. A hardware keyboard makes the device larger and a software keyboard takes up precious screen space (you just can’t win).

My PDA is an iPaQ model h3900. It has 64M of RAM, 32M of flash, no hardware keyboard, and a screen resolution of 320×240. I have done some serious writing on my iPaQ (including writing an entire article for Linux Journal) and it works reasonably well. For serious writing you can produce plain text on a PDA and then easily paste it into your program of choice on a PC later (PDAs generally support connection to a PC via serial port and/or USB).

The challenge is editing files that originate on a PC using a PDA. Generally I try and use HTML and TeX for my formatted documents so the text versions of those formats are easy to edit once you have learned them. Taking data from a MD-Word file, editing it on a PDA, and then taking it back to the PC would cause many problems and probably wouldn’t be worth attempting.

Recently I have been using my iPaQ for writing notes about email and blog posts that I will write. If I get an idea then I immediately write some notes about it on my iPaQ and then usually type it again instead of downloading it. For example the notes for this post were “write about RAM, storage, and screen resolution”. Often getting the initial ideas to start writing is the hard part. Writing a 500 to 1000 word blog post or message is easy once I have the ideas.

If I was going to buy a new PDA now I would prefer one with a hardware keyboard, the loss of screen space for a keyboard on the touch-screen is a serious impediment to writing. The maximum amount of text that can be displayed on the screen at any one time limits the complexity of what I work on (see my post about monitors for developers). Another factor is the fact that for small notes the amount of time taken to remove the stylus from it’s bay is greater than the amount of time saved by using it. So I end up writing small notes using my finger-nail on the touch-screen which is significantly slower than using a keyboard (even the crummy ones that PDAs have). Of course the keyboard would still have to be QWERTY and have raised keys so that I can touch-type.

I haven’t investigated this seriously as my iPaQ is good enough to last me for another year or two at least and I’ve got an unused spare iPaQ to replace it when it fails. But if anyone has any recommendations of Linux based PDAs with keyboards then I would appreciate some comments.

Share This

Syndicated 2007-08-04 21:00:18 from etbe

Debian Lunch Meeting in Melbourne and BSP

This afternoon we had a Debian meeting in Melbourne (Australia) arranged through the Debian-Melb mailing list.

We met under the clocks at Flinders St station, had lunch at a good Japanese restaurant, decided not to play LASER games (like paintball but with LASER guns instead of paint guns) due to the queue. The LASER games are at the Crown Casino, some people object to it on principle, but when you only use free tickets… One noteworthy thing about the casino is that they have a free cloak-room that stores bags (back-packs etc are not allowed on the gaming floor). I expect their cloak-room to be a little more secure than most places that you might stash your stuff (they have a reputation for security to uphold) so I felt safe leaving a back-pack containing a laptop in their care (it didn’t have any secret data and was a really old one).

After leaving the casino we had Gelati/Gelato ice-cream (Gelati is the plural of Gelato and either word may be used to describe Italian style ice-cream).

The general plan for the next meeting is to meet in the city at about 10AM on a weekend, play the LASER games, and then have lunch. Of course that would make it a greater requirement for people to arrive on time. ;)

While at the meeting we discussed in concept the idea of a Bug Squashing Party (BSP). I can get a free venue for up to 12 people outside business hours which is not far from the center of Melbourne and which has good net access and a good supply of keyboards, monitors, and other misc computer bits (even possibly some PCs that can have their hard drives temporarily replaced to test Debian stuff). One guy who is rather keen on this idea asked if it would be possible to bring sleeping-bags and sleep on the floor. I hesitate to ask the guy who owns the office about that, it might make him reject the idea entirely. So probably starting at about 10AM and going to 10PM would be enough. We could do that both Saturday and Sunday on some weekend or maybe even start on Friday night.

I’ve been planning to run a similar meeting to play Linux games which may end up as a games hacking party. I might get around to running that soon.

Share This

Syndicated 2007-08-04 09:00:49 from etbe

Getting Work in Another Country

Often there are possibilities to earn more money or gain valuable experience by working in another country. I learned (and earned) a lot while working in London and Amsterdam and recommend travelling if you get the opportunity.

There are two ways of getting work in another country. One way is to work for a multi-national company and get transferred, this gives benefits of having the company sort everything out for you (creating a bank account etc). But it isn’t an option that is open to many people.

Getting a job directly in another country is in some ways more difficult than expected and in some ways easier.

Here are some of the factors that make it easier:

  • Once you arrive in your destination country it’s usually easy to get work if the economic conditions are good. When choosing a country to migrate to and a time to migrate you will generally make sure that the economic conditions are reasonably good (or at least demand is greater than supply for your industry sector).

  • It’s widely believed by employers that employees from other countries have valuable experience to bring, due to working conditions being different in other countries. I am doubtful of this (but I don’t complain when it helps me get a job).

  • Employers often believe that employees from a long way away are very highly motivated and work really hard. I believe that this is correct as it applies to the employees that they get (EG Australians in the EU work really hard). Not that Australians in general would work harder than Europeans, but people who are willing to travel so far for their career will be motivated and people who have recently arrived in a country where they have few friends and no relatives have less things to distract them from work.

Here are some of the problems that you will face:

  • Different expectations of employers. For example in Australia a university degree is not really required while European employers demand it.

  • Getting a bank account. When I arrived in the UK I had trouble getting a bank account due to money-laundering laws. A passport was not sufficient and I needed proof of address, but renting an apartment without having a bank account was difficult too… I ended up getting an accountant to recommend me to a bank. Apparently the easiest way of doing this is to get an Australian bank that is part of a multi-national banking group to get their UK equivalent to set up an account before you leave Australia. Also I know people who had problems getting a Dutch bank account (fortunately there is the PostBank which deals with everyone). The UK laws may have changed in the last 8 years, but it’s the sort of problem that can get you in any country - as you can’t get paid without a bank account it’s serious!

  • Renting an apartment. I think it’s best to plan to live in hotels until you get a job that will last a while, then you can live reasonably close to your work. Also landlords will often want to know where you work before deciding whether to accept you as a tenant. I lived in hotels in the UK for almost a year and never rented an apartment because of this. It’s not a problem if the stuff you need can fit into a couple of suitcases.

  • Learning how to save money. Little things like bulk purchases of train tickets can save significant amounts of money. It’s the sort of thing that locals learn by osmosis but foreigners can take months or years to learn them. This is especially a problem when you don’t speak the local language and discount vouchers have fine print.

  • Catching a taxi. Taxi drivers generally only speak the local language and if you don’t speak it then you will have problems. Showing a taxi driver a laptop screen with printed directions and a map helps.

Share This

Syndicated 2007-08-03 21:00:30 from etbe

Popular Posts

I’ve just reviewed my web stats from last month. Here are what appear to be the most popular posts:

  1. Committing Data to Disk - about how RPM and DPKG don’t use fsync() the way I believe that they should. Surprisingly popular (more than twice as popular as #2), maybe the developers of both RPM forks and dpkg were repeatedly checking for comments.

  2. Terrorism Foolishness - found by StumbleUpon.com and got lots of traffic from there. More than twice as popular as #3.

  3. Prius vs Small Non-Hybrid Car - a little contentious as some Prius owners think I should compare the Prius to a Camry. I will visit a Toyota dealer soon to investigate this matter in more depth. Note that this is a post from June that was one of the most popular reads for July!

  4. Tevion MP4 Player Model M6 - a Review - review of an MP4 player that didn’t satisfy me.

  5. Installing Xen DomU on Debian Etch - from January but still getting read!

  6. A Support Guide to Xen

  7. Buying a Laptop From Another Country

  8. Xen and Heartbeat - another from June.

It seems that most readers of my blog come from Planet Debian. So the above seems like an indication of what people on that planet want to read.

Share This

Syndicated 2007-08-03 09:00:52 from etbe

Starting a Heartbeat Resource Without Heartbeat

The command crm_resource allows you to do basic editing of resources in the Heartbeat configuration database. But sometimes you need to do different things and the tool xmlstarlet is a good option.

The below script can be used for testing Heartbeat OCF resource scripts. It uses the Heartbeat management program cibadmin to get the XML configuration data and then uses xmlstarlet to process it. The sel option for xmlstarlet selects some data from an XML file, the -t -m options instruct it to match data from a template. The template is the /resources/primitive part. The --value-of expression will print the values of some labels from the XML. The script will concatenate the name and value tags and export them as environment variables (see my post about Configuring a Heartbeat Service for an explanation of the use of the variables). The TYPE variable is the name of the script under the /usr/lib/ocf/resource.d/heartbeat directory.

In recent versions of Heartbeat (2.1.x) the OCF_ROOT environment variable must be set before an OCF script is called. Setting it on older versions of Heartbeat doesn’t do any harm so I unconditionally set it in this script (which should work for all 2.x.x versions of Heartbeat).

The first parameter for the script is the id of the service to be operated on and the second parameter is the operation to perform (start, stop, and status are the only interesting values). The script will echo the exit code to the screen (0 means success, 7 means that the service is not running or the operation failed, and any other number means a serious error that will trigger a STONITH if Heartbeat gets it).

$(cibadmin -Q -o resources| xmlstarlet sel -t -m \
"/resources/primitive [@id='$1']/instance_attributes/attributes/nvpair" \
--value-of "concat('export OCF_RESKEY_',@name,'=',@value,'
OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/heartbeat/$TYPE $2
echo $?

Below is another version of the same script that instead uses crm_resource to get the XML data. The output of crm_resource has a couple of lines of non-XML data at the start (removed by the grep) and also only gives the XML tree related to the primitive in question (so the /resources part is removed from the xmlstarlet command-line).

$(crm_resource -r $1 -x | grep -v ^[a-z] | xmlstarlet sel -t -m \
  "/primitive/instance_attributes/attributes/nvpair" --value-of \
  "concat('export OCF_RESKEY_',@name,'=',@value,'
OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/heartbeat/$TYPE $2
echo $?

The problem with both of those scripts is that they rely on Heartbeat being operational. Performing any operations other than a status check while Heartbeat is running is a risky thing to do. If Heartbeat starts a service at the same time as you start it via such a script then the results will probably be undesired. One situation where it is safe to run this is when a service fails to start. After it has failed repeatedly Heartbeat may stop trying to restart it (depending on the configuration) in which case it will be safe to try and start it. Also you can put in temporary constraints to stop the resource from running by repeatedly running crm_resource -M -r ID until all nodes have been prohibited from running it (make sure you run crm_resource -U -r ID afterwards to remove the temporary constraints).

The following script does the same thing but directly reads the XML file for the Heartbeat configuration. This is designed to be used when Heartbeat is not running. For example you could copy the XML file from a running cluster to a test machine and then test your OCF resource scripts.

$(cat /var/lib/heartbeat/crm/cib.xml| xmlstarlet sel -t -m \
  "/cib/configuration/resources/primitive [@id='$1']/instance_attributes/attributes/nvpair" \
  --value-of \
  "concat('export OCF_RESKEY_',@name,'=',@value,'
OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/heartbeat/$TYPE $2
echo $?

Share This

Syndicated 2007-08-02 21:00:40 from etbe

Xen Saves

A couple of days ago the hardware that is used to host this blog was upgraded - doubling the amount of RAM in the machine. To do this the machine was halted, memtest86+ was run to ensure that the new RAM worked correctly, and then it was booted up again. During that process my ssh session was not stopped! I merely refrained from typing anything until the upgrade was complete.

This is one feature I really like about Xen. It can save the memory image of a running domain to a file and then restart it later. TCP sessions remain open if timeouts have not elapsed. The command xm save can be used to save the state to a file and the command xm restore will restore it.

In Debian the location of the save files is stored in the file /etc/default/xendomains with the variable name XENDOMAINS_SAVE and defaults to /var/lib/xen/save.

A quick experiment with one test domain (running Debian/unstable in 128M of RAM and had just run apt-get dist-upgrade so the memory contents would not be all zeros) showed that gzip -9 would decrease the file to 35% of it’s size at a cost of just over 1 minute of CPU time on a Pentium-M 1.7GHz. But gzip -3 compresses it to 37% and only takes 9 seconds. 9 seconds of CPU time to save 80M of disk space seems a reasonable trade-off.

In my particular case it saves CPU time as the encryption I use for my root filesystem takes more CPU time than gzip -3 so compressing the data saves time. But I don’t expect my case to be common.

Now when Xen is used on a more modern machine with a faster CPU gzip -3 has the potential to save time as well as disk space. A machine with a CPU that is in aggregate 10x faster than my laptop (I think that means most 64bit multi-core CPUs) running with a single S-ATA disk (that will have a sustained contiguous read speed of 80MB/s and write speed that is less) will save time when saving multiple Xen DomU’s if it runs them in parallel and compresses them.

Also gzip is not the fastest compression program. There may be other options that are better suited to the needs of Xen.

I have filed a Debian bug 435406 requesting that compression be supported.

Share This

Syndicated 2007-08-02 09:00:52 from etbe

Advogato and Hateful/Divisive Posts

Firstly for the benefit of people who haven’t heard of it, the Advogato FAQ and the Wikipedia Page describe what Advogato does.

Pete Zaitcev posted a strange article about me to Advogato. In it he accused me of “pumping hateful leftist propaganda into Advogato“, said propaganda being my regular blog posts. In an addendum he accused me of insanity, and said that my “attacks” were “divisive“.

I considered writing an Advogato post in response but first read the Posting Guidelines which say:

  • Please keep articles about Advogato itself to a minimum

  • Personal complaints, rants, and flames belong in your blog, not here

Both of those criteria rule out Pete’s post and any response that I might make would risk being in breach of such conditions - so I will use my blog as the Advogato admins recommend.

Pete’s ad-hominem attack on me claiming that my posts are hateful is bizarre. Pete, for the benefit of all the interested onlookers could you please inform us which of my posts you consider hateful and why you have such an opinion? As a general rule you should always cite articles that you reference. When you make accusations without any evidence to back them up it makes you look bad and prevents any positive discussion of the acts in question.

As for the accusation of being divisive, that only happens when people are forced to choose sides. For example when you encourage other people to rate me down on Advogato because of my political opinions that can divide the community (in a small way, neither you, nor me, nor Advogato is important enough to cause a serious problem in this regard).

The idea that I was intentionally pumping anything into Advogato was also strange to me. When I entered the URL for my blog into the Advogato settings page I didn’t even realise that it was being syndicated until I reviewed my web logs some time later. It seems that Advogato only has a small number of readers, a recent post about strange ZCAV performance included a graph and judging by the referrer tags it seems that 412 people read the post from Advogato out of 10468 total (so Advogato gets less than 4% of my readers). Planet Debian seems to get more than 15x the number of readers of Advogato. Incidentally if you don’t currently include images in your blog the reader tracking ability is one reason for including an image in an occasional post.

Another strange ad-hominem attack was the reference to “college indoctrination“. When I was in university I supported the Liberal party (the Australian equivalent of the Republican party in the US). The influence of Linux programmers (including some of Pete’s colleagues at Red Hat) had much more of an effect on my political opinions than that of my university experience.

I am not criticising Pete for disagreeing with me in regard to politics (I don’t even know what he disagrees with). Here are my specific criticisms of Pete’s behaviour:

  1. Ad-hominem attacks

  2. Encouraging mis-use of Advogato trust metrics for political reasons (this one may not have been deliberate)

  3. Non-specific accusations which do not allow me to either defend myself against the accusations or change my actions if he turns out to have any reasonable points

  4. Hypocrisy - he breaks two of the posting guidelines for the purpose of criticising my blog posts which supposedly break some unwritten rule

  5. Not reading the Advogato FAQ - it has a specific section about political disagreements

But I’m not going to advocate voting him down on Advogato. He does write some interesting things on occasion. Check out his page on guns for example.

Share This

Syndicated 2007-08-01 21:00:02 from etbe

ECC RAM in a Cheap Machine

In a comment on my previous post about ECC RAM someone commented that Dell sells PowerEdge desktop machines with ECC RAM. I visited the Dell web site and found that a low-end PowerEdge tower server (which still has a Pentium-D dual-core 64bit CPU) costs as little as $800AU. I also noticed that Dell Precision workstations that have ECC RAM - but that start at $2400. I wonder how much noise a low-end PowerEdge machine would produce.

HP Workstations with model codes starting with xw also have ECC RAM and are advertised at $584US as the starting price (about the same as a low-end PowerEdge).

I checked out NEC and Lenovo and according to their web sites they don’t make a desktop or desk-side machine that takes ECC RAM (someone please correct me if I’m wrong).

So now I’m looking for cheap HP Workstations and Dell PowerEdge and Precision machines at auction.

Share This

Syndicated 2007-08-01 09:00:19 from etbe

Germany Leads the World in Solar Power

boston.com reports that Germany now has 55% of the world’s photo-Voltaic (PV) power generation.

The German solar power industry has created tens of thousands of jobs including significant exports - so much for the Australian government claims that supporting the dirty coal industry is necessary for the economy! The renewable power industry in Germany employs over 250,000 people.

Australia has much more sun-light than Germany, the same programs of creating solar power could give better results here!

Share This

Syndicated 2007-07-31 21:00:10 from etbe

Praising Children vs Praising Programmers

In a comment on my blog post titled Childhood, Don Marti refers to an earlier blog post he wrote which refers to a New York Magazine article about the effects of praising children. The article does in some depth to describe scientific research into the issue of praising children for being “smart” vs praising them for working hard - with the conclusion being that it’s significantly better to praise them for working hard!

One quote from that article that I find very significant is “Baumeister has come to believe the continued appeal of self-esteem is largely tied to parents’ pride in their children’s achievements: It’s so strong that ‘when they praise their kids, it’s not that far from praising themselves’“. This matches my theory about people who subject their children to TV documentaries about gifted children.

The conclusions regarding children seem quite clear and the article provides direct advice to parents and teachers as to how to avoid the problems.

One issue I am wondering about after reading the NYM article is whether being exposed to smarter children hurts a child’s learning ability. The fact that there is no correlation between high self-esteem and learning ability has been proven, but the reports do not indicate whether there might be a correlation between a decreases in self-esteem and a decrease in learning ability. I recall pointing out to one the few good teachers at high-school that having some of the most capable and some of the least capable students in the same class was inefficient and led to excessive boredom for the more capable students and excessive difficulty in keeping up for the less capable students. I was told that “streaming” was considered bad because it was bad for the less capable students to know their status. I was also refused access to my results of the Westpac Maths contest for the same reason - which seems particularly strange, I was in the training program for the International Mathematical Olympiad so I doubt that releasing my score from one maths contest would change anyone’s opinion of my ability.

I am also wondering about how this effects adults (apart from their education history). Should we try to praise work colleagues for their effort instead of being smart? Are adults discouraged from trying hard at their work when they see others succeeding with little apparent effort?

One data point for this seems to be kernel coders in the Linux community. Everyone sees super-star Linux kernel coders on stage (on a pedestal) at conferences and it’s easy to believe that such people are significantly more intelligent than others (the well-known programmers are indeed very smart - but they also work a lot harder than most people believe) and that being so smart is a necessary pre-condition for submitting Linux kernel patches. I have met many people who appear to have the ability to be good at any type of coding but seem intimidated by kernel coding it for these reasons. Statements such as “I’ve been doing Linux coding for 10 years but I’m not a kernel coder” are often heard at Linux conferences. Also people who’s skills are respected are often regarded as kernel coders without any real reason.

The Linux kernel is a large C program with limited options for a debugger, if you are good at C coding you should do OK! I know that I am trivialising the issues related to kernel coding, there are some tasks such as reverse-engineering device-drivers and debugging some of the tricky race conditions that require special skills - but no-one is born with such skills! I would not suggest that someone try a significant kernel coding task on their first attempt - as with all areas of programming it’s best to start with the easy things first. The web site kernelnewbies.org is a good source of information for people who are getting into kernel coding.

I wonder whether a change in the attitudes towards such things could encourage more people to write free software, and more of the current programmers to attempt new challenges (such as kernel coding).

Share This

Syndicated 2007-07-31 09:00:22 from etbe

79 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!