Wednesday, November 30, 2016

Embarcadero Akademija: RAD Studio and Version Control

This is an announcement for the next Slovenian “Embarcadero Academy” session. As it is intended for Slovenian Delphi programmers, the rest of this post is in the Slovenian language.

Monday, November 21, 2016

Debug Faster. Debug Smarter.

My CodeRage XI session on debugging in RAD Studio is now available on YouTube.

If you have missed the presentation or want to see it again, now is a good time :)

Additional materials (slides, code) are available on the Presentations page.

Monday, November 14, 2016

Hear me speak at CodeRage XI

This year I’ll be presenting two sessions at CodeRage XI.

On Wednesday, I’ll be exploring the topic of debugging in RAD Studio. I’ll show how advanced options in breakpoint properties work and drop some debugging tips & tricks here and there. Join me in room 1 at 7 am PST / 10 am EST / 16.00 CET.

On Thursday I’ll be demoing new enhancements in FastMM. If you are writing multithreaded code, then this session will be targeted to you! Join me in room 1 at 10 am PST / 1 pm EST / 19.00 CET.

Saturday, November 05, 2016

Recording Webinars (repost)

As I’m pretty sure many Delphi programmers will be working on their CodeRage XI videos this weekend ;) , I decided to repost a link to my year old post Recording Webinars – My Workflow. Maybe it will be of some use to you.

Monday, October 24, 2016

OmniThreadLibrary 3.06.2

Another week, another critical update …

There was a logical error – also known as “my own stupidity” – built into OTL 3.06 which prevented programs that used OtlCommon to be started on Windows XP. This is now fixed.

There’s also a tiny addition to OtlSync included in this release.

download / git

Wednesday, October 19, 2016

OmniThreadLibrary 3.06.1

There was a nasty bug in DSiWin32 unit included with the 3.06 release so I had no other option than to quickly issue a fix. If you have downloaded version 3.06 then please update to 3.06.1 as with 3.06 you could experience weird crashes during program startup. I’m really sorry for that :(

There’s also a tiny addition to TOmniValue included in this release.

download / git

Monday, October 17, 2016

OmniThreadLibrary 3.06

Hi, guys! After a looong time, a new version of OmniThreadLibrary was released! It is available as a zipped download, git checkout, via Delphinus and (really soon) via GetIt.

Following stuff was added/changed/fixed since the 3.05 release:

Monday, October 10, 2016

ITDevCon 2016

ITDevCon was - as always before - a blast! Great topics, great presenters, great organization and great food!

My presentations (slides and code) are now online at the usual place.

Friday, July 15, 2016

OmniThreadLibrary Everywhere

For the last year and some, Sean B. Durkin has been working on the mobile port of the OmniThreadLibrary. There was lots to be done, as OTL was never designed to be a portable library – after all, it was created in Delphi 2007 times.

Recently I merged his latest commits into the mobile OmniThreadLibrary branch. This version is (by his words) functionally complete (although it may be missing some very recent OTL features) but is very much untested. So Sean is asking everybody that is interested in multithreading on OS/X, iOS, and Android to help him find bugs and to make OTL even more awesome!

Please report any findings to his OmniThreadLibrary-For-Mobile-DevelopmentProject on Google+. I am currently working on other aspects of the OTL and didn’t I put much energy into checking his work.

Wednesday, June 22, 2016

Friday, June 10, 2016

OmniXML Official Repository

In case you are wondering which of the many github (and even bitbucket) omnixml repos is the official one (as www.omnixml.com is still pointing to the old googlecode storage), this is it: https://github.com/mremec/omnixml.

www.omnixml.com should be pointing to the correct repository “real soon now” ;)

Wednesday, May 25, 2016

RAD Studio Berlin 10.1 Notes and Links

In case you are already using RAD Studio Berlin 10.1 or are merely looking into it, these links and notes may help you.

YouTube videos

Thursday, May 19, 2016

RAD Studio 10.1 Berlin presentation in Ljubljana

Next week (Wednesday 25th) I’ll be presenting the new and shiny 10.1 release in Ljubljana.

For more info click here.

Tuesday, March 01, 2016

Defensive Programming and Advanced Debugging

Next Wednesday (9th) I’ll be holding a presentation in Ljubljana. Topic: defensive programming, maintaining a clean code, and debugging tips and tricks. Presentation will be applicable to both Delphi and C++Builder programmers.

As usual, I’ll be presenting in Slovenian language.

For more information and registration click here!

Sunday, February 21, 2016

Finding Memory Allocation Bottlenecks with FastMM4

Recently, I had to find bottlenecks in one of our applications that does all sorts of things related to DVB and is handling real-time reading and sending of data streams over IP with bitrates up to 80 Mb/s (in our lab; in real life maybe even more). Our customer created a configuration which essentially brought the app to the crawl and I had to fix it.

It quickly turned out that although the program was not able to handle the load, the CPU was not very busy. The busiest core was only using about 30% CPU. So I suspected the thread contention problems in FastMM, switched it for SapMM and indeed - the problem went away. CPU load went up and application could again handle the load.

Crisis averted, I took time to find the real problem - excessive get/freemem calls in this program. As far as I could tell, there existed no tool to find that so in a true DIY manner I created my own ;)

Wednesday, November 18, 2015

Connect Your Applications with REST – Links

The materials for my “Connect your applications with REST” workshop are now available online (in Slovenian language).

Below you can find all the interesting DELPHI- and REST-related links I have collected during the preparation of this workshop.

Thursday, November 12, 2015

Connect Your Applications with REST

Next Wednesday (18th) I’ll be holding a presentation about all things RESTish in Delphi. We’ll start with basics and then move to DataSnap, REST Client Library, REST Debugger, BaaS and more!
As usual, I’ll be presenting in Slovenian language.
Register here!

Sunday, October 18, 2015

Friday, October 16, 2015

Recording Webinars – My Workflow

Each time I have to record a webinar, I have trouble remembering how exactly did I do it last time, so I decided to document my workflow. Maybe this will help somebody else besides me …

If you have any ideas on how to improve my workflow or if you have a different way of solving same problems, then please post it in the comment section. Thanks!

[v 1.01: Added screenshots of CamStudio and Filmora settings and few words on Audacity settings.]
[v 1.02: Added appendix A with some time&space information.]

Updating a Progress Bar From a Parallel For Loop (Plus Two Bonuses)

During the Q&A part of my Simplify Parallel Programming with Patterns presentation on CodeRage X, I’ve promised the listeners to publish a demo for updating a progress bar from a parallel for loop.

In this article I’ll try to explain few different approaches that all solve this problem. I’ve also put together a demo project which demonstrates all techniques.

Thursday, September 24, 2015

Links for 10 Seattle Presentation in Ljubljana

Firstly, thanks to everybody who visited my RAD Studio 10 Seattle presentation! I’m sorry I had to improvise because of bad video drivers, but on the other hand RAD Studio performed great!

2015-09-24 09.16.20

Secondly, here is a bunch of links I’ve promised.

OmniThreadLibrary Spotlight now On-line

My short spotlight presentation about high-level OmniThreadLibrary patterns is now available on YouTube.

Wednesday, September 23, 2015

Conditional Compilation with Features

EDIT: Make sure you read this post to the very end!

Are you developing a code that must work in different Delphi versions? Are you sick of writing code like

{$IF CompilerVersion >= 22}
class function Mapper<T1,T2>:
IMapper<T1,T2>;
{$ENDIF}

as you a) never know when some feature was introduced into Delphi and b) constantly wonder which version of Delphi has CompilerVersion equal to 22?


Then maybe you could use this simple include file.


Wednesday, September 16, 2015

Learn All About RAD Studio 10 “Seattle” in Ljubljana

Next Thursday (24th) I’ll be presenting new RAD Studio 10 Seattle in Ljubljana. This is announcement for Slovenian readers.

Naslednji četrtek (24.) se mi pridružite v kristalni palači na predstavitvi novega RAD Studia 10 Seattle, ki je po mnenju mnogih (in tudi mojem), ena boljših različic tega programskega orodja v zadnjih letih.

Predstavil vam bom izboljšano podporo za Windows 10 (v VCL in FMX), nove vizualne gradnike, izboljšave v IDE, novo podporo za mobilna okolja (razhroščevanje iOS 64-bit programov, pisanje sistemskih storitev za Android), novosti in izboljšave v sistemskih knjižnicah RTL, pa tudi novosti v prevajalnikih za C++ in še marsikaj.

Več podatkov o dogodku najdete tu.

Monday, September 07, 2015

OmniThreadLibrary 3.05

Hear, hear, OmniThreadLibrary 3.05 has just been released!

What’s new? Not much.

  • Added Delphi 10 Seattle packages and projects. OmniThreadLibrary now supports Delphis from 2007 to 10 Seattle.
  • Setting IOmniThreadPool.MinWorkers property will start up idle worker threads if total number of threads managed by the thread pool is lower than the new value.

There were, however, many quite important bug fixes. You are strongly advised to update to this version!

Monday, August 31, 2015

OmniThreadLibrary on Delphinus

OmniThreadLibrary now supports the Delphinus package installer. If you are using Delphi XE or newer, you can install Delphinus, select OmniThreadLibrary, and click Install. Delphinus will do the same steps GetIt does: download OTL, recompile and install package, and add proper paths to the search and browsing path. Source will be installed to c:\Users\Public\Documents\Embarcadero\Studio\<release>\Comps\.

image

Friday, August 28, 2015

Spotlight on OmniThreadLibrary

If you are not using OmniThreadLibrary yet, or if you are only using its low-level parts (CreateTask and company), I’m kindly inviting you to a 20-minute presentation “Simple Parallel Programming with Patterns and OmniThreadLibrary”, which will be transmitted as a part of the Embarcadero Technology Partner Spotlights series on September 3rd.

There are three timeslots to chose from so I’m sure everybody can find a suitable time. After the first two presentations I’ll be handling Questions and Answers and Jim McKeeth has kindly offered to do the job for the third presentation as it will be around 02.25 AM here when it is finished.

If you want to see something interesting and new, register here!

[Slides, code, and video will be available on my blog after the presentation.]

Thursday, August 27, 2015

OmniThreadLibrary 3.04b on XE8

Just a quick note – OmniThreadLibrary 3.04b is now available on XE8 via GetIt.

Thursday, August 20, 2015

Book Update: Miscellaneous

I have updated the Parallel Programming with OmniThreadLibrary book with the Miscellaneous chapter. The book is now almost complete!

Changelog:

  • Documented TOmniMessageQueue.
  • Documented TOmniTwoWayChannel.
  • Documented TOmniValueContainer.
  • Documented TOmniCounter.
  • Documented TGp4AlignedInt and TGp8AlignedInt.
  • Documented TOmniRecordWrapper.
  • Documented IOmniAutoDestroyObject.
  • Documented IOmniEnvironment.
  • Documented examples.

Sunday, August 02, 2015

Setting Up a Parallel Build System

OmniThreadLibrary now supports 11 different Delphi versions (2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8), some with very special requirements about the supported pascal syntax (2007 and 2009 clearly standing out in that regard) so it takes quite some time to test the compilation of all demos and run unit tests on all supported editions. (And this time will only increase with the addition of support for mobile platforms and OS X. Not that I’m complaining. Sean is doing a terrific job there!)

It does not help that I don’t have all those Delphis installed on my computer. Most of them are only installed in a VM. And it takes a looooong time to start up a VM, run tests, power it down, start up next VM, and so on. And when I fix something, I have to retest it all ….

This kind of testing hurts. So in the manner of the Continuous Integration mantra, I decided to do it more often.

Wednesday, July 29, 2015

Double Bill: OmniThreadLibrary 3.04b & a Book Update

I have just updated OmniThreadLibrary to version 3.04b. This is kinda important update as I somehow messed the 3.04a release which did not include support for more than 60 concurrent tasks that was added in version 3.04. This important feature is now back and I’ve added few other small improvements.

Changelog for this release:

  • Reimplemented support for TWaitFor in the TOmniTaskControl which was removed from the code in release 3.04a by mistake.
  • Implemented TOmniSingleThreadUseChecker, a record which checks that the owner is only used from one thread.
  • TOmniCommunicationEndpoint.ReceiveWait and .SendWait are now fully thread-safe and support multiple consumers (former) and multiple producers (latter).

Version 3.04b can be downloaded here. Alternatively, you can check out this release or update to the trunk.

I have also released a new version of “the book” which is now 239 pages long! Following sections were added/updated:

  • Documented TOmniValue.
  • Documented TWaitFor.
  • Documented TOmniLockManager.
  • Documented TOmniSingleThreadUseChecker.
  • Adapted Communication Subsystem documentation.

Sunday, July 12, 2015

OmniThreadLibrary Book Update

After a (much too) long time, I have (finally) found some time to work on my book “Parallel Programming with OmniThreadLibrary”. For starters, I have updated existing content so that the current version (3.04) is properly documented. The following topics were added/updated:

  • Documented Parallel.For.
  • Documented Parallel.Map.
  • Documented TOmniBlockCollection.ToArray<T>.
  • Added longer example for Parallel.For.
  • Documented IOmniTaskConfig.SetPriority and .ThreadPool.
  • Documented Parallel.Pipeline.PipelineStage[] property.
  • Documented new demos.
  • Documented other changes and additions.
  • Updated hyperlinks.

Update is free (as it always was and as it will always be) for all owners of the book. You probably already received an email with details. If not, you should just go to LeanPub and download the new version.

You can buy the book (and with that support the OmniThreadLibrary development) here.

GpSQLBuilder Improvements

Thanks to [leledumbo], GpSQLBuilder now works with the FPC pascal and supports the INSERT statement.

You can now write statements such as:

  query := CreateGpSQLBuilder
.Insert
.Into(DB_TEST)
.&Set(COL_1, [42])
.&Set(COL_2, 'abc')
.AsString;

Which will give you:



INSERT INTO Test (Column1, Column2) VALUES (42, 'abc')


Saturday, July 04, 2015

Using OmniThreadLibrary’s Message Queue with a TThread Worker

A reader recently asked about using OmniThreadLibrary’s communication channels with a TThread-based worker thread so I prepared a simple example, now part of the OTL repository (stored in the folder examples\TThread communication).
Two separate topics are covered in this example:
  • Sending data from any thread (main or background) to a TThread-based worker.
  • Sending data from a TThread-based worker to a form.