More Coding in Delphi Book Review

More Coding in Delphi

More Coding in Delphi Book Review

Nick Hodges has released the latest additional to the Delphi world called “More Coding in Delphi”.  The book is a pretty neat manual but more on the theory side then actual code.  There are samples in each chapter but this is not a typical technical manual that breaks down the syntax concerning Delphi.  The predecessor “Coding in Delphi” was very similar and could be considered part one that dives into object pascal aspects of Delphi.

The Chapters are about 12 to 20 pages each and deals strongly in the object oriented Delphi or Object Pascal.  You can pick up both books together for a low cost at various web stores and they are a highly recommended book to pick up.  You can use the knowledge you gain when working with C# as well.

The writing is good and a reader can get this done in less then a day with about a little over 200 pages.  This will not go into the form designer, VCL, or the Firemonkey (FMX)  framework but you will pick up tips on:

* How to write stronger code using Delphi.
* Using Delphi with design patterns like the Factory, Observer, Adapter, Decorator, and Command Patterns.
* How to take advantage of Operator Overloading to simplify your code.
* How to write multi-threaded and parallel code and take advantage of the multiple cores in your CPU.
* How to write Aspect-oriented code to help separate your concerns.
* The history of and an deep-dive into the world famous TSmiley component.

Author Nick Hodges has been a part of the Delphi community from the very beginning working with various developers and I did have the pleasure of running into him in Baltimore during the Delphi Developers Day.  Nick has a good sense of humor and there are numerous videos you can watch on YouTube.

Learning iBeacon Review by Craig Gilchrist Packt Publishing.



Learning iBeacon which was written by Craig Gilchrist is a solid technical manual that provides Objective-C / iOS source code that demonstrates various methods to interface with a iBeacon.  Now for folks that do not know what an iBeacon is, they are a small electronic that transmits a signal for an application that is attempting to locate the proximity of a person to where they currently are.

Shown below, the iBeacon is no bigger then a quarter and can be placed anywhere within your store or location to send out a beacon to inform the user which area they are in.  Now the signal is just that, a signal your application does everything else.  So if I walk into a store and step by the shoe department, using the app I can get possible current sales information.

iBeacons work with Bluetooth and the demos actually can work on your iMac if you do not have a Apple developers account.



Going back to the Gilchrist manual, it is broken up into 9 chapters at 180 pages.  There are excellent examples allowing you to develop the applet and test it either on a iMac or on your iPhone.   Each chapter is contains a simple theme and the following describes it fully by the author:

Chapter 1, Welcome to iBeacon, introduces you to the technology and the incredible opportunities it offers us as developers. We’ll cover the technological advancements that have made iBeacon possible and we’ll discuss some of the options which you have to get your hands on for some real beacons. Finally, we’ll create the age-old Hello World application and start detecting beacons easily.

Chapter 2, Detecting Beacons – Showing an Advert, introduces you to beacon detection in more detail. We’ll show you how to differentiate between beacons using the values that they broadcast and we’ll introduce the concept of regions and some of the CoreLocation classes used to represent regions and location. We will also cover the user permissions needed to monitor beacons before building a tutorial using our new-found knowledge to build an app that shows different offers as you approach different beacons.

Chapter 3, Broadcasting Advertisements – Sending Offers, introduces you to the important classes in the Core Bluetooth framework and discusses how to handle the variations in beacon broadcasting power before building a functioning beacon broadcasting app. Now that you know how to detect beacons and act on their unique broadcasting values, you will learn how to turn your iPhone or iPad into a fully functioning iBeacon broadcaster.

Chapter 4, Ranging Beacons – Hunting for Treasure, introduces the concept of ranging beacons and determining their distance from the receiver. This chapter expands on the CLLocationManager class usage and will take you through a tutorial that allows one device to be configured as a sender and another as a receiver to ultimately build a simple treasure-hunting app.

Chapter 5, Detecting Beacons in the Background – Location Dating, introduces you to the core responsibilities of the iOS in monitoring beacons in the background. We will discuss how iOS takes over beacon monitoring when the app is in the background and will also launch the app if it has been terminated.

Chapter 6, Leaving Regions – Don’t Forget Your Stuff, discusses other uses of beacon technology and introduces functionalities based on when a user leaves a region. This chapter will introduce you to the possibilities of the technology for home automation before showing how to develop an application that ensures you don’t leave your keys or wallet at home.

Chapter 7, Vendor SDKs – Buying and Configuring Beacons, discusses some popular vendor implementations of iBeacon hardware and takes you through some of the vendor software development kits to build a beacon configuration tool using the Estimote SDK, as buying iBeacon hardware can be difficult. By the end of this chapter, you’ll be armed and confident to go and buy beacons for your commercial implementation.

Chapter 8, Advanced Tutorial – iBeacon Museum, pulls everything together with a more advanced tutorial. The tutorial focuses on an imaginary museum, which has different exhibits and multiple displays within each of the exhibits. As the user travels around the museum, the information shown in the app changes to show information about the display that they are currently closest to. As the user travels around the museum, you can track the user’s journey on an interactive website.

Chapter 9, iBeacon Security – Understanding the Risks, arms you with a complete idea of the security vulnerabilities that need consideration when building apps that use iBeacon. This chapter also dispels any myths around security that concern users and discusses ways to naturally request the security permissions in an app without scaring users.

1337 Institute of Technology on-line courses Review

Udemy on-line courses beat the competition.

After taking a recent Excel certification course using 1337 Institute of Technology there was a lot left to be desired. It seems that the course instructor are descent but the overall experience on watching and learning from the course on-line leave so much to be desired.  The display is weak thus giving a terrible session when attempting to learn new software or gain knowledge on a subject.  The sound is mediocre and just the mobility between lessons is extremely slow.  There were numerous times you have to re-log into the session if you did not respond to it in minutes when in fact it should remain open for at least 30 minutes before forcing a logout.

Even if you were to go full screen it was blurry, weak and the sessions tended to be long for no reason. Currently the Excel Certification session 427 and 428, is strong up to a point but it is way too redundant on the subject. The instructor does not provide any lesson material that a user can download to use along with the session which is very weak.

The cost involved was very low but Udemy offers the similar courses at maybe a few dollars above or it could be cheaper when the sales occur.  Udemy tends just to have a enjoyable professional user interaction.  Questions and answers as well as course material are either provided at the moment or during the updates that the instructors do.

Baron Software strongly recommends using Udemy for any type on-line training that a person may want to either brush up on skills or just to learn something new.  Instructors tend to provide better course material and the overall experience is highly professional.  The recommendation is to stay away form 1337 Institute of Technology.

Windows 10 Professional criteria error when clicking on START button.

Windows 10 Professional has been a pretty outstanding OS since moving from Windows 7 Professional but it is really odd when particular errors occur. One recent has been when clicking on the START button, a message is received that a criteria error has occurred and a logout has immediately happen.

At the lab it did occur and it was thought to log out from the session to see if Windows actually repaired itself. That of course did not happen and the entire Start / Cortena / Notification did not work and the same error message about criteria error would be displayed to do it all over again. It does sound like ground hog day but the next usual step was to go into safe mode.

From the sign-in screen
Restart your PC. When you get to the sign-in screen, hold the Shift key down while you select Power Power icon > Restart.
After your PC restarts to the Choose an option screen, select Troubleshoot > Advanced options > Startup Settings > Restart.

After your PC restarts, you’ll see a list of options. Select 4 or F4 to start your PC in Safe Mode. Or if you’ll need to use the Internet, select 5 or F5 for Safe Mode with Networking.

The lab would enter into safe mode and then restart the machine. Once again the similar issue occurred that a criteria error has occurred and a log off has to take place. Now this is pretty disappointing that a new OS is giving out such errors and there seems to be no method to repair. After reviewing the event log there were numerous COM errors that did not make any sense, could it be the last Windows update or software installation but after careful review it was that Dropbox Windows Application was giving the error.

Dropbox was uninstalled and sure enough everything has been smoothly working for the past few days as well as no COM errors in the Windows Event Log. This could be from OneDrive that is having issues with Dropbox or something else but this does not give you a warm feeling. The best recommendation is to uninstall the Dropbox Windows Application and just use the Browser to interface with Dropbox, Windows 10 is still brand new and the bugs will occur but it is just a pain to not know what to fix when errors do appear without any leading factor.

Delphi Create a Process or Shelling to start up an external application.


Delphi Create a Process or Shelling to start up an external application.

Since Windows 10 has been released there has been hiccups when dealing with the Windows API. The strange behavior may not return an error code and may actually end up doing nothing leaving you more perplexed then ever.
For Delphi developers the best thing to do is retire the ShellExecute API call and convert it over to ShellExecuteEX or to create a separate process you should use CreateProcess.

Let’s examine the simple task of calling

ShellExecute(0, 'open', Pchar('DocumentName.pdf'), '', '', SW_SHOWNORMAL);

work under Windows 7 and 8, which would start the Acrobat Reader and open the file but under Windows 10 this no longer is the case. So the next step was to update the call to use ShellExecuteEX instead.

ShellInfo := Default(TShellExecuteInfo);
ShellInfo.cbSize := SizeOf(TShellExecuteInfo);
ShellInfo.lpFile := PChar(Current_Client_Documents + FileName +'.pdf');
ShellInfo.nShow := SW_SHOWNORMAL;


The actual code will prepare the Object ShellInfo to contain all of the necessary data to start up the Acrobat Reader and display the generated PDF.

In the case of Createprocess API call the following code does the trick but realize the problem of this call, passing in a parameter will not work. Most likely you will not see anything. There are numerous

procedure ExecProcess(ProgramName : String; Wait: Boolean);
StartupInfo : TStartupInfo;
ProcessInfo : TProcessInformation;
ProcessCreated : Boolean;

{ fill with known state }
StartupInfo.cb := SizeOf(TStartupInfo);

ProcessCreated := CreateProcess(nil, PChar(ProgramName), nil, nil,False,
nil, nil, StartupInfo, ProcessInfo);
{ Check whether to wait }
if ProcessCreated then
if Wait then
WaitForSingleObject(ProcessInfo.hProcess, INFINITE)
ShowMessage(Error: The ‘+ProgramName+’ could not execute!’);



The Windows API indicates that the first line should be the Application that you wish to start and the second parameter should be any arguments you wish to send to the application. On Windows 10 this is something that was not working correctly.

BOOL WINAPI CreateProcess(
_In_opt_ LPCTSTR lpApplicationName,
_Inout_opt_ LPTSTR lpCommandLine,
_In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes,
_In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes,
_In_ BOOL bInheritHandles,
_In_ DWORD dwCreationFlags,
_In_opt_ LPVOID lpEnvironment,
_In_opt_ LPCTSTR lpCurrentDirectory,
_In_ LPSTARTUPINFO lpStartupInfo,
_Out_ LPPROCESS_INFORMATION lpProcessInformation

This does work and you can modify it to whatever you need it to do.  It is Ok for you to use ShellExecuteEX and simply using what has been demonstrated above.


Baron Software releases OLE Error Helper for Windows.

Baron Software has released the latest version for Windows the OLE Error Helper which is a simple free application that allows developers to do a quick search on OLE Errors and the definition.  Click here to download the latest version.  Developed using Rad Studio Delphi and SQLite stores the information.  System requirements is any Windows 7 or higher and the versions are either 32 bit or 64 bit.


Search by simple words to match what you are looking for.


You can view or print a report based on your search criteria or dump out the entire database to read at your leisure.


Embarcadero and Baron Software Powerstudio case study which monitors SQL Performance

Embarcadero and Baron Software has issued a case study that demonstrates the benefits of using Microsoft SQL Powerstudio product line.  Powerstudio is a robust package that monitors SQL performance and can provide assistance for clients to update or create tables, stored procedures, etc. for various SQL servers some being Oracle, Microsoft SQL and many more.  The detailed report can be view by clicking here.


Embarcadero Logo
Case Study

Delphi Developer Skill Sprints: Short, Cool, Quick Tips, Tricks and Techniques for 2016

Skill Sprints are open to the public by Embarcadero again in 2016.  Follow this link to register for the free webinars that deal with the Delphi – Firemonkey application development or on Thursdays they are having the sessions using C++.  Register for Skill Sprints

These are webinars scheduled for about 30 minutes, dealing with the topic and a follow-up Q&A.  The instructors are pretty solid in their knowledge so well worth the time spent.


New Year wish for Idera and the Rad Studio.

With 2016 now in full force the expectations for Idera to start getting aggressive for Embarcadero product line.   It has been highly speculate what is currently happening but this is without any written notice from Idera.  This opens nothing but hearsay or smoking guns on the demise of Delphi which is further from the truth.  Delphi is alive and doing very well all over the world, you may not hear many developers speaking about Object Pascal but there is a underlining amount of developers using either the Delphi or Free Pascal compilers.

These developers are designing applications for various operating systems and devices, you just do not hear anyone parading these accomplishments.  This is largely due to the developer who does not think it is cool to work with this type of tool and has a lot to do with the college/university they have attended.  The university provides free software tools so that the cost to the student is kept low.  Microsoft and Apple are huge in the educational areas giving away free applications such as Microsoft Office or discounted Macs.   As we know the student no longer is taught Pascal or C but have adjusted to where the job market is driving and that tends to be Java.

As a developer you cannot beat something that is free and that is where Idera will have to make a huge advancement towards whether they want to step into the educational market again to build the developer base to use their product, Delphi.

With that all being said I am listing what I consider are the business targets on getting the merger completed and building the Delphi community confidence that the product will continue and blossom into something even better.

  1. Create a Rad Studio roadmap before the end of January on what is expecting in the next release.  Something simple as this provides a full boost for the community in general.  Not everything has to be done based on the roadmap but gives a developer the rough idea of what to expect.
  2. Reduce the overall product cost.   This tends to keep new developers from the purchasing since the cost is extremely high.
  3. Create an educational or hobbyist package that does not include everything in the professional / enterprise package but gives a new path for people who may wish to try the product.
  4. Throw out the current EDN web site.  This is one of the ugliest web sites around and tends to break.  The search capabilities are terrible, the time it takes to enter the product area is long and plainly it sucks.
  5. All external web sites that were part of Embarcadero need to have a proper SSL and not one that is outdated or fails.  For a company that charges top dollar this is embarrassing.  Finally the last piece is that web sites such as the community cannot be broken for days.  This is just sad.
  6. Database tools such as ER/Studio, DBArtisan, Powerstudio need to be evaluated and the big question is how Idera will merge these products into their database product line.  Should a person continue to pay the subscription if they do not know what is happening even in the next few months.  A plan has to be announced and pretty soon.
  7. Major release should be held to once a year with updates as done in the past.  Creating 2 major releases a year was cool in the beginning but after a while it became insane.  I know Embarcadero was trying to justify the subscription cost that kept going up but how many developers moved release to release.  With Seattle (Delphi 10) just released this is one of the strongest releases in years where the software bugs were held to a minimum.
  8. Competing against Visual Studio Community.  Microsoft released a full blown developers package that no longer requires anyone to purchase the professional package.  Now Idera cannot compete against this since the Microsoft world is huge and thanks to the Borland/Inprise/Codegear days is next to impossible to give away the Rad Studio but if they go with step 2 to come up with a reduce package pricing then there will be new markets.
  9. Idera has to get behind the Delphi developer.  No one bothers with the certification testing and the developers day conferences have become a small event.  Idera needs to promote the developer because those are the customers and the more you get the bigger the profit.  The MVP program is extremely small and that is also not promoted like it should be.  There needs to be a strong grass roots program for all developers using and promoting what they use.
  10. Mergers mean layoffs.  There is nothing else you can say, a merger is ugly and the employee that is being laid off will know it, slow it down and prepare to leave with the utmost of not caring any longer about Embarcadero.  This is a reality, certain people will be given packages to leave and certain people will remain behind to keep the product going.
  11. The VCL/Firemonkey Rad Solution Pack is overpriced.  Sometimes you wonder whether Embarcadero was giving Ray Konopka a send off when they purchased the Raize tool kit along with Codesite and then charging top dollar along with a subscription.  The funny thing was that this was done so late it makes you wonder what was in the Embarcadero business plan for 2015.
  12. Idera has to promote the component maker.  Simple listing on any web site that goes thru a testing can be listed if it works.  A hyperlink and the version it supports is more effective then not knowing where to find software that supports the Rad Studio.
  13. Keep the sprint skills alive and any other technical webinar.  This promotes the product, gives free tips and also allows products to be shown.
  14. Customer surveys by Idera should be done now to get the developers mind set.  This alone will provide Idera will so much important information on what is expected.
  15. Idera has to reduce the distrust and worries that tend to accompany the Delphi developer.   This occurred after the demise days of Inprise/Codegear where the product was almost thrown away and thanks to Embarcadero bringing it back to life, the product has gotten better.


Idera is a pretty strong company and it was surprising that Embarcadero was sold to them but this is the new age where equity firms look at the profit and want to reduce what they have to put into the product.  Now changing the corporate page on a web site is important but communication is golden.  Keeping a low profile, no news releases, no road maps, no announcements tend to create a muddle view of what to expect.

Idera has to understand what Delphi developers have gone thru since 2005 and how to help ease their worries.  Now, the new year is here and Idera has to step up.