Thursday, February 28, 2013

Sansa clip+ mp3 player

My venerable battery powered mp3 player ceased working a few days ago. Several months ago, playing one song caused the player to crash; a few months later, a second song started doing this. When a third song crashed the player, I realised that it was time to upgrade. The only problem is that there seem to be no mp3 players available - the smartphone seems to have satisfied the need for such gadgets. After searching in several shops in the nearby town (not known to be technically advanced), I eventually found a Sansa clip+ 4GB player (in fact, I should have two: I ordered one from an online supplier and then found one in a shop in a different town).

I had no trouble in charging the player nor moving songs to it, but very quickly discovered  that I couldn't hear the songs (or to be more accurate, they were played at very low volume)! The player has ReplayGain support but it's not very clear how I would actually use this.

In a fit of desperation, I googled "sansa volume" and discovered that due to EU regulations, the volume output of a portable audio device MUST be limited to 85dB. The actual volume perceived is dependent on the headphones and obviously I must be using headphones which require high output, as I could barely hear anything. The solution is as follows:
  1. Reset the Sansa player to factory settings: Settings, Reset All
  2. Set the region as Rest of World
  3. Change volume setting to High: Settings, Volume, High
I must admit that I had downloaded the full instruction manual and had noticed that whilst there was a 'volume' setting, it wasn't appearing on the device. Changing the region caused the setting to appear - and a quick listen took my head off! The device is definitely loud now.

There is another hack which I will try later: defining a playlist. Being an old-fashioned sort of person, I like to listen to complete albums where the songs are in the sequence ordained by the producer; this means that allowing me to set the order is very important. At the moment, I have been reduced to numbering all the songs which I have transferred so far. This numbering must exist not necessarily in the file's name but rather in the file's ID3V2 tag and editing this takes a long time. It doesn't help that mp3 files that I create from my own wav files (via Lame) don't have a tag at all (although this is probably because I haven't set up Lame correctly).

The solution seems to be
  • In Windows Explorer, browse to Computer > Sansa Clip+ 4GB > Music
  • Using Ctrl + left_click, select folders and/or files to comprise the playlist.
  • Right_click on one of the selections, and choose Create Playlist from the drop-down menu.
  • A file named New Playlist.pla is created. Give it an appropriate name, and move it to the Playlists folder

Monday, February 18, 2013

Ten reasons why my childhood wasn't as good as my daughter's

I read with interest and amusement a column in Saturday's Guardian about comparing one's childhood to the childhood of one's children. As it happens, the column's author, Tim Lott, was born a few months before me so we had comparable childhoods. I'll quote Lott in italics whereas my responses will be in normal type.

1. Holidays. They were crap. Cold and wet. In England, in bed and breakfasts that kicked you out after breakfast. My children have so far been to more exotic locations than David Attenborough. Yes, they're middle class. But you can get a package holiday abroad now for the price of a pint and a packet of pork scratchings. Whilst we never stayed in bed and breakfasts, we used to go caravanning which probably wasn't much more fun. It always used to rain and I remember never ending games of 'Monopoly', which is one reason why I am unable to play the game now. I went camping for the first time a few days before my tenth birthday (see here) when everything in my life changed - except for the amount of rain.

2. Boredom. My children are never bored. They have iPods, mobile phones, PCs, games consoles, TV on demand, child-friendly, free museums and exhibitions. Yes, they're middle class. But even those on very modest incomes can afford basic versions of most modern technology. I don't remember being bored as a child. If I wasn't outside playing one man tennis against a wall, or cricket with friends, then I was inside, reading. We should turn this one around: I think that today's children would be bored if they didn't have the gadgets.

3. Sleepovers. When did they happen? I never once had a sleepover as a kid. Agreed. I don't think that I stayed at a friend's house until I was about twelve and then it was in a different city. What's the point of staying with a school friend when you can see him/her again tomorrow?

4. Getting hit. Like most kids, I would have to take a slap now and then. My children don't get hit. It's relatively rare nowadays. Yes, my children are middle class. You think it's only middle-class parents who don't hit their kids? Ditto.

5. I was always peripheral to my parents' universe. I had to fit in with what they did. Sitting in the pub car park with a packet of crisps was as good as it got. My children are at the centre of family life. Yes, they're middle class. But I think it would be patronising to suggest that it's different for the working class. And there have always been a minority of dysfunctional families. Whilst I agree with this to a certain extent, I don't think it was totally true of my childhood (maybe my parents never did anything).

6. Happiness. A Children's Society report cited in the Guardian claimed that one in 11 youngsters aged between eight and 15 have a "low sense of well being" at any given time. That means 10 out of 11 don't have a low sense of well being. I don't think that we had "well being" in those days. I don't remember being unhappy as a child.

7. Children in Britain report higher levels of satisfaction with school than almost any other European country. Definitely. But is Lott writing about his childhood or his children's childhood here?

8. Football. When I went to a football match I had to listen to racist abuse and unbelievably foul language roared by frightening men. And that was just the footballers. Also the football itself was of an unbelievably low standard. Or maybe that was just QPR. I started going to rugby matches (Bristol RFC) when I was twelve and never heard any abuse or foul language.  So maybe it was QPR.

9. Food was terrible. Boiled – all of it. What I would have given for some good junk food – a McDonald's or a KFC. But that was "eating out". We never ate out. I went to my first restaurant on my 18th birthday. Agreed - but my mother was a very good cook. I remember being in London with older people from the youth movement; we would go to an Indian restaurant and I would order a chicken omelette!

10. TV. It was crap. Now it's good. We didn't know any better at the time. 'Thunderbirds' wasn't good? Monty Python? Top of the Pops? I don't remember watching that much television and I used to go to bed at 9pm.

I don't think that my childhood was better or worse than my daughter's - it was simply different. One can't compare oranges with apples.


Sunday, February 17, 2013

Pictures from a balcony (2)

Here's a picture of our balcony taken from the ground; it seems quite high up but that's only because of the angle.

We were the first family to have a balcony in the front of the house (others built behind the house); originally there was a decision that no one alters the front of the house so that they all look the same, but our downstairs neighbours objected to us extending to the rear and there is not enough room on the side. We obviously started a trend by building in front, for as soon as we did, the other family on the top floor of our building (we live in a building with two flats on the ground floor and two on the first floor) built a balcony as did the neighbours in the next building.


Note the lemon tree in the bottom right hand corner (if one looks hard, one can see a lemon on the tree), the bird of paradise shrub (I think that's what it's called) underneath the balcony and the bare Koelreuteria bipinnata in the front. It's just as well that I took the picture now for in a month or two it will be blossoming and then it will not be possible to see the balcony from where I was standing!

Thursday, February 14, 2013

Another evening (2)

I spent another evening working on the song 'Another Evening', about which I originally wrote a few weeks ago. The completed version was beginning to sound too strident to me whereas I wanted something softer. After playing around a bit, I realised that I needed the vibes to start at the beginning of the song (as opposed to entering in the second verse), whereas the chordal pad needed to enter at the second verse (instead of starting the song) and also needed to be lower in volume. 

After some experimentation for the instrumental verse - at one stage, I tried a string quartet - I eventually went for a two voice choral section. Unlike the pad, there is actually some movement in the parts (for example, if the bar's chord is C, then one voice will sing C (crotchet), D (crotchet), E (minim), whereas the second voice will sing (to the same rhythm) EFG: simple harmonies, but effective. The trumpet which featured in the original was swapped for a tremolo'd electric guitar, which also helped make the entire song softer. The drumming was also changed.

I probably fiddled around with my vocal track, also trying to make it softer (this specifically means reducing the treble boost which I had added).

The current version of the song can be found here.

Sunday, February 10, 2013

Pictures from a balcony

A


A sunny and quiet Saturday morning spent on the balcony. I often feel like being in a treehouse when I'm out there. The first picture is looking east, towards Bet Shemesh and the second picture is looking west, into the kibbutz.

Wednesday, February 06, 2013

Research Proposal exam results

I was informed last night that my exam had been marked and that the results would shortly be made available on the university web site. I was disappointed to discover that my mark was only 58 - it's a pass, to be sure, but not exactly the mark that I was expecting. Presumably my disappointment is due to the fact that I thought that I did well: had I been expecting less, I wouldn't have minded so much.

What can I learn from this? In time, I will have to write my own research proposal, but by that time, I will have forgotten the exam and my answers. I will be able to write the proposal with frequent reference to the course material (which no longer has to be remembered) and so the proposal should be satisfactory.

Did I treat the course with less respect than was needed? This is difficult to answer; certainly during the three weeks previous to the exam, I worked as hard on this course as I had as on my previous courses. I did feel that the course was easier (possibly even much easier) than the MBA courses, certainly containing less material. In which case, the moral of this episode is treat IBR2 (the literature review) with greater respect and to devote to it several concentrated hours a week.

The IBR2 exam is at the beginning of June; I discovered yesterday that the MBA degree ceremony will be held on 19 June.

Tuesday, February 05, 2013

Leverage

I was reading Paul Graham's book "Hackers and painters" last week; whilst the early chapters were interesting, the later chapters became more dogmatic. Probably I work in an environment which is beneath contempt - Windows/Delphi/Firebird - which explains why my mind is closed to the beautiful concepts espoused by Mr Graham.

On Friday, during my weekly meeting with the Occupational Psychologist (OP), we were talking about priorities and she said that her immediate priority was to deal with salaries (the meeting took place on Feb 1). Her current method of operation is to go into the screen in the management program which displays all the meetings, projects, expenses and work hours recorded for all the therapists, create a Word file of this data (the program does this automatically), check the data in the file, make corrections and then send individual Word files to each of the therapists, fishing for comments.

Suddenly a light bulb lit in my brain. My immediate reference was to the chapter in Graham's book about leverage; the OP didn't seem to be too familiar with the concept. I explained that I had come across the term primarily in my financial studies, using the example of the Israeli 'tycoon'  Ilan Ben Dov, who borrowed money at an interest rate of (say) 5% in order to buy a controlling share in the national telephone company, Bezek, which should have returned money at (say) 8%. Unfortunately, the bottom fell out of the telecommunications market about a year ago and as a result, his investment was returning only (say) 4%.

What is the relevance here? I spent a few illuminating weeks (that's a good euphemism) learning how to send Hebrew emails with attachments; we could leverage that knowledge so that the program could send those individual Word files automatically to the therapists!

I would like to say that the implementation of this idea was simple but it turned out to be more complicated than I had expected. The existing implementation leaves the Word file open on the screen (in Word, obviously), waiting for the user to do something with it (like posting the file), whereas I needed a file saved in the file system which I could then use as an attachment. Eventually I solved all the problems, thus allowing those Word files to be sent automatically.

But knowing the OP, I was sure that she would want to keep a record, not only of to whom such files were sent but also the contents of the files. As I wasn't prepared to keep the Word files, let alone store them in the database, some thinking was required. I'm not too sure where the idea came from, but it occurred to me that I could create the data as HTML and save that in the database. A first attempt took the Word file and saved it as HTML (thus moving from a proprietary format to an open one); this caused the resulting file to be twice the size of the original file (expanding a 20KB file to 40KB, if not more)! Word creates extremely verbose HTML.

It then became clear that my program would have to create its own HTML code and then either display it on the screen (which required saving it to file first) or inserting it into the HTML text (that sounds like an oxymoron) of an email. It took a few hours to create the initial HTML report, but I am pleased to say that the Delphi code which does this is much cleaner than the corresponding code needed to create the Word version, and the resulting HTML file's size is only 2KB as opposed to 20KB (this was after tuning the HTML code itself)!

After a few more hours of fiddling around (in which I discovered that my demo version was freeing a stringlist more often than the stringlist was created, thus causing memory violations), I finally achieved a professional version which creates the data, displays it and optionally sends it by email (I used a multi-select dbgrid for this). If an email is sent, an entry is made in the appropriate table in the database and the HTML code is saved. A few more minutes work, and this saved HTML could be retrieved from the database and displayed. This will be useful if we want to see what were the contents of the email sent to therapist A on 01/03/13. For this, I used leverage again: there already exists in the program a form which contains an HTML browser, so I didn't have to create yet another browser form in the program.



The next stage in the leverage chain is to take my new found knowledge of HTML tables and use it in a different program. I wrote one called 'Inspector', which as its name suggests, inspects files, specifically those created by the OP's flagship exam. The current display is ok but could be improved, and it occurred to me that the visual improvement would come about by using HTML to display whatever has to be displayed instead of a list view.

Sunday, February 03, 2013

The twins came to visit yesterday

Obviously their mother and father brought them! The parents claim that they can tell the child's sex by looking at their faces but I don't agree. The one on the right has a very distinctive face which makes it easy to differentiate between them. He's the boy and is called Yehonatan (Jonathan - "God gave him") whereas his sister is on the left is called Hila ("halo").

The above is not a very good picture: it was taken from my mobile telephone without external lighting. Such is my attempt at being modern. I'm surprised that the babies don't have their own facebook pages - they could have updated their status to "visiting uncle and aunt".