Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiDeveloper InterviewsRAD StudioShowcase

The Story Of Too Much Code And An Imaginary Friend

The Story Of Too Much Code And An Imaginary Friend

We’ve had quite a diverse array of submissions for our Enterprise App Article Challenge. Most have helped demonstrate the strengths of RAD Studio with Delphi as a highly efficient low code programming language. Several have featured component sets and technologies like FireDAC, and RAD Server has been mentioned in more than a few. I have to say, though, this is the first article submission which features an imaginary friend. Here’s Vladimir Timofeev to tell us all about it.

Is it too much code?

Since all my work as a Delphi developer was shrouded in nondisclosure agreements and a terrible trade secret, which only a complete scoundrel could disclose, the narration below will be told on behalf of my imaginary friend. The friend came to me in a dream and told me about his work long ago. It is as if I do not talk to my friends about anything else except work. I will begin the narration of my friend’s story with his experience of work in one of the companies. Here is how it was…

My friend was to develop accounting for companies that were closed from public view. He worked for an organization that was a contractor for developing accounting software and internal bookkeeping systems. The database for storing all the information was Oracle and the client was written and maintained in Delphi 6 with custom patches to improve performance or remove bugs (my friend had a bad memory). The installation and configuration of the development environment was done by two very old (by the programmers’ standards) specialists, and only these specialists in the company knew what a particular patch was for. Why such a situation of consecration to the saints occurred in the company, only a narrow circle of people did not understand. The confusion arose because the company had its own internal wiki, which contained all the information everybody had access to. Ordinary programmers read the wiki only in the most hopeless situations (for example, when the first “chosen one” was on sick leave, and the second on vacation in Mexico). The company had its own SVN repository for storing code and used TortoiseSVN as the client.

2023 02 19 12 54 15

What did the app do?

It kept track of all the personnel and assets in the plant and ran like clockwork on Windows XP. A couple of years later Delphi 6 was upgraded to Delphi 2009, the friend we imagined got bored with this work and safely quit.

Where did your imaginary friend go next?

After a brief but tedious search for his next job, our friend got a job at one of the most, as they said, “employee-friendly” companies. My friend’s job responsibilities included writing a medication inventory system for pharmacies and hospitals. The company organized wholesale shipments of medicines to various regions of the universe. And in addition to medicines, it provided its own system of their accounting. Drugs were also purchased by public institutions for distribution among the population. Free discount drugs could be prescribed by the attending physician, knowing in advance in which pharmacy the necessary medicine was located.

As far as my friend knows, by now such technology has been lost to mankind (all this happened long before the pharmaceutical companies became more profitable than the military). All we know is that it used Delphi 2009 and an Oracle database, although any SQL compatible database would have worked. The application had two interfaces: one for pharmacies and one for hospitals. Third-party libraries such as Fast Report, which generated a PDF prescription document with a text description and barcode, were used to print the discount prescription.

What hardware was used?

Regular handheld scanners with a keyboard interface were used to scan the codes. When reading the data immediately entered into the input field of the cursor, so the barcode could be quickly entered into any commodity-accounting program. This prescription was used to scan the barcode in the pharmacy and to dispense drugs. The personal computers of the physicians and pharmacists had different versions of Windows installed, but no compatibility problems were detected during the operation of the system. Because of this, my friend is wary of telling modern Android developers about such technology. Most of the labor was put into development when the main manager had the idea to rename all the tables in the database when the project had already been launched in the test region of the universe. After that, the programmers spent two months rewriting the queries in the client programs, since the tables for their work no longer existed.

It was then that the employees understood the whole meaning of the words “an employee-friendly company”, because the programmers could get the drugs for the recovery of the nervous system at a discount.

That sounds outrageous – what happened next?

Then our friend decided to look for a job in a company with a calmer atmosphere. The next place of work was developing an analytics system for the Oracle database. The analytics were used to build marketing programs for different classes of customers. Customers were classified based on their purchases and interactions with the product ordering system. Each month customer class was recalculated based on their activity in the previous month. Monthly drawings for cash prizes were held among customers.

What technology did you use for the app?

To develop the client we used Delphi XE 2 to fill in the client with SQL queries. After execution of the query chain the data were loaded through OleObject into Microsoft Excel tables. My friend was responsible for generating three large reports for the marketing department on a daily basis. At first, he would run them one each day when he came to work, which took about an hour. Later, he rewrote the client and put it running on the unlock screen of his work machine. After that his typical working day started with turning on his PC, entering his password for his Windows account and going for a coffee in the kitchen, when he came back the reports were already lying in the shared folder on the local network. Youtube was not popular yet, so he had to watch only funny pictures with cats till the end of the working day. Soon his friend was fed up with memes and wanted to work for real. 

What was the next app?

restlib

The next job turned out to be interesting in its task. Here it was necessary to select free ads for rent on pre-set criteria. This task was performed manually by operators and my acquaintance suggested its automation with the help of REST Client Library. The list of required requests and useful answers will be stored in good old Microsoft Access. The answers from the server were parsed with TJSONObject and selected by their contents before writing. The list of words for filtering was also kept in a separate table Microsoft Access. The database update procedure was run three times a day. So, the organization always had the freshest items on the market. After creating such a useful utility, our acquaintance was told “thank you very much” and was offered to look for a new job.

What else did you friend do?

The next place he was taken to work as an analyst in the marketing department. The company was selling cosmetics through a network of deeply motivated salespeople. In the case of sales, all the salespeople received a huge commission on each product in the catalog. The cosmetics themselves were very cheap, but the marketing costs made them much more expensive. The cosmetics catalog was formed based on the previous year’s sales. This was the responsibility of the marketing department. The company used a whole zoo of Oracle , MS SQL, PostgreSQL databases etc. And all of them had different clients including Delphi XE. Our imaginary friend was given full freedom to develop programs for generating reports. He did it with his favorite tools OleObject and Microsoft Excel. It must be said that in the company’s warehouses each order was manually assembled by an operator on the conveyor when assembling final orders for customers. The composition of the order was shown on the display and the operator collected into the box the required samples of cosmetics. Our friend saw an even more complex system for this machine labor at the next company – it was called “monkey interface”.

firedac architecture12 21 16 2906697

At this place of work they were developing and maintaining the system of inventory and delivery for an intergalactic online store. Used the familiar combination of Oracle + Windows + Delphi, only a few clients were written, or rather the interface was changing depending on the role of the operator of the system. In the warehouses, workers who collected the final orders used a “monkey interface”, it was so called because only a bar code scanner was needed to perform the tasks. With the printed 20 barcodes, it was possible to operate the entire program interface without using a mouse or keyboard, because they were completely duplicated by entering a command from a hand-held scanner with a “keyboard break” interface.

After telling this story, my imaginary friend finished his coffee, turned off the computer and told me it was time to wake up so I could write the story down, which I did. I hope his memories will be of interest to someone else besides me.


This article was submitted as part of our Enterprise Article Showcase. If you have a success story to tell about a project which makes use of RAD Studio with Delphi or C++ Builder, or any of our other great enterprise products please get in touch, you could be featured too and win a prize! Read all about it here: Enterprise Article Showcase

See What's Coming in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Ian is the Embarcadero Developer Advocate, a professional writer, presenter, and host. He is a prolific software developer, voice actor, designer and poet. Ian is British American, born in London, now living in Dallas, Texas. "I get up early every day and write code".

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES