Category Archives: Uncategorized

Warwick’s Workings, part II

This post will mainly make sense to Warwick – if you aren’t Warwick and you need some context, see the Twitter thread starting with this twitter post.

u_{cost} \text{ is the number of units at cost price}
p_{cost} \text{ is the unit cost price}
u_{current} \text{ is the number of units at the current price}
p_{current} \text{ is the current unit price}
p_{target} \text{ is the target unit price}

\frac {u_{cost} p_{cost} + u_{current} p_{current}} {u_{cost} + u_{current}} = p_{target}
\Rightarrow u_{cost} p_{cost} + u_{current} p_{current} = p_{target} (u_{cost} + u_{current})
\Rightarrow u_{cost} p_{cost} + u_{current} p_{current} = p_{target} u_{cost} + u_{current} p_{target}
\Rightarrow u_{current} p_{current} - u_{current} p_{target} = p_{target} u_{cost} - u_{cost} p_{cost}
\Rightarrow u_{current} (p_{current} - p_{target}) = u_{cost} (p_{target} - p_{cost})

\text{The formula you
u_{current} = \frac {u_{cost} (p_{target} - p_{cost})} {(p_{current} - p_{target})}

\text{Proving it works using the given figures:}
u_{current} = \frac {336 * (14 - 18.23)} {(13 - 14)}
\Rightarrow u_{current} = \frac {(-1421.28)} {(-1)}
\Rightarrow u_{current} = 1421.28

Leave a Comment

Filed under Uncategorized

Three years down the line

Three years ago today, I made a commitment to the Lord and the world that I wanted to spend the rest of my life with an amazing woman who had become my everything.

Three years down the line, I’m even more blissfully happy than I was then – thank you Vicki for giving me a terrific year with you, and here’s to many more happy years together. Happy anniversary love.

Leave a Comment

Filed under Uncategorized

30 years on the planet. Stock taken. Status: content.

Today I’ve been on the planet for 3 decades. A round-number birthday seems a good time to take stock of life, which I’ve done after a bit of reflection:

  • I am married to an amazing and loving woman, who is truly beautiful both on the inside and the outside, who is also my best friend. I fully realise that such a relationship is sadly very rare, and I’m deeply grateful that I’ve found love like this.
  • I am paid to do what I would do for fun anyhow – and paid well enough that I have no serious financial concerns. I realise how rare this is too, and am very grateful.
  • I am very actively involved in serving my community and those in need through my Lions club, which brings me great joy.
  • I have many good friends, from many walks of life, some of whom I’ve physically met and others I haven’t, but all of whom are terrific people I’m proud to call my friends.
  • For the past 30 years my parents and brother (well, in his case, 28 years) have been more supportive, loving and fantastic than one could imagine, and I am truly, deeply grateful for the amazing family I am blessed to belong to.
  • I have a deep faith in the Lord, which brings me inner peace and stability.

Looking at the above, I can honestly state that I am blissfully content. Life has challenges, of course, and ups and downs, but on the overwhelming whole everything is going great.

“Blissfully content” sounds like a pretty good state to be in at any age – I’m truly grateful to be able to say that at 30, that’s where I stand.

Leave a Comment

Filed under Uncategorized

Where the missing R1 went

Several times now, I have been sent or shown a variant of the following riddle, and asked if I can explain it:

Peter borrows R50 from John and R50 from James
 He spends R97 and gets R3 change
 He pays James and John R1 each and keeps R1
 He now owes them R49 each
 49 + 49 = R98 + R 1 in his pocket = R99
 Where is the missing R1?

Here is the explanation I provided, in case anyone else may find in helpful:

The sum at the end (R49 + R49 + R1) is a red herring. How Peter spends the money he borrowed and what change he holds from that is a completely separate issue to how he pays it back and what he still owes on his loan.

Look at this way:
Peter borrows R50 from John, R50 from James.
He gives John R1, gives James R1.

He still owes John R49, James R49.
So in total he still owes R98 of the R100 he borrowed.

He used R97 of that hundred, and R3 in change.

After paying R2 of his debt, he still has R1. He has to get R97 from elsewhere (he spent it already). R97 + R1 in his pocket is the R98 he owes John and James.

 

It’s the phrasing of the question that is out of whack.

R49 owed to James + R49 owed to John + R1 in his pocket is meaningless maths – that’s adding what he owes + what he owes + what he has. There is no physical R49 anywhere – it’s introduced in the story as a figure but it doesn’t physically exist. It represents what he owes, not a sum of actual money, so it can’t be added to the R1 that does exist.

What he owes cannot be mixed in an equation with the details of where the money went, they’re different issues.

The correct maths is either:

R49 owed + R49 owed + R1 paid back + R1 paid back = R100 (dealing purely with his debt, ignoring what exactly he did with the original R100)

OR

R97 spent + R1 kept + R1 returned + R1 returned (dealing purely with what he did with the money, ignoring the irrelevant matter of where it came from).

The reason it comes across as a missing rand is in the way it is phrased, but you can’t add R49 owed + R49 owed + R1 physically in your possession, since they are apples and oranges.

 

I hope this is helpful to someone.

Leave a Comment

Filed under Uncategorized

2 years – where does the time go?

Exactly a year ago, my Facebook status was:
“Kim has been married for a year today to his amazing and beautiful wife, and has enjoyed every minute of it immensely. If possible I’m more in love with her today than I was a year ago.”

Other than the fact that is now 2 years, not one, every last word of that is still as true as it was then. Thank you for a fantastic 2 years love.

Leave a Comment

Filed under Uncategorized

Colour me immensely impressed

I realised today that I accidentally booked for Thursday instead of Friday for a show I’m going to with my folks, using www.strictlytickets.co.za. I fired off an email to the strictlytickets.co.za email address, to ask if it would be possible to alter the booking.

Within 15 mins I had a reply from a chap called Gary, saying he had cancelled the Thursday booking and credited me on the site with the money so I could make a fresh booking.

I went to the site to make a new booking, and saw I had R322 in credit, not the R480 I should have had. I added 6 tickets for Friday to my shopping cart anyhow, thinking to pay the extra (the wrong booking was all my fault anyhow). I didn’t pay yet though, and fired off another email to ask why the credit was less than R480, but adding that I would understand if the refund wasn’t total.

Before it can even have got there, Gary gave me a call, saying he saw he put in too little credit, and not to worry, he’d process my new booking within 5 mins – no need to pay anything extra. True to his word I got an sms 5 mins later with the details of a booking for the right day, for the right number of tickets – he must have picked it up from my as-yet-unpaid-for shopping cart.

His service was astonishing – if only all SA businesses could have service like that.

Leave a Comment

Filed under Uncategorized

Thanks for the holiday

My wife and I recently got back to SA after a 3 week-long, truly awesome US holiday. In their extreme generosity, my parents paid for the vast bulk of it – they took both their sons and daughters-in-law with them for a trip to New York, Miami, a 4-day cruise of the Bahamas on the Norwegian Sky and several days in Orlando, visiting Universal, Sea World and other fantastic attractions.

The experience was incredible, and certainly something we won’t be able to match for a few decades. My parents took us along partially to celebrate their recent 30th anniversary but more particularly simple because they really wanted to.

The likelihood of either of them reading this here is remote, but still, this seems a good place to simply say thank you.

Leave a Comment

Filed under Uncategorized

Nothing Else Matters but a good pun

jerith, Voyager, netgate and myself thrashed out a very punny heavy metal conversation about Metallica today – here it is in marked-up glory.

Netgate: <3 the S&M version of Nothing Else Matters
* Jerith nods.
Pkeike nods as well
colin: man everyone is listening to Metalica lately
colin: including me
* netgate always listens to metallica
Netgate: just, selectively
Kim: I was too, a few minutes ago
* Jerith listens to more Bach.
* Voyager also listens to Bach
Voyager: Metallica wins this round...
Kim: you don't want to be picking fights with Metallica
Kim: they have a huge gorilla who plays the bass
Voyager: No, doing so would be unforgiven.
Kim: Voyager: aside from it being unforgiven, they may well up the anti and decide it's Killing Time
Jerith: If you beat them, though, you'd be the Hero of the Day.
Kim: given their bassist gorilla, beating them is probably a Thing that Should Not Be
Kim: although, once you'd done so you could Turn the Page and move on
Jerith: Of course, you'd have to be somewhat insane to consider it. I'd recommend a lobotomy to save them the trouble -- I've been taking a Crash Course in Brain Surgery.
Kim: that probably alters your eating patterns. Do your subjects become Breadfans?
Jerith: Kim: No, I'm a better Master of Puppets than that.
Jerith: The only real side effect is a moderate case of Motorbreath.
Kim: clearly this is not the busiest week - Tuesdays Gone already and we're debating One of the most impossible items we've ever discussed. We must be Stone Cold Crazy
Jerith: I've been waiting on database stuff a lot. I can't really do much Until it Sleeps.
Jerith: Why is the rest of the gang not joining in this Devil's Dance?
Kim: do you think they will? I hope you're not waiting for the Day that Never Comes
Voyager: I Disappear
Jerith: You're just worried they might be Better Than You...
Kim: perhaps they're otherwise occupied. Too much Whiskey in the Jar
Jerith: Am I Evil? I always just ascribe the worst motives to their non-participation.
Kim: I prefer to be more generous, more of a Loverman if you will. I think maybe they're just waiting for the thread to Die, Die (my Darling)
Jerith: I keep wanting to work "Sympathy for the Devil" in. Maybe it's the reference to Blitzkrieg that does it.
Netgate: my luck's about as good as you could get with a No Leaf Clover, so I may have to be counted out
Netgate: even if that leaves me Unforgiven
Kim: You can't bring in "Sympathy for the Devil"! That's a different band - it could lead to Civil War. Someone will end up Knocking On Heavens Door
Jerith: Too Late, Too Late. Unforgiven's already been used.
Jerith: If you're going to start rhyming again, I'll make you Jump in the Fire...
Voyager: The Memory Remains of that, Jerith?
Netgate: let's just launch him to Orion
Kim: hopefully you'll just pass out though, and it will be the clue to "Enter Sandman"
Voyager: Bitter like Cyanide I bet.
Jerith: I've always been partial to Astronomy.
Voyager: Sad but True
Netgate: oh, The Struggle Within.....how one must choose...
Jerith: Although I'm seldom awake enough at the Small Hours.
Kim: this is taxing my ability to work from memory alone. I had to look a few titles up. The More I See now the easier it should get
Jerith: That's hardly the right Attitude to bring to this, Kim.
Kim: The Wait before I started looking names up was quite difficult though. It was like a little Creeping Death - it gave me a headache
Kim: I've been Fuelled with new ideas
Jerith: Memory a bit of a Fixxer upper? You must be getting old...
Kim: Mama Said I'm not old yet, so no, I'm not
Jerith: Don't think you can Slither out of it that easily...
Kim: Age is merely in the Eye of the Beholder, after all. Wherever I May Roam, I remain youngish

Leave a Comment

Filed under punny, Uncategorized

Getting Emacs 23 onto Ubuntu

It’s no secret that I use emacs, and that I’m a huge fan. Some time ago I started using the most recent stable release, emacs 23, on my Windows PC at work. Unfortunately Ubuntu, which I run at home, still provides emacs 22 in its package system. While emacs 22 is perfectly fine to get the job done, the mismatch does cause some small annoyances due the fact that I use the same .emacs config file and supporting files (http://hg.rooijan.za.net/addons/) on all my systems. (Some months ago I claimed that I was going to write about that system within weeks of making the claim. I still will do, soon, I promise. I don’t promise to define “soon” though).

While emacs could of course be compiled from source on my Ubuntu systems, this becomes a bit of a pain to maintain across upgrades and the like. Amongst other minor issues, json.el is not provided with emacs 22, but it is with emacs 23, which caused a warning to be issued when loading my config files on emacs 22. Fortunately, the magic of Ubuntu PPA’s (on which Jerith recently wrote more eloquently than I can) comes to the rescue: behold the Ubuntu Emacs Lisp PPA, from which one can install emacs23. One can also install emacs-goodies-el, which is a good collection of nifty emacs extras.

Beautiful things, PPA’s…

Leave a Comment

Filed under emacs, Uncategorized

Why yes, my name *is* Kim and I’m a guy. Thank you for assuming

I have just had reason to send the following to Woolworth’s complaint inbox:

I have been a customer many times at the Mount Edgecombe Woolworths Food store, as it is conveniently close and normally well stocked. However, I have just been extremely insulted at the till point by the cashier, and I find myself quite angry about it. When I gave the cashier my credit card, he looked at the name on it and asked me if it was my wife's card. My name is Kim, which I'll agree is more commonly a woman's name, but it has served me just fine as a man's name all my life. I was very insulted that he would make presumptions about my name being unsuitable for a man. I told him in no uncertain terms that it certainly wasn't and frankly I was insulted by the question.

I then spoke to a supervisor after paying (the manager was apparently in a meeting) to tell her how annoyed I was, and she apologised. She also however told me that "they need to check signatures and so forth". As the cashier hadn't yet asked for my signature or even swiped the card, this explanation is garbage. The cashier quite simply looked at my name and assumed it couldn't be my card because it wasn't a masculine enough name, which is very rude.

I understand that Woolworths is perfectly within its rights to ask for ID when paying with a card - but then ask me for ID, don't just make assumptions about my name. That kind of behaviour is just plain disrespectful to a customer. If I had been a woman, and the cashier had asked me it was my husbands card I could quite easily be complaining of sexism - and as it is the behaviour was no less insulting.

Consider me decidedly unimpressed. It happens fairly often that people assume I’m a she, but normally over the phone or before they meet me – and not normally from a business perspective. Very unprofessional, and extremely irritating.

Leave a Comment

Filed under Uncategorized