Something completely different this week! I’ve been a bit of computer spod for most of my life, and it all started with a 48K ZX Spectrum home computer. My dad bought it in the early 80s and I took to writing games and keying in code listings from the likes of Your Computer and Your Sinclair. As a big fan of emulation and retro-computing, I’ve obviously acquired a Speccy simulator to relive the good old days.
Now, last week I was discussing the “Monty Hall Problem” with my missus. For the uninitiated, this is a probability problem that is often described in the context of a US game-show, where a contestant picks one of three doors. Behind one of these doors is the star prize, a car, with the other doors concealing a pair of undesirable goats. In the game, once the contestant has chosen a door, the host, the titular Monty Hall, reveals, at random, one of the goat doors and asks the contestant: “Do want to stick with your original choice or choose the other door?”. The Monty Hall problem suggests that the contestant has a 1 in 3 (33%) chance of winning with their original choice yet a 2 in 3 (66%) chance if they choose to swap. As such, the contestant should always choose to swap to have the best chance of winning the car. The problem can be proven mathematically, using Bayes Theorem, but is a fascinating problem to simulate using a simple computer program.
Combining these two interests, then, I’ve written a simulation of the Monty Hall Problem in BASIC on my simulated ZX Spectrum.
The solution is also available as .tap and .z80 files, which are available at the bottom of the listing. Next steps? To implement as a Siebel Workflow of course! 🙂
10 REM Monty Hall Problem
20 REM Iain Ollerenshaw 2018
50 REM initialise counts. S = Swap, R=Stick
60 LET s=0: LET r=0
70 REM Get number of interations
80 INPUT "Num of iterations: ",t
90 FOR i=1 TO t
100 REM Initialise doors
110 DIM d$(3)
120 LET d$(1)="G"
130 LET d$(2)="G"
140 LET d$(3)="G"
150 REM place the car
160 LET c=INT (RND*3)+1
170 LET d$(c)="C"
180 GO SUB 360
190 REM Pick a door
200 LET d=INT (RND*3)+1
210 PRINT "I:";i;"+ D:";d;" C:";c;" R:";d$(d)
220 IF d=c THEN LET r=r+1
230 REM Monty reveals a random goat
240 LET m=INT (RND*3)+1
250 IF m=d OR m=c THEN GO TO 240
260 REM player changes doors
270 LET n=3*(m=1 AND d=2)+2*(m=1 AND d=3)+3*(m=2 AND d=1)+(m=2 AND d=3)+2*(m=3 AND d=1)+(m=3 AND d=2)
280 PRINT "I:";i;"* ND:";n;" C:";c;" R:";d$(n);" M:";m
290 IF n=c THEN LET s=s+1
300 REM prevent Scroll? message
310 POKE 23692,100
320 NEXT i
330 PRINT "Stick: ";r;" of ";t;" (";r/t*100;"%)"
340 PRINT "Swap: ";s;" of ";t;" (";s/t*100;"%)"
360 REM print the doors
370 PRINT d$(1);":";d$(2);":";d$(3)
Download .tap file
Download .tzx file
Okay, so the title is misleading and pinched from Richard Napier’s recent series on his On Demand Education blog. However, finding an ‘Eliza’ business service ‘game’ in Siebel Tools did make me chuckle and I thought I’d share, along with a little community challenge.
Check out this site for some background and source code.
What you may not know is that there is a rudimentary implementation of Eliza built into Siebel!
When I say “rudimentary”, I really mean it – the Business Service method simply does some string concatenation. It’s a useful demonstration of how to use and call a Business Service but doesn’t go far in implementing the ‘natural language interpreter’ that Eliza was geared up to become.
So the challenge is:
- Can you think of some useful real world use cases for an ‘Eliza’ like solution in Siebel? How about a self diagnostic portal in eClinical?
It’s good to know that the busy developers over at Oracle still have a sense of humour – I wonder what would happen if I raised a Service Request complaining about the lack of functionality in the ‘Eliza’ business service? Would they see the funny side? 😉
I really enjoy writing code and customising Siebel to do neat things. I do it for a living but I also mess around with stuff in my own time – much to the disgust of my wife and daughter! 🙂
For me, it’s a bit of fun and I get a sense of satisfaction that others might benefit from my work and use my stuff to help themselves solve some problem or other.
Having spent quite a lot of my own time developing a connector for the dotMailer email service, I got to thinking: is there a demand for commoditised Siebel coding products? If we created the Siebel Marketplace ™ or the Siebel Store ™, we could buy and sell neat customisations, clever Business Services and all sorts of functionality to expand the Siebel platform. You could offer your wares for free or charge a fee. The developer community would own it and the whole Siebel community would benefit from it. Everyone’s a winner.
Based on the discussions that have been going on within the community, questioning the life span and relevance of Siebel in today’s tough market, I’m not so sure it would work:
- Is Siebel, as a platform, so mature that there’s little left to build – apart from writing Angry Birds in eScript, of course
- Is there really enough demand for Siebel solutions?
- Is there a will in the community to share knowledge and skill or save it for that killer contract that may be hiding around the corner?
- Is there enough skill out there to produce truly elegant and re-usable solutions that people would be willing to buy?
It works for AppExchange, the SalesForce.com marketplace, so why not for Siebel?
I’d love to hear your thoughts on this, so please use the voting buttons on the survey below and let me know!
Now, I know it’s been a very quiet quarter for posts on the old blog. It’s been a funny old year and I haven’t been able to find the time or inspiration to post much. I apologise and hope that next year will bring many more informative posts for your viewing pleasure.
As it is, Ollerenshaw IT are shutting down for the festive season, which means all I have left to post this year is:
All the very best to you all over the festive period and I look forward to adding further to the blog in 2013.
With kindest regards,
After moving off a customer engagement, some of the guys there made me a brilliant leaving card – it says it all, really! How did they know of my feelings for Siebel Workflow?!
For those not in the know, check out ‘Borderlands‘ for the Xbox 360.