OU blog

Personal Blogs

David Pennington

Getting more concerned as time goes on + news of Raik

Visible to anyone in the world

I am bashing away at this but feeling that I missing too much as I go. As I mentioned before, my strategy is to crash through the course work and get myself plenty of headroom for the TMA. I am currently at the start of week 15 and have completed part 16 so I am about 2 weeks ahead. Tomorrow, I will start on question one of TMA 02 having submitted ICMA 44 some time ago. 

I got 55.67 out of a possible 60 for ICMA44 which gives me another result in the low 90s. 92.78% to be precise. I felt that i could have got 100% if I had tried another go round but I can't see the point in doing that when all I need is 30% to pass the module. So far, I have averaged 85.6% for the ICMAs so I am quite pleased. With 72% for TMA01, I am satisfied that my strategy is working.

Now, to part 15. Wow, what a devil of a part. This part concentrates on extracting data from a MongoDB database and mapping the results. I am finding this incomprehensible. The code is complex and arcane in its presentation and use and there is zero explanation of what is going on. As an example, in 15.1 it shows you how to map accidents in the area of North Wales Police. It does this by giving you a code - 60 - which represents this police area. In the assignment bit, it asks you to map accidents in the Hampshire police area with no indication of the code for Hampshire. In the solution, it shows you how to get the code - but we have never seen this before so I am not sure quite how I was supposed to know how to do it. So it goes on... 

Yet again, I decided to skim the solutions and to make sure I knew where to come back to when/if I need to. I have never had to tackle an OU course in this manner before and I hope not to have to again. I am very fortunate in have a long experience in coding object oriented software against SQL and NoSQL databases so, although I am not rigorously trained in the theory, my experience of the practice seems to be getting me through.

Now, to more interesting things. I have been working quite hard - outside of my allocated OU hours - on getting my new Riak database integrated into some of my fun code. Now that I am retired, I can work on my own projects rather than those for other people (well a lot of the time anyway as I still get paid consultancy). I have a project that, for convenience sake, was using CSV files as its data store. I am slowly converting that to use the Riak database I have running on Amazon AWS. I had most of the CRUD working but had a strange thing when trying to delete objects from buckets. I could delete a single object but when I tried to loop around the keys for the bucket, nothing was getting deleted. I ran the single code through Wireshark and compared it to the same call using Curl and couldn't see any difference. It took me hours to realise that I was switching the parameters to the single delete method when calling from the loop so the http call was badly formed. Did I feel stupid - yes, I did. Still it is sorted now and I can get on with the integration proper.

(Wireshark records all TCP/IP traffic down a network connection so you can see what is being sent. Curl is a Unix command line program that formats and sends HTTP calls.)

One last thing that I found - one of my classes has lots of entries and I firstly put them individually into a single bucket but I found that creating and saving - and reading and decoding the JSON was taking too long so I now put all of the individual items in a JSON array and save them in one go. Much quicker!

Permalink Add your comment
Share post
David Pennington

Lots of activity with NOSQL

Visible to anyone in the world
Edited by David Pennington, Wednesday, 4 May 2016, 15:30

I got 72 in my TMA01. Great results for the coding side and a bit of a disappointment with the written work. No surprise there, then!

In the meantime, I got on with the course work and hit the section about NOSQL databases. Now, this is my territory.

Background.

Until I retired, four years ago, I owned and ran a scale plastic model shop here in  Ipswich. This was in addition to my programming activities. I wrote all the till software and all of the web stuff - in Smalltalk. We have a true OODB written in Smalltalk but it had a few performance problems so I decided to create my own. VisualAge Smalltalk has two nice classes - ObjectDumper and ObjectLoader. These write out and read in objects in a binary form. I simply used the file system as a means of using the database so it worked like this.

I had a nice User object and each user had a unique key. I simple wrote out each user to a file inside a directory called "user" with the unique key as the file name. I then wrote out similar copies under the postcode, surname, town and so on. It seemed a bit makeshift at the time but it worked really well and it scaled very nicely. It wasn't until I read the "Seven databases in seven weeks" book that I realised that I had built my own key/value pair NOSQL database!

As I have plans for my final project course that will require a fast database, I decided to build one using Amazon AWS so I signed up (for about the third time) under a new e-mail so that I could get a free instance. I  then had three days of agony trying to get a Riak database in place. Firstly, I had to understand that I didn't create an instance and then put Riak into it. I used the Marketplace Riak option to build a dedicated Riak server. I did this for three instances and then tried to connect them. That is where the real hell come in to play. It took me two days to sort out how to cluster the three together. I finally managed it yesterday and now have a nice three node Riak database working. I know that I will probably have to pay for two of them but firstly it is tiny money - about $7 per month and secondly I can always stop them when I am not developing on them. 

Having got on very well part 14 - MongoDB stuff, and got most of the next CMA done, I can get on with playing with my new toy. My first thing to do is to get my Smalltalk image to talk to Riak. This is just a case of writing a GET and POST method in my application. Once that is done, I can get on and implement all of the Riak calls. This should be fun. I shall report on this in future blog posts.

In the meantime, MongoDB awaits. I am interested in this because my son uses this at his work. It will be nice to be able to extend our conversations in that direction.


Permalink Add your comment
Share post
David Pennington

Week 10 - facing up to my difficulties

Visible to anyone in the world

I finally had a soul searching moment this week. I was working through week 9 notebooks and realised that I was just executing the code and moving on. This made me think about how I was studying and what it meant for the future.  Finally, I posted the following in the Cafe forum.

"Am I unusual?

I have been programming since 1978. I started out in BASIC (taught to me by the OU in M251). In 1983, I switched to Pascal and in 1990 to Smalltalk (feeling that OO was the way to go).  In all of that time, I have never set out to learn anything by rote or felt a demand to hold everything in my head. There was (and is) documentation available for me to check up on anything that I had forgotten (or even never known). As an example, I am currently getting to grips with Seaside - which is a package within most Smalltalk versions for creating web sites programatically. I am learning this by doing and thus, whenever I need to do something new, I look it up.

I have been going through the notebooks for week 9. I am finding it very difficult to carry out some of the SQL problems in the notebooks. My brain just doesn't let me create a complex programming statement or section of code without me "having to do it". Hence, I skim over these bits knowing that, if needed, I can read them again when I have to. 

I should mention that I have made my living by programming in Smalltalk for many years.

Am I on my own in this (i.e. is it because I am 71 years old and my brain is failing - grin - although I have always been like this) or is this a common trait. Please help."

I got a couple of replies that indicated that I wasn't on my own.  However, it made me carry out a retrospective on the recent TMA. I realised that I managed all the written stuff straight off but all the programming needed me to go back to the notebooks, my Pandas O'Reilly manual and god old stackoverflow.com! When I thought about it, that was how, even after 38 years of programming, I did my "day job".

Suddenly, I knew how to get on with this course. It should let me get quite a bit ahead, knowing that I will slow to a crawl through the next TMA (and probably the CMAs as well). Read all of the course books, giving them some time to sink in and skim through the notebooks to make sure that I know what is in them. Then,when the TMA comes along, I will have the time to run through the written work and struggle my way through the programming stuff. It helps that I am pretty familiar with SQL, Normalisation and inner/outer joins etc.

As an aside, I thought that I would let you follow what I am doing with my personal programming. At the moment I am writing a web log analysis package so that I can see what activity is going on with the web sites that I host on my personal web server. I know that I can get packages to do this but I will get a better understanding of the topic by writing the code. In passing, I was amazed at how many web crawlers there are out there. We only get about 10 hitting our sites but the real total is astonishing. This package is being written in Instantiations VisualAge Smalltalk - my eternal coding partner since 1994. I will describe it better when it is finished and working.

That's all for this week. I am worried about my TMA score so I check a few times a day to see if it has been posted. No luck yet!

Permalink Add your comment
Share post
David Pennington

Week 10 and the first TMA is in!

Visible to anyone in the world

I managed it. Having said, last week, that there was only the last part to do, I didn't realise that that last part would take nearly a week. I hit a block and couldn't work out how to do it. I got stuck on the aggregation part where we had to calculate the mean, min, max and sum. I seriously couldn't see how to do this as I couldn't grasp the working difference between a dataframe and a group object. I fought this for a few days and, finally, decided that I had to get it cracked. I spent nearly all day Monday on the problem and suddenly it went "Bing!". I then got through to the end and went for dinner thinking that the TMA was over. Ha! Before sending it off, I thought that I had to make sure that everything was fine and, thus, went through the TMA again from the beginning. I not only found some silly mistakes but also found that there were two bits that I hadn't answered. So this killed off Tuesday. Finally, I couldn't do any more so sent it off, only to get it back as the screen shot names were too long. The OU only allows 50 characters, evidently. Did they tell me this first? No. It also seems that the OU cannot count because it rejected one file name that actually had 49 chars in it.  Still it is gone. I can do no more. As this is the first TMA I have done since 1979, I am concerned that I have written enough and that my coding meets their requirements. I wonder how long it will take to get my results?

Anyway, I now have a little time to get back into work. I have read half of unit 9 so if I can get the rest read by Sunday I will be back on track. I have had a quick look at unit 10 and the notebooks that come with that seem to be the biggest that we have had so far and it is all SQL stuff.

I thought that I might relate my previous computing experience at the OU as that was done in a different world. In 1977, I sat M251, An Algorithmic Approach to Computing. This was in the days before home computers so the arrangements were arcane to say the least. I was living in Billericay at the time and my local centre was in Chelmsford. In a room in Chelmsford there sat a teleprinter - think large electric typewriter with a punched tape attachment and a modem. There was no other storage than a punched tape and the modem ran an 300 baud (300 bits per second). The course was set around the BASIC language and to gain experience in running a program or doing an assignment, I had to travel up to Chelmsford having booked an hour slot, and studiously, and carefully, enter the program in from the keyboard. Once in and tested, I had to 1) make a clean print out of the program and its output and 2) make a punched tape.

Assignments were done by sending off the printout and the tape to Milton Keynes. I remember that one of the assignments was to turn numbers into Roman numerals. I got back a print out of the run that was about 20 feet long. I had to get on my hands and knees to read it all on the living room floor. I did that same thing at Reading Uni when I attended the M101 Maths foundation course summer school. At that time, I was free to choose a subject so I did some Foreign Exchange calculations comparing currency and interest rates. As a result of that, the bank I worked for bought me my first desktop computer and the rest, as they say, is history. 38 years later and I am still programming and enjoying every minute of it.

Permalink 1 comment (latest comment by Emma Thomas, Wednesday, 6 Apr 2016, 13:49)
Share post
David Pennington

Week 9 - late! A quiet week

Visible to anyone in the world

I have got myself quite ahead so the break week really was that. I am currently starting on Part 9 (more later) and have nearly completed the first TMA. As a result, I was able to get a few other things done. 

I spent two days sorting out a new camera lens. This wouldn't normally have taken that long but it was a bit of a special requirement and I got myself down a blind alley. I do a lot of scale plastic modelling and run the web site for a local club (IPMS Clacton). This requires that I take photos of the models that the members bring along. They only bring them once so I have to get the images right. I was having some trouble with my existing zoom lens so I needed a special lens. I went up to Norwich to Wex and had a long conversation about macro lenses. Having got home with the new lens, I found that it would create difficulties so went back the next day and changed it. The whole story is on my modelling blog.

We went away on Saturday for an overnight stay at a nice hotel in Aldeburgh and then, on Sunday, drove around the north Norfolk coast through Cromer toWells-next-the-sea (what a great name that is!).

Back to the course. As mentioned, I have nearly completed TMA 01. I have the second part of Question 6 to do. In a TMA with 6 questions and with most questions having multiple parts, this last little bit has a worrying 20 marks assigned to it. This is not a question to take lightly. Fortunately, the bulk of it is one liner Python answers. I am, currently, stuck on the last part - hence me doing my blog. Still, I have until 7th April to sort it out.

Although I don't know Python any depth, I am managing between my programming knowledge, the O'Reilly book "Python for Data Analysis" (available from the OU library, I think), and StackOverflow.com I am managing to complete all of the tasks to, I think, a satisfactory standard. We shall see, though, when I get the results of the TMA - gulp!

I am starting on Part 9. I must say that the book that they have us reading isn't telling me much. I did a unit on databases back in 1980. I didn't finish it but I got 3/4 of the way through and ever since then I have been using them. Thus, the content of these current units is just covering what I already know - albeit in greater depth. I am hoping that this means that I can keep ahead. My arthritis catches me out some days and I don't get much done so the buffer that I have is going to be  needed further into the course.

Permalink Add your comment
Share post
David Pennington

Week 8 - Well, I got that wrong!

Visible to anyone in the world
Edited by David Pennington, Friday, 18 Nov 2016, 12:56

In last week's blog I had the following section:

"Some of the notebook questions don't quite correspond to my code output. As an example, there is a comment - 

# A quick inspection shows that we have one spurious row at the end the DataFrame.

# (The original spreadsheet has an entirely blank line after the Clinical Senate rows.)

Well, I have a blank line there in the spreadsheet itself but it doesn't appear in my dataframe! I took the point of view that I would just comment on this and not worry about it. Later, this appears:

# Finally remove the spurious space at the end of the 'One ' column name.

# Enter your code here.

I don't have that space so I have placed a comment in the box saying:

# I don't have a space at the end of the 'One' column name"

This was all rubbish!

First off, I couldn't address one of the headings. Guess which one? 'One', of course. It turned out that I was just looking at the screen word and not looking at the heading as seen by Pandas. When I checked, there was the space. It was easily got rid of but I did feel a little stupid. More was to come though. When I started looking at the Clinical Senate list I found that I had one too many rows. Oh, so I did have the empty row, except it wasn't empty - well not really. It did have an entry which had confused me and hidden its empty status. (I can't say any more as I will give away some part of the TMA). So, I did remove it. I now felt more than a little stupid. I felt very stupid. That error with the hidden space had cost me a couple of hours messing around because I couldn't address that column.

Anyway, I got that notebook out of the way and carried on with the TMA. At the same time, I started to read the Part 8. I was having a lot of trouble reading the course books as I was putting them on my iPad mini but the angle of reading at my desk was causing a lot of trouble with my neck. I applied to the DSA for a larger tablet that would allow me to read at a much better angle and distance. It seems that I didn't explain myself correctly as the request was refused. I bought myself a 10" Lenovo tablet and this has sorted out my problems with reading. It sits on the original tablet stand that the DSA supplied but that wouldn't hold my iPad mini. I am much more comfortable now with the reading part of the course.

Part 8 turned out to be mostly history for me. In 1980 I studied M352 - Computer Based Information Systems. I didn't finish this course - working as a foreign exchange trader in the City and four kids at home got in the way. However, I got about 4 months into it. It was mostly about relational databases so reading the background wasn't just history for me but memories. As it was, I rattled through the book and the reading of the references. I have ticked that one off.

So, I have half of one question left in the TMA 01. I have started ICMA 43 - ish - and have read all of the available course material. This should leave an easy couple of weeks without any study. It will give me time to go over the TMA. I am still worried that I am being too lightweight with the TMA. I have to get 40% on this assignment. I am hoping that the coding part will get me there with just a little help from the written parts. I am OK with the factual side but struggling to understand if my analysis and review of statements, etc. are up to scratch. Maybe I will discuss my fears with Joe, my tutor.

Permalink Add your comment
Share post
David Pennington

Week 6 - Spreadsheets and TMAs

Visible to anyone in the world

This week is all about spreadsheets and how people manage to mess them up. I have some direct knowledge of the major effect that having a spreadsheet as your main source of information and of using a spreadsheet inappropriately can have so I am very careful whenever I use them. I am a big user of Excel. For my last business, I used it as my main accounts package. This worked for a few reasons particular to me:

  1. 24 years in banking and having completed a big proportion of the Institute of Banker's exams so I have a deep knowledge of accounts management
  2. 30 years experience in programming at "mission critical" levels
  3. 30 years of using spreadsheets in a wide variety of situations (starting with Lotus 1-2-3 in 1985!)

These have ensured that, when I create a spreadsheet, I always incorporate cross checking features that highlight any numeric inaccuracies.

I found that the course work took a very short time to complete which has enabled me to concentrate on the TMA. I want to have this assignment nailed before the break coming up. It is my birthday during the break week so I am hoping to enjoy the rest and not to have to play catch-up.

Now to the TMA. I am concerned that I have nothing to judge my written performance against. Most here will have completed, what I know as, foundation courses recently. These will have eased the student into writing TMAs in a gentle way. My last assignment for the OU was written in 1980. Since then, I have spent my time writing specifications, code and manuals - none of which is a help in writing 300 words on ‘Is facial recognition tech really a threat to privacy?’ . I have no idea as to whether what I write is in the right format, worded correctly, is too detailed or too trivial. I know that I have an aversion to using "clever" words so this may be my downfall. 

Anyway, I have completed the written work up to question 3b and the notebook up to question 4a. Some of the notebook questions don't quite correspond to my code output. As an example, there is a comment - 

# A quick inspection shows that we have one spurious row at the end the DataFrame.

# (The original spreadsheet has an entirely blank line after the Clinical Senate rows.)

Well, I have a blank line there in the spreadsheet itself but it doesn't appear in my dataframe! I took the point of view that I would just comment on this and not worry about it. Later, this appears:

# Finally remove the spurious space at the end of the 'One ' column name.

# Enter your code here.

I don't have that space so I have placed a comment in the box saying:

# I don't have a space at the end of the 'One' column name

I am hoping that this won't cost me any points. I have just the data visualisation part of the notebook and questions 5 & 6 to complete before 7th April so I should be OK. Given that we have only just got the course work for week 8 and there is no sign of anything further yet, I guess that I will have to hope that I can stay one week ahead.

 

Permalink Add your comment
Share post
David Pennington

Week 5 and ICMAs

Visible to anyone in the world

Still keeping myself one week ahead but not by doing 8 hours a week - more like 12 - 14. This week it was all about the Data Protection Act and the Freedom of Information Act. I found the reading quite interesting and followed up a lot of the links. I have to admit to getting lost in the detail of the acts themselves. The official guides were very helpful. However, I am sticking to my current learning practice of reading everything, taking notes of the important points but not trying to digest everything as I go along. I find that if I concentrate too hard I actually start to glaze over and think of other things. So, reading and gleaning the important stuff and knowing that, should a topic come up in a TMA/CMA, I will know where to come back to is keeping me on time. This means that I am still maintaining my one week advance on the course. Not much of a buffer but a buffer none the less.

I am confused - again - about the suggested timings. I can't remember what I used to do - my last TMA that I completed was in 1980 so I am sure that a) I can't remember what I did or how it was marked and b) It has probably all changed since then! It seems that my studies are taking up more time than the authors of the course suggest. So, my question is - where does the time come from to complete the TMAs and CMAs? As far as I can tell, these have to be done in time outside of the weekly allowance. I am lucky in that I am retired so can find the extra time. I wonder what I would do if I was in my previous situation - a senior trader in a bank in the City plus a wife and four children between 11 and 2. A year previous to that I did a 60 credit maths course (M101) which included a week's summer school. I came back from that having learned Basic and promptly got involved in writing software for the bank's trading room - as well as completing the course on time and successfully. I am a bit (ha!) older now so expect to be a bit less capable but this is only a 30 credit course so the timings ought to allow another course to run parallel. I am glad that I am not doing that other course though.

I sorted out the mess that I got into having signed up for two courses next year. I took on the second course knowing that I would cancel the first one. I sent an e-mail to the Student Support people asking them to effect the cancellation - I got an auto acknowledgement back but no action. I telephoned and the person there said that they had taken the appropriate steps but 10 days later I had to send another e-mail which finally got the job done. I am now enrolled on TM352 - Web, Mobile and Cloud Technologies which starts in October.

I have completed the second CMA. Hmmm. I learned a lesson with this one (which I knew really). I thought that the first question was easy so I rattled off the answer - wrong - did it again - wrong and then a third time. Guess what - wrong again. I ended up with just 4 marks out of 10. OK, I thought. Let's do this properly so, yesterday morning, I sat down and went slowly through the rest of the CMA. I found questions 2 and 3 somewhat confusing and, even though I did spend a good amount of time on them, I had to accept that I was going to get less than full marks. As it worked out, the results looked like this:

Question Status Marks Possible
1 Correct 4.00 10.00
2 Correct 6.22 10.00
3 Partially Correct 8.00 10.00
4 Correct 9.33 10.00
5 Correct 10.00 10.00
6 Correct 10.00 10.00
7 Correct 10.00 10.00
8 Partially Correct 10.00 10.00
67.55 80.00
Result 84.44%
I am not sure quite how I got 10 for question 8 when it was marked up as Partially Correct but I think that I got it right. I have just checked back but , to do that, I have to start another session and question 8 is different so I can't answer that one now. Still I got 94% and 84% so far which means I have 5 more to get my final 3 over 30%. I am struggling with the TMA though as my poor 70 year old brain is dragging its feet back to assignment writing. I will get there though. Still a few weeks before the cut off so I can keep working at it.

That's all for now. I am just about to open Part 7. I love using spreadsheets and could write you a book about where 'non-programmers' go wrong in using them (hint - a lack of planning and debugging skills).


Permalink Add your comment
Share post
David Pennington

Week 4 and just about on track

Visible to anyone in the world
Edited by David Pennington, Monday, 29 Feb 2016, 10:35

A difficult week, this week. I have a server computer here at home. This runs both a web and an e-mail server. For many years, this was run on an old, home made computer which ran like a train. Some time ago, I decided that it needed a new machine so I bought a nice little Lenovo desktop. This had Window 8.1 (Ugh) installed. I put the server software on there and off it ran. I had a BT Business broadband line which provided me with the required static IP address. When we moved, I had to close down the broadband and sign up for a new contract - this was because the business broadband was running on a residential line and BT couldn't move it along with the phone line! As I was going to be out of service for a while (10 days, they told me) I moved the server to my daughter's school (she owns it) as she had a static IP there. It has been there before so I didn't foresee any trouble. Before it went, I upgraded it to Windows 10 as this was a free upgrade and I hated 8.1.

From then on, we had nothing but problems with the server freezing at random intervals. This had happened before but, at home, we could just reboot Now I was beholden to others, apart from the fact that the school was closed at weekend, etc. Finally, after 4 weeks (! 10 days, they said) I brought the server back to our new apartment. As part of the new regime, I decided to upgrade everything so I replaced the hard disk with a 250MB SSD (solid state disk) and installed Microsoft Server 2012, which I got from the OU through Dreamspark). We had some problems with the wireless connection which was important as there was no space in the apartment hallway for the server to be directly connected to the BT Business Hub.

OK, so back to now. I spent the whole of last week messing around with wireless network connectors until finally I got everything sorted on Saturday. This constant effort has played havoc with my schedule. In the middle of this, I had my new desk and chair delivered. This came on Friday and is part of my Disabled Student status. The man came with the new desk, which was delivered as a kit of parts. It seems that the desk top comes in many different lengths so it arrived without fixing holes. The installer had to spend a good while measuring up for my top, which is 1.6 metres in length! The desk is height adjustable so, if I get too stuck sitting down, I can raise it sufficiently to stand up to work! The chair is infinitely adjustable. I had a 15 minute training session on its features. He also installed an under desk device for the server that I mentioned above. This avoids the problem of cables being stretched. There was also a footrest and a desktop iPad holder. Everything went in fine except for the iPad holder which wasn't able to shrink down to hold my iPad mini in portrait and was too narrow to hold it in landscape! I have bought a small metal one from Amazon that works beautifully - so good that we have have bought two more. You can see the desk in two heights in the images below.



This is the replacement iPad holder. I am very impressed.


So, everything seems to be Ok and I can get back to studying. However, the BT Broadband should be between 8.5 and 9.9 Mbps uploading (which is important for an e-mail and web server) but it is running at 1.8Mbps so the engineer is coming on Tuesday to knock out my planned 2 hour study stint then!

Back to the course. I am trying to keep one week ahead and I had a lot of worries about this week just gone thanks to the dramas of the previous week - in terms of hours required. However, I shouldn't have worried as week 5 is all about presentation and is of a major order of magnitude down on practical projects. In fact, I skipped all of the notebooks on the basis that, if I need to do any map presentations then I can come back and check these out. In fact, I found the whole week quite light on the core stuff. As an example, this is an e-mail I sent to my friend in the USA regarding one element of the reading material.

"I am currently studying Part 5 of the course - “Presentation - Telling the story”.
I have read 58 pages out of the 87 in the week’s course book (an eBook). It comes out with the following steps:
0. Employ a data engineer and visualisation designer (!!) - or move straight to step 1 ( you have to smile - my addition)
1. Know your story
2. Choose a basic graphic form
3. Try out the basic forms
4. Adjust the elements
5. let others comment.
Wow, is this what I am dedicating 8 - 10 hours a week to learning?"

Having read the last few pages of the book, I have decided to move on to week 6 without worrying and expecting to look back at the notebooks if I need to.  I am doing a lot of worrying about the TMA as well but the questions that I am worrying about count for 6 marks in total so I am tempted to leave them with my best shot and hope (expect?) to get 2 or three marks for what I have done.  We shall see if this is a stupid assumption or not! However, as I cannot grasp what they are asking for then I see that there isn't much I can do about it for now. Maybe it will be come clearer as the TMA deadline approaches.

Summing up the week - I learned a lot more about network cards than I needed to know; I am fed up with BT as it is now 5 weeks and I still don't have my contractual business line; I am getting more confused over the course as some parts are extremely hard and others are almost trivial (but maybe that is because of my pre-knowedge?).

Permalink Add your comment
Share post
David Pennington

A hard 3rd week but a bit of realisation

Visible to anyone in the world

I have not found this third week particularly easy. I found that Notebook 04.5 particularly time consuming. I am not sure quite where the authors of the course got their timings from but I thought that the following was a bit optimistic:

"Activity 4.5 Notebook - 30 minutes"! At the end, it presents you with a list of tasks:

  • a) Show a count of the number of sales records for each District.
  • b) Show a count of the number of sales records for each Team in each District, including the Team and District margin totals.
  • c) Show the total sales value for each Team in each District summed over the year.
  • d) Show the total sales value for each Team Member in each District over the year, showing the District and Team member margin totals. (Remember you need the team name and salesperson name to identify each person uniquely.)
  • e) Show a bar chart of the number of sales each month. 
  • f) Show a bar chart of the total sales each month.
  • g) Show a scatter plot showing the Item Cost v. the number of Units in each record.
  • h) Add a Season column to the DataFrame. For each sale record, the value for Season will be derived from the month: (11,12,1) are Winter, (2,3,4) are Spring, (5,6,7) are Summer, (8,9,10) are Autumn. From the sales in each Season calculate the number, average, maximum, minimum and total sale amount over the season (that is, from all the sales records grouped by season report the number of records, and the average, maximum, minimum and total sales amounts).

These would prove to take me 1 1/2 hours on their own and I never did finish so quite where the 30 minutes for the whole notebook came from, I have no idea. Perhaps one of the course authors timed themselves? Anyway, I think that you would need to be very adept at Python and pandas to achieve the time. 

I left that notebook and tackled the next one - about Regular Expressions. I found this not quite so difficult but it did require some careful thinking. By this time, I was getting quite depressed about my chances of even getting to do TMA01, let alone complete it and continue. Fortunately, there was a post on the forum which set me back on the path of confidence (well - a bit). Someone mentioned that there wasn't an exam at the end so we had no need to have everything welded into our brains and that we could manage throughout by referring back to the course notes. A sign of understanding and relief was heard in my household.

On that basis, I tackled the first part of TMA01 and found that I could manage quite well! So, onward and upwards, as the saying goes.

I have been writing successful software for the last 35 years - some of it in mission critical situations such as bank currency trading rooms and so on. This has been done in Basic, which was taught to me by the OU in M251 An algorithmic approach to computing (in 1977), in UCSD Pascal (which was the OU's next teaching language and, finally, Smalltalk - which was the OU's third teaching language (replaced by Java and now Python to some extent). In all that time I have relied heavily on having documentation to hand as I have never managed to learn by rote all of the syntax of these languages. As an aside, Smalltalk (like pandas) has a very easy syntax but an extremely rich library so I spend some time regularly looking up stuff.

The upshot is, I think, that I should assume that I will do the same with Python, pandas and Regex and not try and have it all in my brain. I have one day left to complete week 4 to maintain my one week buffer so it is eyes down tomorrow for a good stint.

One last comment. Last week, I signed up for TM354 - Software Engineering, which starts in October. I have to say that those who know me from my development background expressed opinions that this would be quite boring given my CV. I felt that it would be a reasonable step to the final project course (TM470). However, it turns out that it has an examination. Ignore what I said above as I would be quite happy to sit this if it wasn't for my stupid arthritis and the problems it brings with continuity of concentration. As a result, I cancelled the application and signed up for TM352 - Web, mobile and cloud technologies. Firstly, this doesn't have an exam component but also it ties in very nicely with my thoughts on a project for TM470. More on this later.

Permalink Add your comment
Share post
David Pennington

Week 2 - fun and games, plus some free software

Visible to anyone in the world
Edited by David Pennington, Tuesday, 16 Feb 2016, 12:51

I am just starting week three of the course and have had to give myself a reality check. I was looking through the forthcoming Tutor Marker Assignment (TMA) and was panicking a bit at what I was seeing.

Let's step back a bit. I have had a difficult week one way and another - lots of pain in my hips so lots of tiredness and lack of concentration. This has caused me to have to force concentrate on the learning part. I have weeks 1 and 2 put to bed. I have the first ICMA (computer marked assignment and more on that later) finished and I was finding it difficult to stick with reading the recommended research papers for week 3. I have never been a fan of using jargon and, having been away from studying so long, I find that the way a lot of academic papers are phrased strike me as opaque for not much reason. First off, I couldn't find the recommended papers in the OU library and then, when I did, I found them impenetrable. This was probably because of my concentration difficulties. Eventually, I sorted out what the week was about but I was still panicky about the TMA.

Remember that "lack of concentration" means that you don't read things and take in the import. Well, it seems that, with the TMA, the questions (from 3 onwards), I was panicking over had a rider in the title that I had missed. How about "You should be able to answer this question when you have completed Parts 1 to 6 of the module"? Suddenly, it dawned on me that I was only up to Part 3! Giant relaxation all round.

Then how about this one in Notebook 0.4 of week 3. "We cannot cover the cases where the user has created sentinel values to capture semantic variations in missing data." I even posted on the forum for some help here! A fine example of using words to demonstrate writer understanding rather than to promote the same in the reader. This came back from the Moderator in an attempt, I think, to clarify the issue: ""We're not going to look at cases where the user has different flag or signal values to denote different sorts of missing data." Sort of... wink". Hmmm. Well, I think I get the message but I would have said that the course will ignore cases where special flags have been used to note dirty data rather than the Nan or NULL that we are going to look at.

Enough of my moaning. I finished Part 3 feeling that I will, maybe, have to come back and re-run the reading but that I knew enough to go on. Today, I started tackling Part 4 and have found this much more to my liking.

On a personal basis, I am ringing tomorrow to see what the delivery hopes are for my new electric desk and ergonomic chair. I think that this combination will help greatly with my concentration.

Now, I need to discuss the first ICMA. I find the whole issue of the ICMAs to be quite strange. They want us to do them but they tell us we only have to get 30% in 5 of the seven. They then tell us that we can have up to three goes at each question. From there, it seems that we can have multiple goes at the whole ICMA and, if the score of the latest submitted one is below that already achieved then it is ignored. It seems to be a scheme to let you get to a 100% score - eventually - so why have the 30% - 5 out of 7 - rule? I have done ICMA 41 (the first) just the once and got 75.11 out of 80 which I make 93.9%. This seems to me to be a good score so I will not be going back and having another go. Incidentally, the scores that are shown on my student record, when I add them up, come to 75.11 whilst the same scores on the Student home page are totalled there as 75.09. I can only guess that the actual scores are  calculated to 3 decimal places with only two shown thus giving a rounding error.

Right, I ought to finish as this is a very long post but I thought that I should mention Microsoft Dreamspark. This is a repository of Microsoft development tools and Operating Systems that can be free if you have the right student credentials. I tried signing up on the web site to find that they hadn't heard of the OU. I even gave them proof of my course but nothing happened. I then found out that the OU has a Dreamspark set up managed by them just for OU students. I sent an e-mail to mct-dreamspark@open.ac.uk and very quickly they had me registered. I was able to download a copy of Windows 10 (for my Windows Laptop which only had Windows 7 so no free upgrade) and Windows 2012 Server to replace the Windows 10 Home edition that I have running on my E-mail and Web Server. They even have MSDos 6.22 if you are so inclined. Try it. You could find something that you need.

Permalink Add your comment
Share post
David Pennington

Week One is nearly over

Visible to anyone in the world

I had planned to be well ahead by now but moving apartments put a stop to that. As it is, I have managed to get through to the end of week 2 and have the first ICMA (computer marked assignment) nearly completed. So far I have answered 4 questions correctly and one question that needed a second go. As I have to score 30% in five of the seven ICMAs I am quite pleased.

First reactions? Well, the Python bits are easy. Programming is what I do and the course is well presented through the iPython notebooks. I have had a few issues with data paths and, although I seem to have problems that others aren't getting, I am able to work my way around them. I don't seem to be able to make a CSV/JSON combination that works with CSVLint. My JSON description file won't be recognised by CSVLint. I have tried getting it through JSONLint but I can't even do that. So, that is in abeyance for now. I am having more difficulty with the theoretical parts but then I always thought that I would. It is, after all, 35 years since I have done any studying and my arthritis gives me issues with concentration. Funnily enough, I have no problem concentrating when I am coding. I think that I regard issues there as opportunities rather than as problems and I can keep going. Reading theoretical descriptions - I don't find that as gripping - so I have to work harder at it.

Reading the course description of databases has caused me to go back and think about the databases that I have worked with over the years. It is quite an interesting list.

  1. Linked Lists - I wrote my first database software back in 1980 when I created a Trading Room Front Office package using North Star Basic on a NS Horizon. For this, I wrote software for a series of linked lists that held transactions, exchange rates, dates, etc. all with an active re-use of deleted data spaces. The main problem with this was the fixed data widths.
  2. More Linked Lists. When I retired from the City and started my own software company we switched to UCSD Pascal and a complete re-write of the system. The product was called "Integrated Dealer Support System" (IDSS). To ensure that the database was robust, I got a guy called Mark Woodman to write the linked list code for me. At the time, he was an Open University lecturer (he is now a Professor at Middlesex University).
  3. In 1990, I switched to Visual Smalltalk (VSE) from Digitalk. With this, I wrote a Barrister support package based firstly on VOSS from LogicArts and then using Tensegrity from Polymorphic. These are/were Object Oriented Databases (OODB) that were integrated into the Smalltalk environment.  I went on to incorporate Tensegrity into my Smalltalk based Trading System which was called Powerdesk Trader.
  4. In later years, I have mostly written software for my own use. Between 2004 and 2012, I owned and ran a shop with my wife and daughter. This shop had a very active web site which, eventually when we closed the physical shop, became our main means of transacting business. The web software was based around a database of my own devising. Built using IBM's (latterly Instantiations) Visual Age Smaltalk - VAST - this utilised the built-in high speed directory system within Windows by having individual directories for all of the main database elements - products, users, sales, etc.  Within these directories I used VASTs own object dumper and loader mechanisms to save the various objects directly into their relevant directories with the file names providing the indexing. This worked remarkably well with the performance of the web site matching that of those with much more sophisticated (and expensive) systems.
  5. More recently, I have been building a freight car routing system for my US Outline model railroad. This utilises CSV files for its data. This option allows me to make changes to the data without having to write a lot of data management screens. For instance,when I purchase a new freight car, I can pull up the cars.csv file and add the new details within Excel.
  6. Finally, my serious programming has been for a US based insurance company where I my most recent project was to develop a insurance premium calculator based on normalising risk data for the clients. This gets its data from an MS SqlServer RDBMS.

Wow, that's a lot of variation through the years. It will be interesting to see how I really do cope with all the theoretical stuff, given that I have spent 35 years playing with all of the above!

Permalink Add your comment
Share post
David Pennington

The course is getting closer

Visible to anyone in the world
Edited by David Pennington, Thursday, 14 Jan 2016, 19:58

Getting closer meant that I had to get more serious about learning Python. 

I run a web and e-mail server from home. The e-mail server is for the family domain and there are three web sites that are running on the machine as well. I thought that I had put together a reliable setup when I  purchased a brand new Lenovo desktop box running Windows 8 (which was fairly quickly upgraded to Windows 10). However, the box freezes occasionally. I can't find any reason for this so I just have to manage the situation. I find the the Pingdom service, which is supposed to e-mail me when my server goes down isn't as reliable as I need.

I was casting around for another program to write in Python to extend my knowledge of the language so I thought that I would write my own Ping software. Now a ping is something that gets sent to a web address and reports back if the server at that address responds or not. What my software had to do was to regularly connect to the server and, if the server failed to respond, send me an e-mail. There was a few problems with me doing this in Python.

  1. I had no idea how to connect to a web server
  2. I had no idea how to send an e-mail
  3. I had no idea how to log these actions

So, this was going to test my ability to learn the inner details of Python. It was actually easier than I thought. Python has a rich set of libraries so I included the following in my program:

import smtplib
import requests
import time
import configparser
import os
These gave me everything that I needed. I used these libraries and very quickly I had my web checker program running. It runs in the background as a script on my iMac and has now been running for a few weeks without incident. It has shown me how useful Python can be. It would have been a good bit more complicated to do this simple task in Smalltalk - but then there are many things that I have done in Smalltalk that would be nigh on impossible in Python so, whilst I am pleased that I now know how to code in Python, I won't be giving up on Smalltalk anytime soon!

My next progression towards the course is a giant backward step. We have decided to move apartments and the move takes place on 23rd January. We are only moving from one floor to another (the new apartment is much bigger than the existing one) but, for various reasons, we are to lose our broadband internet connection for about 10 days - which covers the date of the start of the course! I am hoping that I can use my iPhone as a router for my iMac in the meantime. As we have a nice 4G signal here, that shouldn't be a hardship.

Lastly, I have quite severe Arthritis in a lot of my body so I have registered, through the OU, as disabled. Following an assessment of my problems, I have been awarded a grant that will provide me with equipment that will help me in my studies. I have difficulty sitting for too long in one position and find concentrating for long periods a trial due to pain levels.  Yesterday, I had a visit from a representative of an Ergonomics company who has carried out an assessment for a new desk, chair and reading aids. It seems that I am to get a desk that is electrically height adjustable, a fully configurable chair, an iPad holding device and a footrest. All of this is designed to get me into the best possible position for sitting at my iMac for extended periods. It seems to take about 6 weeks for this to happen but it does mean that, soon after the course starts, I will be able to get on with more success. My existing hobby room is way to small to take the new desk along with my other stuff so it is good that I am moving to a bigger apartment as the 2nd bedroom in that one is substantially larger than now. I might even have room for a decent model railway - at last!!!

Permalink Add your comment
Share post
David Pennington

New blog post

Visible to anyone in the world
Edited by David Pennington, Wednesday, 23 Mar 2016, 19:11

As mentioned, I am a newbie to Python. I was concerned about learning it because of my experience with Ruby on Rails some years ago. When I tackled Ruby, I kept getting annoyed because most of the stuff was so complicated in comparison with Smalltalk that I wondered why anyone would bother. Along the way, I got caught up in its constant automatic update of versions and finally threw it away. On first glance, I had a similar impression of Python but I had no choice but to get to grips with it if I was to make a good fist of the up-coming course.

I set myself a timetable of 8 hours a week to study as this got me into the right frame of mind that will be needed for my OU course. I then set myself a project to recreate my "Let's learn Latin" web program in Python. The plan included three steps.

  1. To write a Python program to test vocabulary.
  2. To add the Pandas library to it and start to do some statistical analysis of the results. (Pandas is a library that includes lots of stats stuff).
  3. Convert it to be a web program.

I got as far as midway through 2 when I came up with a better plan. 

Problem

I run an e-mail and web server from home. The e-mail server provides a domain for all of the family to have simple e-mail addresses. Mine, for instance, is david@xxxweb.com. Recently, I replaced the server with a new Lenovo machine that has now updated itself to Windows 10. Being a long time Mac man (since 1990!), I don't much like this but I can't get the e-mail moved to the Mac as we have some much history in the Windows program that we use (Magic Winmail). The problem is that the server randomly freezes and I can't find any reason. I have got so irritated that I have considered going back to Windows XP. I don't always notice that the server has frozen so, sometimes, it is down for a couple of hours. I have a Pingdom account but that sends to my own e-mail address which is useless but, since Pingdom changed their web site, I can't seem to find where to go to change the address. 

Answer

I have written a headless Python program that loops around every 20 seconds and tests that one of the web sites on the server is responding. If it isn't then it sends an e-mail to my Outlook mail account, which gets forwarded to my iCloud mail. Along the way, it logs its actions and responses to a logfile on the Mac. This took about 7 hours to write and works perfectly.

Assessment

Python has proved to be very understandable, once I got the idea of line indentation and its use of commas. The main thing that I like is the depth of its available libraries. I have the following libraries in my program:

import smtplib
import requests
import time
import configparser
import os
These provide simple access to e-mail sending, html gets, delay management, ini file and text file access. These significantly reduced my development time. I am very impressed. I now feel that I have come to grips with the language and, although I am a long way from being an expert, I feel that I can cope with anything that comes along. The code can be seen HERE.

I am now going back to the vocabulary tester to complete the statistical side.

Permalink Add your comment
Share post
David Pennington

Getting down to the prep.

Visible to anyone in the world
Edited by David Pennington, Tuesday, 8 Dec 2015, 11:01

I have been writing Smalltalk software since about 1990ish, firstly with VSE and then, from around 1995, IBM VisualAge(now Instantiations). This means that I am very embedded in the world of Object Oriented Software development (OO) and with the standard Smalltalk paradigm where everything is an object. Part of that experience means that I think in objects and write new classes for everything. This isn't always the case for people new to OO where they tend to write sequential code until they are forced into making a class. As an example, I used to work in a large banking software company where I was in charge of development of a reporting system that was being written in Java. This was the first Java development for the team and I was the only person that had really been exposed to OO (I am ignoring the fact the programmers had all been using C++ but I am guessing that they still basically wrote C code).

I was asking one of the senior guys (he had been in the company some 15 years) how it was getting on and his comment was "Glyn (one of the senior developers) tells me that I have to create more classes than currently. I can't see why. The software works, doesn't it?". 

OK, back to the present. The course that I am taking involves using the Python programming language for a lot of the data manipulation. There is a Python package called Pandas that has a huge library of tools for this. I did a three week on line course in Data Manipulation which gave an introduction into Pandas but felt that I really needed to get to grips with Python before the course starts at the end of January. I was mainly concerned with the way that OO works in Python as it looked very easy to write sequential code and ignore OO altogether.

Recently, I have been getting back into the groove of studying for 8 hours, or so, a week. If I don't get into the habit now then it will be difficult when the time comes. Hence, I have been carrying out a few tasks. These have included a course on Calculus, the Data Manipulation course mentioned above and a home study course in Latin (which recently morphed into Dutch). The calculus course was very trivial and I should have kept working through the home study book that I got for my birthday back in March. The data course was very good. The Latin/Dutch was hard because I have forgotten how to sit and learn vocabulary ready for the next session (shades of French and Latin back in my school days so many years ago!). I decided to write a testing program for the vocabulary. I did this in Smalltalk and it works very well as a web development.

Now - to learn Python. Why not recreate the vocabulary program in Python. Admittedly, it will be a command line program so nowhere near the Smalltalk one for presentation but functionality is everything in Python, rather than making nice windows etc. I spent the last 4 of my 2 hour sessions slowly working through the steps and ensuring that the Python code was fully object oriented. Well, yesterday, I was able to go through 10 questions of Dutch words and getting feedback on the right and wrong answers. It still has a way to go but it has proved to me that I "can" do this Python thing. I still have 7 weeks until the course starts so I still have plenty of time to get proficient.

The current Python code can be seen HERE. I will update it as I make further changes.

Lastly, the really good news is that I have been accepted for a Disabled Students Allowance with may provide me with a new, ergonomic, chair and desk that I can sit at for longer then 45 minutes at a time. I will report back on that one.

Permalink Add your comment
Share post
David Pennington

Back to the OU after 35 years!

Visible to anyone in the world
Edited by David Pennington, Friday, 15 Jan 2016, 17:40

I last studied with the OU back in 1980 so all of my previous credits are from that time. I have an original E student code - which amazingly I still remember. Due to Student Loan requirements, I am unable (as explained later - also unwilling) to take the two required prerequisites for the course I have signed up for. This course is TM351 Data management and analysis. 


I studied computer subjects back in the 1970s previous to the advent of micro-computers but was prepared for them when they finally arrived around 1978. At the time I was a Foreign Exchange Dealer in the City and, up to them, had assumed that the OU course was a side show and not relevant to my daytime occupation. Having attended a one week summer school at Reading University for my T101 Mathematics course, I returned with a program to do some elementary calculations on Money Market problems. My boss liked what I had done and arranged for me to obtain one of the first Z80 micro-computers to design a suite of programs for the dealing room. This was a North Star Horizon. This, along with an Elbit VDU was used to build a good suite of software. The bank, eventually, bought an Horizon for me to have at home.


I moved jobs and arranged to keep the Horizon. From there I wrote a whole package of front office software for the bank - including a package for our branch in Greece - built in Microsoft Basic on an Apple II. Eventually, I left the City and formed my own software company - in 1985. For the next 20 years I spent my time developing software in the Smalltalk programming language. Smalltalk is the original Object Oriented language - designed at Xerox PARC in the mid-1970s.


Consequently, I saw no reason for me to study OO programming using Java (which was one of the prerequisites) as I was already very competent in this field. After me writing a CV and obtaining a reference from an insurance company in Connecticut, USA (I had been writing custom software for them for the last 20 years!) the course team agreed that I had sufficient background to take the course without the prereqs.


I will still need to get up to speed with Python. To assist this, I am currently working on the Future Learn three week course - “Learn to Code for Data Analysis” which uses Python to analyse spreadsheet data. Once this is complete, I have designed a few projects to fully understand Python - one of which is to convert my existing Smalltalk web program (using Seaside) which tests vocabulary knowledge for those learning Latin!


So. Onwards. More on the Data Analysis course and Python next time.

Permalink Add your comment
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 34353