Monday, July 31, 2017

Mobile CPAP

This is more of a memo to myself for future reference rather than recording an experience.


I saw today in the paper an advert for a mobile CPAP machine. It's strange that I even noticed this as normally I skip over all the adverts without looking at them. The machine is a Transcend EZEX miniCPAP™ machine, which apparently is only slightly larger than a soft drink can. In America, one can purchase it for $480, whereas in Israel it would cost 4900 NIS - a ridiculous rate of exchange! On the other hand, medical insurance would pay 75% of the cost, meaning that I would have to pay 1225 NIS, which is about $300. 

This machine is meant for people who travel around and don't have access to electricity (it can run either from the mains or from an internal battery). I don't go on camping trips so this is not an advantage for me. The only reason that I can think of for buying this machine is that I don't have to take my heavy and bulky machine with me when I go on holiday. If I were to fly low-cost to Naples for a weekend in Sorrento (EasyJet are now adding such flights) or even to Edinburgh, then I wouldn't have to sacrifice space and weight for the machine - I could just pop this in my pocket. Of course, the hose is still the same size.

Reviews are mixed. It would be good as a spare machine if I traveled more. At the moment, this doesn't sound like a good argument. Also, medical insurance would only pay for one machine and I don't think that I would want this as my sole support of night time breathing.

Sunday, July 30, 2017

Sing Street (2) - A few more observations

A few more observations which I forgot the first time around.

As the excellent quality of the music irks me, so does the fact that the group's videos are supposedly filmed with a hand-held super 8 camera (such devices are hard to find now). Hand-held - but no shaking; edits - exactly how are they achieved? Too much nit-picking on my behalf.

The excellent tv tropes site lists one of its tropes "Gilligan cut" as basically when someone says that they're not going to do something, and then the next moment shows them do exactly what they said they wouldn't do. There are two nice examples in the film, which strangely enough to not appear on the tropes page for this film: at the beginning when Conor meets Eamon, they're having tea but decide to move to the shed for further discussion. Eamon's mother says "Remember: no smoking", and Eamon says that he's told her that he doesn't smoke. Cut to shed, where Eamon, Damon and Conor are all puffing away. 

There's an almost Gilligan cut later on when Conor shows Eamon an A4 sheet advertising the end-of-term dance, with 'DJ and Lights'. "We could do a short set", says Conor. Eamon disagrees, mentioning that he has to revise for exams. "Will there be girls?", he asks. Conor say yes, then Eamon says "Then we're playing". Cut to exam room: all six members of the group, along with Barry, their nemesis, appear to be totally lost when they see the exam paper.

With regard to smoking, the first half has almost everybody in the film smoking, although this tapers off towards the end. But strangely for this kind of Irish film, nobody swears (except for exactly one example)! The Commitments swear more than they smoke, and they smoke more than they drink.

I really enjoy this film when I allow myself to let reality slip a little.

Final trivia: as noted before, the group is named after a pun on the name of the school they attend which is named after Irish playwright J. M. Synge. Quote: Walsh-Peelo's [Conor] father attended the actual Christian Brothers School on Synge Street, as did creator John Carney. To fully square the circle, the real school was used as a film location. Carney has stated that he needed to get it as it's too famous in Ireland to believably double.

Thursday, July 27, 2017

Sing Street

Several years ago, I saw the film 'Once', directed by John Carney: I found it enjoyable and very realistic. To quote the very short description on IMDB, "A modern-day musical about a busker and an immigrant and their eventful week in Dublin, as they write, rehearse and record songs that tell their love story". Apart from anything else, the film stars Glen Hansard and Marketa Irglova, otherwise known as The Swell Season. A song from the film, "Falling slowly" won the Oscar for best song! I don't think it's that good, but never mind. I wrote about the film here.

A few years ago, I turned on the television and saw a film which had already started; the first line which I heard was something about Randy Newman. Of course, I had to watch the rest of the film then record it properly when it was shown again. This was 'Begin again', directed by John Carney: I found this also very enjoyable but slightly less realistic. "A chance encounter between a disgraced music-business executive and a young singer-songwriter, new to Manhattan, turns into a promising collaboration between the two talents". This film presumably had a much larger budget as it features 'name' actors such as Mark Ruffalo (the music producer), Keira Knightley (the songwriter - she doesn't consider herself a performer at first), Catherine Keeler, James Corden and Hailee Steinfeld. I don't seem to have written about this film before [Edit from a few years later: actually I did mention this film two years prior to this blog].

A few days ago, I was perusing the listings for what is to be shown on television (after missing the beginning of an interesting film, 'God help the girl') and discovered that a new film by John Carney would be shown. In Hebrew, it's called something like 'The 80s club', but its real name is 'Sing Street'. Once again quoting IMDB, "A boy growing up in Dublin during the 1980s escapes his strained family life by starting a band to impress the mysterious girl he likes". Once again, enjoyable, but the least realistic of all three films. Six teenagers - supposedly aged 14-15 - get together to form a band with the eponymous name, which is actually a pun on the name of the school they attend - Synge Street. Some of them look their (onscreen) age whereas some ... don't. The 'mysterious' girl is supposed to be 16 (the actress was born in 1994 - and is actually American! - so she would have been about 20 when filming); sometimes she looks that age and sometimes looks much older. The little guy with carrot coloured hair on the far right of the picture below was born in 2000, so he was playing his own age.

Apart from the various anachronisms pointed out at IMDB (which don't really distract from the film), what really irks me is the quality of the songs that this group produce, in terms of both songwriting and performance. 'They' are really good and hold their own against 'real' songs which appear on the soundtrack (Duran Duran, The Cure, Hall and Oates, Joe Jackson) - totally unrealistic. No feedback, no missed cues, no out of time playing (although their very first recording has an appropriate and bad ending), everything mixed perfectly. The film takes place in about 1984/5, and the recordings are supposedly made with a simple cassette recorder! In 1974, I had a stereo tape deck with external microphones which could record better, but there were still plenty of extraneous noises.

The lead character (Conor) is somewhat chameleon-like, changing appearance to match whomever he is listening to at the time (there's one sequence where he starts looking like Robert Smith of The Cure). In the above picture, he's the one looking like Dracula, naturally at the front. The Lennon to this character's McCartney is called Eamon: he looks like John Lennon probably looked thirty years earlier although musically he's McCartney (plays many instruments). Actually, he looks more like Robert Fripp would have looked like when RF was 15 (blue suit, standing to the left of the girl).

Tuesday, July 25, 2017

Guitar corner

We've seen this corner of the music room before, but that was before the 12 string guitar was hung on the wall. Left to right  are the Ovation Applause, Washburn HB-25 and Fender 12-string. Actually there is a fourth guitar in this picture: below the Ovation is a picture of me playing my first good guitar (bought in Cardiff, 1973). Judging by the length and colour of my hair, this picture was taken in the early 1990s, but I can't be sure.

The piece of wood attached to the wall underneath the 12 string is a fold-up shelf on which can be placed my laptop computer: ideal for recording.

I have noticed that several photos which I have taken with my mobile phone indoors have strange colouring; this picture originally wasn't too bad (the white wall came out bluish), but one picture which I took in Rodos seemed entirely black. I use a comparatively simple program called IrfanView as a picture editor: this has a function called 'auto adjust colors' which radically improves these pictures. I don't know on what basis the colours are adjusted, but the final results are very good and are much closer to what the eye sees in the original scene.

Monday, July 24, 2017

Sleeping in the ground

Whilst mooching around the Kindle store, buying the book about "Rubber soul", I checked whether the new Peter Robinson book was available. Indeed it is, so I swiftly downloaded it and began reading.

As has been his habit over the past few years, Peter Robinson's latest book, "Sleeping in the ground", is named after a song - in this case, by Blind Faith. There seems to be no connection whatsoever between the song and the novel.*

A very brief description of the beginning (not written by me): It's a beautiful day for a wedding. But suddenly shots are fired and both wedding party members as well as guests are left dead and bleeding. It takes the police as well as emergency vehicles longer than normal to get to the dying, bleeding and wounded. By the time they do ... the shooter is gone ... there is no sign of him anywhere. Inspector Banks ... on his way home from a funeral ... ends up at the crime scene where there is confusion as well as chaos. No one has seen any sign of the shooter except perhaps a youth staying at a hostel. But a conversation with him leads Inspector Banks and his team nowhere. Please, no longer Inspector Banks (that should be Chief Inspector) but rather Superintendent Banks.

I don't want to write about the story very much, for fear of giving away the plot and whatever surprises it holds. Instead, I'll write about the cast. DS Winsome Jackson is 'disposed' of, right from the start: she's one of the people who are shot at the wedding, but not seriously injured. She goes home to Jamaica to recover and so doesn't really appear in the novel. Annie Cabbot appears but doesn't get much internal dialogue, if at all. Alan Banks has plenty of internal dialogue, but it's about an old girl-friend who, to the best of my knowledge, has never been referenced in any of the books. His poet friend from the last book, Linda Palmer, makes only a brief appearance [I didn't notice this before, but Linda Palmer is the name a good friend of mine used during her first marriage]. 

One interesting character is Ray Cabbot, Annie's father, who has decided to move to the area and buy a cottage. He stays with Alan Banks, as Annie's cottage is very small. He doesn't really add anything to the story, but makes the background more interesting. If anything, he functions more like Alan's wife, preparing food which other characters then eat. There is some reference to his artistic ability (in fact, he makes a key drawing, saving a police artist from doing so), but he could easily have been dropped from the book.

Psychologist Jenny Fuller returns: she appeared in many of the early books, providing extra-marital temptation for Alan Banks (which is never fulfilled). I don't remember exactly when she disappeared from the cast, but I think it was shortly after Annie appeared. Temptation once again rears its ugly head, but it seems that this time Banks and Fuller are prepared to let bygones be bygones and not get involved. A few senior superintendents also make appearances but they are peripheral to the story.

The star this time is DC Gerry Masterson, who makes most of the running. The final chapters belong to her, she has most of the insights and even delivers a briefing. She also betrays her inexperience in a similar manner to Winsome in "Abattoir Blues". One description of her reveals a new fact: she's six foot tall. I don't remember her height being mentioned in any of her earlier appearances.

It's a good book but not outstanding. Most of the time the police are wandering about, unable to find any lead to whoever the shooter is. After a great deal of patience and some good ideas, they finally get some leads, and only then does the pace escalate. So I suppose one needs a great deal of patience to read this book. Faint but damning praise.

There's a mention of a girl singing Richard Thompson's "Farewell, farewell" in memory of those killed at the wedding; Sandy Denny is referenced. Otherwise, all of the music seems to be classical (certainly no Blind Faith, despite the presence of Ray).

I admit that I am sorely tempted to create a chart of which characters appear in which books, but that won't help me appreciate the series any more than I currently do.

* [Edit from 17/06/23] Blind Faith played this song at their Hyde Park concert; it is a generic 12 bar blues, a 12/8 shuffle, the sort of music that turns me off.
I have created a database program for charting which characters appear in which books but this entails rereading all the books.
[End of edit]

Sunday, July 23, 2017

This Bird Has Flown: The Enduring Beauty of Rubber Soul

A few years ago, I bought from the Kindle Store a book about the Beatles' album, "Revolver" ("Revolver: how the Beatles re-imagined Rock'n'Roll", by Robert Rodrigues). The book is divided into three parts: a description of the period into which "Revolver" was introduced, descriptions of all the songs (including the 'scoop' that the bass on "She said, she said" was played by George Harrison after Paul McCartney walked out of the session) and the reaction to "Revolver". I found this book fascinating as it contained many details which aren't in any of my other Beatles books.

On this basis, it is easy to understand why I ordered the book "This bird has flown" yesterday after I came across it on the Internet, looking at the Wiki entry for "Norwegian Wood" (which is a song which I have been playing frequently in the past few days with my new 12-string guitar). As always, I am amazed at the speed and ease of buying a book for the Kindle. The book cost $10.99, which is quite expensive for what might be considered a vanity book.

I read about half of the book yesterday and gave up in frustration: instead of the neat ordering of the "Revolver" book and the critical facilities displayed by its author, this one was all over the place. There is confusion as to whether the book is referencing the British or American versions of "Rubber Soul" (probably both); there is very little about the period preceding "Rubber Soul", but there are all kinds of references to events which happened much later (for example, the sniping between Lennon and McCartney at the time of the latter's "Ram" album). 

It seems that there is very little about "Rubber Soul" itself, but rather a hodge-podge consisting of well-known facts and lesser known suppositions about the Beatles. Descriptions and writings about the songs themselves - which is why I bought the book - are conspicuously lacking, being replaced by other material (for example, why Eric Clapton plays on "Why my guitar gently weeps").

I cannot recommend this book to anyone. So why did I buy it? Because the preface - which is available for reading on the Amazon site - seemed reasonably interesting. I will be posting a negative review there in the next few days.

Thursday, July 20, 2017

Back to the beginning

After a long period of waiting, it has been decided by the powers that be that I have to be returned to the beginning of the DBA process. Obviously I don't have to resit exams, but I do have to submit a research proposal, have it accepted, then submit an intermediate submission etc. I am not very happy about this although I can understand the reasons for this decision. 

As I've already done a fair amount of the work required for the intermediate submission in April, it wasn't too difficult to sit down for a few hours and take what is needed in order to create a research proposal. I went over it very closely a few times today, deleting material which is irrelevant and rearranging what is not. I imagine that I will be assigned a new mentor for the research proposal (my previous mentor is probably sick and tired of me) and then hopefully I can submit the proposal within a few weeks.

One used to be able to see when the research committee meetings are, but the university's website appears to have been redesigned and I can't find that information. It will be my luck to have the proposal in a form ready for submission only to discover that I have to wait another six weeks. Actually, that isn't very likely to happen as the mentor will tell me when the next committee will be.

Just to recap, here is the abstract. Existing literature shows that there are gaps between the standard functionality provided by Enterprise Resource Planning (ERP) systems and the specific functionality required by implementing organisations. These gaps, known as misfits, are closed by means of enhancements – changes enabled in the system beyond the initial implementation configuration. As business is dynamic, the longer a company is in the post-implementation phase, the greater the need for further enhancements which were not envisaged during the initial implementation. These enhancements can vary in complexity from innovative uses of existing functionality through to the addition of complete, bespoke, modules. Each enhancement should produce a benefit which can ultimately be translated into monetary savings. This research is aimed at Small/Medium Enterprises (SMEs) and is restricted to those using the Priority ERP system. This research utilises the case study approach, being based on interviews with managers and users from multiple companies.

Saturday, July 15, 2017

12 string guitar: the basics

In conversation with my family, I realised that they don't know what a 12 string guitar is and what makes it special. On this basis, I imagine that most of my readership doesn't know either, so I have decided to write a few words of explanation.

A regular six string guitar with standard tuning is tuned (from bottom to top) E - A - D - G - B - E. Apart from the G-B gap, all the strings are tuned in fourths. Questions have been asked on the Internet as to why the intervals are fourths, except for one; the explanation seems to be that this tuning was settled on after decades of trials, as it allows for the easy formation of chords. Tuning the top two strings a semitone higher (thus preserving intervals of fourths over the entire guitar) apparently makes for very difficult chord shapes. A bass guitar has only four strings: these are tuned as the same as the bottom four strings on a guitar but an octave lower.

Since the early 1960s, people have experimented with alternative tunings, such as 'DADGAD', dropped D and open G (Keith Richards). Robert Fripp developed a 'new standard tuning' which is fifths. Joni Mitchell rarely played in standard tuning (as a side effect of the polio from which she suffered as a child) and so developed special tunings: almost every one of her songs has a different tuning.

A mandolin has eight strings: two 'courses' of four strings, which are tuned (from bottom to top) G - D - A - E, which are intervals of fifths. Each string is doubled, which gives the mandolin its special sound; frequently the two strings for each note are slightly out of tune, which gives a chorus effect. One of the bazoukis which I was shown in Rodos has six strings, two courses of three, tuned A - D - A.

After that lengthy introduction, we can now turn to the twelve string guitar. Like the mandolin and the bazouki, this guitar has its strings doubled (that's why there are twelve strings and not six). But instead of tuning the strings in unison (mandolin and bazouki), the bottom four strings are tuned in octaves (the top two are in unison). This is what gives the twelve string its characteristic sound, and is why I wrote yesterday that I will have to learn how to play single note parts on the lower strings.

Where can the twelve string be heard? As a child of the 60s, I instinctively think of the "A Hard Day's Night" album, where George Harrison can clearly be heard  playing a twelve string. The nascent Byrds saw the film and heard the music; they turned the twelve string into the dominant sound of their earlier songs. The first line up of Genesis used acoustic twelve strings. Apparently Tom Petty uses a twelve string guitar but I am not familiar with his work. Fairport used a twelve string occasionally, played by Simon Nicol: the opening riff on "Come all ye" and "Run, Johnny, Run" spring to mind. In fact, Simon used to claim that the reason that he was asked to join Fairport in 1967 was that he had a twelve string guitar!

Friday, July 14, 2017

The deed is done (12 string guitar)

The deed is done, the purchase has been made. After a few months of dreaming and a few weeks of planning, the stars aligned, allowing us to drive to the guitar shop near Modi'in (about half an hour away) and purchase the Fender CD-160SE 12-String V-2 which we saw at the end of May. 

As opposed to last time, I played the guitar for quite some time, and discovered that this guitar requires a different technique from what I am used to. Whilst the guitar is very comfortable, it's hard on the left hand, pressing on all the strings. My right hand technique also has to change: I would like to finger-pick, but that doesn't work too well; it's easier with a plectrum. The problem is to pick the first string of each pair, which is the octave string; this way, one achieves the characteristic sound of the 12 string. And finally: for solo note playing (lead guitar), it is better to concentrate on the lower four strings (which have the octaves) as opposed to the top two strings (which are in unison).

I have been reading and listening about the 12 string over the past few weeks, getting prepared - which is why the first thing that I played was the riff to the Byrds' version of 'Mr Tambourine Man'. Apparently McGuinn's 12-string was recorded with compression (there's also a story about Steven Still's guitar being compressed for the CS&N record) so I was interested in hearing what this actually sounds like. To be honest, there didn't seem to be much of a difference, except for a strange sounding attack, so I decided not to buy a compression pedal.

I took along my Dia violin bass as this requires repair work. The shop salesman (Adam) took the bass and played happily for several minutes: as opposed to my previous attempts, the electrics worked, although at the end we discovered that there is indeed a loose wire inside which causes the pickups to disconnect intermittently. Adam was very taken with the bass - especially the dampener - and said that he was prepared to buy it; my wife refused politely. As I may have written before, part of the binding is missing and so the back of the bass is separating from the body. Although I had been told that the shop takes repair work, it transpires that they handle only goods which have been purchased from the shop. I was given the address of a luthier in Tel Aviv; I will try and send him pictures via email or WhatsApp before going there, as it may well be that the cost of repair is more than the guitar is worth.

It turns out that the owner of the shop knew us: he spent time on our previous kibbutz in the mid-80s as part of his army service. He also knows the person who gave me the bass during that time. His knowing us (or having known us) may have suggested to him to discount the price - or throw in a freebee.

I took the opportunity to try out a few other, iconic, guitars which were in easy reach of where I was sitting. Behind me on a stand was a stratocaster (barely visible in the photograph on the right hand side); I found this quite difficult to play, although of course I am an acoustic guitarist who plays primarily rhythm. I also tried out the telecaster (just above my right elbow in the picture): I have always belittled this guitar, partially because of its look and partially because everyone seems to play it (in other words, non-professional reasons). When I picked it up, I was surprised at its light weight, and as opposed to the strat, it was very comfortable to play. I can now understand its ubiquity. 

I also picked up the Gibson SG (directly above my head in the picture) and showed it to my wife, asking if it looked familiar. She recognised that I have a copy of this guitar in the music room, and asked how it could be that guitar makers can produce a blatant copy of an expensive guitar. I don't know whether the penny has dropped about the bass guitar and Paul McCartney's iconic Hofner violin bass, but then, she isn't interested in guitars.

The bottom line of these last two paragraphs is that most electric guitars don't feel comfortable in my hands - although I wouldn't refuse the tele - and so I don't have any intentions of buying any more guitars. Just as well as there is no free wall space!

Thursday, July 13, 2017

Room hiring service design

Giving a small glance into one facet of the work which I perform, I was approached to design a database for a room hiring service, to be implemented in Priority. At first glance, this appears to be the same as a hotel management system: there are rooms which are booked from date until date, each room with its own price. This is fairly standard, although the date handling can be tricky. But what makes this system stand out is the fact that whilst some rooms are 'private', other rooms are 'communal' - a big room could hold fifty workstations, where someone can hire a workstation for a few days. Thus an order for such a workstation would leave the room 'vacant', and other people can hire a workstation in the same room for the same dates. A field will need to be added to the 'parts' table to represent this (1 would indicate 'private', whereas any other value would indicate the number of workstations in the room).

Based on the constraint that the implementation will be in Priority (which simplifies certain things but forces one to work within the framework of Priority), my first decision is that 'each room is a part'. This allows us to use the standard 'orders' screen in Priority, along with the 'order items' screen. Let's see what functionality exists, what has to be added, and where there are problems.

Assuming that there is a part with catalogue number 'ROOM01', a customer can hire this room, stating the period during which the room is to be hired. The 'orderitems' table has a field called duedate, which can represent the date the room is to be vacated, but a field has to be added to represent the starting date (it's definitely not equal to the date the order is opened!). Checking whether the room is vacant during this period is not as easy as it sounds. One approach would be to check whether there exists a record in the orderitems table for this room which straddles the starting date - if there is such a record, then the room cannot be hired. If the starting date is free, then the vacating date has to be checked in the same manner. Unfortunately this check would ignore the possibility that the room has been ordered for a smaller period, falling between the start and end date of this request. I'll leave this aside for the moment.

The room has its default price, so the total price for this line would be this default price times the number of days, which would be 1 + (the leaving date less the arrival date). The number of days would be stored in the quantity field, allowing the total price to be calculated automatically. This last statement implies that the quantity field should be read-only, which is not the case of the standard order items screen.

Priority does not allow fields to be set as read-only at run time, dependent on other fields. While the status of this field could be set in advance, it will be problematic if the user wants to use this screen to insert customer orders for items which are not rooms. As this standard capability should be left as it is, I am tending to suggest that a customised order items screen be used for room ordering, which implies that the order should have a specific type: an error message will be displayed if the user tries to enter the standard order items screen when the order type is 'Rooms', and vice versa.

The owners want to have a daily price, a weekly price and a monthly price. Priority allows multiple prices for the same part, based on a minimum quantity, so three rows can be entered for each part, with prices for quantity 1 (e.g. $50), 8 ($45) and 29 ($40). The appropriate price will appear automatically in the order line dependent on the number of days. Whilst this seems very good, there are two overwhelming problems with it, one internal and one external. The external problem can be phrased as 'what about weekends?' - how many days is it if one orders a room for two weeks? Is this from Monday 17 July 2017 until Friday 28 July 2017? What about the weekend 22-23 July? Is a week seven days or five days? Maybe some people work on Saturdays but not on Sundays. I call this an external problem because its solution is not dependent on Priority per se, but rather a management issue. Weekends can be handled by a series of flags, which will reduce the number of days, but this is messy.

The internal problem is that all the above relates to a room as if it is a whole, and not a room with workstations which can be hired separately. This relates to the quantity: how would a order show that the customer wants to rent 2 workstations for 5 days? The first solution appears to be separating the number of days from the quantity: if the room is defined as 'single hire' (and this has to be added somehow to the parts table), then the quantity will be 1, whereas if the room is defined as 'multiple hire', then the quantity will be however many workstations are required. The mechanism which calculates the total price will have to be amended (it's good that a customised screen will be used!) to calculate 'number of workstations' times 'number of days' times 'default price'. Unfortunately, this means that the multiple prices entered into the price list will not work, as the quantity is the number of workstations and not days.

I think that it would be better not to use the standard price list mechanism, but instead use a discounting system, which would state provide a discount per number of hiring days, for example 5% discount for a minimum hire of 8 days and 10% for a minimum hire of 29 days. This system can be implemented at three different levels: on a global basis (all rooms have the same discount policy); on a 'room type' basis (all rooms of a given type have the same policy), or each room has its own policy. The discount - by whatever means it is calculated - would be inserted into the discount field of the order line. So now the total price for a given room would be: 'number of workstations' times 'number of days' times 'room price' times (100 less discount) times 0.01. Management will have to decide at which level the discounting system will work - probably all three!

Although theoretically a check should be made whilst booking a workstation that there is a free workstation within the room during the given period, I have been told to ignore this possibility. Management is happy to rent 120 workstations a day in a room which holds only 100 workstations. Fortunately, in the first paragraph of this blog, I mentioned the need to add a field to the 'parts' table which allows differentiation between 'single' and 'multiple' hires, so this field would be checked prior to the complicated vacancy check, which is to follow.

Here is the vacancy check problem: someone wants to book ROOM01 for the period 17 - 28 July (this room is a 'single' hire). As it happens, someone has already booked this room for the period 19 - 25 July. How does the program 'see' that the room is unavailable and that the request has to be denied? A naive way of doing this is as follows: after a room has been successfully booked, a series of entries is made into a 'booked room' table, where each row has a room and a date. Thus given the above, this table would have the following entries

Room numberDate
Room0119/07/17
Room0120/07/17
Room0121/07/17
Room0122/07/17
Room0123/07/17
Room0124/07/17
Room0125/07/17

The check would start from the day before the first required date (16 July) in a loop as follows (the flag has to be set initially to 'failure'):
  1. increment date
  2. if there is an entry for this date and room in the 'booked room' table, then go to label 99
  3. loop until the current date is the same as the vacating date (28 July)
  4. set flag to 'success'
  5. label 99
Whilst this solution would work, it requires inserting values into a table, which is going to grow indefinitely. This table is not really needed, as the dates already exist in the order items table, which looks as follows

Room numberFrom dateTill date
Room0119/07/1725/07/17

The only difference between the code needed for these data as opposed to the earlier data is the second step, which would have to check whether the current date is in any given range. There is no particular advantage in this checking code, but the requirement to build the 'booked room' table has been obviated: a very big saving!