Showing posts with label IBM. Show all posts
Showing posts with label IBM. Show all posts

Friday, 17 April 2026

Building MeetMiddle: How I Created a Journey Planning Tool in a Couple of Hours with IBM Bob

Introduction 

In this article I’ll talk about how I built MeetMiddle with IBM Bob (an AI coding assistant). I'll cover how it turned out, what worked, what didn't, and my thoughts that AI acceleration is valuable for personal productivity tools.

 

Each year my family do long journeys up and down the country, and with young kids you can't drive for hours and hours. Finding somewhere to have a rest and stretch your legs is useful. I can do this today, but I have to find search on google maps, then find the mid point and then look for cafes, activities etc.

 

So ,I decided to use IBM Bob to help build a tool to help me! Some colleagues and I had previously written the idea up together but had never implemented it. We wanted to know the best mid-point for multiple friends to meet.

 

With the help of IBM Bob, I built this in just a couple of hours leaving it to get on with its changes with occasional jumping back on to see how it was doing, provide some more prompts and test the output. 

 

I think this is a great demonstration that AI tooling can help people build the tools they need to speed up the monotonous tasks of life and work.

Setting Expectations

I deliberately did not boil the ocean when creating my prompts and instructions. I was investigating effort vs speed - how quickly could I get something working with minimal input? I let Bob choose the technologies and components and waited to see how it did and what it did.

The Foundation

 

Luckily, we had already designed the application, the method, the benefits and that gave the specification to IBM Bob. So now you can see that I have click-baited you with the 'couple of hours' headline, because a lot of the real effort went into the idea and the method write up that Bob could follow!

 

My first prompt to Bob:

```

Come up with a solution design for this idea.

Design should be one document

Second document should be a plan of what you would like to do to deliver it

```

The solution design was a 625 line MD file which was very comprehensive. I'll be honest, I didn't read it all but it looked and sounded right. It had the four architecture layers: presentation, application, integration, and data.

 

Yeah, I know that this is a little dangerous - letting the AI off the leash without reading everything it produces. But I was doing this as a fun test to see how far I could get with minimal oversight. In a production environment, you'd absolutely want to review everything carefully. This was more about exploring the "effort vs speed" trade-off for personal tools that maybe could be less rhobust or should be to get some cost benefit if its only me using it.

 

Bob then overlayed data models and their mappings. It also went a little crazy and was doing sophisticated algorithms for multi-stage filterings, scoring etc. That's my bad for not being clearer in my prompt, so I wasted some tokens on that.

 

The second document was a 1000 line todo list. It was a detailed list of what I would need to do to deliver the solution. It was a detailed list of tasks, with estimated completion dates. Again, useful but at the moment I just wanted something really basic for some holiday planning I'm doing!

 

Even though I wasn't planning to spend 9 months or £800K on this! Having that comprehensive plan meant I could cherry-pick the MVP features and know exactly what to build first.

Building the Backend

 

Alright, so we had the blueprint. Time to start building!

 

Bob setup a project using a python framework called FastAPI with folders for models, API endpoints, services, etc. It used SQLAlchemy models for users, events and participants! It also wrote a bunch of security models.

 

I didn't use most of these though, because it was still running from the main solution design it built. I should have told it to strip it back but I didn't want to mess up the context.

 

Bob told me I needed to fetch a bunch of API keys from places like Google Maps and Google Places. Not sure why... ahh ok, it's because that's the example we wrote in the idea we gave it! So it did a few mocks instead, which is nice.

 

Also, Google Maps API are expensive and I don't want to pay for it for a test app, so next prompt was whether I could build a backend from scratch.

 

My prompt:

```

Can we do the backend without the google API? could we build from scratch?

```

 

Bob created a service with over 100 UK postcode areas built in. Each postcode area (like M1 for Manchester, SW1A for Westminster) has its real geographic coordinates hardcoded.

 

When you enter a postcode like "M1 2SA", the service:

- Extracts the area code (M1)

- Looks up the base coordinates

 

It did the same with Restaurants, Cafes, Bars, Hotels and Petrol Stations. But it completely made it all up which makes sense if it's starting from scratch rather than fetching data from a service.

 

It did some clever formulas to calculate routes and travel times e.g., Haversine formula. I'm not sure what that does but I've added it to my research list. It also had an optimal meeting point between the two locations but it was as the crow flies not via roads.

 

Then Bob told me it wrote a bunch of tests that passed! Nothing like marking your own homework. There was also no UI, boo!



The UI

My prompt:

```

lets run the demo in the UI

```

Bob created a single-page application with HTML, CSS, and JavaScript. It had the app title "MeetMiddle", and used something called Leaflet.js as the mapping library - start point (green A), end point (red B), and midpoint (blue M), a blue line for the route and then interactive pop ups if you click a place it has found.

 

As I mentioned earlier, I let Bob choose these technologies. I don't have experience with FastAPI or Leaflet.js, I do know javascript so I might do a follow up article reviewing how easy it is for me to understand what is happening and how good the code itself is.

 

Users - me - enter the start postcode like NE1 4ST and the end postcode DE1 2PY, the type of place they are looking for e.g., "Cafe" or "Petrol station" and the search radius and select go. The map shows the route with markers and places to go.


The Quest for Real Data

 

The UI is good, and so is the map for my two endpoints. I tried some new postcodes and the markers were off in the sea! What's happening here?

 

Ahh, I'm using mocked and fixed data so it only works with specific postcodes.

 

My prompt:

```

Can we replace the estimated and generated data by doing free internet lookups?

```

 

Bob had a look and found OpenStreetMap, Royal Mail Postcode Address Finder and Ordnance Survey Open Data which has 2.5 million free to use postcodes. It also found an Open Source Routing Machine which calculates driving, walking and cycling routes with travel times and directions with no API Key requirement.

 

So the map and route is now sorted! And if I type different post codes in it actually picks it up. The only down side is that it has 1 transaction per second on the free tier, so this isn't production ready.

 

I also have real places like costa, mcdonalds, pubs, esso's and what not.

 

Bob created two new JavaScript services to handle the real data.

 

I then asked Bob to add a 7-day cache for postcodes, places and routes and it also removed all the mock data, straight line routes and added some error handling.

 

Now when I run for NE1 4ST and the end postcode DE1 2PY I get real location on the map, real places in the radius distance from the midpoint.

Results


So that's what I can get with Bob in a couple of hours with very little input from me. I think I did around 4 general prompts, and 3 "this didn't work" style prompts and I'm quite happy with the results. I can now use this when planning holidays to make sure we're not driving too long at a time.

 

I would also say, that my prompts could have been much better and there was a LOT of extra code that I had to ask to get cleaned up. The documentation was overly verbose and the plan was way too detailed. But all in all, not bad for 2 hours work!

 

I can hear some naysayers at the back saying that you can already do this with google maps, and I agree, but I do think this project showcases how much an individual can achieve in a short space of time, with limited technical knowledge to become more productive.

 

And this is a trend I'm seeing more of. Managers creating customer dashboard, sellers creating sales plans and learning plans, techies applying their knowledge to completely new coding styles. This localised value add means we don't always need production ready services, as little apps like these can be shared between 1 or 2 people.

 

This is Unix philosophy stuff - reduce human time by writing programs. I'd compare Bob to writing little helper scripts - many that don't see the light of day. The personal tools I can now build with Bob for solving specific problems wouldn’t have been made before because I wouldn’t have had the time to turn my ideas into real tangible things.

 

I’m excited to see how individuals use AI to build tooling that improve productivity and the incremental benefits this will have on organisations.

Monday, 9 August 2021

Updating IBM MQ Storage Size in CP4I

If you have already deployed your IBM MQ operator in IBM Cloud Pak for Integration (CP4I) but want to increase the total amount of storage available for Persistent Volume Claims of the three log types (if using PVC) then the correct method is to first edit the PV / PVC and then update the MQ Deployment YAML and apply it.

The three log types that can rely on a persistent volume claim are:

  • Queue Manager – Holds data normally under /var/mqm. Will contain all persisted data and recovery logs, if no other volumes are specified.
  • PersistedData – PersistentVolume details for MQ persisted data, including configuration, queues and messages. Required when using multi-instance Queue Manager
  • RecoveryLogs - Persistent volume details for MQ recovery logs.

These must use persistent claims if you are running multi-instance. Here is an example of the Queue Manager specification that is deployed on CP4I. (This is a small snippet of the overall yaml)

spec:
queueManager:
name: QM01
storage:
queueManager:
type: persistent-claim
defaultDeleteClaim: false
persistedData:
enabled: true
size: 500M
class: rook-cephfs
type: persistent-claim
recoveryLogs:
enabled: true
size: 500M
class: rook-cephfs
type: persistent-claim

Example Recovery Log Storage Size Update

The following steps give an example set of steps of updating the recovery log which can be applied too any of the three MQ log types listed above.

  1. Login to the OpenShift console as an Administrator
  2. Navigate to Storage -> Persistent Volume Claim
  3. In the search bar type "${queueManagerName}-ibm-mq-recovery-logs"
    e.g. qm01-ibm-mq-recovery-logs
  4. Select the burger bar menu and select "Expand PVC"
  5. Type the required value i.e. 700 MiB and select "Expand"
  6. To validate the change: Navigate to the Workloads -> Pods
  7. Select the 'Ready' qm01 pod which will be either qm01-ibm-mq-0 OR qm01-ibm-mq-1
  8. Switch to the 'Terminal' view and run `df -h | grep mqm-logs` which will show the available storage has increased
    ${ip-address-and-port}:/volumes/csi/csi-vol-550e9a08-f915-11eb-9348-0a580afe140b/a1d2871a-aa2c-46cb-a422-19eca1ef0b36  700M   48M  852M   6% /mnt/mqm-log
  9. It's important to ensure you update the deployment YAML (configuration as code) in order to have a consistent record of your queue manager configuration should you build a new environment etc. from the same config.

    Go to your deployment YAML for the Queue Manager which we have stored locally. 
  10. Update the recovery log size to 700M and save the file. e.g.
    recoveryLogs:
    enabled: true
    size: 7000M
    class: rook-cephfs
    type: persistent-claim
  11. On a terminal where you are already logged into the OpenShift cluster run the following command:
    `oc apply -f ${yamlfilename}.yaml` e.g. `oc apply -f my-qm.yaml`

    This should result in "queuemanager.mq.ibm.com/qm01 configured"

Note: updating the Queue Manager YAML before updating the persistent volume will lead to the Queue Manager showing a failed status in the MQ operator view, although the container will continue to run.

Monday, 12 October 2020

Building IBM ACE Bars using Azure DevOps and a Windows Build Server

For the last few months I have been looking at the most appropriate way to build ACE artefacts. This ranges from what makes good practice for ensuring consistency, what allows the best governance procedures to be followed and what is the best way to isolate the build and deploy of the artefacts?

One of the more common pipeline tools that is being used is Azure DevOps and so I've been playing with the mqsicreatebar, mqsiapplybaroverrides and mqsideploy commands in IBM ACEv11. The following are steps I wanted to achieve to get deployable units in ACE:

  • Build a Base BAR file
  • Apply environment specific overrides to the Base BAR to create an environment BAR file
To complete the build process we need to be able to run ACE commands. To do this we could use an external Server but when using a Windows machine there are certain ways these commands might be run. 

The following are some tips on how I completed the steps using Azure DevOps and Windows in my demo building scenario.

Method of Execution

Having decided to produce a script to be run on the Windows machine the first decision was whether to run as a batch script, bash script or PowerShell. 
  • PowerShell is the Azure Cloud preferred method and comes with the PowerShell pipeline
  • Batch files are out of the box, well understood by most and so likely to be easily supported
  • Bash scripts are cross platform, easily portable and possibly better understood than batch scripts
In the end I chose bash because of the portability and ability to move across Cloud and Operating Systems with more ease and increases the number of people who can edit and support the scripts in future.

Running ACE Commands on Bash on Windows

Bash is not currently native to Windows machines and as such you have to run a bash environment on the Windows system. This will usually be Git Bash so to run in the Build pipeline in Azure using the command line task:
“C:\Program files\Git\bin\bash.exe” myscript.sh

 In order to run ACE commands, the ACE profile needs to be setup using the mqsiprofile command. In the Build pipeline in Azure using the command line task, run the following:

“Drive:\InstallPath\server\bin\mqsiprofile” && “C:\Program files\Git\bin\bash.exe” myscript.sh

Check the format of each ACE command 

It's important to check the format of each of the commands in ACE as some of the command are already executable in shell e.g. cmd format and do not need the file path specificying in the bash script, others are in BAT format so need the full path specifying. One example of this and specific to our needs is the mqsiapplybaroverrides command which needs the .bat extension name when being called in the bash script and also needs the full path to the file.

Passing Azure Variables to the Script

Azure variables need to be passed to the script via the command line task. Azure uses the following format to reference existing variables $(myVariable). Variables can be passed in using the Variables tab e.g. appName (to specify which to build) or predefined Azure variables e.g. System.ArtifactsDirectory

Example buildACE.sh $(appName) $(System.ArtifactsDirectory)

#!/bin/bash
appName=$1
buildAddress=$2
mqsicreatebar -data ${appName} -b ${buildAddress}/${appName}_Base.bar -a ${appName} -deployAsSource
drive:/installPath/server/bin/mqsiapplybaroverrides.bat -b ${buildAddress}/${appName}_Base.bar -p ${appName}/dev-overrides.properties -o ${buildAddress}/${appName}_DEV.bar -r

The following example will take the application being built and the build output location (Artifact) as parameters which are used in the bash script. 

As you can see the mqsicreatebar can be ran without specifying a path because we have the mqsiprofile set, but the mqsiapplybaroverrides needs thee full path to the batch file defining.

The output from the above script would be a base bar and a dev bar for the application name supplied in the Azure Build. Further scripting can be implemented to produce BARs for more environments.

Tuesday, 8 September 2020

IBM MQ – AMQ3817E – DRBD Errors

 Recently when rebuilding an MQ Estate, the previous deployment was torn down and a new installation and configuration was deployed to the same physical Virtual Machines. However, when it came to creating the new Queue Manager there was an error thrown.

 

The reason for the rebuild was to upgrade the version to IBM MQv9.2 which includes some changes to the way RDQM pacemaker and drbd kernel modules are installed.

 

Command:

crtmqm -rr p -rt s -rl thisIP -ri otherIP -rn otherHostname -rp port -lla -fs 20 -lp 6 -ls 3 qmname

 

Error:

AMQ3817E: Replicated data subsystem call '/usr/sbin/drbdadm new-resourceqmname 0 --auto-promote=no' failed with return code '20'.Command 'drbdsetup new-resource qmname 0 --auto-promote=no' did not terminate within 5 seconds

AMQ3812E: Failed to create replicated data queue manager configuration.

 

To debug I did the following:

1.     Checked the MQ Error logs

2.     Check there were no outstanding processes that could be blocking the crtmqm command

3.     Check the correct drbd kernel module was installed on the server. (modinfo drbd)

 

There were no errors in the MQ Logs, no processes running for drbd and the correct kernel module was installed. Sufficiently stumped I ran lsmod drbd | grep drbd on the server and compared it to another environment.

 

There was no drbd_transport_tcp module on the output of the environment with the issues only the drbd module. When there are no RDQM Queue Managers running lsmod drbd | grep drbd hould return empty, which seems to suggest the drbd module was hanging. 

 

To resolve this there are two possible actions:

a.     Reboot the machine

b.     Remove the remaining ‘hanging’ drbd module using rmmod drbd

 

After completion, run lsmod drbd | grep drbd and the result should be empty. Try to build your Queue Manager again and it should create successfully.

Wednesday, 9 May 2018

Integration Innovators - Part 1

**Note: Any images, text or quotes have been used to provide an overview of the people themselves. I have linked to the relevant sources in the read more, but will gladly remove any part should the subjects or original authors so wish.**

In the last 18 months I have been constantly seeking to get a better understanding of the technologies I work with every day from databases, to Ethernet, to the first compilers, message queues and the underlying network they run on. The list is never ending and what started as a few pages of notes has turned into maybe 30.

What has begun to interest me more and more are the people who brought about these changes, the work they have completed across their lives and the impact it has had on the way we live and the way we do business.

In this post I intend to describe some of the people who I have ‘discovered’ in my research in a hope that my own generation do not forget those who progressed the computing technology that can often be taken for granted. 

Here are a handful of them, in no particular order;

Abhay Bhushan

1.    Abhay Bhushan was born in Allahabad, India in November 1944 and was in the first group of students to attend the Indian Institute of Technology Kapur (IIT Kapur) which was at the time being funded by a consortium of universities including; Berkeley, Princeton and MIT. 

It was at the university that Abhay met mentors like William Schreiber and Harold Huskey who had worked on some of the first ever TVs and computers inspiring him to take up a role at MIT after his graduation to complete his master’s degree.

It was over the next 5 years 1965 - 1970 that Abhay became involved with APRA and APRANET, even attending a meeting at the pentagon for the Defence Advanced Research Project Agency (DARPA) to discuss communication security before getting involved in the Network Working Group whilst working on his MBA at MIT.

It was in one of these meetings where Abhay took the ownership of “a file transfer protocol” having been working with Steve Crocker, Jon Postel, Mike Padlipsky, Vincent Cerf and many more. The group would discuss, build, test and write Requests For Comments (RFC’s) working on a whole host of networking solutions such as TCP/IP, FTP and the email address with different members being tasked with the write up.

FTP - for which Abhay was the author - went on to be the foundation for pushing files from one system to another whether that’s sharing information across branches, uploading to your blog, or to share files securely. It has been expanded, updated and built upon but FTP remains a huge part of the computing world and Abhay is recognised here for his part in it.

Read more: https://tools.ietf.org/html/rfc114https://www.mappingthejourney.com/single-post/2017/09/15/episode-9-interview-with-abhay-bhushan-author-of-file-transfer-protocol/https://www.scmagazineuk.com/ftp-comes-of-age-as-considerations-made-on-how-practicality-is-over-riding-security/article/560138/

Grace Murray Hopper
2.    Dr Grace Murray Hopper was born in New York City December 1906, gaining a BA in Mathematics and Physics in 1928 before achieving both her MA and PhD in Mathematics at Yale University.

From a young age it was apparent that the budding mathematician had a drive to discover, taking apart the family alarm clocks at age 7 just to see how they worked. The same drive saw her through university and her PhD, despite being only 1 of 10 students on a doctoral program of which only 4 were women.

It was this drive that also led her to take a leave of absence from teaching to join the US Navy as part of their Women Accepted for Volunteer Emergency Service (WAVES) program where she graduated first in her class and gained the rank of lieutenant, aiding in the war effort by working on the Mark series of computers.

Working on and off for the rest of her life in the navy, research positions and as a consultant she filled her days with innovating, teaching and thinking outside of the box. One such innovation was her belief that computing could be further used and more widely adopted if it could be written in a human readable way.

She went on to create an operational compiler at a time when many believed that computers couldn’t - or indeed shouldn’t - communicate in English. Instead, she pushed for its use in business tasks like billing and payroll calculation. Later the FLOW-MATIC compiler she had worked on became the basis of COBOL, a language used by up to 80% of all code in existence including in the Navy whom Grace persuaded to adopt the new language.

Whilst this extremely brief summary does not skim the surface of this inspirational woman, her contribution to the world of computing has been phenomenal.

An interesting fact is that Grace Hopper was the finder of a moth in one of the early computers which was causing chaos on the system itself. This later led to the widespread use of the word ‘bug’ to mean a fault in a computer.

Read More: Grace Hopper and the invention of the Information Age (Book) http://www.amazingwomeninhistory.com/amazing-grace-hopper-computer-programmer/http://www.cs.yale.edu/homes/tap/Files/hopper-wit.html

Roy Fielding
3.    Roy Fielding was born in 1965 (same year as my mum and dad) in Laguna Beach, California and describes himself as “part Maori, Kiwi, Yank, Irish, Scottish, British, and California beach bum".

Whilst the youngest member of the five being discussed, he was accredited as one of the top 100 innovators around the world by an MIT Technical Review in 1999 for his work on Open Source projects like Apache Group - of which he is a co-founder - and his work in 1994 when he innovated the web by creating procedures to update web page storage by transmitting information only when a change had been created.

He later began work with Tim Berners-Lee as part of the WWW Consortium (W3C) helping with standardisation of WWW protocols being an active member of several working groups such as HTTP, HTML and URI.
Most notably would be his contribution to the world of web services in 2000 with his dissertation thesis for his degree as a Doctor of Philosophy in Information and Computer Science at University of California, Irvine. 

In the dissertation, Roy discussed the idea of Representative State Transfer (REST) architectural styles and how they can be used in web services specifically by using interoperable, stateless operations such as GET, PUT and POST. 

The RESTful architecture came to be used massively in SOA implementations across the computer industry, especially in integration and this Roy finds himself on my list. At still a young age and continuing his work at Adobe there is yet much more to come.


Frances Allen
4.    Frances Allen was born in Plattsburg, New York in 1932 becoming first a B.S. in 1954 and then an M.S. in mathematics from the University of Michigan in 1957. Whilst initially a teacher of mathematics she later joined IBM - our first IBMer on the list - in order to pay off her education debts but fell in love with the people in the company, so much so, that she remained there for the next 45 years.

It was Frances work in compiler optimisation that gained her the plaudits, after she read the FORTRAN programming manual and became interested in the field. She continued in this vane for the rest of her IBM career, working on some of the earlier supercomputers within the organisation such as Stretch.

Part of this optimisation was the use of her mathematics knowledge to gain computational advantages when analysing data sets. She gained many awards for the work including IBM, ACM and IEEE fellowship for her work in making the programs people loved to use, better.

In 2006, Frances was awarded the ACM Turing Award, a prize given for those who have contributed lasting and major technically important work in the computing field for her years of dedication. Additionally, she is one of the Women In Technology Internationally (WITI) hall of famers.

Read More: https://amturing.acm.org/award_winners/allen_1012327.cfmhttp://www.computerhistory.org/fellowawards/hall/frances-allen/https://www-03.ibm.com/ibm/history/witexhibit/wit_hall_allen.html

Douglas Crockford
5.    Douglas Crockford was born (according to Wikipedia, but I can’t verify) in 1955. Having graduated from San Francisco State University with a Radio and Television degree, Douglas has worked across the board as a technology guru at Atari, yahoo, lucasfilms, paramount pictures and paypal.

What Crockford is well known for his work with JavaScript and specifically the object notation called JSON which he discovered and has popularised ever since by documenting formally the notation for the JSON media type in  RFC 4627 and through a dedicated website. Additionally, he has published a book called “JavaScript: The Good Parts” which was released by O’Reilley in 2006.

What makes JSON so key is that it is a self-describing, hierarchical structured simple text which is both easy to use and more compact than its XML counterpart by around two thirds and although its name contains “JavaScript” it is actually language independent.

It is now widely used, and in some cases like Twitter, it is the only data expression exposed in APIs due to the simplicity and ease with which it is consumed. Whilst JSON will be Douglas’ lasting legacy his other work also provides much to be admired including his creation of the JSLint and JSMin software which analyses and minifies JavaScript code respectively.

Read More: https://tools.ietf.org/html/rfc4627https://www.crockford.comhttp://www.json.org/fatfree.html


I hope you enjoyed this little read and will go out and learn more about the people mentioned.

Who would go on your list of Integration Innovators? Feel free to comment and I can add them to Part ‘N’ of what I hope to be a little series over the next year.