I’ve been using Usenet for a very long time. I haven’t checked in for about a month. But with the addition of a Nook, I went back to Usenet to see what I could pick up.
But dang, I couldn’t connect. Did some research and found that at the end of June, Cox discontinued newsgroups. No more Usenet. If I want access, it looks like I have to pay extra money and go with one of the big commercial providers like Giganews.
I have to do some research on this. What happened to Google Newsgroups? Did they give up? Is there anything on Usenet except piracy any more?
August 1st, 2010 in
Programming |
No Comments
I really did want an ereader, and the biggest reason was to load my technical library into one so I can carry it around and maybe get rid of the paper versions.
I have access to iPad, Kindle and Nook. The iPad is way out of my price range right now. I started doing research on the Kindle and the Nook.
If I wanted to read current novels only, I would buy the Kindle and get access to Amazon’s library. They have a much wider selection of novels than Barnes & Noble. But Kindle isn’t perfect. I’ve been reading the Simon Scarrow Eagle series. B&N have 3 of them, Amazon have 6 of them. What about the other 8 books that he’s written that aren’t available? Not good.
But I don’t want to just read current novels. I want to move my technical library to an ereader and carry it round. Kindle doesn’t support that very well with formats. PDFs have to be mailed to some address, then they get converted to the Kindle format and then they are available. The Nook lets you put PDFs straight on the device and read them without conversion. So the Nook looks promising.
I took some PDFs, and I converted some CHMs to PDF, put them on a Micro SD card and went into Barnes & Noble to see how they would look. It doesn’t work that way. The Micro SD card is used to extend memory, but they couldn’t get it to see files on it. You have to do something more formal called “sideloading” and then it will see the files. By this stage I had done enough reading and had pretty much made up my mind that the Nook would be better suited to what I wanted to do. So I bought one. I bought the Wi-Fi Nook for $149.
Took it home, charged it, installed the Micro SD card, and then loaded on the PDFs and converted CHMs. Ugh. That’s pretty ugly. I did a lot more reading and discovered EPUB. And then I discovered a wonderful program called Calibre.
My first attempt was to load it onto Linux. So many dependencies, so many failures. I tried the Mac version and it worked. Oh lordy, did it work. I tested it with books in all sorts of format. PDF, CHM, LIT, TXT, RTF, and it took each one, converted to EPUB and did a very nice job of it. And it let me set the meta data and include covers. Calibre is a really, really nice system for converting books to put on your Nook. It will do it for a wide range of ereaders, not just the Nook. It’s nice.
So finally, I got to load text books and reference books onto my Nook and read them. The EPUB format works much better than PDF. Much, much better. But overall, using the Nook for reading technical books… I don’t think it works very well. To jump between books, to move within a book, there’s a lot of really slow clicking. It’s far faster to pull a paper book out, flick to roughly the right place and then zero in on the topic. Paper sure beats the Nook. I wonder if the iPad, with the extra size, would be any better?
However, I tried some novels and they work very well. When you are reading a novel, and you are moving steadily in one direction, the Nook is really, really nice. It’s a very good ereader. I transferred a bunch of novels in, and starting reading them. It’s good. I would recommend it for that, without question. But my primary purpose of reading technical books? Not so good. It’s possible, but it’s awkward. And some diagrams and code fragments get chopped off and you can never see them.
I think that I will use Calibre to convert my technical library to PDF format, and read it on the various computers. I might have to find a better reader than Acrobat Reader, something that doesn’t that spiral my CPU to infinity whenever it feels like it.
But I’ll definitely use the Nook for a lot of things. It isn’t a wasted purchase. I am going to get an ereader for Anne soon. When that time comes, I’ll compare the size of Amazon’s ebook library to Barnes & Noble’s ebook library. That will determine what Anne gets.

August 1st, 2010 in
Programming |
No Comments
I have a large technical reference library, in paper format. Some of it is up to date, some I use a lot every day, some is dated, some is obsolete. But I hang on to it, just in case.
If I get the opportunity, I get electronic versions of the books, just in case. From many sources.
O’Reilly Books emailed me with a special deal. Two for one of their ebooks, and you get all four of their formats, with free updates. They have the ebooks in PDF, EPUB, Mobi, and APK for Android. This was a good deal, especially as I’ve been considering buying a Kindle or a Nook. It’s interesting to see where the ebook market is going.
On my iPod Touch, I have five book readers. The Kindle reader, the Barnes and Noble reader, Stanza, eReader Pro, Classic Books, and most recently Apple’s iBooks.
I read books in each of them. Not technical books though, they wouldn’t work very well on such a tiny screen as the iPod Touch. Kindle, B&N, Classics, eReader, iBooks, – I buy them in whatever format they are in, they get downloaded and I read them. I look for cheap deals, free books, and sometimes just for the hell of it, I’ll buy ebooks at regular price and read them.
But I have a lot of books that I have collected in various formats over the years. Mostly in text format, some HTML, and reluctantly some in PDF or RTF. Most of these, I can convert to one format or another and load into Stanza and read them there. I’ve been doing this for a while.
But not the technical books. I can’t read them on the small devices. So I get them in PDF and read them on the computer using Acrobat Reader (and watch it spin into oblivion on Linux and consume 100% of the CPU), or I get them in CHM format and use kchmviewer on Linux and get a good reading experience. It works because I can view them in large format. I don’t know if reading technical books on an ereader device would work. I will find out one day.
CHM is a difficult format to work with. It’s Microsoft’s Compiled HTML that they use for their help system, and a lot of publications have produced books in CHM format. I can read them with kchmviewer, but can’t do much else with them.
I did experiment with conversion. I tried some Windows conversion tools that would convert CHM to PDf, but they all wanted money, and I was reluctant to spend money when the trial versions did such a poor job of creating PDFs. On the Linux side, I found chm2pdf, which is a set of Python scripts with some heavy dependencies to convert CHM to PDF. This worked really nicely on some CHM files, but didn’t work at all on others. I had to do a lot of reading and found that you need to do two passes, one to decompile and extract the HTML, then you edit the files and fix incompatibilities, and then the second pass builds the PDF. THis might work for one or two CHM files, but I have hudnreds. I didn’t go further down that path.
I did keep looking for an ereader. It’s between a Kindle and a Nook. I’ll make a decision soon.
August 1st, 2010 in
Programming |
No Comments
I’ve had an iPod Touch for a while now. I love it. But I learned something new recently. I learned that iPod Touches do actually have microphone ability. There’s no built-in microphone, but if you have a headset with a microphone, it will work.
But not Bluetooth. No, the Touch will not use a Bluetooth headset microphone. It has to be a wired headset. So tonight, just before the opera, I ducked into the Apple Store and bought a wired pair of earbuds, with microphone and a small control panel. The case said “Made for iPod”. It’s a Scosche set (a what? never heard of them) and I tried to get the Apple guys in the store to confirm that it would work with my Touch, but they just pointed to the “Made for iPod” sign and said that if it doesn’t, bring it back.
I got it home, plugged it in, and discovered what that Voice Memo app was all about. I always wondered why they supplied that. And then I fired up Skype, and it works fine. I can use my iPod Touch like a phone now.
Just as a matter of interest, the Apple store was still packed when we came past at 9pm. It stays packed almost all the time it’s open.
July 21st, 2010 in
Gadgets,
Mac |
No Comments
I run a couple of small websites for community groups. They are functional, I improve them and add more data and functionality regularly. But they look bland and boring. I am unable to make attractive websites. I needed to learn how to improve the colour schemes.
I found some articles on Reddit that pointed me to these three articles about Color Theory For Designers, and I have been reading them:
They are very interesting, although I struggle with the concepts.
I also played with this Color Scheme Designer.
But today, I think I have found something that will help me develop good looking colour schemes. I found a decorating book at Barnes & Noble called The Home Color Selector by David Willis. The cover is a colour wheel that matches colours with their adjacent, complementary and accent colours. Best of all, it was on sale for $8. They had plenty of them. I might go back and get a spare one.

It steadily works through a fairly complete set of colour schemes for home decorating, and they all look good. Like these:

Warm schemes, cool schemes, elegant schemes, tranquil schemes, invigorating schemes, fresh schemes and sensual schemes, with backgrounds and colours that match. It’s designed for decorating homes, but it surely looks like website schemes to me. I’m going to try some of these and attempt to make my websites look a lot more attractive.
I had one problem – the colours in all the schemes are just referred to by a number. At the back of the book, there is an index showing the CMYK values of each of these numbers. For the websites, I don’t need CMYK, I need RGB. A quick Google and I found this neat website that converts CMYK to RGB. Now I am all set.
July 16th, 2010 in
Programming |
No Comments
Last time I wrote about these devices, I had two of them. One had a hard disk, one did not.
The one without a hard disk had a problem where it would boot and then switch off after about 10 seconds. This went away when I fiddled with it.
As soon as that one fixed itself, the other one with the hard disk developed exactly the same problem. It would boot, and then about 10 seconds later it would switch off. I fiddled with it the same way, but it did not fix it.
But then I fiddled some more and the problem went away. I have no idea what I did that could have fixed it. Maybe opening the memory case? Maybe loosening the screws under the front case and then tightening them again? Maybe cursing at it vigorously? I don’t know.
But now I have two netbooks, both working properly. I would like to sell one off, but given the turn-off problem, I am not morally comfortable selling them to someone else in case they develop the problem again.
So I will keep them and experiment with them. I managed to install VirtualBox on the one with a hard disk, and then put Windows XP inside VirtualBox. It’s pretty funny, but it was just an exercise to see if it could be done. It can.
I watch a lot of Bollywood films and I love the song-and-dance routines. I find it hard to get the soundtracks on CD, so I extract the music off the DVD. I do this under Linux using a number of different tools.
First, I use mplayer on the command line to extract the music as wav. Then I use Audacity to extract the music parts. And then I use my regular tools to convert to mp3 and ogg.
To get the music off the DVD, I have a number of techniques and a number of scripts, depending on how the DVD is put together. I have a way of doing it that works, and I’m going to describe it. I think it works this way, but my knowledge is not exact, it’s been acquired through erratic trial and error. I could be wrong, but this works for me.
First, you have to work out the content of a DVD. If you mount a DVD, it will mount as a data DVD and it contains two directories – AUDIO_TS and VIDEO_TS. AUDIO_TS is usually empty. I have seen stuff in it, but it doesn’t concern me. The contents of VIDEO_TS is what gets played when you put the DVD into a player and press Play.
In VIDEO_TS there are a bunch of files. The ones that contain the data we need are the ones with the VOB extension. Here’s an example of one film’s VOB files:
VTS_01_1.VOB
VTS_02_1.VOB
VTS_03_0.VOB
VTS_03_1.VOB
VTS_03_2.VOB
VTS_03_3.VOB
VTS_03_4.VOB
VTS_03_5.VOB
VTS_04_1.VOB
VTS_05_1.VOB
VTS_06_1.VOB
VTS_07_1.VOB
The filename has two numbers. The first number is the title, and the second is the chapter. I think. So this DVD has 7 titles, and titles 1, 2, 4, 5, 6 and 7 have 1 chapter each, but title 3 has 5 chapters. Think of a “title” as a section of video. One “title” could be the whole movie. Another could be a promo, another a special feature like “The Making Of The Movie”, another could be a block of deleted scenes. The “chapter” is a portion of a title. For example, the “title” could be the deleted scenes, and the “chapters” within that title would be each of the deleted scenes. Some titles are very small and they relate to linking material on the DVD, Some are medium size and they are promos for other films or special features. Some are huge and they are the movie. You will often see two versions of the movie – one widescreen and one fullscreen – and they will be two “titles”.
You have to work out which title is the actual movie you want. Once you look at the VOBs, you can usually make a pretty good guess which one is the movie. They are the biggest ones. If there are two, one will be widescreen and one will be fullscreen, and you will have to work with both to determine which is which. But if all you want is the audio, it doesn’t matter.
So, if I look at the DVD whose VOB files I listed above, and see that title 2 is the biggest file, then that’s a pretty good indication that it’s the movie. I will extract the audio for that whole title and dump it to a wav file. Then I will load that into Audacity and break the music tracks out one by one.
I have a script that will help me extract the audio for the entire title – get_audio_title.sh.
#!/bin/sh
TITLE=$1
mplayer \
-vc null \
-vo null \
-ao pcm:fast:waveheader:file=title_${TITLE}.wav \
-cache 8192 \
-af resample=44100:0:0 \
dvd://${TITLE}
I run this with “get_audio_title.sh 2″ and mplayer will read title number 2, extract the audio as wav, resample it to cd quality, and save it with the filename “title_2.wav”. Then I load this into Audacity and work with it. While it’s extracting, you will see complaints about speed and caching. Ignore them. It’s normal for audio dumping.
If I know that I want multiple specific titles, say I want the two versions of
the movie, and the special features, I have another script and I modify the
TITLES line for each CD once I know more about it.
#!/bin/sh
TITLES="2 3 5 6 7"
for title in $TITLES
do
echo "Title $title"
mplayer \
-vc null \
-vo null \
-ao pcm:fast:waveheader:file=title_${title}.wav \
-cache 8192 \
-af resample=44100:0:0 \
dvd://${title}
done
This will extract the audio for each title, resample to cd quality, and save them with filenames like title_2.wav, title_5.wav, etc.
Sometimes you see multiple chapters like in title 3 in that example. On my Bollywood films, they often have a section where they have extended versions of the best songs in the film. That section is one title, and each song inside is a chapter. I have another script that extracts these individual chapters, but because it changes per film, I have to edit the script for each DVD.
#!/bin/sh
TITLE="3"
CHAPTERS="1 2 3 4 5"
for chapter in $CHAPTERS
do
echo "Title $TITLE - chapter $chapter"
mplayer \
-vc null \
-vo null \
-ao pcm:fast:waveheader:file=track_${TITLE}_${chapter}.wav \
-cache 8192 \
-af resample=44100:0:0 \
-chapter ${chapter}-${chapter} \
dvd://${TITLE}
done
This script will extract the individual chapters out of title 3, resample them to cd quality, and save them with filenames like track_3_1.wav, track_3_2.wav, etc.
Sometimes this will not work very well. On most DVDs I can extract the chapters okay, but I got one DVD from a recent Taste Of India festival. It was a pirate DVD that contained 100 video clips of Aishwarya Rai singing from her films. Title 1 was the main menu, then there were titles 2 to 11 and each title had exactly 10 chapters. 10 titles x 10 chapters = 100 video clips. I extracted by chapter, but the times were off (I suspect the DVD was poorly mastered) and I lost chunks of time at the start and end of each chapter. So I had to extract it by title, load it into Audacity and break each title manually into the 10 chapters. That took some time, but it sure was worth it.
But anyway, one way or another, once I have the contents of the DVD converted to wav, either directly through mplayer or by breaking it with Audacity, I can then convert to mp3 or ogg and then I have the soundtrack to the film to carry around with me and enjoy the way I want to.
Last year I needed to create PDF files from PHP web pages. I was running a very old version of PHP and could not get anything going. I recently upgraded the webserver, and now have the latest Apache and PHP, so creating PDFs became an issue again.
I started working through the PHP manual’s PDF pages, where they use PDFLib Lite. I failed. I could get the PDFLib Lite library installed, but I failed to understand and implement the pdflib PHP interface. So I gave up.
At the bottom of that manual, someone recommended using FPDF – FreePDF. I tried it. It basically consists of a single PHP file that defines a PDF class, and a directory of fonts. You include the PHP file, and just go. It’s simple, it works, I created my PDF report in about half an hour, and the end user was ecstatic.
On their website they have some brief tutorials, and a whole bunch of scripts to create some very fancy PDFs. It’s a very nice product.
I recently had the problem where I needed to see how some of my websites looked when being viewed with Internet Explorer. I don’t have any Windows computers at home or at work. My home environment is Linux and Mac, and I am extremely fortunate in being allowed to use Linux at work. But that means I have no access to Windows and Internet Explorer.
I had heard about VirtualBox for a while, but never had any need of it. Now I needed it. It used to be Sun’s VirtualBox, and now it’s Oracle’s VirtualBox. It’s free, which is always nice.
I downloaded it, I installed it on Slackware, and it worked. Very nice. I am impressed when companies write Linux code that runs on any distribution and you aren’t locked to a specific distro and version.
Then I had to find a legal copy of Windows. I found Windows XP, the cdrom and the license, and I installed it in VirtualBox. The installation was as horrible as I remembered old installations of Windows. Eventually I had it in shape and could fire up Internet Explorer and view the website in question. It worked, I found a solution to my problem, and all is well.
I am very impressed with VirtualBox and what it can do. I will definitely keep it and WinXP around so I can check how the websites look using IE.
But this exercise sparked some memories. I have a large box of old DOS and Windows games. These were favourites of mine for many years, and I haven’t been able to play them for 10 years or more. Now, I might be able to relive those happy days. Thanks to VirtualBox.
I have a couple of websites for other organisations. One website was for a craft group, mostly for women. It was nicely designed, had a pink tone, looked good, I was really happy with it. I checked it against Firefox, Safari, Opera, Chrome, SeaMonkey, Konqueror and it looked great. I don’t have any Windows computers here or anywhere near me, so I never got around to looking at it with Internet Explorer. Bad mistake.
Someone mentioned that the craft website was a bit cruddy in design, and I wondered what they meant. So I found someone out there who had Windows (and finding someone in my circle with Windows was not a trivial task), and I looked at it. Oh crap, it looked awful in Internet Explorer.
The way I had designed it, I had nice div blocks centered on the screen. Internet Explorer ignored the centering and jammed them up against the left. Bad.
It’s all in CSS, and the way I did the divs was like this:
div .itemblock
{
margin: 10px auto 0 auto;
}
Looks great in all browsers except Internet Explorer. So I did some research and most people had the same suggestion for fixing it to trick Internet Explorer into behaving correctly.
The trick involves setting the body like this:
body
{
text-align: center;
}
and then setting each div block like this:
#itemblock
{
margin: 10px auto 0 auto;
text-align: left;
}
Regular browsers handle it and Internet Explorer is supposed to handle it and center the div blocks. Except it didn’t work for me. After a lot of experimentation and viewing the page source of good demo websites (like http://flumpcakes.co.uk/css/center-div-ie) I worked out the final step that is necessary for this text-align trick to work.
You have to set the DOCTYPE to a specific DTD:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Once I did that, it all worked and Internet Explorer displayed the website roughly the way I wanted it.