One more reason to have an ARC win32 compiler: tracking down memory leaks efficiently

One of the reasons it is so hard to write ARC a compatible source base is that there is no Delphi ARC win32 compiler. So you have to debug your memory issues using the remote debugging capabilities which – besides very slow – are unstable at best. This is the number 1 reason I have […] … Read More

Read More

Delphi 10.2 Tokyo: they did not fix the broken documentation tab in 10.2.2 2004, but it is an “easy” fix to do yourself

Since the fix is on the forums server (singular!) and that one tends to be squirrel driven lately, here it is in full via [WayBack] I see they didn’t fix the broken documentation tab in 10.2.2 2004 (professional). It’s not a show stopper but a nuisance to fix oneself. And for new dev… – Herbert […] … Read More

Read More

C++’s Strengths Keep it Relevant in an Age of Code Bootcamps

  There is an interesting post on Medium aiming to inspire students why to learn C++. Its main point is that learning C++ teaches fundamental computer science concepts: memory management, compile-time vs run-time, polymorphism implementation, iterators and containers, and more.  Unfortunately, it phrases itself in an exclusionary manner. While C++ is not the only language where you can learn these fundamentals, it is one of the most popular. However, with dozens of coding "boot camps" popping up and charging thousands of dollars for the promise of a quick path to a software development career, why should you consider learning a complex language like C++? Here are three key reasons to learn and use C++ today:   Technical Foundation It's Widely Used Support and Future   Let’s look at these in order. Technical Foundation C++ is one of the most common languages used to teach strong foundational knowledge that is applicable to all other languages. There are many core concepts you can learn with C++: Memory management: Allocating and freeing; use of pointers, and very quickly why you should not manually manage memory Different memory management models: reference-counted in the form of shared_ptr; strict ownership in the form of unique_ptr  Ownership and deterministic behaviour, illustrated by RAII (see C++ specifics) Polymorphism behaviours: this one is in fact illustrated by some odd behaviours of C++, such as that the type identity of an object changes throughout its construction - hint, what happens when you call a virtual method in a constructor? Fundamental containers and algorithms Optimizations: what causes fast or slow code? Functional programming: while not a pure functional language, functional style is a direction the language has been heading and is very powerful in C++   If you learn C++, you will have a solid background that will allow you to understand other languages’ designs and implementations. It’s Widely Used C++ is the most widely used language for software today, especially in areas requiring performance. The following applications are written totally or mostly in C++: Windows Explorer Photoshop Word Clang compiler Windows (key area, including the new wrappers for XAML and desktop in C++17) Amazon’s key services Large parts of Apple’s macOS Bloomberg’s financial software And many more. Why is it widely used? Because C++ is powerful, expressive, concise, and performant. When you need to write solid, fast, applications and need powerful concepts in your code, you use C++. Support and the Future Finally, one key item in learning a language is the direction it’s going in the future. C++ is an ISO standard, and is evolving rapidly. You can read an overview of the various standard versions here. It’s a language that is being kept up-to-date and extended as developers need it. That’s a language to rely on.   Ready to Get Started learning or expanding your C++ knowledge? Start with our free tools and C++ Bootcamp replays.  
Read More

Desktop Development on Windows and Delphi VCL Library

Despite all the push for web and mobile development, which are certainly growing a lot, Windows desktop development is far from death. In fact, at the recent Build 2018 conference Microsoft reported that over the last year the developers using Visual Studio for building desktop applications has doubled. On our side, we know the the majority of the RAD Studio customers are still maintaining a lot of Windows applications and building many new ones. Windows Desktop: A Moving API Target Over the years, Microsoft has been shifting the Windows platform. The original C-language API (often indicated as Win32, even if a Win64 counterpart exists), was augmented many years back with COM interfaces (mostly around desktop and shell integration). This never fully took off. At one point, it seems the "object-oriented Windows core" was going to be based around .NET, but that never happened either, as the core Windows OS remains written in C/C++ and fully native. Starting with Windows 8, and more fully in Windows 10, Microsoft has added a new core to Windows, known as WinRT. This is a complete overhaul of the system API, with an OOP layer (almost binary compatible with COM), covering applications management, the file system, integrated devices, desktop integration, a complete new set of platforms controls (the first one after the original Windows 1 user.dll controls like edits and buttons). While this is a big leap forward, adoption has been tepid, as regardless of your current language and development tools you'd have to do an almost complete rewrite -- and the resulting applications won't run on the still popular Windows 7. Seeing the limited adoption of WinRT, Microsoft has decided to improve the compatibility of the old and new world, introducing the Desktop Bridge (aka Centennial) and at the last Build conference highlighting a plan of full integration, with the ability for Win32 applications to host WinRT UI controls. This technology is called UWP XAML Islands and will become available in future versions of Windows. The Confusing Microsoft Stack for Desktop UI Along the same period of time, Microsoft has introduced several different UI libraries. With .NET they first introduced WinForms (which offers a layer on top of the Win32 API, similarly to the VCL). After that, they started pushing .NET developers towards XAML markup in WPF (Windows Presentation Framework) and its light, web-oriented twin, Silverlight. These are .NET libraries in which controls are painted on screen using optimized graphic libraries, in a fashion similar to what FireMonkey does. As mentioned, more recently Microsoft has been pushing the WinRT UI, which differently from WinForms and WPF is not a .NET library, but a core platform library written in C++ library. You can program for WinRT with C# and .NET, but also in JavaScript, directly in C++ and in Delphi, as we'll see. However, again, this new platform requires an almost complete rewrite of your applications. When I ask the many friends I have on the Microsoft side, the question: which UI framework to target is the one with the most diverse answers, and many "don't know for sure". This is a summary from Tim Anderson, a very good observer of the Microsoft development stack: https://www.itwriting.com/blog/10182-which-net-framework-for-windows-uwp-wpf-or-windows-forms.html. After the Build conference, Tim was very happy to see a new focus on desktop and wrote: "With Windows 10 and changes like these Microsoft is acknowledging that Win32 is still hugely important to developers, the industry, and to their platform. They are making Win32 a first class citizen on Windows again. Basically we held the course of what developers wanted, and now Microsoft is finally acknowledging that and circling back around. This does represent a good sized R&D investment to take full advantage of these new APIs and controls. In the short term developers can use the APIs and controls manually, but ideally we should update our shipping controls to "light up" automatically with these new features on Windows 10." You can find the full text, a very interesting read for anyone doing Windows development, at https://www.itwriting.com/blog/10687-what-is-happening-with-desktop-development-on-windows-and-will-wpf-be-upgraded-at-last.html And Where is the Delphi and the VCL in All This? Now comes the interesting part, at least for me. Delphi started in the native camp, was lured into the temptation of shifting to .NET, and got back squarely into the native world -- which is now becoming fashionable again (see the push towards C++, even on desktop). In terms of UI libraries, the VCL has always been considered the best wrapper on top of the native Windows API. Compared to MFC and WinForms, there was never really a context. Moreover, Delphi and VCL offer a much better encapsulation of the COM layer on Windows, both for consuming objects and publishing them. And recently Delphi started offering a great and smooth encapsulation of the WinRT APIs, directly mapped to interfaces and other core language features. Among all of the libraries mentioned (with the exception of the very limited MFC) only the VCL offers long term support for your code investments. An application build 15 or 20 years ago can still be maintained and updated for Windows 10, while someone following Microsoft trends would have rewritten it 3 or 4 times with WinForms, WPF, Silverlight, and WinRT. Compatibility with old code is nice, but that's true also for legacy libraries and tools. But that's not the case for VCL. The library has a styling architecture to modernize the UI, it offers new UI controls mimicking the WinRT look and feel (written in pure VCL, so you can use them also on Windows 7), and it offers WinRT API encapsulation and ready to use components for Windows 10 only features like notifications and sharing. This means that with a limited effort you can make sure your application looks modern and behaves properly on Windows 10. While there are still gaps, Embarcadero has been also investing in layout management, HighDPi support, multi-monitor support, and many other features that are becoming increasingly important on today's desktop Windows computers. We can certainly do more (and have new features and more quality in the works right now), but we are ahead most other solutions. Finally, Delphi (and C++Builder) VCL applications support APPX format deployment via Desktop Bridge, so you can publish them on the Windows Store (the RAD Studio IDE integrated support for Desktop Bridge is still much easier to use than the Visual Studio counterpart).  Is VCL Today the Best Windows Desktop Library? I really think it is, but I fully understand your mileage might be different. Native optimized applications, very fast to load, with multi-core CPUs support, integration with all Windows APIs, not to mention the large number of great third party VCL UI controls. There are a lot of reasons start new desktop applications development in VCL today, maybe even more than in the past given Microsoft renewed focus on native desktop applications.
Read More

Delphi 10.2.3 RAD Server Linux Apache Patch Released

As you have probably seen, Embarcadero has released a few patches for 10.2.3. I wrote about them at http://blog.marcocantu.com/blog/2018-april-10-2-3-patches-recap.html and there was a new one for iOS covered by Sarina at https://community.embarcadero.com/blogs/entry/rad-studio-10-2-3-ios-11-3-patch-available. Yesterday, the compony released a patch that addresses a few critical issues when deploying RAD Server modules to Apache on Linux. The reported bug mentioned is not the key one, as the main issue was found and reported internally and not on Quality Portal. If you have any interest in deploying a RAD Server solution to Linux, this patch is a must have.  The download is at  https://cc.embarcadero.com/item/30836 . Just in case you missed is, remember that part of a RAD Studio. Delphi, or C++Builder Enterprise or Architect product, you now have the license to deploy a single RAD server instance without any further cost.
Read More

Linux Mint 18 and UEFI boot manager

Recently I was installing Linux Mint on a new Acer laptop with UEFI boot manager. The laptop came with preinstalled “Endless OS” which turned out to be useless because of absence of a package manager. I’ve created Linux Mint 18.3 bootable USB using Rufus, and chosen “GPT partition scheme for UEFI”. I did not make any BIOS changes before installation, and the installation procedure worked fine; I’ve chosen “Erase the entire disk” option during installation. After the installation, when I tried to launch the newly installed OS, I’ve got “No Bootable Device” screen. After several “try and error” iterations I came with the following solution: During installation, do not check “Install 3rd party drivers …” option – the drivers will not be installed anyway; they can be installed later using Driver Manager. After the installation is over, boot into BIOS settings (on Acer laptops by pressing F2 key after switching power on) and set the EFI file created during installation as trusted. The procedure is written in much detail here, only in my case the file turned out to be grubx64.efi The system should boot now, but without some drivers. The worst thing in my case appeared after installing Oracle’s Virtual Box – Virtual Box installs it’s own kernel driver, and Virtual Box did not work because the driver did not work. So you need to enable driver installation now, and it is done by disabling “Secure Boot” option in BIOS.
Read More

May 25 is TMS XData training day, the day after TMS RADical Web Day

Our TMS XData expert Wagner R. Landgraf travels from Brasil to Germany especially for the TMS RADical Web training day on May 24th at Marienfeld, Germany. TMS XData is the tool for Delphi developers to enable creating fast, easy and secure REST APIs to access cloud databases from desktop, mobile and web client applications. As there is a demand for in-depth training on this powerful TMS XData product, we decided to also offer a possibility for training on TMS XData on May 25th, the day after the TMS RADical Web training day and available for an ultra limited number of developers to ensure a personal, hands-on and very interactive training. TMS XData Training Day (all sessions in English) 09h00 - 09h30 Welcome, coffee, meeting 09h30 - 10h30 1. Introduction to TMS Sparkle and TMS XData a) Presenting TMS Sparkle concepts: http.sys, modules, example server b) Creating a XData module with a “hello world” operation c) XData overal concepts: service operations and entities 10h30 - 11h00 Coffee break / Instructor available for questions and discussion 11h00 - 12h00 2. Service Operations a) Creating service operations - interface and implementation b) Parameter passing: in body, in url c) Supported parameter types: scalar, structured and PODO d) Parameter by reference e) Memory Management f) Using/receiving TStream 12h00 - 13h30 3-course warm lunch / instructor available for questions and discussion 13h30 - 15h00 3. Database access a) “Traditional” approach b) Connection Pool c) Aurelius integration in service operations d) Entity publishing: CRUD operations e) Querying, paging and counting entities f) Entity set permissions 15h00 - 15h30 Coffee break / Instructor available for questions and discussion 15h30 - 16h15 4. Desktop client-side development a) TXDataClient overview b) Invoking service operations c) CRUD operations from client d) Memory management 16h15 - 17h00 5. Web client-side development a) TXDataWebClient overview b) TXDataWebDataset usage c) Asynchronous paradigm 17h00 - 17h30 Closing, questions and answers. Alternative advanced topics that can be handled on-demand: a) JWT and authentication b) Server-side events c) Custom error-handling in server d) Swagger/OpenAPI The TMS XData training day price is 295EUR. For Delphi developers attending both the TMS RADical WEB training day and TMS XData training day, price is 395EUR. Contact us directly by email sales@tmssoftware.com for registrations. Contact us as quickly as possible as registration is on a first-come, first-serve basis.
Read More

What do you, me, Warren Buffet, and his pilot have in common?

Success. Each one of us; you, me, Buffett, his pilot all want success. Whether we acknowledge it or not, we each hunger for success. So, what separates the exceptionally successful people from the rest of us?

Check out this story about Warren Buffet and his long-time pilot then you decide.

Mike Flint was Buffett’s personal airplane pilot for 10 years. Flint had flown for 4 different U.S. Presidents before, so he was pretty good at flying. Yet he still felt as though he hadn’t achieved all of the career and life goals that he wanted to.

So one day Buffett jokingly says to Flint: “The fact that you’re still working for me tells me I’m not doing my job. You should be out going after more of your goals and dreams.”

So Flint asks Buffett for his help, and Buffett tells him to go through this 3-step exercise.

Here’s how it works (you can play along at home, too)…

STEP 1
Buffett started by asking Flint to write down his top 25 goals – the things that came to mind when he thought of success in his career and life. So, Flint took some time and wrote them down.

STEP 2
Then, Buffett asked Flint to review his list and circle his top 5 goals – the things that were most important to him and that he wanted more than anything else in the world.

This was a lot harder for Flint, since everything on his list was important to him (after all, that’s why he wrote them down). But Warren insisted that he could only pick five, so after some time and thought, he made five circles.

“Are you sure these are the absolute highest priority for you?” Warren asked. Steve confidently replied that they were.

STEP 3
At this point, Flint had two lists. The 5 items he had circled were List A and the 20 items he hadn’t circled were List B.

Warren now asked Flint when he planned to get to work on these top 5 goals and what his approach would be.

Flint explained, “Warren, these are the most important things in my life right now. I’m going to get to work on them right away. I’ll start tomorrow. Actually, no I’ll start tonight.”

Flint went on to explain his plan, who he would enlist to help him, when he expected to complete each item…

And that’s when Buffett asked him about the second list, “And what about these other 20 things on your list that you didn’t circle? What is your plan for completing those?”

Flint replied, “Well the top 5 are my primary focus, but the other 20 come in at a close second. They are still important so I’ll work on those intermittently as I see fit as I’m getting through my top 5. They aren’t as urgent, but I still plan to give them a dedicated effort.”

To which Buffett replied:

“No. You’ve got it wrong, Mike. Everything you didn’t circle just became your ‘avoid at all cost list.’ No matter what, these things get no attention from you until you’ve succeeded with your top 5.”

Semper Fi
Gunny Mike
zilchworks.com … Read More

Read More

Delphi Blogs of the Month #59

I have already blogged specifically about the 10.2.3 release, the patches we delivered for it, and linked to the collection of related articles in the community site at https://community.embarcadero.com/blogs/tags/tag/10-2-3. In particular, the launch webinar reply is available at https://community.embarcadero.com/blogs/entry/10-2-3-webinar-replay. Not much else to add, if not that it has been very well received by the users. Technical Blog Posts Very interesting, focused suggestions in Positioning a Task Dialogue by David at http://www.davidghoyle.co.uk/WordPress/?p=1921 Media file meta-data on Android in Delphi by Craig at https://community.embarcadero.com/blogs/entry/media-file-meta-data-on-android-in-delphi 5-Minute-Snack: Understanding TWebRequest’s ContentFields and QueryFields with regard to MethodType by Holger at https://flixengineering.com/archives/649 Using CData’s Gmail connector in C++ Builder by Greg at https://cppthingsblog.wordpress.com/2018/04/09/using-cdatas-gmail-connector-in-c-builder/ (as it also applies to Delphi, almost identically) Ready for Debate? Which Windows Framework and What About StackOverflow? Two topics that could spawn a significant debate, I'm sure. The first is I found it very interesting to read this article by respected technical author Tim Anderson on "Which .NET framework for Windows: UWP, WPF or Windows Forms?" at https://www.itwriting.com/blog/10182-which-net-framework-for-windows-uwp-wpf-or-windows-forms.html. I strongly believe VCL provides a better option than any of the current Microsoft framework, plus it clearly wins for a long-lived applications and has the highest degree of long time support and compatibility. A couple of comments hinted at VCL, nice. Anyway, Tim recently reiterated the question on Twitter, https://twitter.com/timanderson/status/981933828964003840. The second good topic for a discussion is reading Nick's take on the status of StackOverflow, at http://www.codingindelphi.com/blog/in-which-i-pontificate-about-stackoverflow/. But read also this twitter thread by an internal : https://twitter.com/balpha/status/984839394829000706. 
Read More

Recap of RAD Studio 10.2.3 Patches and Information

The replay launch webinar done by the PM team earlier in April is available on YouTube and it is linked at https://community.embarcadero.com/blogs/entry/10-2-3-webinar-replay. You can also browse the community for all of the 10.2.3 related blog posts at https://community.embarcadero.com/blogs/tags/tag/10-2-3 Two two recent patches are: C++Builder 10.2.3 C++ Compiler 4k Stack Allocation Patch at https://cc.embarcadero.com/item/30834 RAD Studio 10.2.3 Context Help Patch at https://cc.embarcadero.com/item/30833 (notice that depending on the browser you used for download, the files might have a wrong permission setting, read the additional information in the download page) I already blogged about these previous patches: RAD Studio 10.2.3 EMS Package Wizard Patch at https://cc.embarcadero.com/item/30832 RAD Studio 10.2.3 Android Push Notification Patch at https://cc.embarcadero.com/item/30831 Finally, you can find on the GetIt package manager IBLite 2017 and IBToGo 2017 as additional downloads.
Read More

TMS announces a new training day: TMS RADical Web Day in Germany

We’re excited to inform we are organizing a new training day: TMS RADical Web Day in Germany.

Learn everything about fascinating new ways to create modern new web development with Delphi!

When you’re a passionate Delphi developer and interested in applying your skills for creating web applications, you cannot miss the TMS RADical Web Day.

On the TMS RADical Web day, you can:

  • Discover how to apply your Delphi knowledge to create high performance web applications.
  • Learn how RAD techniques can be applied to go web with components.
  • Learn how you can integrate existing web frameworks like jQuery.
  • Experience how to use REST services from your web applications.
  • Learn how TMS XData or Embarcadero RAD server data can be used from web apps.
  • Learn how you can now use FNC UI controls not only for VCL, FMX, LCL apps but also for the web.
  • Mingle with fellow Delphi developers.
  • Get a glimpse of the roadmap of future developments under the TMS RADical Web umbrella.
  • Talk in person to the experts from TMS software.
  • Receive a gift with the fully functional trial version of TMS WEB Core, samples and documentation.
  • Get 20% discount for one product of your choice, for your new licenses!

Organization

Sessions are presented by:

  • Bruno Fierens, CTO of tmssoftware.com + Embarcadero MVP
  • Roman Kassebaum, architect tmssoftware.com + Embarcadero MVP
  • Wagner Landgraf, architect tmssoftware.com + product manager TMS Business Subscription
  • Adrian Gallero, architect tmssoftware.com + product manager TMS Flexcel product line
  • Leon Kassebaum, Delphi & TMS WEB Core enthusiast

Location

This extraordinary event will take place at Hotel-Residence Klosterpforte, Klosterhof 2-3, 33428 Harsewinkel-Marienfeld, GERMANY. The location is easily accessible via the A2 motorway.

TMS software has chosen for Hotel-Residence Klosterpforte as it offers an inspiring and peaceful place in the midst of the nature and green to maximize your concentration & creativity. Facilities for hotel rooms at the event are optionally available for attendees.

Registrations

Early bird: 195 EUR (before May 1, 2018)
Regular price: 245 EUR

The registration fee includes a full day access to the sessions and coffee/drinks during this day. A 3 course hot meal is served for lunch.

Seats are limited. Don’t delay your registration and reserve your seat!

Get more information or make your reservation here!

We look forward to see you!

Read More

Read More

Artificial Intelligence Transgender: Kings and Queens

Researching for some Natural Language Processing tasks for a .NET application recently, I've come across Facebook's FastText library. FastText is an open-source, free, lightweight library that allows users to learn text representations and text classifiers. It works on standard, generic hardware. Models can later be reduced in size to even fit on mobile devices. It's written in C++ and builds on
Read More