Random thoughts on normal things.
Monday 28 March 2016Posted by on
I hate Exams!
We have all had to sit exams at school, college and university. Even later in life there are great many professions for which regular exams are a way forward to furthering your career.
A few years back, I had a chance to give a family member some exam advice. He is a university student and as a young person it is very easy to fall off a cliff into a deep hole of self-doubt. So what follows is the advice I gave based on my own personal experience.
General Studying Tips
When studying, it is no bad thing to be a little bit scared. It really helps to keep motivated. Question is how to channel all that angst into something positive?
Do not procrastinate
Really just don’t. Keep on top of your assignments. Make a To-Do List and prioritize your work. Create a study timetable that includes periods for focussed work and for socializing with others.
Do not compare yourself to others
There always seems to be someone better than us in class. They just seem to find the work easier and irritatingly always seem to be in control. Why do they get it and I don’t?
The simple truth is do not compare yourself to them. Get inspiration that if they get it then so can you.
Duh! this one is easy, right? Wrong! When you’re working get rid of all distractions: Whatsapp, Kik, Snapchat…Goodbye! Reddit, Imgur, Facebook, Instragram…See yah later! Take your mobile, turn it off, put it in a drawer, hide it under the mattress or entrust it to a trustworthy friend. Honestly, do this and you can thank me later.
Rise to the challenge
Studying is hard. But, of course, it has to be.You’re doing something which you wouldn’t normally do.
If you want to succeed then put your working boots on and wear your thinking cap. Think of it this way: Those University smarty-pant examiners are trying to say Prove yourself! and you are going to play their game and win.
In return, you will gain an understanding of: self-discipline, self-sacrifice and ultimately, self-satisfaction.
Keep calm and carry on
No matter the situation you have to think slowly and rationally. There is a time and place for fast irrational thinking but this isn’t one of them. These exams are but one event in a series of events that will make up your life. Don’t stress, don’t panic, calm down. Remove yourself from the problem.
You do know what you have to do: Stick to your study plan or else seek help from a responsible person such as a Lecturer or a friend.
No time to slack
Again, execute good Time Management, by way of a study timetable. Ideally, write one at the start of the term. Don’t procrastinate in not writing one!
Your time is precious – so don’t waste your valuable time messing around when you know you should be focussed on your studies.
You have potential
This is especially true for University undergraduates. You have worked exceedingly hard to get to where you’re at. You have earned your place, hence please do exercise your right to fulfill your potential. Go right ahead.
Future in your hands
I strongly buy into the notion that:
Who we are today is defined by our Past Experiences.
From this we can extend it to say:
What we become tomorrow is defined by our actions today.
For example, you are just getting ready for a 2 hour session of quality study in the evening. Your friends knock on your door and invite you to see a cool new student band playing in the Main Student Buildings. What do you do? Well, it depends on what has happened so far and what your immediate commitments are. If you have banked enough Study Credit and there are no pressing deadlines then why are you sat there? Go. Now. Have fun! However, be prepared to thank them kindly, promise you will make time for them later and shut the door.
Think of it this way: Right at this very moment, you are making and weaving your future. Exciting, isn’t it?
All work and no play makes Jack & Jill miserable and grumpy. Out of everything I write this is perhaps the most important. What is the point of doing anything if you can’t have fun every now and then? Keep a sensible positive attitude, stick to your study plan so that when you have those regular TGIF Nites to kick back and chill out, you really do make the most of it.
Life is more than the individual you, it is about making & enhancing relationships with people. So whether it is a face-to-face, on an Internet Forum, on a mobile messaging app, Sports, Music or even enjoying some Vodka Tonics (hold that lime!) or Dirty Vodka Martinis…whichever you prefer to do Life, just surround yourself with people.
We have all heard it before:
What doesn’t kill you can only make you stronger.
Overcoming a challenge arguably requires: focus, clarity of mind, freedom of spirit all on a foundation of self-sacrifice. You can’t master that from a teacher, a book or even this blog. You have to simply experience it yourself.
Desire is the essence of Man
This is one of my favourite phrases. Back in 1677, Spinoza wrote:
Desire is the essence of man.
If you want to pass those exams then Desire it so much that you’re willing to Execute the Actions necessary to satisfy your desire.
Aut viam inveniam aut faciam
Chigwell School’s motto is another firm favourite phrase of mine, which translates to:
I shall either find a way or I will make one.
In other words, just try, keep trying and if you are not getting ahead try something different. But keep trying.
Fight to survive
Life is – quite simply – unfair. Just when you think you have reached stability someone or something or some circumstance pulls the rug from under your feet and you land majestically on your extremely fine ass.
Ok, great, get up….SCREAM, SHOUT……get it out of your system. Go for a run, have a walk, ride a horse, climb a mountain, bake a cake, talk to a friend (such as Dr Bazza) but try to become rational as soon as you can.
Fight for what you want. I’m sorry but that’s just the way it is. You do what you have to do.
How to achieve
I have already mentioned Spinoza. He has a structured style of reasoning which I find quite compelling. I would like to suggest my definition of Achievement:
Achievement is a function of: Confidence
Confidence is a function of: Practice
Practice is a function of: Quality Effort and Time
If you put in high quality effort into your studies over a period of time then you will get good at it. As you practice your chosen subject you will gain confidence – it will become easier.
What can you practice to gain confidence? Well, experiencing exam conditions (for example, by working through past exam papers) is important in two ways:
- Applying your knowledge under exam pressure, and
- Learning good examination technique:
- Time Management: to make sure you have selected and attempted the right number of questions and managed to leave some time to check them.
- Staying mentally calm, rational and in control
When you apply what you know during an exam your confidence will help you achieve the best result you are capable of.
You’ve made it to the moment of the Exam. Well done! It is completely acceptable and normal to be exceedingly nervous.You are as ready as you ever will be. I bet seasoned Sprinters at the Olympics Mens 100m Final are all nervous in the hour leading up to the race.
The key here is Relax. Just by expecting to be nervous and knowing that you’re going to stick to your exam technique will help keep those nerves at bay.
During the exam, you know what I am going to say, don’t you? Yes, relax some more. Stick to the game plan. Execute your exam technique and stick to the time constraints so that your knowledge can flow into your answers.
Afterwards, it is up to you. Some people like to forget their exam. Other’s go into full detailed debrief mode. I like to briefly go over the answers in my head to get a feel of how I did, what part of my technique worked, what needs to be improved. I then forget the exam and move on. It’s over. Nothing can be done to change how you did. So move onto the next exam or if it is your last one then, Congratulations!
In my mind’s eye, I see exams as a Network of Challenges & Hurdles which are inter-connected by Paths of Preparation & Perspiration. You are much more capable than what you think you are. Don’t fall into the trap of the Imposter Syndrome.
Life obviously doesn’t prepare you for unexpected exams. However, if you have a known future event such as: a work presentation, a job interview or even something like a Wedding Speech then I hope some of the ideas above can be of assistance to you.
(Note: Thanks Ricky for the pictures.)
Thursday 29 May 2014Posted by on
The other day I was fortunate enough to go to a Clojure Dojo held by the London Clojurians at ThoughtWorks. It was my first ever Dojo and I had a fantastic time. I must say thanks to the organizers and to ThoughtWorks for the beer and pizza. Superb!
After everyone had introduced themselves we voted on which Clojure programming task we would like to work on. There were choices such as making use of a testing framework and using a music library called Overtone. However, I chose to implement a Bloom Filter simply because I had not come across them before. We were split into our respective teams of approximately five and we set to work.
Bloom Filter Task
So what is a Bloom Filter? A detailed explanation is beyond the scope of this blog but here’s a summary from Wikipedia:
Bloom Filter: A space-efficient probabilistic data structure that is used to test whether an element is a member of a set. False positive matches are possible, but false negatives are not; i.e. a query returns either “possibly in set” or “definitely not in set”. Elements can be added to the set, but not removed.
I am fairly new to Clojure. Fortunately, one of the team members, not only knew Clojure but he also had a basic idea about Bloom Filters – Result! We all participated and it was interesting to observe the tactics of using the Clojure REPL to successfully build a solution in a interactive “bottom-up” way. I could not recall the exact implementation therefore I decided to write my own.
In my experience of writing Investment Banking software typically we try to follow a “top-down” process consisting of:
- Gather the Functional Requirements
- State some high-level Design Objectives
- Implement the code including unit tests
This got me thinking: How would I write my own Clojure Bloom Filter using a top-down approach?
This is quite simple as the Wikipedia summary details the expected functionality:
- Add textual string words to a Bloom Filter
- Check whether a word is in the Bloom Filter returning true if it is, otherwise false.
I have decided to embrace Functional Programming ideals to define the objectives by three categories: Data structures, Functions and Other Considerations:
- Data Structures:
- Bloom Filter Buffer (BFB) of configurable size where each element can either be 1 or 0 (default).
- A configurable list of hash functions.
- A configurable list of input words.
- A hash function which takes a word and returns a hash number within the bounds of the BFB size
- A function which takes a hash function and a word and to returns a BFB with the appropriate element (as defined by the hash value of the word) set to 1.
- A function to process a word through a collection of hash functions
- A functions to process collection of words
- A check function to see if a word is in the BF or not.
- Other Considerations:
- Ignore any performance optimizations and memory issues for now
- Ignore any diversity issues around hash-functions
- Use the REPL to test the functions.
In other words…just make it work…for now!🙂
Coming from the Java world I am more used to NetBeans whereas nearly everyone at the Dojo used Emacs. I do have the entry: Learn Emacs on my To-Do list but for now I am using Counterclockwise Clojure plug-in for Eclipse running Clojure 1.6.
Here’s my implementation in almost the exact order that reflected my thought process:
;; 1. Define a function to create a bloom filter buffer
;; Let’s try creating a vector of size n initialised to 0
(apply vector (take 5 (repeat 0)))
; [0 0 0 0 0]
; Ok, that worked so let’s create a function to create our bloom filter buffer.
“Create a Bloom Filter Buffer initialised with 0’s”
(apply vector (take n (repeat 0))))
; Now lets quickly test the fn
; [0 0 0 0 0 0 0 0 0 0]
;; 2. Create our initial BFB
(def bloombuf (buffer 10))
;; 3. Let’s try write some hash functions. Note: hash fns must be from 0 to size of buf
;; Play around with the internal hash fn.
(mod (hash “hello”) (count bloombuf))
;; Use the internal hash fn for our first hash function.
(mod (hash elem) (count bloombuf)))
;; As per the design objectives, write another hash function
;; But for now, simply re-use the internal hash function value, but incremented by 1.
(mod (inc (hash elem)) (count bloombuf)))
;; Try out our hash functions
;; Define the collection of hash-fns which the Bloom Filter will use
(def hashfns [built-in-hash my-hash])
;; 4. Define some words which we will use to pre-populate our Bloom Filter Buffer.
(def words [“hello” “goodbye”])
;; 5. Define a function to hash a word and return a BFB of it
;; Let’s play with setting the buffer depending on the hash value.
; [0 0 0 0 0 0 0 0 0 0]
;; Use our built-in-hash function with “hello” should set element 9
(assoc (buffer 10) (built-in-hash “hello”) 1)
; [0 0 0 0 0 0 0 0 0 1]
;; Use our 2nd hash function with “hello” should set element 0
(assoc (buffer 10) (my-hash “hello”) 1)
; [1 0 0 0 0 0 0 0 0 0]
;; Ok use the above code to write a specific put function
“Return a Bloom Filter Buffer with the appropriate element
set to 1 corresponding to the hash value of the word”
[word buf hashfn]
; (println “put: word is ” word)
; (println “put: buf is ” buf)
(assoc buf (hashfn word) 1))
;; Test the put function
(put “hello” bloombuf built-in-hash)
; [0 0 0 0 0 0 0 0 0 1]
;; 6. Now a implement a way to bloom a single word over
;; our collection of hash-fns by using reduce.
“Return a Bloom Filter Buffer with the appropriate elements
set to 1 corresponding to hash values of the word against
a collection of hashfns”
; (println “bloom: word is ” word)
; (println “bloom: bb is ” bb)
(reduce (fn [b hfn] (put word b hfn))
;; And test the bloom function
(bloom “hello” bloombuf)
; [1 0 0 0 0 0 0 0 0 1]
(bloom “goodbye” bloombuf)
; [0 0 1 1 0 0 0 0 0 0]
;; 6. Implement a way to bloom-filter over a collection of words
“Return a Bloom Filter Buffer by processing a collection of words”
(reduce (fn [b word] (bloom word b))
;; And test bloomAll. We expect to see the union of the bloom-filter results of
;; “hello” and “goodbye”
(bloomAll words bloombuf)
; [1 0 1 1 0 0 0 0 0 1]
;; Define a bloom filter pre-populated with our designated words.
(def bbuf (bloomAll words bloombuf))
; [1 0 1 1 0 0 0 0 0 1]
;; 7. Write a check function to see if a word has been bloomed using a given
“Check a word against a pre-populated Bloom Filter Buffer using a passed in hash fn”
[word buf hashfn]
; (println “check?: word is ” word)
; (println “check?: buf is ” buf)
(= (buf (hashfn word)) 1))
;; Test the check? functions
(check? “Hello” bbuf built-in-hash)
(check? “hello” bbuf built-in-hash)
(check? “Hello” bbuf my-hash)
(check? “hello” bbuf my-hash)
;; 8. Write a function to see if a word has been bloomed for our collection of hash-fns
“Check a word against a pre-populated Bloom Filter Buffer”
(reduce (fn [b hfn] (and b (check? word bb hfn)))
;; Finally test the bloomed? function.
(bloomed? “hello” bbuf)
(bloomed? “Hello” bbuf)
(bloomed? “goodbye” bbuf)
(bloomed? “byegood” bbuf)
;; 9. Finally, have an ice-cold beer😀
As a Clojure newbie this has been a fun exercise where I feel I’ve learnt a number of things:
- Clojure Dojos are fun!
- Thinking in terms of Data and Functions in a top-down manner works well.
- Clojure with the REPL is a lot of fun.
The above solution could be improved by:
- Each call to put will generate a new buffer. Therefore, use a single mutable Bloom Filter buffer.
- Have multiple threads to add/check a word.
- Improve the number and types of hash functions.
I look forward to the next Dojo.😀
PS: If anyone knows of a nicer way to show Clojure code then I’d be grateful if you would please let me know.
Tuesday 1 April 2014Posted by on
Sunday 15th July 2007 will forever be etched into my memory. It was one of the greatest day’s of my life. I became a…..a……read on if you want to find out😉
After my Rotterdam marathon failure of not achieving a sub-3 finish time in 2006 I was feeling dejected. I read about my friend Hippo’s epic race report of the Kent 50 Mile Challenge, got excited and entered for. Bloody Hippo, has a lot to answer for😉
Leading up to the event I knew I had to get some long runs in. I only run on pavement. I did:
- 26mile run. Learnt that choccy is no good for refuelling whilst running. Sunny weather and loads of isotonic Lucozade Sports don’t work for me. I also developed muscle cramp towards the end.
- 37mile rin. Learnt that less Lucozade (ie 500ml per 12miles) and couple of bananas seems to work well. I also added a 1/4 teaspoon of LowSalt to the drink, no muscle cramp, but did get sore nipples!
- 13mile walk. Learnt that my joints and tendons are not strong yet muscles are fine. My heels got very sore and I almost developed some blisters – but I can walk if I want to!
I spent the last few days sorting out my MP3 player for some fast cadence music. I didn’t carbo-load for the above training sessions so I didn’t really feel the need to carbo-load for 50M, just to eat well the day before. Also the info on 50M said that most of it was on good firm track and only a few dodgy bits which shouldn’t be a problem in the dry. I planned to run in minimalist NB150 racing flats, however I bought a pair of Decathalon’s Kalenji Off-road shoes, very cheap, light and flexible. I made sure the shoes were a little on the large size.
Saturday afternoon we did some map-cap packing. The 50M is so well organised they provide all the food and fluids you need. I still mixed my own concoction of LucoSports plus LoSalt. We left to go to Marshside, Kent. There was total traffic chaos everywhere. AAAaaargggh!. The whole of East London and Essex had shut down due to a spate of accidents. After being stuck in traffic for an 1hr, we went back home and had a meal. Phoned the AA who confirmed all was clear and then set off at 7pm. Got to the Gates Inn Pub which is 50M Race HQ in about 1hr 20mins. The organiser Mike Inkster is also the head chef! I registered and then drove to Reynolds Farm. I was very impressed to see an exquisite beautiful country cottage B&B set in six acres of well maintained land owned by Freda and her husband. They made us very welcome and our room, a self-contained gound floor annexe was simply excellent. There were a number of other runners staying there too. One of them, Dave, lives just round the corner from me. Dave’s an experienced ultra-runner and he told me all about the mental challenge of ultra-running. By the end I was wondering just what I had got myself into! The event start was at 6AM. After setting all of our mobile phones to ring at 4AM we all went to sleep.
Sunday: I had a restless night and managed to wake up before the alarms. I shaved some of my chest hair around the nipples and covered them with surgical tape. I also rubbed a large amount of Vaseline all over my feet, toes and heels before putting on my racing flats. Packed my plastic race bag with drinks, Kalenjis and wind-proof jacket. Freda made breakfast for all the runner-guests for 5AM. Dave kindly offered a lift so I left the wife and kids snoring to set off to the race start at Gates Inn Pub.
The 50M is 8 laps of a ~6.5mile route given 52.4 double-marathon distance. There’s water stops every ~1.6miles. My plan was simple: Forget the total miles, just focus on one lap at a time. Get to lap6 ie ~40miles and then if necessary walk.
Note: Some of the pace times include the stops.
Lap1: Mike Inkster gave an inspirational speech. Sadly this may be the last one. All the more reason to finish it I thought. Without much fanfare we were off. Remembering UltraTrini’s words I set off slowly, drink in hand, chatting with Dave. At the half-way point there is a steep concrete hill. It is aptly named Tourette’s Hill😉 Just after that at the water-and-toilet stop Dave had to pee, so I continued focussing on pulling the ankle and good pose form. The weather started to get darker and darker. Flashes of lightning and deep rumble of thunder. Counting the seconds between the flash and sound proved to me that the lightning strike was getting closer – yikes! I hastily put my MP3 away. Completed the fist lap in 9:23/mi pace 145bpm. Had a banana and put my wind-jacket on.
Lap2: Hooked up with ACID who went to school near where I live – small world! Also met Cliff Face and Mark Foster 7. Immediately the heavens opened and God turned on the Power Shower! I’ve never seen so much rain. One moment we were running and next we were wading. I recalled Soda’s quip about wearing a wetsuit and smiled. The guys were too chatty for me so I pushed further on. The terrain was atrocious. I’ve always run on pavement. But here I was in racing flats running over mud! In times like this I find it useful to talk to myself and I didn’t have polite words! Completed in 10:04/mi pace 151bpm. At pub the organisers had kindly put plastic bags all over our kit bags. I dumped my bum-bag, had a banana and continued.
Lap3: It kept raining and the feet of a 100 runners churned the mud. I decided I had to change into Kalenji off-road shoes next time as I was mud-skating. I just couldn’t find my form I was slipping so much. At one point my shoe nearly came off. I had thoughtfully put my lovely new MP3 in a plastic bag. Sadly the water had got in and zapped it. Bu33er!!!! Completed in 10:01/mi pace 155bpm. I was so busy putting my MP3 away that I forgot to change into the off road shoes – and no sign of the family!
Lap4: Still loads of problems with running with a good rhythm – oh well. Luckily the rain had eased and I could see blue-sky. One great aspect of this race is the friendliness of all the runners. I chatted to so many people. One person confirmed my strategy ie if you get to Lap6 you’re on the home straight. 10:15/mi pace at 154bpm. I saw the family and realised I had just completed a marathon! Thought of Sportaloo and smiled. Luckily, family had brought along spare clothing. I took off the NB150s and wet socks, dried the feet and put on nice dry socks and the kalenjis. Took an extended 10min break to have some tea but just could not eat anything.
Lap5: Nrg, you are a total fucking idiot. You have never run off road, yet here you are doing an off-road ultra in brand new XC shoes. Is that the mental madness Dave spoke about? Kalenjis got some getting used to. Suddenly, my right Achilles started to tighten. Wow what’s going on here? Ok, I thought, Kalenjis have a larger heel cushioning so I must land flat. It’ll hurt the quads but I’d rather have sore quads then a busted achilles. I altered my style and immediately the achilles soreness went away. Feeling very pleased with my rational thinking I pounded along, thinking that maybe Fell Liker and Lizzy B had a good point about all their muddy cross-country runs. Completed in 10:13/mi pace, 160bpm. It was getting hot so from my training sessions i knew I had to stop taking Lucozade Sports and start drinking water. Kids helped me to wash my face, get rid of the salt and mozzies.
Lap6: The important one. Just focussed on getting round. Chatting to as many people as I could. Started to take walking breaks as I found that running slow and steady was tiring. Completed at 11:00/mi 155bpm. Another extended stop and I was off.
Lap7: Walked with another runner for a mile just talking about ultras. Bid him good bye and phoned that my slow running was killing me. So what to do? I can’t run slower, walking is not an option – yet! So the logical answer is to speed up. So I set off at fair clip at about 8-8:30/mi pace. When I got exhausted, I walked to recover. I did these run/jog intervals to complete at 11:00/mi at 150bpm.
Lap8 (Final): This was so tough! I tried repeating the intervals of Lap7 but couldn’t. So I just run/walked about 60/40 of the way. I thought to myself if I were to die at least I would have run an Ultra, c’mon get moving Pal! Came up to Tourette’s hill one last time. I thought, I’ve run up hill all the other times I’m gonna fucking well sprint up the hill this time and I did! About 2.5 miles from the end one chap was power-walking along. Had a good conversation and with the Sun beating down I felt like walking with him to the end. But then I realised it would mean I’d finish after 10hrs. Thinking if maybe this was the moment of mental madness Dave told me about, I decided I wanted to run under 10hrs. Bid him fair well and away I went. All throughout the 50miles I had been focussing on my Pose form: Pose, Fall, Pull, Pose, Fall, Pull, Pose, Fall, Falling, FALLING, SHIIIIIIIIIT! Splat. I had fallen into the mud, 1.5 mile from the finish. I burst out laughing. Nrg, when you shoot, you shoot to kill😉 I picked myself up got moving again and decided what would be a fitting end to an amazing ultra? Answer to run the last 0.5mile at 6-6:30min/mile pace to the finish.🙂
I’m really pleased. Lots of my decisions came out right. My form was good and as expected my quads are a little sore as I had to focus on where I was landing. I reckon if I had spent less time resting at the end of each lap and perhaps run a bit faster where I would’ve been more comfortable then I could’ve got a better. Oh well. We live and learn.
Sunday 15th July 2007 : The day I became an Ultra-Runner.
Sunday 23 March 2014Posted by on
Hello and welcome to my first ever blog entry. Woo-hoo!…yep I really do speak like this in real life…not. Oh well, you have been warned.
Trying to think about what to write here has been surprisingly….spontaneous. I find myself at a (st)age where I feel I have a lot to say. All those thoughts that buzz around in my skull like mosquitoes on a warm summers evening, they need to be let loose. So here’s a taster for you to ponder. I firmly believe we go through our lives in stages but at each point we only ever see the next challenge, the next hurdle. The majority of us are simply not mentally psychologically intellectually equipped to see what’s going to happen two or three jumps ahead.
Hence, at each stage of our lives we truly have only just begun:
Such a beautiful song espousing the initial excitement, enthusiasm and the bright-eyed innocence of new adventure. So with trepidation but determination we traverse those uncharted roads. We may find that our initial excitement was perhaps not quite what we expected. But we persevere. Then one day what we saw as new, is now common. The enthusiasm is perhaps a little hard to muster. And the initial excitement has turned to the daily grind.
At this point, you simply close your eyes and say to yourself and your loved ones and your friends: We’ve only just begun….