Thursday, July 05, 2012

High-level Multithreading

Chapter five of my book Parallel Programming with OmniThreadLibrary is now completed. New version of the book has already been published and all buyers have been notified by the email.

Wiki will be updated soon.

Please remember – the best way to support the OmniThreadLibrary project is to buy the book!

The next chapter on the list is Introduction to OmniThreadLibrary which won the public poll by a very small margin (34 votes against the 31 votes for the Synchronisation chapter).

Smart Controls

Today I have published new version of the A Smart Book.

Newly added chapter Smart Control on 54 pages covers all built-in controls, from TW3Panel to TW3Header. Additional sections include tips on writing custom controls and description of the TW3ScrollControl control.

Sample book was also extended. In addition to Smart Pascal and Regular Expressions chapters it now contains selected parts from the Smart Controls chapter, including full text on TW3EditBox and TW3Toolbar.

Click this link for more information about the book …

Wednesday, July 04, 2012

OmniThreadLibrary Documentation: Blocking Collection

A chapter on blocking collection (IOmniBlockingCollection) is now available online.

Tuesday, July 03, 2012

OmniThreadLibrary Documentation: ForkJoin

A chapter on Parallel.ForkJoin is now available online.

Better OnStop

Pop quiz! What’s wrong with this code?

  FPipeline1 := Parallel.Pipeline
.Stage(
procedure (const input: TOmniValue; var output: TOmniValue)
begin
end)
.Stage(
procedure (const input: TOmniValue; var output: TOmniValue)
begin
end)
.OnStop(
procedure
begin
Caption := 'All done';
FPipeline1 := nil;
end)
.Run;
FPipeline1.Input.CompleteAdding;

Thursday, June 21, 2012

Parallel Programming Poll Extended

While setting up the poll on the right I did something wrong and it was prematurely closed.

This has now been corrected – you can again vote for your favourite.

Monday, June 18, 2012

Hacking FastMM for Debugging Purposes

Last week I started solving weird ‘out of memory’ crash in one of our services. First reports of problems came in from a client but with some experimenting I managed to repeat it on the test configuration. The program works nicely for few hours and then something weird happens and it starts using the memory, few megs per minute, until it crashes.

Repeating the problem on the test configuration usually means half the victory won but this time it wasn’t so :( I was fighting the most terrible of memory leaks – a live leak. Memory was allocated, stored away in some management structure and properly disposed off when the program terminated. FastMM have shown no problems at all. Such problems are always hard to find.

Saturday, June 16, 2012

Delphi Foundations

Chris Rolliston has published his monumental[*] work “Delphi XE2 Foundations” in Kindle format (paper version to follow). The book is split in three parts (TOC is provided in the book home page), each priced at £7.99/€8.99/US$9.99 (which of course translates to $13.79 for people not living in USA, UK, DE, FR, ES or IT – damn Amazon!). As the book is excellent, the price is more than fair – if you doubt my words, download the sample from the Amazon.

As the book site is called “delphifoundations.com” and not “delphixe2foundations.com” I can’t but assume that Chris will update the book to following Delphi releases, which would indeed be a great thing.

Recommended!


[*] It is hard to tell book size from the Amazon’s download size but I have read Chapter 15 (Multithreading) in advance and I can attest to the fact that it is a) very long and detailed, b) very exhaustive and c) very well written.

Tuesday, June 12, 2012

The Book is Here!

I have finally pushed the Publish button and “The Book” is now available on LeanPub.

To get the current book status, click here or on the book cover image right to this post.

If you want to affect the order in which the book is written, participate in poll on the right (below the book cover image). I will complete the “High-level Multithreading” chapter regardless of your votes but then I’ll follow the majority.

Monday, June 11, 2012

Thursday, June 07, 2012

Parallel Programming with OmniThreadLibrary – Current Status

Parallel Programming with OmniThreadLibrary is now complete. It will be updated as the OmniThreadLibrary itself is updated, but other than that it is done.

Go to LeanPub to learn more about the book, read the free sample or buy your own copy!

Tuesday, June 05, 2012

When a Hotfix Requires a Hotfix

Do you know that feeling when you can’t put together a simple piece of code? You turn it around and around and there’s always “one last” problem. Even after you’ll happy with it, the first user that tries it out will find a problem. And then you correct that and you’ll happy with it again and the first user that tries it now will find a new problem. :(

It looks like I’m playing this game with Parallel.Join. I can’t make the @#$%^ thing to work correctly. That’s why I have just issued another hotfix. If you are following the SVN head, just do the Update. Otherwise, please download the updated OtlParallel unit.

Thanks go to [meishier] for reporting the problem!

Sunday, June 03, 2012

A New Web, a New Book and a New Info Source

I have decided to start up a new blog, dedicated to programming with Smart – www.smartprogrammer.org. If you are using the Smart Mobile Studio or if you think that programming mobile applications with Pascal is an interesting idea, make sure to bookmark it.

I will however not move all my Smart-related posts there, most important stuff will also be published here.

My book about the Smart is now available – read more in my post on the new blog. [But feel free to comment here, if you want.]

And the last but not least – I have created a Twitter account. (Took me a long time, I know.). Follow me @thedelphigeek and you’ll get notifications about the OmniThreadLibrary, A Smart Book and more.

Parallel.Join hotfix

There was a nasty bug in Parallel.Join which (sometimes) raised its ugly head when number of tasks submitted to the Join abstraction was larger than the number of parallel execution units (threads). Big thanks go to [Passella] for reporting the problem together with a reproducible test case.

If you are following the SVN head, just do the Update. Otherwise, please download the updated OtlParallel unit.

Tuesday, May 22, 2012

Sunday, May 20, 2012

A Smart Book

Yes, there will be a book about the Smart Mobile Studio. I don’t know yet how it will be published – as a printed manual that you’ll get together with the software, as an on-demand printed book, as an e-book or combination of those options – but there definitely will be a book about Smart.

For starters, you can download test chapter (not yet completely finished) about using regular expressions in Smart: PDF, Mobi, ePub (rename it to .epub after download). If you like what you see, you can express your interest in the book at the Leanpub site.

On a slightly unrelated topic – I’m thinking about moving all my writing about Smart to another, yet unnamed blog. However, I’m of two minds about this so I would appreciate a feedback. What do you think – should I create a new blog or should I write about Smart here (after all, it uses almost the same language as the Delphi)?

Saturday, May 19, 2012

OmniThreadLibrary Documentation: BackgroundWorker

A chapter on Parallel.BackgroundWorker is now available online.

Laying out Smart applications with Layout Manager [4]

Last time you’ve seen how to make different layouts for portrait and layout orientations. This time I’ll show you how to dynamically set layout parameters in Resize.

Friday, May 18, 2012

OmniThreadLibrary Documentation: ParallelTask

A chapter on Parallel.ParallelTask is now available online.

Laying out Smart applications with Layout Manager [3]

The third layout manager demo shows how to set different layouts for portrait and landscape display orientation.