Movie #104 - Loops with Guard Clauses

Sometimes loops can get quite complex with lots of conditional logic and deep nesting.  Have a look at this video for a technique to reduce this complexity.

Movie #103 - Property Code Templates

It can be quite an effort typing out a property declaration on an interface with getter and setter methods, in this video you will learn to save yourself a bunch of time by using one of the code templates available in Delphi.

Movie #102 - Alignment Ordering Problem

You may have noticed if you align a bunch of controls to one side then toggle their visibility property their order can change. This can be a bit annoying for building a consistent UI, but in this video I explain a simple work around.

Movie #101 - Component Prefix Wizard

In this video we are going to continue to look at features of CnPack, this time the Component Prefix Wizard.  This allows you to quickly and easily name components with consistent prefixes.  It's five and half minutes long and you can watch it on YouTube.

Movie #100 - Structural Highlighting

In this video we take a look at using structural highlighting, and how it can help make your code easier to understand.  This is one of the many cool features of the free Delphi IDE plugin CnWizards from CnPack.org.  I hope to cover some of it's other features in future videos.  This video is under 4 minutes in length and you can watch it here.

Movie #99 - Mouse Cursors in FireMonkey

In this YouTube video we look at how to change the mouse cursor in FireMonkey in a way that should work on all platforms (although I've not tested it). We further look at how we can do this with a single line of code, using a cleaver trick by returning an interface from a function. The video is about 12 minutes long.

Movie #98 - Exit

In this video we take a look at a couple of features of the Delphi exit statement.  These are the fact that you can specify a parameter to the exit statement, and that finally blocks are always obeyed even when you call exit.  It's two minutes long.

Movie #97 - Common Delphi Coding Anti-Patterns

During this session you'll either be thinking "I do that" (and hopefully you'll stop) or "I remember doing that" (while cringing at the memory). There are certain coding patterns that all Delphi programmers seem to use at some stage - some of them sub-optimal, some weird, and some just plain wrong. Collectively I've called them Anti-Patterns, and in this session you'll get to see some of my favorites (or, anti-favorites).  Watch on YouTube, the video is about half an hour long.

Movie #96 - Escaping the Try...Finally...Free Nest

We all want to do the right thing with memory management and make sure we tidy up after ourselves. However as our code gets buried in successive layers of object allocation, try, finally, free "nests" it all becomes a bit onerous -- and, well, resembling a pterodactyl nest. In this session, we look at a technique to flatten out your code so that it will look less attractive as habitation for a friendly pterosaur, and as a side benefit, improve readability. Along the way we use interfaces, generics and anonymous methods to build our over-engineered object de-allocation artifice.  Watch the video on YouTube. This video is about half an hour long.

Movie #95 - Margins and Padding Confusion

In this YouTube video I take a look at the fact that depending on what version of Delphi and if you are using FireMonkey or the VCL, the definitions of Margins and Padding on controls are different.  Up until Delphi XE4, the usage of Margins and Padding in FireMonkey was reversed to that of the VCL, but now this situation has changed and they are the same, making margins and padding different in FireMonkey between XE3 and XE4 -  confused, watch the video.