Adam’s Jan 2021 Meeting Summary
- Getting Started with Watson – Russell Weetch
- An intro to Smartdraw – Ian Hamilton
- Components – Ian Hamilton
- An interview with…..Richard Hatherall – Jason Chapman
UK Dev Group January Meeting update
Another month of lockdown another all-on-line meeting
Stephen Ball from Embarcadero dropped in for the first portion of the meeting, directly fielding questions members raised on EMB related issues. That was tremendously useful.
Russell Weetch: Getting Started with Watson
Russell spoke about accessing IBM Watson AI services.
IBM have a vast range of services available from: www.ibm.com/watson/services
He specifically showed: www.ibm.com/watson/services/tone-analyzer, and briefly the image-analysis tool.
Setting up an IBM account is relatively simple. Once this is done, once you subscribe to a particular service you receive a personalized URL.
There is an API to pass commands through this URL to receive JSON encoded response content.
URLs are personal per user account. There is a free tier offering a few thousand requests per month through each URL, more than this requires payment of subscriptions.
Russell used the Delphi Rest Debugger to generate GET and POST statements. I have attached image-grabs from his talk showing some of the steps in this process.
Once you have set up working commands in the Rest Debugger a single click generates code for a set of Delphi components which encapsulate everything you have done.
Having shown sending and receiving data to the Watson API in the Rest Debugger, Russell then used the generated Delphi Components in a Delphi App to send and receive data.
Watson Tone Analyzer accepts large quantities of text and returns analysis of its tonal content, whether it is “happy”, “sad”, etc. The data is encapsulated sentence by sentence with a weighting for the level of certainty. It is an amazing tool. The free service uses Watson’s own “model” to generate the results. Larger corporates can add tagged data to create datasets which are used by Watson in its analysis. That part of the process was beyond the scope of the session.
Ian Hamilton: An intro to Smartdraw
Smart Draw has existed for a long time and can be used for a very wide range of 2D diagramming requirements. The product comes with an absolutely vast array of pre-created diagrams showing everything from the inside of a human shoulder to diagrams of cafes and restaurants. It includes modes and models to allow charting, ER diagramming, flow-charts and many other diagrammatic processes. For these it includes a lot of nice automation such as automated drawing of lines that link elements in an ER diagram.
It is not terribly cheap, with a full license cost of about $270. Note that Ian has shared an offer from SmartDraw on the DevGroup Slack with a substantial discount on this cost.
Members mentioned a few alternatives, which are detailed on the Slack. The TMS Diagram Studio Delphi components were also mentioned. These give diagramming capability within any Delphi Application you write, allowing you to start from a powerful base (similar to Smart Draw) but add your own extensions and customization.
A future Dev Group meeting will include a session on Diagram Studio.
Ian Hamilton: Components
After a short break Ian spoke about Creating Components in Delphi
This was a really useful session if you want to start thinking about creating components in Delphi which you can add to the Component Pallet and use at Design Time. It is also an area of the IDE which is woefully under documented.
I have attached an image showing part of a slide from Ian’s talk showing where in the Delphi VCL class hierarchy components should be descended from.
Ian showed the built-in Component Wizard, which didn’t work … so he showed how to do it manually.
He descended a “TTwoColorBevel” from “TBevel”, this added 2 color properties and overrode the “Paint” method with his own code.
There was as lot of custom-painting in Ian’s components, nice to see, with curved corners, well-managed bevelling of colours and even gradient colour painting. All the source code for Ian’s components is on the Dev Group website (I think!)
Most Delphi developers have created their own descendent classes. The key with Component design is the extra steps: Registering, adding Image resources to give the component a icon within the IDE, and adding additional tools such as custom-UI for editing component properties.
Ian showed a few of these steps, but only scratched the surface. Hopefully future sessions will delve deeper.
Jason Chapman: An interview with…..Richard Hatherall
The day finished off with a trial of a new format for the sessions: A Q&A interview between Jason Chapman and Richard Hatherall. Jason had pre-recorded an interview and played it back, as much to test the technology and show how such things can be done in Zoom. Richard showed his Webmocks code (briefly) but most of the time was used up with Q&A.