Planet Object Pascal

January 30, 2015

The Podcast at Delphi.org

Delphi Hackathon

How are you Delphi programming skills? Want to visit Fortaleza, Brazil? I’m sure it is especially nice if you are in the northern hemisphere right now since Brazil is enjoying summer while we are stuck in winter.

Next week Hack’n Fortes is hosting a Delphi hackathon / programming marathon. Registration is closed, but you can always head down to watch. If Brazil is a little far away, we have an online Code Battle planned for Wednesday the 15th as part of Delphi Week 2015! #DelphiWeek

by Jim McKeeth at January 30, 2015 09:47 PM

January 29, 2015

The Wiert Corner - irregular stream of stuff

jpluimers

Unit testing has been here for a long time, and so has Unit Testing in Delphi. Below a summary of historic links together with some notes on how the state of affairs changed over the years.

Charlie Calvert

I’ll start with one of the first large Delphi Unit Testing articles was a paper by Charlie Calvert summarizing the state of the art on Delphi Unit Testing in 2004. It is present in the wayback machine as DUnit Talk and on his elvenware.com site.

Note that the elvenwere.com site is sometimes slow or hard to reach. Since his evangelist days at Borland/CodeGear, Charlie has moved through a few evangelist jobs at Falafel and Microsoft and finally went back to his old profession: being a great teacher – this time at Bellevue Collegeoften using script based languages and cloud computing, with less focus on his web-presence.

Many of his IT books (during his writing period, he wrote both as Charles Calvert and Charlie Calvert) are still relevant though.

DUnit; Juanco Añez

http://sourceforge.net/projects/dunit/

Charlie’s paper describes both NUnit (the .NET unit testing framework) and DUnit (originally by Juanco Añez as a 1-on-1 port from JUnit in 1999, the Delphi 5 era, back when Charlie was evangelist at Borland) with some sample code at charlie’s sourceforge site.

Back then, both the paper and the sample code were very welcome, as there was virtually no DUnit documentation (apart from the README and Juanco’s InPublishing articles about Extreme Testing and Extreme Testing for Delphi programs) and people tended to stick to their development stack (so there was not much mixing of the Delphi, Java and .NET world, luckily times have changed).

Around 2006, DUnit maintenance started to slow down, and – though still part of Delphi – around 2008 it completely stalled on CVS and SVN. But a fork appeared: DUnit2.

Juanco also developed a Delphi friendly build tool called WANT (after Ant, and NAnt), which now is at want-tool.org, but development also came to a halt in 2008 and the forum in 2010.

Mocking in Pascal and Delphi

Unit testing often requires mocking to simulate real world objects. There are about a dozen mocking libraries available for NUnit.

For Delphi, Kylix and FreePascal, PascalMock used to be the mocking library, but it too halted, probably because back then RTTI was only available for published members and there was no way to automatically mock new classes and create instances of them on the fly .

Since Delphi 2009 however, RTTI has broadened a lot, and Delphi XE2 introduced TVirtualInterface in 2011 to implement SOAP consumer clients in Soap.RIO.pas. A great article about that is TVirtualInterface: Interfaces without an Implementing Class.

So I was glad that – after in 2011 a getting started guide and coverage by Nick Hodges in Delphi Mocks The Basics appeared, the DelphiMocks got officially announced in late 2012: VSoft Technologies Blogs | Introducing Delphi Mocks.

DSharp has some mocks too that bind with DUnit.

mORMot has their own mocking classes based on their own virtual class factory and a nice discussion with the DSharp author.

See also: unit testing – What is your favorite Delphi mocking library? – Stack Overflow.

DUnitWizard

But first about DUnitWizard, which still is part of Delphi too. And there is DUnitWizard documentation!

Basically it is a wizard that allows you to select the project and source file for which you want to generate a unit testing skeleton unit.

DUnit2

http://sourceforge.net/projects/dunit2/

DUnit2 is an improvement over DUnit: it improves both speed and structure, for instance allowing for “Early Exit”. The original aim was to merge back into DUnit, but that didn’t happen because DUnit2 also stalled in 2008. It does however have a better GUIRunner, so that might be worthwhile for future frameworks.

DUnit and DUnit2 are both used to test the tiOPF framework. The tiOPF is a native Object Persistence Framework for Delphi and FreePascal.

DUnit2 is also used to integrate into OpenCTF. With OpenCTF, you can test components (including Forms, Frames and DataModules) as well as classes. It tests all kinds of “obvious” things when using Delphi in a RAD way.

Remote testing your GUI using DUnit and automation

With the added RTTI in Delphi 2010 and up, you can now even remote test your GUI: André’s Dev Blog: Remote Control: automated GUI test with Delphi and DUnit. The proof of concept code is at https://code.google.com/p/asmprofiler/source/browse/#svn%2Ftrunk%2F-Other-%2FRemoteControl.

DUnitX

https://github.com/VSoftTechnologies/DUnitX

DUnitX is a complete rewrite, but has a DUnit compatibility layer.

A few main aims of DUnitX are to have it attribute based (for easier configuration), allow – like NUnit – any class to be a test fixture (added benefit of being attribute based), support for new features (collections, inversion of control, attributes) allowed by recent language improvements (generics, anonymous methods, attributes).

Another aim is to support NUnit XML output to make it easier to integrate with Continuous Integration systems (like Continua). On my research list is to check if DUnitX can be ran through the NUnit GUI Runner.

VSoft is actively maintaining DUnitX, introducing it in VSoft Technologies Blogs | Introducing DUnitX – A Unit Test Framework for Delphi.

The open source Delphi Unit Test project uses DUnitX as a foundation of their test suites.

Note the “new” Delphi language features (introduced in Delphi 2009, more or less stable in Delphi 2010 and having become more stable with every new Delphi version) has brought a plethora of new possibilities. Back then, I was hoping for fresh new libraries to come out, and indeed some of them have, of which a very incomplete overview:

There also used to be DeHL by Alex Ciobanu, but that development stopped around mid 2010 (the WiKi got removed at the end of 2010, but version r528 still has the WiKi). The same holds for his project delphi-coll – Generic collections library for Delphi 2010 and XE which stopped

German DUnit walk through

If you can read German, or can use Google translate, there is a good German walk-through on how to use DUnit (old broken link). Recommended!

TSynTest

TSynTest is a very light weight framework not compatible with DUnit or DUnit2.

It is used to test the synopse mORMot, another OPC framework for Delphi.

Sidestep to FreePascal

On the FreePascal side, there is fpcUnit, which is used to test the FreePascal database components. fpcUnit is an independent port of JUnit to FreePascal, so it is like DUnit, but slightly different, as described in Introduction to unit testing with Lazarus | The Programming Works.

fpcUnit is very similar to DUnit, but a lot less similar than DUnitX. For now, DUnitX cannot be used in FreePascal.

For FreePascal, there is also FPTest, which is a port of DUnit2 to FreePascal and used to test the FreePascal port of tiOPF (both now maintained by Graeme).

Mocking and Stubs

These are much related to unit testing, and you should read Martin Fowler’s article Mocks Aren’t Stubs before getting started.

Some frameworks are mentioned in these SO questions; more on those in a later blog post:

The Delphi Mocks Open Source Project on Ohloh.

Stubs and Mocks for Delphi with mORMot – Synopse.

Delphi Mocks: The Basics.

–jeroen


Filed under: Agile, Delphi, Dependency Injection, Design Patterns, Development, FreePascal, History, Inversion of Control / IoC, Pascal, Software Development

by jpluimers at January 29, 2015 05:00 AM

January 28, 2015

Australian Delphi User Group Members

Sydney Meeting – January 2015

Wednesday 28th January 2015 at 6 for 6:15pm start.

List Processing with Generics and Anonymous Methods: Functional Programming in Delph – Colin Johnsun

In many Delphi applications, it is not uncommon to find code used to manipulate lists of things. It could be a list of numbers or strings or even a list of TPersons or TAccounts.… Continue reading ›

by Mathias Burbach at January 28, 2015 09:02 PM

Delphi Code Monkey

Odds and Ends: Another CodeSite thing and a thought about the 20th birthday of Delphi

I think I forgot to mention a lot of features in my CodeSite review, but there's one that just made me so happy. I actually smiled. While coding. I know eh?

  Imagine this. I'm persisting some complex structure as XML and writing that to the DB. Writing that big mess out to a plain text log file quickly gets you into that "Drinking from the Firehose" mess.  But what if your viewer just showed a quick summary like "Variable = <?xml version .....".  Then you click it, and you can inspect that row "zoomed in", using the Inspector.


Here is a sample:


Now, instead of feeling like I'm drinking from the firehose, I feel like the guy who can pick exactly the rows he wants, and find the items inside he needs.  You really need to try sending giant blobs of text to CodeSite, as ONE CodeSite.Send, and using the Inspector pane, to realize, hey, there is NO reason to use anything else for logging.

It's that good.

I suggest that you have specialized DIFFERENT sets of IFDEFs and use these giant dumps to codesite, only when you need to use them, like this:

{$ifdef TROUBLESHOOT_PERSISTENCE_XML}
   CodeSite.Send( 'LoadSomething',  AXMLString  );
{$endif}


Delphi 20th Birthday Party Coming Up

Hey folks, did you realize that Delphi is going to be 20 in a few weeks?  You know what would be a good idea to celebrate? Find your local Delphi user group or meet-up, and join them for a beverage, at some point in February 2015.  I plan to do just that in Toronto.




by Warren Postma (noreply@blogger.com) at January 28, 2015 03:20 PM

January 27, 2015

The Wiert Corner - irregular stream of stuff

jpluimers

Thanks Uwe Raabe for sharing

This sounds interesting: http://www.twodesk.com/castalia/thanks.html

</rumours on>

As the page then read:

Castalia for Delphi is not currently available. Thank you for your interest.

Copyright © 2013 Jacob Thurman

–jeroen

via: This sounds interesting: http://www.twodesk.com/castalia/thanks.html.


Filed under: Delphi, Delphi XE7, Delphi XE8, Development, Software Development

by jpluimers at January 27, 2015 11:00 AM

January 26, 2015

Firebird News

Firebird JDBC driver Jaybird 2.2.7 is released with a few fixes

The Firebird JDBC team is happy to announce the release of Jaybird 2.2.7. This release contains a few fixes .

by mariuz at January 26, 2015 09:57 AM

January 23, 2015

Firebird News

CopyCat Developer 3.7.1

Microtec is pleased to announce the release of CopyCat Developer version 3.7.1! CopyCat Developer is a Delphi components library encapsulating a database replication engine with support for Firebird, Interbase, MySQL, MS SQL, Oracle, PostgreSQL, SQLite and NexusDB. For more information, please refer to our site: http://www.copycat.fr The changes in this release are as follows: – XE7 […]

by jonneve at January 23, 2015 07:38 AM

January 22, 2015

The Podcast at Delphi.org

Looking at Radiant Shapes

RadiantShapes_Logo
I’ve been playing with Raize Software‘s new Radiant Shapes components this week. These are the brand new primitive shape component set for FireMonkey on all platforms: Windows, OS X, iOS and Android. I’ve been a long time fan of Raize Components because of their attention to detail and high quality. Radiant Shapes continues this tradition.

Radiant Shapes PaletteRadiant Shapes is made up of 35 reusable shape controls that are all pretty flexible. If you caught Ray Konopka’s RAD In Action: Seeing is Believing on Data Visualization then you have a pretty good idea the importance of using primitive shapes like these to communicate useful information to your users, especially in mobile development.

All of the shapes include useful design time menus to make common changes quickly and easily. You can probably get away without using the Object Inspector for a lot of your common tasks. They also have various customizations that make them very flexible.

One thing that is interesting is they introduce the idea of a TRadiantDimension they allows you to specify some of the sizes as either absolute pixels, or as a scale factor. This gives great flexibility in how they behave when resized.

Ray Konopka introduced the Radiant Shapes during CodeRage 9 with a couple great sessions. You can catch the replay for both Object Pascal and C++.

I really like the TRadiantGear component, so I decided to play with it in detail. You can specify the number of cogs (teeth), their size (as a Radiant Dimension) and the size and visibility of the hole. Just like all the other shapes, they handle hit tests correctly, so at runtime, you can click between the cogs of the gear and it doesn’t produce an onClick event.

Gears

Just for fun I put down three gears and used LiveBindings to connect a TTrackBar.Value to their rotation. A little math in the OnAssigningValue event and I had all the gears rotating in unison. The fact that the gears stayed synced up, and the teeth meshed perfectly was really impressive.

procedure TForm4.RotateGearBigAssigningValue(Sender: TObject;
  AssignValueRec: TBindingAssignValueRec; var Value: TValue;
  var Handled: Boolean);
begin
  Value := TValue.From(-1 * (Value.AsExtended / 2 + 18));
end;

procedure TForm4.RotateGearRightAssigningValue(Sender: TObject;
  AssignValueRec: TBindingAssignValueRec; var Value: TValue;
  var Handled: Boolean);
begin
  Value := TValue.From(-1 * (Value.AsExtended + 18));
end;

18 is the offset for the gears (360° / 10 cogs / 2 (half offset) = 18) and the 2 comes from the big gear being twice as big (20 cogs), then the -1 is so they rotate the opposite direction.

Overall I am impressed with the Radiant Shapes. Something I would like to see include a polygon component where I can specify the number of sizes. You can do that with the star and gear, but a flexible polygon would be nice. Also, the shapes can be rotated with the rotation property, but it would be cool if there was a way to rotate it in the designer too. That might be a big undertaking though.

You can buy the Radiant Shapes from Raize Software for $49, which gives you a 1 year subscription for updates. I did get a complimentary copy from Raize Software to review them.

Be sure to join Ray on Friday the 23rd as he is featured in the Embarcadero Technology Partner Spotlight.

by Jim McKeeth at January 22, 2015 11:30 PM

Australian Delphi User Group Members

Melbourne Meeting – January 2015

Monday 19th January  at 6 for 6:15pm start.

Compression Techniques  in Delphi – A discussion on members’ experience with various compression options available for Delphi.

This month four different compression components were presented and by four different presenters.  As is typical, each of the solutions discussed have their own strengths and weaknesses. … Continue reading ›

by Roger Connell at January 22, 2015 10:07 PM

The Wiert Corner - irregular stream of stuff

jpluimers

Wow: I feel like having lived under a stone for 8 years, as RosettaCode has been alive since it was founded in 2007 by Mike Mol.

The idea is that you solve a task and learn from that, or learn by seeing how others have solved tasks or draft tasks.

So in a sense it is similar to the Rosetta stone: it has different languages phrasing the same tasks.

There are already a whole bunch of languages on RosettaCode (of which a few are in the categories below), and you can even suggest or add your own languages.

When you want to solve tasks, be sure to look at the list unimplemented tasks by language that leads to automatic reports by language (for instance two of the languages I use most often: C# and Delphi).

I’m sure there are lots of programming chrestomathy sites, even beyond the ones, and it feels very similar to programming kata sites.

–jeroen


Filed under: .NET, APL, Awk, bash, Batch-Files, C, C#, C++, COBOL, CommandLine, Delphi, Development, Fortran, FreePascal, Java, JavaScript/ECMAScript, Lazarus, Object Pascal, Office VBA, Pascal, Perl, PHP, PowerShell, PowerShell, Prism, Scripting, sed script, Sh Shell, Software Development, Turbo Prolog, VB.NET, VBS, VBScript, Visual Studio and tools, Web Development

by jpluimers at January 22, 2015 05:00 AM

January 21, 2015

The Podcast at Delphi.org

Episode #55 – Interview with JT

An interview with John Thomas “JT”, Senior Director of Product Management over RAD Studio and Delphi with Embarcadero Technologies.This episode was recorded almost a year and a half ago, right after the XE5 release added Android support, but is still a relevant conversation today.

It is 2 weeks from our last episode, so we are going to try and keep it at an episode every 2 weeks for now and see how that goes. Also we are moving to Soundcloud for audio hosting.

An interview with John Thomas “JT”, Senior Director of Product Management over RAD Studio and Delphi with Embarcadero Technologies.This episode was recorded almost a year and a half ago, right after the XE5 release added Android support, but is still a relevant conversation today. It is 2 weeks from our last episode, so we are going to try and keep it at an episode every 2 weeks for now and see how that goes. Also we are moving to Soundcloud for audio hosting.

by Jim McKeeth at January 21, 2015 09:33 PM

The Wiert Corner - irregular stream of stuff

jpluimers

Uwe Raabe was the first one to suggest that it might just be so that Castalia got acquired by Embarcadero. In the thread rumoured Usertility might as well been, or that Jacob Thurman might be responsible for IDE stability.

So today

These seem to be the hard facts:

  • Castalia and Usertility are now owned by Embarcadero
  • Jacob Thurman keeps involved but it is unclear if he is employed by Embarcadero

–jeroen


Filed under: Delphi, Delphi XE8, Development, Software Development

by jpluimers at January 21, 2015 07:38 PM

Firebird News

Database Workbench 5.0.8 released

Upscene Productions is proud to announce the availability of the next release of the popular multi-DBMS development tool: ” Database Workbench 5.0.8 “ This release fixes several bugs as reported by our customers. “There is so much new in Database Workbench 5, I don’t know where to start”, says Martijn Tonies, founder of Upscene Productions. […]

by Martijn Tonies at January 21, 2015 02:13 PM

Firebird and CMake

Now it is possible to build Firebird with CMake. CMake build system was commited to Firebird trunk: See the 60531 and 60531 commits.

by mariuz at January 21, 2015 01:03 PM

Australian Delphi User Group Members

Melbourne Meeting – October 2014

Monday 20th October at 6 for 6:15pm start

Using Amazon DynamoDB with Delphi – Adam Johnston (Novuslogic)

In April 2013  Adam talked about accessing the .NET framework from Delphi using the open source JVCL library.

Adam is now making use of Amazon Web Services and the Dynamo DB it offers.… Continue reading ›

by Roger Connell at January 21, 2015 09:02 AM

Melbourne Meeting – November 2014

Monday 17th November at 6 for 6:15pm start

Using Delphi Styles – Damien Bootsma – Embarcadero

Damien calls in to see us in Melbourne from time to time and in November the subject matter of his presentation was “VCL Styles”.

A number of VCL style files are shipped with Delphi ( .vsf files in   Redist\styles).… Continue reading ›

by Roger Connell at January 21, 2015 09:01 AM

Melbourne Meeting – December 2014

Monday 15th December at 6 for 6:15pm start

Lets Move an Application To FireMonkey – Roger Connell – Innova Solutions

A look at ActionLists and ImageLists in the Dunit VCL Form and converting such forms to FireMonkey.

Roger wants to have access to the Green Light DUnit testing interface when he comes to debugging his libraries in the new compiler environment {$IFDEF NEXTGEN}.… Continue reading ›

by Roger Connell at January 21, 2015 09:00 AM

Firebird News

SQL-MVC, alpha release write web applications in SQL instead of JavaScript or other.

SQL-MVC, alpha release, request for comments. Hi all, I have released a new concept in web application frameworks, using firebird and node.js, and would appreciate any comments, especially on the concepts behind it. In brief: Paradigm inversion – write web applications in SQL instead of JavaScript/or other. How does SQL-MVC work? https://github.com/quale-quest/sql-mvc/wiki/How-does-SQL-MVC-work%3F The compiler takes […]

by mariuz at January 21, 2015 08:58 AM

The Podcast at Delphi.org

Run Outside the Handler or Making a Non-Blocking Call

Have you ever had some code you wanted to run outside of the event handler that causes the code to run? If not, then this blog post isn’t for you. I’m not here to debate why you would want to do that, or if it is a good idea or not. I just know there’ve been times I’ve needed my code to run outside the event handler, or just a bit later.

One use case example: You are calling a slow routine (Network I/O maybe) and don’t want to freeze the UI while you wait for it to execute.

Still with me? Good. What I used to do was drop a TTimer on the form and set the Interval to 1, then enable it to trigger the code to run later. This worked, but it was messy. You had a timer to deal with, and you had to remember to disable it in the event handler, so it didn’t run multiple times. You also could have used a TThread, which may have been a better solution, but still seemed kind of messy, especially if you wanted to update the UI from your code.

Thanks to the new System.Threading library introduced with XE7, I’ve created a simple procedure that makes this a breeze to do. I call the procedure NonBlocking, but you could just as easily call it RunALittleLaterRunOutsideHandler, etc.

uses System.Threading;

procedure NonBlocking(const Proc: TThreadProcedure);
begin
  TTask.Create(procedure begin
    TThread.Queue(nil, Proc);
  end).Start;
end;

All this does is create a task, and then inside the task queue an update back to the main thread to execute the code that is passed to this procedure as an anonymous method. You could easily just write this code inline, but I thought it worthwhile creating a procedure to handle it for me.

Lets look at a normal execution scenario:

  //...
  ListBox1.Items.Add('Before Handler');
  EventHandler;
  ListBox1.Items.Add('After Handler');
  //....

procedure TForm1.EventHandler;
begin
  ListBox1.Items.Add('Inside Handler');
end;

When this is run, our ListBox1 will look like

  • Before Handler
  • Inside Handler
  • After Handler

which is what we would expect. Now when we introduce a call to our new procedure in the EventHandler:

  //...
  ListBox1.Items.Add('Before Handler');
  EventHandler;
  ListBox1.Items.Add('After Handler');
  //....

procedure TForm1.EventHandler;
begin
  ListBox1.Items.Add('Inside Handler 1');
  NonBlocking(procedure begin
    ListBox1.Items.Add('Outside Handler'); // This will run last
  end);
  ListBox1.Items.Add('Inside Handler 2');
end;

Our ListBox1 will look like

  • Before Handler
  • Inside Handler 1
  • Inside Handler 2
  • After Handler
  • Outside Handler

Notice that Outside Handler was the very last line added, even though it is written between Inside Handler 1 and Inside Handler 2. It even occurs after the After Handler line. Also, this works across all platforms: iOS, Android, Windows and OS X.

Everything before and within the call to NonBlocking will execute in order, but the code within NonBlocking will execute after the code that comes after that anonymous method.

If you have a ShowMessage or something else that blocks the UI thread in the event handler, then the code you passed to the NonBlocking procedure will be executed early, which is fine since the UI thread was already blocked.

 

by Jim McKeeth at January 21, 2015 12:31 AM

January 20, 2015

The Wiert Corner - irregular stream of stuff

jpluimers

This used to be a great Delphi-only feature that I missed in Visual Studio, but I found the downloadable free extension Favorite Documents extension.

It is a by Sergey Vlasov, who has a whole bunch of free and paid Visual Studio add-ins, extensions and tools.

–jeroen


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio and tools

by jpluimers at January 20, 2015 05:00 AM

January 19, 2015

Firebird News

Firebird 2.1.x series discontinued EOL

Accordingly to its release lifetime policy, Firebird Project notifies that the Firebird v2.1 series has reached its end-of-life and thus will not be maintained anymore. The last official release in this series, Firebird 2.1.7, which has been announced in December 2014, will be available from the “Discontinued Versions” section of the download area.

by mariuz at January 19, 2015 05:40 PM

Delphi Code Monkey

Debugging, Inspection, and Logging: Tools and Techniques (Why I like CodeSite)

I'm going to talk about the importance of logging, and in particular, why I like to use CodeSite in my Delphi applications.  Before I do that I want to place logging within a context. It is a tool, among other tools, available to you, to give you insight into your running code, so that you can observe the behaviour of your application, determine the correctness of your application, and even, give you some ability to reason about how to fix it, just from the output of the logs.

Fixing performance problems, validation problems,  exception mis-handling problems (catching things you shouldn't catch, not catching things you should catch),  detecting and fixing thread deadlocks,  problems with control painting, or high level user interface behaviours like persistence of user customizations to the application's grids or toolbars, are things I've never found any way to wrap up in unit tests and then fix.  Attempts to do it that way have just wasted time and money.

First I'll say that I wish I found and fixed all my bugs by wrapping all my application code in unit tests, and that TDD is so wonderful that nobody needs logging, and nobody ever needs the Debugger. Ha. What a laugh.  I'll bet TDD people are keen on TDD precisely because they have, and still do, spend a lot of precious time in the Edit-Compile-Debug cycle.

Logging can be a way to reduce the amount of time you spend in Edit-Compile-Debug.

So, let's take it for granted that any bug that can be found by TDD practices probably should be found that way, and perhaps have been found that way already, and that leaves behind the bugs that don't get caught that way.  For those bugs, there are three main debugging techniques that I rely on:

1.  Making effective use of the Debugger, especially the advanced Breakpoint properties.    Some people seem to think this is the only way to find and fix problems though.  Set a breakpoint. Inpect a variable value.  Step into and out of a complex code path.     Yes, using a debugger is a critical part of being an effective developer, but sometimes, you can spend a long time chasing bugs, and even finding where a problem is.   There are a lot of features in the debugger that, if you use them correctly can reduce the time to find your problems. One of them is the advanced features in the Delphi breakpoint settings window; Conditional breakpoints, and even non-breaking breakpoints, which can be used to generate some log messages without modifying your code:



2. Code Inspection.  Read your code. Without running any code, and without even much searching, it is sometimes possible to locate the code that is malfunctioning and find the repair that is necessary, without even running the debugger, by a combination of good code reading skills, and a good working knowledge of where in the code you might go to look and do some code inspection.  The question is, how do you find the code that was running right when the problem you experienced was happening.   I find inspection useful only after my code is instrumented with trace logging, or when the failure happens in an area where I have just been, and made changes. My mental process is usually to detect all the cases that I have to handle, and see if all the states are detected properly, and then correctly handled.  Many bugs can be found by determining that a correct bit of code to handle a particular scenario either doesn't exist, or can't possibly be run (even if it exists) because the code that detects it is not correct.  I find in custom-control work, for example, that states like Disabled, and Hot state handling (the less common states for a control) are where a lot of the bugs in my custom controls lurk.   Another kind of inspection that I like to do is reviewing the version control logs and looking at what's changed today (especially when I'm part of a team working on the code). Sometimes by reviewing the version control logs, and source code diffs, I can quickly zero in on a change that caused a problem.



3. Trace Logging, also known as "Debugging by Print Statements".   There are a wide variety of techniques for logging, and CodeSite, my topic today is just one of the available ways to do it.  A classic one, one I've used for a long time, is to use the Win32 API function OutputDebugString.  You can see the messages from these right in your IDE, or using the free SysInternals DebugView tool which you can download from Microsoft. Another way is to roll your own little disk based logging library.   I think we all think logging libraries are not very difficult to write properly, until we've written one.  Open a file, append a line of text.  If you don't have to worry about multi-threaded logging, and multi-process logging, perhaps you might make due with a pretty simply logging system, it probably has a global Critical Section that blocks every thread in your app for the 300 microseconds that it takes to write a log message, and that's probably fine for your needs.   Probably most Delphi developers who have been working for a while have their own favourite logging system.  I have my own:


  • I like one file per day, named in the form YYYY-MM-DD.log and I like logs to auto-clean after some sensible period like 30 days. That way if I turn on logging at a client machine, it's never ever going to fill the hard disk with my logging messages.  
  • I also like to have multiple levels of logging, at least three;  Information, Warning, and Error.   I like the message to have the timestamp first, and the severity indicator second, followed by some kind of area or scope name, and then the message.   Something like this:
   2016-01-16 08:03.02.123 [I] [NETLISTENER]  Listening on port 8081

  • Typically my logging library has a simple API that I don't have to think about. My own home-brew logging system is built around a function called Log:
    Log( lvInfo, 'Listening on port %d', [ FServer.Port ] );


  • If I'm in a module I might have a log method that is private to the implementation section,  that adds the facility (section) of the application, the 'NETLISTENER' above, and invokes a global callback function, if it's assigned:

procedure Log( LogLevel:TLogLevel; FormatMessage:string; Args:array of const ); inline;
begin
   if Assigned(Logger) then 
     Logger( 'NETLISTENER',  LogLevel, FormatMessage, Args);
end;

What I wish is that I didn't have to wrap Log messages I only want on sometimes in any explicit {$ifdef}.  I'd love it if I could declare inline functions as conditionally "no-op", so that I could switch out all the logging calls in my application in some non-logging build, just like Assert can. If I was using C++ this is a place where Log() would be a macro, instead of a function.  Although I don't much like having to do it this way, I often find myself going back and conditionally defining my log messages, like this:

{$IFDEF LOG_NETWORK}Log( lvInfo, 'Listening on port %d', [ FServer.Port ] );{$ENDIF}

So I have my own logging library, and you have yours.  Is Logging like Lasagna, something you should always make yourself, and not go for a ready-made?  No.  I think there's a time and a place for both things in your tool-chest.

Sometimes I will use my own home-brew logging system, and sometimes CodeSite, and sometimes both, even in one codebase.   Already having a logging system in place, of sorts, isn't a good reason to ignore CodeSite.  You might find your existing ad-hoc system, and CodeSite actually combine pretty seamlessly.

Why CodeSite?

If logging to a file is a few lines of your own code, and that doesn't require CodeSite, why do I find I like CodeSite so much?

Well the first thing I do in any codebase that has its own logging functions, is wire up CodeSite to my own internal logging system's handler function.

Just add CodeSiteLogging, to the uses clause, and call CodeSite.Send, and you've got the lovely Code Site live viewer application up on your screen.   Live Viewing rocks.   But then, OutputDebugString can enable the "live viewer" built into your debugger. So why is CodeSite's live viewer better than just adding an OutputDebugString call to your logging handler function?   It's easier to read the live viewer window's output, and easier to find stuff I care about.  This is the one area where all homegrown or the IDE-built-in OutputDebugString systems tend to fall apart, in my experience, is in finding the messages I care about and ignoring the ones I don't care about.

 Another less common problem, is having to read several logs separately and combine them manually in my head.  Code-site has a dispatching (routing) system that can combine messages from multiple applications and multiple machines, into a single log file.  It also has ways to help me find the needles in the haystacks.  I can use CodeSite to arrange live logging scenarios that help me see what I want to see to fix a particular problem, in a distributed multi-application multi-machine scenario.   If I have to manually collate and combine results from multiple log times, that decreases the overall efficiency of the log file as a tool.  I could have a server log, and two client-side application logs, and have to go find a message at 11:32:17 AM in several different logs. Now I need to check if all my computers are synchronized correctly, so that I know if 11:32:17 is slightly ahead or behind, for computer 1 or computer 2.

Another area where CodeSite really shines, is as an IDE wizard for adding logging messages quickly to your application. When I need to quickly add a lot of instrumentation (new trace messages) to a huge area of code, as an exploratory step, and then quickly take it all away.  The CodeSite MethodTracer will automatically instrument an entire area of your code, including all calling functions in a call tree, and even insert {$IFDEF CODESITE_LOGGING}..{$ENDIF} block around the generated CodeSite.TraceMethod function calls.  Seeing what functions call what functions in a structured way can be very enlightening. Adding the execution times for functions, even more.

Here goes, a few clicks...



Hey, presto, millisecond time-elapsed values, just what I wanted..




The more complicated the data types you work with, the more a tool like CodeSite helps.  You can send a whole record or object off to CodeSite, and then worry later about finding the values you need out of the object.  When I'm working with a graphical control, this kind of time-series inspection is exactly the ticket.  With a debugger you get a current value. With a logging tool, of any kind, even the roll your own kind, you get a series of points of information over time.  The question for me is, do I want to spend a lot of time implementing logging features, or do I want a tool that adapts quickly to a variety of ad-hoc logging tasks over time, quickly.

Here are some of the tasks that I find I use CodeSite for instinctively, due to the efficiency of working with the live-viewer, and the variety of tools and facilities in CodeSite:

1.   Anything you install into the IDE itself, I prefer adding logging and instrumentation, and then I visually watch my log output, and when this stuff misbehaves, I can see why it's wrong from the output of the logging screen.  Seeing your messages INSTANTLY on screen is essential here.  For IDE wizards or component debug logging, opening a file and searching in it is a waste of my time, so a live-viewer logging solution is the only sensible choice.

2.  Any graphical drawing code, whether part of a component I plug into an IDE, or even the custom paint code inside an application context (whether the custom-draw events of a control, or a control like TPaintBox that is all about owner-draw).  It's just useless to inspect this stuff with a debugger, and OutputDebugString techiniques are not good enough for my purposes. The ability to send a TRect, or a TPoint to CodeSite and visually see it are very useful:

3. Any time I want to have expandable, collapsible tree view of log messages, giving me better organization than in a flat log viewed in notepad. In the screenshot for the previous point, did you notice how there are little icons before each of the log messages?  There's a little icon for entering a function. Another little icon for exiting a function.  Next there's my Origin = message.   I know that somebody set Origin and it's AFTER the exit of HasGlyphFor, but must be inside some other context that doesn't have logging.

4. Any time I have a system that has multiple programs, parts, pieces, services, runs on more than one computer.  Honestly, I rarely co-ordinate logging from multiple sources, but when I do, it's like when I need to use the remote debugger, it can be a life saver on those days.

5. Any time I need filtering, organization by categories. Particularly nice is the Auto Organize feature, if you make use of the Category field in your log messages, something I urge you to do.

6. Any time I want to quickly instrument (add a lot of logging) that I might later revert out of my working copy.  I use the CodeSite Method Tracer for that.

And now, if I have convinced you to try adding some more logging to your application, or to try out CodeSite, which you may have already (at least the Express edition) if you have a modern version of Delphi.  CodeSite Express was first bundled with Delphi XE, and is still bundled today in Delphi XE7,

Now that I've stated why I love logging, I would like to discuss why logging becomes less useful to me than it could have been, no matter what tool I use, whether it's my roll-my-own file based loggers, or a tool like CodeSite.  Yes folks, there are ways to do logging more and less effectively.


The Cardinal Sins of Logging

Logging is not a panacea.   Making good use of logging tools is harder than it looks.

You can make your life easier by doing the right kinds of logging.  I advocate a restrained, controlled approach, with a retrospective phase where you look at how you log and modify your approach if the approach is not paying rich rewards.

1. Logging too much.   A log that contains 100 messages per second, or a log that contains 1000 useless messages that convey nothing to me, with one message in there that might tell me something interesting, is the most common form that logging fails.   Curating your log messages is something of a skill, and removing useless log messages is something I think you should be even more ruthless about than removing dead code (commented out) or useless and wrong comments.   If you can not use your logging facilities to see problems, because of all the noise, you need to do a reduction of logging.  In logging, often less is more.  If 99% of your log is noise, you may as well rip it all out and start over.

2. Not having ability to filter your logging.   Maybe you added 500 log messages to your system's logging last year due to a bug you had that day. Now those messages are useless to you. The two ways I filter my logging are by category, and by severity.  Category is a thing in my head that is coarser than unit scope, and finer than binary module scope.  In a scientific application that deals with some kind of hardware communications, I might split the scopes up to Communications, Analytics, Database, and then various user interface Category values for parts of my GUI.  The category concept is about grouping your log information to keep irrelevant details apart.   The second thing is severity. Sometimes Information messages should be suppressed and so instead of just turning logging on and off, it could be set of Off, All Messages (Verbose), Normal (Warnings and Errors), or Quiet (Errors only).

3. Logging only to disk and never directly to screen.    I find locating logs on the disk, opening them in an editor tool, and finding the rows that are recent and relevant a complete waste of my time. In fact, I find I ignore logs completely if I don't have a live viewer. Even if you didn't want to use CodeSite, at least adding an OutputDebugString line to your own in-house file logging code is friendlier in use than having to stop what you're doing, go browse in the windows explorer and find a log and then find the content in it.

4. Slowing down your end user's experience or otherwise degrading the application's primary role, due to logging. Your logging solutions, whatever they are, should be possible to turn off, and should not consume memory, or slow the user down, when turned off. If they do, and you can't fix it any other way, you should IFDEF the logging OUT of the code.    In some systems, logging is not worth doing do disk, until a serious fault occurs.  Then, and only then, perhaps some context may need to be written. In high performance applications, I have designed a circular buffer based trace logging system, that logs only to memory in a circular buffer. Then when some fault occurs that justifies the expense of persisting the log content, I save the incident file, with the preceding recent information and warning messages, from the circular buffer.   Or I append the recent in-memory records to an exception traceback (which I might generate using JclDebug or MadExcept), for purposes of automated bug reporting.   This approach is more appropriate  to some application domains, than a simple disk based logging system.

5.  Not cleaning your logs up or having a good log rotation and log naming system.  I have seen log systems that are a pain to leave turned on for any length of time because they fill the user's disk up with gigabytes of noise, and they don't neatly switch files per calendar date, making it hard to keep a recent amount (say the last 7 days) of log data around, while wiping out data that is so old as to not matter any more (say, greater than 7 days).

6.  Omitting Log headers.   My favorite practice is to have daily files with the date in the file name, and the first line in the file should be the executable name (with full executable path) and the version. Something like this:

*** C:\Program Files\MyApp\MyApp.Exe Version 1.2.3.4


Going to Production - CodeSite works there too.

CodeSite is fully capable of working in a production environment, I just haven't used it much for that yet, as I also have my own, or my employers production file based logging code.  Whatever logging system you use in production, remember before going to production, to add a way to configure your logging subsystem,  and then have some configuration user interface, at a minimum, perhaps you will want the options to turn it off completely, or set a logging level (Verbose, Normal, Quiet).

Going to production doesn't cost anything either, since the tools, including the dispatcher, live-viewer and file-viewer are freely re-distributable.  That's awesome.



My CodeSite Wish List : Greater Ability to withstand a Drink from the Firehose


"Drinking from the Firehose" - scene from UHF (1989)

Notwithstanding my advice above about logging too much being bad for you, there have been times when I wanted to generate a giant pile of log messages and then filter the data later.  CodeSite is the best tool for that job that I have found yet, as well.  I have found it's best to turn off the auto-scrolling feature in that case.    What I wish that I had was a technique that lets me see only new errors as they occur, leave the auto-scroll turned ON and showing new error messages, and hiding all messages of severity less than error, until I pause the logging, and want to "zoom in".   With auto-scroll on, and a high enough message send rate, I feel a lot like the kid in the movie clip above.  Michael Richards (and Weird Al) should have got an Oscar for UHF. There is no justice in Hollywood.


 Express versus full CodeSite Studio

CodeSite Express comes bundled with your XE through XE7 versions of Delphi has enough to get started with adding CodeSite.Send() stuff to your code, and includes enough Live Tracing functionality that you really should be using it.

The ability to send much more than just strings, the ability to send whole objects or collections in at a shot, are worth the upgrade alone.   The high precision timing stuff and the TraceMethod technique are only available in the full Studio edition.  There are even a few cool things in the full featured product list that I haven't used yet like conditional sending (SendIf).



by Warren Postma (noreply@blogger.com) at January 19, 2015 07:17 AM

January 14, 2015

The Wiert Corner - irregular stream of stuff

jpluimers

One of the features that bites me over and over again is the ZEROBASEDSTRINGS that got introduced in Delphi XE3 and is by default ON in mobile compilers and OFF in Desktop compilers.

Back then, Mark Edington showed a small example of the effects:

and then explained:

The XE3 RTL source code has been refactored to be string index base agnostic. In most cases this is done by utilizing string helper functions which are always zero based.
When it is necessary to traverse a string, the Char[] property is often used to access the individual characters without concern for the current state of the compiler with respect to zero based strings.

In addition, the “Low” and “High” standard functions can now be passed a string variable to provide further flexibility as needed.
When zero based strings are enabled, Low(string) will return 0,  otherwise it will return 1. Likewise, High() returns a bounds adjusted length variation.

The problem is the non-existent forward compatibility of the other compilers (Delphi XE2 and lower).

So if you have library code that needs to work in Delphi versions, you cannot use the High and Low to make the code ZEROBASEDSTRINGS neutral.

Many Delphi developers regularly skip many Delphi versions, so these are still popular:

  • Delphi XE1 and XE2 (the last 2 compilers before Delphi really started to support mobile)
  • Delphi 2007 (the last non-Unicode Delphi compiler)
  • Delphi 7 (the last non-Galileo IDE)

The result is that library code is full of conditionan IF/IFDEF blocks like these:

Fix: this works only in XE3 or higher: “for Index := Low(input) to High(input) do // for ZEROBASEDSTRINGS”

–jeroen

via: Mark Edington’s Delphi Blog : XE3 RTL Changes: A closer look at TStringHelper.


Filed under: Ansi, Delphi, Delphi 2007, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development, Unicode

by jpluimers at January 14, 2015 05:00 AM

TPersistent

A First Look at Devart’s “new” EntityDAC

One of the newest ORM entries into the commercial market is EntityDAC from Devart.  If you are a Delphi developer you have probably heard of Devart, even if you haven’t actually used one of their products.  The company has been developing Delphi based technology since 1997 when they released their Oracle Data Access Components (ODAC).  Devart has specialized in data access related technologies, and since Delphi has predominantly been used to develop database centric applications, if you haven’t heard of Devart, chances are you were living under a rock somewhere.

While there are numerous ORM/OPF solutions available for Delphi, only a few use the latest language features of Object Pascal.  hcOPF, TiOPF, InstantObjects, DObject were all conceived prior to the appearance of generics, anonymous methods, and the new RTTI which has opened the door to dependency injection, and other modern best practices previously not available to Delphi developers.  That is not to say that none of these frameworks have adopted newer language features, just that they were not initially written with them or require newer versions of Delphi.  mORMot is an exception.  Of the current ORMs (if I missed one please let me know), only TMS Aurelius, DORM and now EntityDAC require a later version of Delphi (2007 and up).

In August 2014, Devart released the first version of EntityDAC for the Delphi platform.  EntityDAC builds on 18 years of expertise Devart has acquired developing database drivers and other ORM related products such as LinqConnect, EntityDeveloper (a designer for DB models) and dotConnect.  There have been several updates since it’s release, so unlike many open source solutions, you know it is actively being improved.

EntityDAC uses an object TDataSet descendant to present data, and recommends the usage of data aware controls to enforce validation so for Delphi developers used to using TDataSets it is as close to a drop in replacement as you can get.  EntityDAC supports Lazy Loading, Code-First, Model-First, or DataBase-First design, and is well documented.

One of the coolest features that I always wanted to implement for hcOPF was visual object design.  A complementary product; Entity Developer is bundled with EntityDAC.  It allows you to reverse engineer a database and create Delphi business objects as well as designing them from scratch.  It can then generate your model code so you can immediately start consuming your business objects.  Entity Developer is a Visual Studio shell based application that is also capable of using T4 templating supported in that IDE, so you can tweak the code generation as you see fit.

One of the questions I debated with other developers when I first wrote hcOPF was whether the ORM should support PODO (Plain Old Delphi Objects aka TObject descendants) as well as those descending from my base class ThcObject.  Limited RTTI precluded that possibility back in Delphi 3, and I have even interfaced ThcObject to experiment with enabling developers to use RefCounted PODO objects.  With EntityDAC you can use either TObject or TEntityObject as your base class.  It also supports using Delphi attributes to determine the database mapping or XML files.

Not only is the solution very flexible in terms of the workflows supported, the getting started Wizard makes it easy to get an application up and running,  and an example app showcases some of it’s capabilities.  The icing on the cake has to be LINQ which enables you to remove the SQL from your code and the coupling to the database it represents.

While I would love to dig deeper into EntityDAC, this is already getting to be a long post so perhaps I will write subsequent ones if there is enough interest.  Suffice to say, if you are looking for a commercial ORM solution backed by a company with almost 20 years experience in delivering high performance database centric solutions, I would recommend evaluating EntityDAC.

by Larry Hengen at January 14, 2015 03:19 AM

January 13, 2015

Firebird News

Firebird Spanish Community Site updated

Disisweb team have updated the website Firebird in Spanish. This year 2015 we celebrate 15 years of serving this website, so we will be creating new sections and redesigning the news sections and articles. Some sections are temporarily disabled, but are already running the news sections and items correctly. In addition, we are very aware […]

by mariuz at January 13, 2015 03:38 PM

BigChimp passed away on 4th december

Just read on the Lazarus forum that Reinier Olislagers better known there as BigChimp passed away on december 4th. A big loss for the Lazarus and Firebird community, he will be sorely missed. http://forum.lazarus.freepascal.org/index.php/topic,26726.0.html He was very active in the Lazarus Database forum answering many questions also he contributed to many projects :turbobird , sqldb […]

by mariuz at January 13, 2015 02:42 PM

Castle Game Engine news

Firebird News

Database .NET 14.2 released

Database .NET is an innovative, powerful and intuitive multiple database management tool, With it you can Browse objects, Design tables, Edit rows, Export data and Run queries with a consistent interface. New features and improvements from 13.6 to 14.2 (2015/01/13) Full support for Firebird 3.0 (BOOLEAN/IDENTITY/PACKAGES…etc.) Compatible with Microsoft Windows 10 Updated to FirebirdSql.Data.FirebirdClient.dll 4.6.0.0 […]

by fishcodelib at January 13, 2015 07:26 AM

January 12, 2015

The Podcast at Delphi.org

Delphi and the #Code2014 Rankings

The Twitter #Code2014 ranking have become a bit of a tradition. At the end of the year everyone votes for the  programming languages they used, or were their favorite for the year. Then they all get tabulated up to see how they rank. Once again Delphi did quite well, coming it at #9, just ahead of other mainstream languages like C and C++ as well as niche languages like Objective-C and Swift (developing for only one platform is so 2013). It was neck and neck with C#, ending with only 11 votes different.

Delphi finished 9th in the #Code2014 rankings on Twitter

Delphi finished 9th in the #Code2014 rankings on Twitter

There are actually still people voting, but the deadline was Friday, so the votes don’t count. I still appreciate the enthusiasm. Watching Delphi climb the charts was a real treat, and shows two things:

  1. Delphi is still a very popular language
  2. The Delphi community is amazing

I believe this second point to be the most important one. The community really came together to vote for Delphi and move it up the rankings. Makes me happy to be part of such an amazing community.

 # Language Count
 1 javascript 2414
 2 python 1355
 3 java 1317
 4 ruby 1044
 5 sql 936
 6 php 882
 7 bash 871
 8 c# 814
 9 delphi 803
 10 c 692
 11 c++ 598
 12 go 566
 13 clojure 504
 14 haskell 452
 15 scala 449
 16 objective-c 375
 17 swift 343
 18 livecode 280
 19 coffeescript 262
 20 f# 246

Looking at the top languages, they mostly have a web development theme. I’ve heard before that Twitter seems to have a web development bias, and this seems to reinforce that. Also since you are allowed to vote for more than one language we see SQL with a very high ranking, even though I imagine it had very few votes just for it (I may be wrong, but it seems like the kind of language you use with a general purpose language).

 

by Jim McKeeth at January 12, 2015 09:41 PM

while true do;

Using dynamic arrays and Parallel Programming Library (Part 1)

The Parallel Programming Library introduced in XE7 is one of the  most awaited built-in library for the Delphi and C++Builder RTL, at least for me. I’ve still a nice list waiting for the next versions, but this is another story :-)

Marco Cantù wrote about dynamic arrays some days ago, another nice feature introduced in Delphi XE7. In the post he talk about an integration between Parallel Programinng Library and dynamic arrays which I shown to the audience in the Milan and Rome XE7 world tour.

I planned to write about Parallel Programming Library in this blog, so why don’t start with that simple example?

Here’s the code.

procedure TFormThreading.Button1Click(Sender: TObject);
var
  tasks: array of ITask;
  value: Integer;
begin
  value := 0;
  tasks := [
  TTask.Create(procedure
    begin
      sleep(1000); // 1 seconds
      TInterlocked.Add(value, 1000);
    end).Start,

  TTask.Create(procedure
    begin
      sleep(3000); // 3 seconds
      TInterlocked.Add(value, 3000);
    end).Start,

  TTask.Create(procedure
    begin
      sleep(5000); // 5 seconds
      TInterlocked.Add(value, 5000);
    end).Start
    ];

  TTask.WaitForAll(tasks);
  ShowMessage('All done: ' + value.ToString);
end;

This code configure and start 3 parallel tasks and wait for their completitions. Then show the result using a ShowMessage.
This code takes 5 second to be executed because the 1st second there are 3 tasks running, from 2nd second to the 3rd second there are 2 tasks running while the last 2 seconds only one task is running. All the internal threads are managed by a thread pool. Hey! This means parallelize!

by admin at January 12, 2015 04:44 PM

My “Delphi Cookbook” has been published

Almost an year ago I started to write a book about Delphi for Packt Publishing. Today that book has been published.

Delphi Cookbook Cover

Delphi Cookbook Cover

This book is a cookbook! That’s it, in 328 pages you will find useful (I hope) “recipes” for your day-by-day Delphi job.

Topics of the book

  • Create visually stunning applications using FireMonkey
  • Effectively use LiveBindings with the right OOP approach
  • Create server-side programs to serve RESTful web services and provide data to your mobile apps
  • Develop mobile apps for Android and iOS using well-defined GUI design patterns for a great user experience
  • Build efficient mobile apps that read data from a remote server
  • Call the platform-native API on Android and iOS even for an unpublished API
  • Use extended RTTI to better manage the software customization for your customer
  • Leverage the most popular design patterns for a better design without wasting too much time debugging

It is not an introductory book, you will not find any “Introduction to the Object Pascal language”, however the majority of the chapters are not too complex and can be grasped also by the new Delphi programmers.

The book is available for sale on the editor website and on Amazon.

Official book page at PacktPub

https://www.packtpub.com/application-development/delphi-cookbook

Book at Amazon

http://www.amazon.com/Delphi-XE6-Cookbook-Daniele-Teti/dp/1783559586

– Table of Contents –

Chapter 1: Delphi Basics

Changing your application’s look and feel with VCL styles and no code

Changing the style of your VCL application at runtime

Customizing TDBGrid

Using the owner’s draw combos and listboxes

Creating a stack of embedded forms

Manipulating JSON

Manipulating and transforming XML documents

I/O in the twenty-first century – knowing streams

Putting your VCL application in the tray

Creating a Windows service

Associating a file extension with your application on Windows

Chapter 2: Become a Delphi Language Ninja

Fun with anonymous methods – using higher-order functions

Writing enumerable types

RTTI to the rescue – configuring your class at runtime

Duck typing using RTTI

Creating helpers for your classes

Checking strings with regular expressions

Chapter 3: Going Cross Platform with FireMonkey

Giving a new appearance to the standard FireMonkey

controls using styles

Creating a styled TListBox

Impressing your clients with animations

Using master/details with LiveBindings

Showing complex vector shapes using paths

Using FireMonkey in a VCL application

Chapter 4: The Thousand Faces of Multithreading

Synchronizing shared resources with TMonitor

Talking with the main thread using a thread-safe queue

Synchronizing multiple threads using TEvent

Displaying a measure on a 2D graph like an oscilloscope

Chapter 5: Putting Delphi on the Server

Web client JavaScript application with WebBroker on the server

Converting a console service application to a Windows service

Serializing a dataset to JSON and back

Serializing objects to JSON and back using RTTI

Sending a POST HTTP request encoding parameters

Implementing a RESTful interface using WebBroker

Controlling remote applications using UDP

Using App Tethering to create a companion app

Creating DataSnap Apache modules

Chapter 6: Riding the Mobile Revolution with FireMonkey

Taking a photo, applying effects, and sharing it

Using listview to show and search local data

Do not block the main thread!

Using SQLite databases to handle a to-do list

Using a styled TListView to handle a long list of data

Taking a photo and location and sending it to a server continuously

Talking to the backend

Making a phone call from your app!

Tracking the application’s life cycle

Chapter 7: Using Specific Platform Features

Using Android SDK Java classes

Using iOS Objective-C SDK classes

Displaying PDF files in your app

Sending Android intents

Letting your phone talk – using the Android TextToSpeech engine

I hope you enjoy the reading!

–Daniele

by admin at January 12, 2015 04:43 PM

Delphi Code Monkey

I've been a bit busy lately! Upcoming posts on Delphi Code Monkey

I apologize for the lack of blog activity for the last few months. I've been in Crunch Mode at work, and various things are going on in my family life right now that have made it harder to blog about Delphi.

I remain an active Delphi guy, all day at work, and I'm happily using XE7 in production.  I remain confident in the product's stability curve.  XE6 was better and more stable than XE5, and XE7 has continued to be stable.

Here are some things I'm planning to write about soon:

1. The sad state of dUnit and the plan to resuscitate it.  This plan is currently underway by the current maintainer of dUnit, Jeroen Pluimers.   He plans to move the project from SourceForge to a public GIT based hosting system, and abandon Subversion for Git.  I plan to be one of the contributors to that newly rescuscitated dUnit and I'll have my own branch (which I will use to submit pull requests, using GitFlow).  I'm quite excited to see dUnit come back again.   I will probably also include some notes about WHY I'm not interested in DUnit/X right now, and yet, I am quite interested in seeing the changes that went into DUnit2 getting merged up to the DUnit trunk.

2.  A plan to relaunch the WANT program, also a Juancarlo Anez original, in a new form.  I will probably be hosting the code at bitbucket, and I plan to use Mercurial to host it.    I need to discuss the plan with my employers as I want to take some of our own in-house customizations and changes and external tools and build them right into WANT.   Why?  Because CI (continuous integration via build servers), IDE package installation, and unit and integration testing frameworks (like DUnit and DUnit/x) should be integrated.

3. I'm planning to write a blog post on how to I use logging tools, especially CodeSite, to help me with my debugging. I think that will be the next one.

Sorry for the quiet months on the blog, but this blog is back, and I've got some stuff to talk about coming up January 2015.   Today is, by the way, my 45th birthday, so I might write a post a bit later this month about the issue of Getting Old, from the perspective of a Software Development professional.

by Warren Postma (noreply@blogger.com) at January 12, 2015 12:35 PM

Firebird News

Firebird Language Reference translation from Russian – The $7,000 target has been achieved.

Firebird Language Reference translation – The $7,000 target has been achieved. Many thanks to all those who contributed. Collected money will go to translation of Firebird documentation and, after USD$ 7000 threshold was exceeded, Money will go for further development of next volumes: «Firebird Operations Guide» and others.

by mariuz at January 12, 2015 12:03 PM

while true do;

ITDevCON 2013 – Call 4 Paper

ITDevCon2013

ITDevCon2013

Dear potential ITDevCon speaker,

I’m building the agenda for next ITDevCon that will be held next november 14th, 15th in Verona (Italy), the same location of the past year.

This will be the 5th edition ( we’re getting conference experts J )

The call for papers are officially open right now, so if you want to propose some speeches, I’ll be glad to see it.

As usual, for the Call4Paper I need:

  • Title (for every talk)
  • Abstract (for every talk)
  • Difficulty level (for every talk. Difficulty level is a scale from 1 to 3 with the following mean: introduction, intermediate, advanced)
  • Speaker’s photo
  • Speaker’s profile

I’m looking forward to your proposal. The call4papers ends at Aug 31st, 2013 but if you have *VERY* interesting topic to propose, propose it… I’ll try to arrange the schedule and fit it in the agenda.

Send your proposal to call4paper(at)itdevcon.it.

Proposals will be evaluated and the speakers will be contacted ASAP.

This year topics will be the following:

TOPICS

  • What’s new in Delphi
  • FireMonkey: component development, hacking styles, best practices, success cases etc.
  • iOS development (iPhone, iPad, iPod Touch)
  • MacOSX development
  • Android clients for Delphi servers
  • Livebindings
  • Windows 8.x
  • Model View View Model (MVVM)
  • Delphi best practices
  • Design Patterns: real world use, success cases
  • DataSnap: intro, success case, tuning, deploing etc
  • “Unusual” Delphi markets
  • Delphi + Arduino
  • Delphi + Embedded Systems
  • Delphi + Raspberry Pi
  • Delphi + WebClient Framework (AngularJS, EmberJS, KnockoutJS etc)
  • Extending Delphi with scripting languages (DWS, Javascript, Lua etc): why? how?
  • TDD and Unit Tests
  • Agile methodologies
  • Dependency Injection
  • ORM
  • FireDAC
  • Software engineering
  • “Hands on” sessions for the most used Delphi frameworks (e.g. Delphi Spring Framework, DORM, TMS Aurelius, OTL etc)
  • Mobile: UI, UX, optimization
  • HTML5/SVG/WebGL and Delphi
  • OOD/OOP
  • LLVM
  • RTTI, Generics and AnonMethods: Real world cases, success cases.
  • Web development with Delphi
  • Real OOP Delphi applications developments
  • Delphi fundamentals/advanced
  • Metaprogramming
  • Games
  • SOA/ROA
  • Architectures

Target audience

  • Software architects
  • Software developers
  • Project managers
  • IT managers
  • Trainers

The conference web site is http://www.itdevcon.it (2013 version is still under construction).

Do you want to see a particular topic or have a suggestion for ITDevCon2013? Let me know

Thanks and see you at ITDevCon 2013.

P.S. This year, ITDevCon will be even more amazing! Stay tuned!

by admin at January 12, 2015 10:58 AM

Sending Android Intents from Delphi (Part 1)

As you probably know, I work for the italian embarcadero representative (www.bittime.it), so last week, I’ve been in Milan (Italy) with the Delphi Product Manager Marco Cantù, to show the new Delphi XE5 for Android (and iOS…).

Users (old and new) were enthusiastics. The Delphi-WAY combined with the Android openness and flexibility, is really a good way to develop mobile apps for the business customers.

So, after the initial demos some users were interested in sending Android Intents from their Delphi app.

I’ve builded some demos about Intents, so I showed those demos to them (in the next weeks there will be many Delphi for Android training in Italy, so I’ve build those demo in advance)

In Delphi XE5 you can call java classes from the Google SDK. So I started investigating hot to do this.

There are a lot of possibilities, and I’m still doing research, but this is a simple Intent send demos.

The Intents demo app

The Intents demo app

 

This is the code under the first button.

procedure THeaderFooterForm.Button1Click(Sender: TObject);
var
  Intent: JIntent;
begin
  // JAVA SDK ANDROID HELP SAYS...
  // String url = "http://www.example.com";
  // Intent i = new Intent(Intent.ACTION_VIEW);
  // i.setData(Uri.parse(url));
  // startActivity(i);

  Intent := TJIntent.Create;
  Intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
  Intent.setData(TJnet_Uri.JavaClass.parse
    (StringToJString('http://www.danieleteti.it')));
  MainActivity.startActivity(Intent);
end;

Simple, isn’t it?

With this piece of code, you cann open your device browser to a web site (my blog in the snippet).

Click on the first button and you will be redirected to this blog.

Open browser with intent

Open browser with intent

 

Intents are REALLY powerfull

With the next snippet, you can send piece of data (e.g. text) to other apps. You dont have to know the apps in advance, Android will do the match with the Implicit Intent. (It is similat to the TShowShareSheet action).

procedure THeaderFooterForm.Button2Click(Sender: TObject);
var
  Intent: JIntent;
begin
  // Intent intent = new Intent(Intent.ACTION_SEND);
  // intent.setType("text/plain");
  // intent.putExtra(android.content.Intent.EXTRA_TEXT, "Android Rocks!!!");
  // startActivity(intent);

  Intent := TJIntent.Create;
  Intent.setType(StringToJString('text/plain'));
  Intent.setAction(TJIntent.JavaClass.ACTION_SEND);
  Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT,
    StringToJString('Delphi Rocks!!!'));
  MainActivity.startActivity(Intent);
end;
Chose wich apps shoud be launched to handle the intent (and the text)

Chose wich apps shoud be launched to handle the intent (and the text)

 

Now, if you choose Twitter, you will get this screen.

Intent handle by twitter app

Intent handle by twitter app

 

I’ve demos about placing a call, sending an SMS, show a PDF file, accessing different kind of storage etc.
In the next part of this mini series I’ll show some other snippets.

There is still many areas to explore…

  • Services
  • BroadcastReceiver
  • Widget
  • Bluetooth
  • I/O
  • …?

I’ll keep you informed…

by admin at January 12, 2015 10:51 AM

DelphiMVCFramework is now Open Source!

delphimvcframework

Yes, just after 1 year of development, and a couple of big projects developed with it, the DelphiMVCFramework has been published as OpenSource.

The project is on google code svn https://code.google.com/p/delphimvcframework/

I’ll talk about it at ITDevCon2013 (http://www.itdevcon.it)

In the trunk there are many samples and I’m planning to put many others.

Main DMVCFramework features

  • RESTful (RMM Level 3) compliant
  • Server side generated pages using eLua (Embedded Lua)
  • Messaging extension using STOMP (tested with Apache Apollo and Apache ActiveMQ)
  • Can be used in load balanced environment using memcached (memcached.org)
  • Fancy URL with parameter mappings
  • Integrated RESTClient
  • Works with XE4 and XE5 (tested, but should works also on XE3 and XE2)
  • Experimental support for IOCP
  • Simple, but very very simple, to use…

It contains also a lot of indipendent code that can be used in other kind of projects.

These are the most notable:

  • Mapper (convert JSON <=> Object, ObjectList <=> JSONArray, ObjectLists <=> DataSets)
  • LuaBinding (integrate Lua script into Delphi native code)
  • LuaTextFilter (convert eLua into plain Lua executable script just like JSP)
Currently DMVCFramework use Embarcadero WebBroker framework, but is not tied to it. I’m working on a version that use IOCP (that is 10 times faster than plain WebBroker) and other web libraries for Delphi.
Code is enough stable and is already used in big production system.
WARNING!
There are a couple of bugs that affect WebBroker and so, DMVCFramework.
In our system, I’ve applied some patches to solve these problems. If you need those patches, ask me (I cannot publish the full code because it is Embarcadero licensed code).
The bugs are:
And another bug that affect also DataSnap and TIdHTTPWebBrokerBridge based projects.
Code is tested on XE4 and XE5 but should works also on XE3 and XE2.

by admin at January 12, 2015 10:37 AM

Sending Android Intents from Delphi (Part 2)

Some months ago I wrote a post with title “Sending Android Intents from Delphi (Part 1)”. In that post I promised to write a 2nd part… here’s it is!

This time I want to play a video deployed with my APK using an external player.

Some informations are available on the Internet, but to correctly know how to play the video I’ve to inspect my Nexus 5 with the LogCat while using the default file manager to start the default video player.

The app main form  is shown below

The main form

The main form

 

I’ve added an mp4 video file using the deployment manager.

This is the code under the button click event

procedure TForm1.Button1Click(Sender: TObject);
var
  Intent: JIntent;
  FileName, DestFileName: string;
  Data: Jnet_Uri;
  CompName: JComponentName;
const
  VIDEO_FILENAME = 'videoviewdemo.mp4';
begin
  FileName := System.IOUtils.TPath.GetDocumentsPath + PathDelim + VIDEO_FILENAME;
  DestFileName := TPath.GetSharedDownloadsPath + PathDelim + VIDEO_FILENAME;
  // Copy the file into a public path (you can use any public path)
  TFile.Copy(FileName, DestFileName, true);
  Data := TJnet_Uri.JavaClass.parse(StringToJString('file://' + DestFileName));
  Intent := TJIntent.Create;
  Intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
  if CheckBox1.IsChecked then
  begin
    CompName := TJComponentName.JavaClass.init(StringToJString('android'),
      StringToJString('com.android.internal.app.ResolverActivity'));
    Intent.setComponent(CompName);
  end;
  Intent.setDataAndType(Data, StringToJString('video/mp4'));
  try
    MainActivity.startActivity(Intent);
  except
    on E: Exception do
    begin
      Label1.Text := E.Message;
    end;
  end;
end;

Using the checkbox you can force the OS to show the ResolverActivity.

see you

by admin at January 12, 2015 10:32 AM

PACKT Publishing Book Review: “Gideros Mobile Game Development”

As you probably know, I did some reviews on PACKT Publishing technical books. Now I did a review on a new book about Gideros Mobile. At bit Time Software we used to create mobile games too and in the last months some of them have been built with Gideros Mobile (we do also training on the Gideros Mobile framework. If you are interested, check the contact me section ad write me an email).

The last game released by bit Time Software, is written with Gideros Mobile and is available for Android and iOS devices. It is called Math Brain HD and it’s free. Here’s the game icon.

Math Brain HD

Math Brain HD

At the last DROIDCON in Turin, IT, we held a speech about the Gideros Mobile framework.

So, being an advanced user, I’ve been really pleased to do this book review for PACKTPUB.

The title of the book is: Gideros Mobile Game Development

The book cover

The book cover

Here you can find the book page on PACKT Publishing web site

http://www.packtpub.com/gideros-mobile-game-development/book

Here’s a bullet list of considerations about the book. These are a sum of feelings, mine and from my colleague at bit Time SoftwareDaniele Spinetti.

Is’s really simple to read, also for non native english people, and the contents are very well organized. When you finish to read the book, you are able to create a good level game, not a trivial one. All the topics related to the complete Gideros Mobile software stack are covered.

During the book, the author incrementally starts to use the most popular plugin for the Gideros Mobile, so you are getting familiar with the “fantastic plugin world” from the start.

IMHO it’s a good book.

However, if you want to find some cons, sometimes seems that it goes into too much details getting too trivial (e.g. zindex).

by admin at January 12, 2015 10:27 AM

ITDevCon 2014, Call4Papers

ITDevCon 2014

ITDevCon 2014

Dear potential ITDevCon speaker,

As every year, I’m building the agenda for next ITDevCon that will be held next october 23th, 24th in Milan (Italy), in a new location.

This will be the 6th edition ( we’re getting conference experts J )

The call for papers are officially open right now, so if you want to propose some speeches, I’ll be glad to see it.

As usual, for the Call4Paper I need:

  • Title (for every talk)
  • Abstract (for every talk)
  • Difficulty level (for every talk. Difficulty level is a scale from 1 to 3 with the following mean: introduction, intermediate, advanced)
  • Speaker’s photo
  • Speaker’s profile

I’m looking forward to your proposal. The call4papers ends at Aug 31st, 2014 but if you have *VERY* interesting topic to propose, propose it… I’ll try to arrange the schedule and fit it in the agenda.

Send your proposal to call4paper(at)itdevcon.it.

Proposals will be evaluated and the speakers will be contacted ASAP.

This year topics will be the following:

TOPICS

  • What’s new in the latest Delphi versions

  • FireMonkey platform

  • MacOSX development

  • Android development

  • iOS development

  • Windows development

  • Mobile development (Android+iOS)

  • Develop UIs for different devices (smartphones, tablets, TV, watch etc)

  • BaaS integrations

  • LiveBindings ®

  • Delphi best practices

  • Design Patterns

  • DataSnap

  • DelphiMVCFramework

  • Arduino e/o Raspberry Pi

  • Web Application with Delphi

  • TDD and Unit Tests

  • Agile methodologies

  • ORM and other data access patterns

  • Using NoSQL databases (even to speed up your VCL software)

  • FireDAC

  • UI, UX, optimization for mobile and desktop

  • OOD/OOP

  • Real use cases for extended RTTI, Generics e AnonMethods

  • RESTful interfaces design and development

  • Architectures

Target audience

  • Software architects
  • Software developers
  • Project managers
  • IT managers
  • Trainers

The conference web site is http://www.itdevcon.it (2014 version is still under construction).

Do you want to see a particular topic or have a suggestion for ITDevCon2014? Let me know

Thanks and see you at ITDevCon 2014.

by admin at January 12, 2015 10:16 AM

January 11, 2015

Castle Game Engine news

Castle Game Engine version 5.1.2 was just released! Get if from http://castle-engine.sourceforge.net...

Castle Game Engine version 5.1.2 was just released! Get if from http://castle-engine.sourceforge.net/engine.php .

This release brings a couple of fixes and improvements to the engine:

1. TCastleControl has 9 new useful events published (for documentation of them, see TUIContainer class):

  OnOpen: TNotifyEvent
  OnClose: TNotifyEvent
  OnBeforeRender: TNotifyEvent
  OnRender: TNotifyEvent
  OnResize: TNotifyEvent
  OnPress: TControlInputPressReleaseEvent
  OnRelease: TControlInputPressReleaseEvent
  OnMotion: TControlInputMotionEvent
  OnUpdate: TNotifyEvent

  These should be used to watch open/close of the context, to watch key/mouse events and to perform continous updates.

  Some previous published stuf is deprecated now and will be removed in next release (sorry, we have to break compatibility --- this old stuff really doesn't make much sense, all new code should use new events). Also, the deprecated OnPaint was fixed --- just in case you're using it (but please switch to using OnRender soon!).

2. Tutorial:
* The beginning of the tutorial is much improved, it's smoother and shorter now. The goal is to be able to make a 3D game in 5 minutes using the tutorial!
* Also, the tutorial chapter "Adding a simple moving object" was added: http://castle-engine.sourceforge.net/tutorial_castle_scene_transform.php .

3. You can save almost 0.7 MB from exe size by undefining CASTLE_EMBED_ALL_3D_FONT_VARIATIONS in some cases, see src/base/castleconf.inc for comments.
4. Various testsuite fixes and improvements.
5. Improved CastleCurves API, and also mark most of it as deprecated.

6. The website got a total facelift, using HTML5 and Bootstrap style. Various pages and menus were rearranged to be more helpful. I hope you enjoy the new website --- please leave a note in the comments :)

January 11, 2015 04:06 PM

Lazarus Team Anouncements

Lazarus and FPC 3.0

I move the discussion from "Lazarus 1.2.6 Release" to this new thread.
FYI: The next release Lazarus 1.4 will use FPC 2.6.4. I understand many people have questions about when the new FPC 3.x will be used.
The following major release Lazarus 2.0 will s...

January 11, 2015 02:06 PM

January 10, 2015

TPersistent

Get Awesomeness is Awesome

Get Awesomeness is a curated list of awesome Delphi frameworks, libraries, resources, and shiny things. Inspired by awesome-… stuff. It’s nice to have one stop shopping to open source frameworks of interest.  Certainly beats searching on source forge, Google code, GitHub and all the other sites.

Note that only open-source projects are considered. Dead projects are mainly ignored except for those which do not have alive analogs. Feel free to suggest other missing nice projects either by comments or pull requests.

by Larry Hengen at January 10, 2015 10:57 PM

New Hope for Solving IDE Out of Memory Issues

Last night I I was reading some of the latest articles on Jon lennart Aasenden’s blog about Quartex. For those of you not following Jon on Google+ he is the founder of the DelphiArmy and the author of the Smart Mobile Studio IDE.  Quartex is an IDE for multiple languages (including Object Pascal) that Jon is working on that is to include the transcoding of languages.  IOW, you could take Delphi code and transcode it to C++ or C#.  The approach is to use the LDEF intermediate format, and from there you could either convert to a different language or compile it into binary code.

Quartex will be built on Jon’s cross platform framework and experience, and he is looking for others to join in. If the effort proves successful there could be another IDE choice other than Lazarus for XPlatform work. Imagine, a native IDE on the Mac compiling for OS/X or iOS, or a Linux IDE targeting Linus and Android. No more networking between machines with intermediate apps like PAServer, or using VMs to target mobile devices.

No more .NET subsystems like ErrorInsight that produces lots of false positives and never gets fixed. No more modelling support that no one uses, Refactoring that works some of the time and blows up out of memory or never comes back and no more half baked features that are abandoned. If Quartex ends up open source, and you find a bug that bugs you enough, you can fix it yourself or hire someone to do so.

Product direction would be a community decision, and both voting with your voice and your wallet would yield results. Object Pascal as a language would have a much better chance of surviving! It’s either that, or we continue with the high # of Quality Portal issue reports, and articles like this one that show how EMBT’s strategy is working in terms of quality (72 reports over the last 30 days without a single resolution).

I also thought I would mention that Marco has been on the EMBT quality portal. Good to see someone from EMBT providing an explanation of the complexity of the issue and what they’re doing.

by Larry Hengen at January 10, 2015 08:36 PM

January 08, 2015

The Wiert Corner - irregular stream of stuff

jpluimers

Even though 15 years ago they proudly announced to have archived 20 years of usenet, it is virtually impossible to find usenet groups through groups.google.com, and they certainly do not archive the groups at forums.embarcadero.com (formerly forums.codegear.com and forums.borland.com).

So I found only a few sites that do index the Delphi groups (and they do index more than just the Delphi newsgroups), so if you know more, please let me know!

  • Alt
  • AtozedSoftware
  • Borland
  • Comp
  • Embarcadero
  • Microsoft
  • Advantage Database,
  • AtoZed Software,
  • Components4Developers,
  • Delphi JEDI,
  • Developer Express,
  • Digital Metaphors,
  • Elevate Software,
  • Embarcadero,
  • Eureka Log,
  • Fast Reports,
  • Graphics32.org,
  • HREF Tools,
  • Jordan Russell’s Software,
  • LMD Innovative,
  • ModelMaker,
  • NexusDB,
  • Woll2Woll.

Back to Google: here are a few groups I know of that are archived there:

I might be able to extend that list in the future.

–jeroen


Filed under: Delphi, Development, Software Development

by jpluimers at January 08, 2015 05:00 AM

January 07, 2015

The Podcast at Delphi.org

Episode 54 – Sarina DuPont

Welcome back to the Podcast at Delphi.org. This is my first podcast since I’ve started working for Embarcadero Technologies back in 2013. When I first started I’d planned to resurrect the podcast, but got caught up with all the new projects, travel and excitement and it fell by the wayside.

With the New Year it seems fitting to recommit to the podcast. I’ve got a lot of changes planned. I’m not sure about the frequency format and other details, but figure it is better to get a rolling start.

I actually recorded this interview with Sarina DuPont (@SarinaDuPont) back in August of 2013, right before the RAD Studio XE5 release added Android support. So some of the comments are dated in that regard, but most of it is still relevant. So while XE5, XE6 and XE7 have all shipped since the podcast, Sarina is still a product manager and the focus of getting to know her and her vision for RAD Studio is still relevant.

[Download]

Typically I am in the Scotts Valley office about one week a month. My plan is to start recording some interviews when I am there. I’ve really enjoyed getting to know people behind the scenes with my favorite development tools, and hope you will too.

In the next episode I’ll have an interview with John Thomas (@FireMonkeyPM), or JT, the Senior Director of Product Management here at Embarcadero Technologies.

Oh, and check out the new Embarcadero Community Podcast by David I.

Welcome back to the Podcast at Delphi.org. This is my first podcast since I’ve started working for Embarcadero Technologies back in 2013. When I first started I’d planned to resurrect the podcast, but got caught up with all the new projects, travel and excitement and it fell by the wayside. With the New Year it seems fitting to recommit to the podcast. I’ve got a lot of changes planned. I’m not sure about the frequency format and other details, but figure it is better to get a rolling start. I actually recorded this interview with Sarina DuPont (@SarinaDuPont) back in August of 2013, right before the RAD Studio XE5 release added Android support. So some of the comments are dated in that regard, but most of it is still relevant. So while XE5, XE6 and XE7 have all shipped since the podcast, Sarina is still a product manager and the focus of getting to know her and her vision for RAD Studio is still relevant. [Download] Typically I am in the Scotts Valley office about one week a month. My plan is to start recording some interviews when I am there. I’ve really enjoyed getting to know people behind the scenes with my favorite development tools, and hope you will too. In the next episode I’ll have an interview with John Thomas (@FireMonkeyPM), or JT, the Senior Director of Product Management here at Embarcadero Technologies. Oh, and check out the new Embarcadero Community Podcast by David I.

by Jim McKeeth at January 07, 2015 05:53 PM

The Wiert Corner - irregular stream of stuff

January 06, 2015

Jamie's Blog

Starting with the Edison Part 1 – Setup

I was recently lucky enough to get a SparkFun starter pack for Intel Edison, which is a set of boards that slot together for the Intel Edison. This post is about getting up and running on the Edison with the initial setup and OS update and in the second, I will go through a very basic home automation project with a Freepascal app running on the Edison. The Intel Edison is a 22nm Intel Development board that includes a dual core, dual threaded Intel Atom CPU at 500MHz and a Quark core, runnning at 100MHz. It has 1Gb RAM, 4Gb eMMC flash storage, plus dual-band WiFi and Bluetooth. What is most amazing about it is the size:

(The Edison board itself is the one of the right)
Spark Fun Intel Edison starter kit

As you can see, the Intel Edison is absolutely tiny. I bought my Edison within the SparkFun starter pack because the Edison by itself is not the easiest to get started with unless you have an extremely good knowledge of electronics and the necessary kit. There seem to be several options for getting started:

As I wanted to develop pure x86 applications on the Edison and wanted a convenient portable power source, I chose the starter pack, which contains a console block for connecting directly to the Edison console via a USB to Serial connection, a GPIO block, and a rechargeable battery block.

In order to get started, you need to slot the Edison into the console block and attach the USB cable. Most starter guides that I found seemed to focus on using the Mini breakout kit so I had to apply different steps than those in most of the tutorials.

The first thing that you’ll want to do is to hook up the console and plug in the USB cable. There is a good guide to setting up the console over on sparkfun, but you will need to install the FTDI drivers as appropriate for your Operating System and install a console such as RealTerm. You should identify the port that your Edison has been connected to as the one which appears when you plug your Edison in and then configure your console application for a baud rate of 115200. One note for RealTerm is that I needed to make sure that it was ready to display as Ansi.

Edison booting via the console

Once connected you can press enter and you should be prompted to log into your Edison as root. There is no password by default, but you can set one at this point should you wish (using the passwd command). I should note that my Edison was shipped with an older version of the Yocto Linux OS, which was slow to react over the console and felt slightly buggy when connecting to the WiFi etc so you will probably want to update the OS at this point.

At this point you can optionally run

configure_edison

and complete the wizard to setup your account and connect to WiFi to make sure that it’s all working. It should be noted that I was initially unable to connect to my Edison whilst the Console cable was connected and I needed to edit /etc/systemd/system/basic.target.wants/network-gadget-init.service and update the IP Address to something further away from my home DHCP block, such as 192.168.99.40 as suggested in an Intel forum thread here.

As most tutorials for updating the OS focussed on the Mini Dev breakout board, I had to search around for inspiration, but eventually found this gist from skvark on github, which I was able to adapt to my needs:

Please note: As with all updates to an OS, these carry a risk. Proceed at your own risk – I take no responsibility for if your board does not update correctly or is damaged irreparably in the process. There are also official guides to flashing your Edison on the Intel community site.

      If you haven’t already, connect the Edison into a local WiFi network with # configure_edison –wifi and check that you can access to the Edison via SSH or with browser.
      On the Edison # cd / to root
      # mkdir update
      # mkfs.vfat -F32 -I /dev/mmcblk0p9 – mmcblk0p9 is the partition which will contain the new FW files, command formats it to FAT32.
      # mount -t vfat /dev/mmcblk0p9 /update/ – mount the partition to the /update)
      Wget the full complete image from the Intel Site (https://communities.intel.com/docs/DOC-23242) directly onto the edison into the /home/root folder.
      # cd /home/root
      # mkdir /home/root/temp
      # unzip update_file.zip -d temp
      # rm update_file.zip
      # mv temp/ota_update.scr /update/ – Apparently ota_update.scr must be first in the folder hence this explicit step.
      # mv temp/* /update/
      # rm -rf temp
      # reboot ota

These steps are also available as an updated gist here.

Once I had updated my Edison, I was able to run

configure_edison

again and ensure that my edison was setup correctly and was then able to run a few quick tests.

I used the obligatory Freepascal hello world program together and SCP’d in onto the Edison to check that it all runs smoothly:

program helloedison;
begin
  writeln('Hello world.');
end.
jamiei@jamiei-dev:~/dev/hello-edison$ fpc helloedison.fpr 
Free Pascal Compiler version 2.4.4-3.1 [2012/01/04] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
Compiling helloedison.fpr
Linking helloedison
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
4 lines compiled, 0.3 sec 

jamiei@jamiei-dev:~/dev/hello-edison$ file helloedison
helloedison: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped

jamiei@jamiei-dev:~/dev/hello-edison$ scp helloedison root@192.168.1.137:~
root@192.168.1.137's password: 
helloedison               100%  121KB 121.3KB/s   00:00   
                                                                                               
jamiei@jamiei-dev:~/dev/hello-edison$ ssh root@192.169.1.137

root@jamiei_edison:~# ./helloedison 
Hello world.

That should have you ready to develop on your Intel Edison. As your Edison is x86 based, you can use whatever language you wish to run on it, including Python, Freepascal, Google Go, Node.js and JVM based languages such as Java or Clojure if you install the JVM.

In the next part, I looked to create a small application to take advantage of the bluetooth connection on my Edison and to do some basic home automation with Freepascal.

Further Reading

by jamiei at January 06, 2015 02:35 PM

Castle Game Engine news

Our website http://castle-engine.sourceforge.net/ was redesigned with modern style, using HTML5 and ...

Our website http://castle-engine.sourceforge.net/ was redesigned with modern style, using HTML5 and responsive Bootstrap! Welcome to 2015:) Go and try the new website now!
Also, YOUR SCREENSHOTS ARE WANTED! We want to create a separate page listing the engine features, decorated with nice screenshots. It will be based on the existing text under http://castle-engine.sourceforge.net/engine.php#section_features , but hopefully it will be much more attractive! If you have any screenshot showing your work with the engine (or just playing one of our games), please share it, in any way you like --- maybe post it here or on our forum: https://sourceforge.net/p/castle-engine/discussion/ . Thank you!

See the screenshots of our website below --- top shows "before", bottom shows "after" :)

January 06, 2015 10:56 AM

twm’s blog

Showing all parameters passed to a batch file

Sometimes you just want to know how a program gets called by another program or by Windows. In that case this little batch file might come in handy:

@echo off
rem This batch file shows its full filename and its parameters
echo cmd file: %~dpnx0
echo Parameters:
for %%I IN (%*) DO ECHO %%I
pause

Blatantly copyied from This StackOverflow answer.

by dummzeuch at January 06, 2015 10:23 AM

January 05, 2015

The Podcast at Delphi.org

Tweet Delphi #Code2014

If you code in Delphi, then be sure to Tweet Delphi #Code2014 to have your vote counted. I’ve made it really easy for you, if you just log into Twitter and click the link you cast your vote. You can see the rankings on Code2014.com or just check the list of all the tweets for Delphi.

Vote, and tell your friends to vote. They filter to one per Twitter account.

by Jim McKeeth at January 05, 2015 08:55 PM

The Wiert Corner - irregular stream of stuff

jpluimers

A very nice thread around multi-threading in Delphi is evolving at Google Plus: Nick Hodges: Man, the chapter on Multi-threading is going to be seriously hard to write.….

Note: you need to be member of that G+ group to read it, but Nick Hodges allows most people in…

–jeroen

(I also tagged it XE8, as by the time such a book arrives, that Delphi version has most likely come out given the past release frequency <g>)


Filed under: Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development

by jpluimers at January 05, 2015 03:55 PM

January 04, 2015

Castle Game Engine news

January 03, 2015

TPersistent

Encapsulate Your Data

What I always fail to understand is why developers (especially Delphi devs), tend to write programs using datasets with the normal RAD approach when all the benefits of Object Oriented Programming (OOP) are lost by doing so.  Datasets were used back when I wrote Clipper programs in 1992.  Clipper was not object oriented, so it’s like stepping back in time, and ignoring all the benefits that OOP has demonstrated over procedural programming.

When I was first learning OOP, I was taught “there are three pieces of PIE” where the acronym PIE stood for Polymorhpism, Inheritance, and Encapsulation.  You could of course say there are slightly more than 3 pieces (3.14) in a Π, or perhaps its just a case where the whole is greater than the sum of the parts.

IMO the characteristic or benefit most often overlooked when writing Delphi code is Encapsulation.  Encapsulation is what enables the de-coupling of classes, which affects your ability to maintain code over time with minimal breakage.

A good test of any code base is how easy it is to create a new application and re-use a class.  Try it, and you will soon find out what the prerequisites are, and how intertwined the code is.  Not only does this affect your ability to develop in an agile fashion, it means re-factoring the code for better performance is more difficult as well.  One of the most common issues with legacy Delphi code is that all the work is done in a single thread (the main VCL thread).  Progress reporting usually involves calls to Application.ProcessMessages() to ensure processing results are displayed in a timely fashion.  What this means is that the processsing takes longer, and is even more difficult to move it to a background thread because it is tied to the VCL message loop as well as other objects in the main thread.

If I had to write an application from scratch I would:

1) use an ORM whenever possible.  DataSets are compact and fast to retrieve.  Where they fall down is the encapsulation of data and behaviour (business logic) which changes over time.  ORM objects are more flexible, and they usually provide a validation framework as well as persistence.  Sooner or later datasets will force you to break the DRY principle in anything but a trivial application.

2) use MVVM.  While MVVM frameworks for Delphi are in their infancy, the concept can be implemented on a case by case basis. The idea is to keep as much code out of the View (form) as possible.  What you really need for MVVM is some kind of object/data binding.

3) implement your data processing on a secondary thread.  If you do so right off the bat, there is less of a chance that the data access will ever be tightly coupled with anything on the main thread, and parallelization becomes trivial.

4) use TDD to write at least the core classes in your onion architecture.  The foundation on which you build an application needs to be bullet proof, otherwise you’re just building a house of cards, and when problems arise, or changes are required the termites start to come out of the woodwork.  This also has the benefit that you can test and optimize the performance of each piece so once it’s all put together it should be as lean as possible.  TDD forces developers to document the code they write in the form of tests.

by Larry Hengen at January 03, 2015 10:24 PM

The Wiert Corner - irregular stream of stuff

jpluimers

Thanks Nick Hodges for asking, and Uwe Raabe for answering:

Yep! Delphi 2 had TThread while Delphi 1 did not.

It resulted in an interesting thread including topics like cooperative multi-tasking and named pipes under DOS by using Turbo Pascal.

Boy, I remember the \pipe\ days and releasing a time slice by calling INT $28, $15 and $2F combinations like this:

Note: you can even use INT $2F with AX=$1680 to check if you are running in a DOS x86 VM and other OS checks.

–jeroen

via: Anyone remember which version of Delphi introduced TThread?.


Filed under: Borland Pascal, Delphi, Delphi 1, Delphi 2, Development, Pascal, Software Development, Turbo Pascal

by jpluimers at January 03, 2015 12:08 PM

January 01, 2015

The Wiert Corner - irregular stream of stuff

jpluimers

In Delphi XE7, Embarcadero introduced a new Parallel Computing Library.

Programmers – human as they are – see this as a silver bullet, thinking using such a library will take away all your performance issues without having to know about solving race conditions.

Boy are they wrong. The library helps you, and makes it easier. Easier in the sens of “less hard”.

So here is my friendly warning:

Parallel programming is hard. Live with it.

This apart from another important warning:

Delphi XE7 is the first version where this library is introduced. So expect bugs and more bugs.

This isn’t to say you should not use a library for parallel computing (the OmniThreadLibrary has been around for a reason), just that it is hard to get these right, even for library writers. They often get it right better and faster than rolling your own.

Remember Delphi 6 when TMultiReadExclusiveWriteSynchronizer was introduced and how long it took to flesh out the bugs there?

So here is my last warning:

Parallel computing is that hard. So do use a library, and do so with care. Favour established libraries over new ones.

Then learn to think in the way parallel code works: as much code that can run independently from each other without having to wait. Then learn about how to decouple things (so there is no state, and information can get passed around without the need to wait, i.e. in an asynchronous way).

Thanks to Uwe Raabe, Simon Stuart and Stefan Glienke for reminding me about the first and learning about the second:

This is copied from the New Features (the link is for the youngest Delphi, so when XE8 comes out, it will have different content):

Parallel Computing Library
  • The Parallel Computing library helps you exponentially increases performance making it easier to write multi-threaded applications that take advantage of multi-core CPUs
  • Boost the performance of your existing VCL and FireMonkey applications, with a self-tuning thread pool
  • Include the new System.Threading unit in your apps and you can do the following:
    • Parallel ‘for’ loops
    • Scheduling of tasks
    • Futures
    • Joining of multiple tasks and waiting for all to complete
    • Easy integration for a significant performance boost

–jeroen

via

PS: What a coincidence: Nick Hodges: Man, the chapter on Multi-threading is going to be seriously hard to write..


Filed under: Delphi, Delphi XE7, Development, Software Development

by jpluimers at January 01, 2015 05:00 AM

December 31, 2014

Firebird News

Rails activerecord-fb-adapter v0.9.1 released

This version fixes connection config and use Rails.root if defined to determine db path #46

by mariuz at December 31, 2014 08:43 AM

December 30, 2014

Castle Game Engine news

We proudly present a new official release of Castle Game Engine 5.1.1 http://castle-engine.sourceforge.net...

We proudly present a new official release of Castle Game Engine 5.1.1 http://castle-engine.sourceforge.net/engine.php . Castle Game Engine is a modern cross-platform open-source 3D/2D engine for FPC/Lazarus.

See http://castle-engine.sourceforge.net/news.php?id=2014-12-30 for links and full release announcement.

The main features of this release are:

* Extensive Spine (2D skeletal animations) support: https://sourceforge.net/p/castle-engine/wiki/Spine/
* Build tool, for easily compiling and packaging our programs on all platforms (including Android): https://sourceforge.net/p/castle-engine/wiki/Build%20tool/
* New shiny 3D Text implementation (fast and portable to Android).
* Many new X3D extensions, like NavigationInfo.blendingSort.
* A lot of improvements for 2D games and for Android. See also new tutorial page about developing mobile games: http://castle-engine.sourceforge.net/tutorial_mobile.php

Also be sure to install on your Android device a demo of Castle Game Engine + Spine :)

  https://play.google.com/store/apps/details?id=net.sourceforge.castleengine.castlespine

It's completely free of course, and the source code is one of the examples in Castle Game Engine sources. "Dragon Spine" is also available for Windows or Linux. You can also watch the video!.

Check out also some recent games using Castle Game Engine:

* Venice - new 2D adventure game with superb graphics and storyline, in the making! https://www.facebook.com/Venicethegame
* Mountains Of Fire - split-screen cooperative survival game http://castle-engine.sourceforge.net/mountains_of_fire.php
* Frogger 3D (initial version done during 1-hour gamejam by Michalis!:) https://github.com/michaliskambi/frogger3d

Have fun!

#FreePascal #ObjectPascal   #GameDevelopment 

December 30, 2014 09:41 PM

We proudly present a new official release of Castle Game Engine 5.1.1 and view3dscene 3.15.0! See http...

We proudly present a new official release of Castle Game Engine 5.1.1 and view3dscene 3.15.0!

See http://castle-engine.sourceforge.net/news.php?id=2014-12-30 for links and full release announcement.

The main features of this release are:
* Extensive Spine (2D skeletal animations) support: https://sourceforge.net/p/castle-engine/wiki/Spine/
* Build tool, for easily compiling and packaging our programs on all platforms (including Android): https://sourceforge.net/p/castle-engine/wiki/Build%20tool/
* A lot of improvements for 2D games and for Android. See also new tutorial page about developing mobile games: http://castle-engine.sourceforge.net/tutorial_mobile.php
* Many new X3D extensions, like NavigationInfo.blendingSort
* New shiny 3D Text implementation - fast and portable

Release 5.1.1 contains a couple of fixes and improvements done after 5.1.0. Thanks for people that reacted to our "5.1.0 beta announcement", your reports helped to polish the release!

December 30, 2014 08:25 PM

The Wiert Corner - irregular stream of stuff

jpluimers

There is a nice Delphi memory thread at G+ initiated by Tommi Prami for which I added some links to the memory managers:

  • FastMM (No signs of the Version 5)
  • ScaleMM – Interesting (two versions)
  • SynScaleMM – Fork of the previous
  • SapMM – Just found out about this, but tries to tackle multithreading issue.

More interesting comments (most people seem to favour FastMM, as they can get very good performance out of it even in multi-threaded environments) at There have not been much of the Talk of MemoryManagers lately….

Note there is also TBBMM based on TBB, but it seems unmaintained.

Barry Kelly’s memory manager is based on Boehm-Demers-Weiser GC.

–jeroen


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at December 30, 2014 11:00 AM

Firebird News

December 29, 2014

The Podcast at Delphi.org

Mobile Push Notifications without a BaaS

Delphi, C++Builder and RAD Studio XE7 include support for mobile push (remote) notifications via a Parse and Kinvey BaaS providers. This makes it really easy to send push notifications to your users on mobile devices. Both Parse and Kinvey offer free service levels (as well as paid), and you can also download App42 SDK for Appmethod and use the App42 BaaS instead.

BaaS or Backend As A Service Providers are companies that maintain the backend servers necessary for many application development tasks. They handle things like user authentication, data storage, push notifications, etc. Sometimes they are referred to as mBaaS or Mobile-BaaS because if the heavy focus on mobile application development these days, but they typically are not tied to mobile.

This doesn’t mean you have to use a BaaS provider to send mobile push notifications. This is just the easy way. During CodeRage we’ve had sessions on how to do push notifications without a BaaS provider. It is different for both iOS and Android, so you are looking at a lot more code and effort, but it is possible.

CodeRage 9 had a session by Jeff LeFebvre had a session on Android Push notifications via Google Cloud Messaging (GCM):

Here is a transcript of the Q&A as well as download links.

For iOS & iPhone use of Apple Push Notifications (APN) Luis Felipe and Anders Ohlsson have some blog posts and videos on the subject. Luis did the original post and video in Spanish, and then Anders translated and expanded on it.

Luis’ post on iOS notifications with XE4 (Spanish but you can use Google Translate). It includes some source code downloads too. The video is also in Spanish but it shows a lot of source code, so it is easy enough to follow along.

Ander’s blog post expanding on it (English), and his CodeRage video on the subject (English)

Keep in mind that this is about the same level of complexity to use most other tools for sending and receiving push notifications.

by Jim McKeeth at December 29, 2014 10:32 PM

December 26, 2014

Andy's Blog and Tools

Tools used to develop IDE Fix Pack

I use and have used the following tools when I work on my IDE Fix Pack plugin.

  • BDS 2006/2007, RAD Studio 2009-XE7 + Debugger
  • WinDbg
  • .NET CLR Debugger, ildasm, Reflector/ILSpy for ErrorInsight patches in 2006-2010
  • HxD (hex editor) to find byte sequence or parts of it from one Delphi version in the other Delphi versions
  • Gigabyte’s EasyTune to limit my CPU speed to 800 MHz to catch performance bottlenecks.
  • ProcessMonitor to find I/O and Registry performance bottlenecks
  • DelphiF12HotKeySupport for performance bottlenecks (not working under Win 8.x but I have my Win 7 VM)
  • DebuggerCallStackResolver (private tool) to use jdbg files and dbghelp.dll for better call stacks and a more descriptive CPU-View
  • “CPU-View to FindMethod” (private tool) to convert the CPU-View listing to an “array of SmallInt” (using “-1” as a wildcard) that is used by my FindMethod function to find the byte sequences in memory.

Where is IDA Pro? – I don’t use it.

by Andreas Hausladen at December 26, 2014 11:11 AM

IDE Fix Pack 5.71 for XE7 – bug fix release

During the search for all function parameter name mangling changes in XE7, I disabled many IDE Fix Pack patches and forgot to enable them before I released version 5.7 for XE7. So here is version 5.71 that enables all patches again.

By enabling all the patches, I found three patches that weren’t necessary anymore or only partly necessary. Embarcadero fixed the rlink32.dll maximum resources limitation (QC 111917) and the debugger local variable watch memory leak (QC 115248). Furthermore they partly fixed the “operator In” class completion bug (QC 102047). Only the “complete implementation” part that is explained in the QC entry is fixed, the “complete interface” part still uses “&In” instead of “In”, IDE Fix Pack 5.7 fixes the missing part for you.

Download:

Name IDE Version File Size Downloads Added
IDE Fix Pack 5.71 XE7 IDEFixPackXE7Reg571.7z 265.42 KB 2 times 2014-12-27
IDE Fix Pack 5.71 XE6 IDEFixPackXE6Reg571.7z 271.46 KB 0 times 2014-12-27
IDE Fix Pack 5.71 XE5 IDEFixPackXE5Reg571.7z 131.25 KB 1 times 2014-12-27
IDE Fix Pack 5.71 XE IDEFixPackXEReg571.7z 111.76 KB 4 times 2014-12-27
IDE Fix Pack 5.71 2009+UP3 IDEFixPack2009Reg571.7z 134.53 KB 3 times 2014-12-27

Download:

Name IDE Version File Size Downloads Added
fastdcc 5.71 XE7 fastdccXE7v571.7z 133.61 KB 0 times 2014-12-27
fastdcc 5.71 XE6 fastdccXE6v571.7z 139.8 KB 0 times 2014-12-27
fastdcc 5.71 XE fastdccXEv571.7z 81.58 KB 0 times 2014-12-27
fastdcc 5.71 2009+UP3 fastdcc2009v571.7z 75.72 KB 0 times 2014-12-27

by Andreas Hausladen at December 26, 2014 11:11 AM

IDE Fix Pack, DDevExtensions and DFMCheck for XE7

I’ve re-released the IDE Fix Pack 5.7, DDevExtensions 2.82 and DFMCheck 1.5 versions with support for XE7. The only change is that X7 is now supported (and one compiler patch was removed from IDE Fix Pack because it is fixed in XE7). Other than that it was just adjusting the build script, adjusting to the new ABI (name mangling of interface function parameters has changed) and building the projects.

IDE Fix Pack download:

Name IDE Version File Size Downloads Added
IDE Fix Pack 5.71 XE7 IDEFixPackXE7Reg571.7z 265.42 KB 2 times 2014-12-27
IDE Fix Pack 5.71 XE6 IDEFixPackXE6Reg571.7z 271.46 KB 0 times 2014-12-27
IDE Fix Pack 5.71 XE5 IDEFixPackXE5Reg571.7z 131.25 KB 1 times 2014-12-27
IDE Fix Pack 5.71 XE IDEFixPackXEReg571.7z 111.76 KB 4 times 2014-12-27
IDE Fix Pack 5.71 2009+UP3 IDEFixPack2009Reg571.7z 134.53 KB 3 times 2014-12-27

fastdcc download:

Name IDE Version File Size Downloads Added
fastdcc 5.71 XE7 fastdccXE7v571.7z 133.61 KB 0 times 2014-12-27
fastdcc 5.71 XE6 fastdccXE6v571.7z 139.8 KB 0 times 2014-12-27
fastdcc 5.71 XE fastdccXEv571.7z 81.58 KB 0 times 2014-12-27
fastdcc 5.71 2009+UP3 fastdcc2009v571.7z 75.72 KB 0 times 2014-12-27

DDevExtensions download:

Name IDE Version File Size Downloads Added
DDevExtensions 1.61 5-2007 DDevExtensions161Setup.zip 734.07 KB 15122 times 2009-01-10
DDevExtensions 2.8 Features PDF DDevExtensionsFeatures.pdf 602.92 KB 3710 times 2014-12-27
DDevExtensions 2.4 7, 2007 DDevExtensions24Setup7_2007.zip 535.41 KB 6462 times 2011-07-25
DDevExtensions 2.6 (legacy) XE2+UP3 DDevExtensionsSetup26.zip 800.68 KB 251 times 2013-11-28
DDevExtensions 2.82 2009-XE7 DDevExtensions282.7z 950.79 KB 0 times 2014-12-27

DFCheck download:

Name IDE Version File Size Downloads Added
DFMCheck 1.5 5-XE6 DfmCheckSetup15.7z 737.53 KB 321 times 2014-04-17

by Andreas Hausladen at December 26, 2014 11:11 AM

DDevExtensions 2.82 and IDE Fix Pack 5.7 released

DDevExtensions 2.82 is a rather small update. It fixes the “Switch to the module’s project” incompatibility with XE6 and adds the option to disable the alpha-sort for the IDE’s class completion (Ctrl+Shift+C).

DisableAlphaSortClassCompletion

If alpha-sort class completion is disabled and you press Ctrl+Shift+C all methods from the class declaration are appended to the already existing implementation methods in the order that they appear in the class declaration with the exception for constructors and destructors. They are positioned before every other method (class ctor, class dtor, ctor, dtor, methods). This function does not resort your existing implementation methods, nor does it prevent the IDE from sorting the methods that are added to the class declaration because they only have an implementation.

IDE Fix Pack 5.7 increases the max. number of resources per binary from 3626 to 65534 (for the command line compiler you need fastdcc). The installer IDEFixPackReg*.exe now supports the “/EXTRACT” command line switch that extracts the installation files to the sub-folder “Files” instead of installing them. This version also adds some smaller optimization, especially for Delphi 2009 and extends the LineEditorEnd.ttr workaround by not creating the file in the first place.


DDevExtensions download:

Name IDE Version File Size Downloads Added
DDevExtensions 1.61 5-2007 DDevExtensions161Setup.zip 734.07 KB 15122 times 2009-01-10
DDevExtensions 2.8 Features PDF DDevExtensionsFeatures.pdf 602.92 KB 3710 times 2014-12-27
DDevExtensions 2.4 7, 2007 DDevExtensions24Setup7_2007.zip 535.41 KB 6462 times 2011-07-25
DDevExtensions 2.6 (legacy) XE2+UP3 DDevExtensionsSetup26.zip 800.68 KB 251 times 2013-11-28
DDevExtensions 2.82 2009-XE7 DDevExtensions282.7z 950.79 KB 0 times 2014-12-27

DDevExtensions Version 2.82 (2014-08-25)

  • Added: Disable Alpha-Sort Class Completion (Default off)
  • Fixed: XE6 broke “Switch to module project” dialog

IDE Fix Pack download:

Name IDE Version File Size Downloads Added
IDE Fix Pack 5.71 XE7 IDEFixPackXE7Reg571.7z 265.42 KB 2 times 2014-12-27
IDE Fix Pack 5.71 XE6 IDEFixPackXE6Reg571.7z 271.46 KB 0 times 2014-12-27
IDE Fix Pack 5.71 XE5 IDEFixPackXE5Reg571.7z 131.25 KB 1 times 2014-12-27
IDE Fix Pack 5.71 XE IDEFixPackXEReg571.7z 111.76 KB 4 times 2014-12-27
IDE Fix Pack 5.71 2009+UP3 IDEFixPack2009Reg571.7z 134.53 KB 3 times 2014-12-27

fastdcc download:

Name IDE Version File Size Downloads Added
fastdcc 5.71 XE7 fastdccXE7v571.7z 133.61 KB 0 times 2014-12-27
fastdcc 5.71 XE6 fastdccXE6v571.7z 139.8 KB 0 times 2014-12-27
fastdcc 5.71 XE fastdccXEv571.7z 81.58 KB 0 times 2014-12-27
fastdcc 5.71 2009+UP3 fastdcc2009v571.7z 75.72 KB 0 times 2014-12-27

IDE Fix Pack changlog

  • Added: Fix for “class operator In” class completion
  • Added: IDEFixPackReg*.exe supports command line parameter /EXTRACT that extracts the files instead of installing them
  • Added: Disable creation of EditorLineEnd.ttr (2009-2010)
  • Added: Fix for QC 111917: RLINK32: Too many resources to handle. Instead of 3626 it can now handle 65534 resource items (also in fastdcc for command line compiler)
  • Added: TObject.FieldAddress optimization for DFM loading
  • Added: String function replacements without STRINGCHECKS (2009-2010)
  • Changed: Disabled “.NET Windows\Globalization search I/O optimization” patch for Windows 8 (2009)
  • Added: TComponent.Remove optimization (2009)

by Andreas Hausladen at December 26, 2014 11:10 AM

EditorLineEnds.ttr – IDEFixPack users are not affected

With the latest Windows updates (KB2982791, KB2970228) Delphi 8-2010 can’t be started twice without a reboot because the IDE wants to create the file %TEMP%\EditorLineEnds.ttr that is now locked by the system.

The IDE extracts a FONT-resource to %TEMP%\EditorLineEnds.ttr and then loads it with AddFontResource(). The IDE’s finalization code unloads the font. But with the newest Windows Updates, Microsoft prevents the RemoveFontResource() function from unlocking the file (for security reasons). If you start a second IDE the resource-extraction fails and throws an exception causing the IDE to terminate.

If you have IDEFixPack newer than 2.7 already installed, you are not affected because IDEFixPack prevents the IDE from calling AddFontResource (this was a patch to work around a performance nightmare with an installed Adobe Type Manager). Thus the file is never locked.

If you are a new user to IDEFixPack, you may need to reboot after installing IDEFixPack if the font file is already locked.

IDEFixPack for 2009 or newer

IDEFixPack for 2006/2007 (if you have Windows 8 you need to use version 4.3 instead of 4.4)

by Andreas Hausladen at December 26, 2014 11:10 AM

Cause for rlink32 Too many resources to handle

If you have many DFM files and RES files in your project you may run into the rlink32 error “Too many resources to handle”. Every DFM file is one resource and a RES file can contain multiple resources. All together must not exceed 3626 resources.

This limit comes from how rlink32 pre-allocates memory for all resources.  The following pseudo code shows the memory allocator.

function AllocateResourceArray(var AllocatedSize: Word): PResourceArray;
var
Size: Integer;
begin
Size := $FF00;
repeat
Result := GetMemory(Size);
if Result <> nil then
begin
AllocatedSize := Size;
Exit;
end;
Dec(Size, $400);
until Size < $400;
AllocatedSize := 0;
end;

As you can see the max. number of bytes for the whole resource array is limited by $FF00 (65280) bytes. A resource array item’s size is 18 Bytes. That makes 3626 items. If the memory allocator can’t allocate enough memory it tries to allocate again with 1024 bytes less. So the max. number of resources can be lower than 3626. But wait, we have 2014 and not 1992 (rlink32.dll’s copyright message) and RAM is like sand on the beach, at least some developer think that. The 64KB age is long gone, but due to this function rlink32 will fail with “Too many resources to handle” if the 3627’s resource is processed.

There is an easy fix without much code change:
Change the var-parameter from “Word” to “LongWord” and set the initial size to $11FFDC (1,179,612 bytes) which makes room for 65534 resource items which should be enough at the moment. Adjust the code that calls into this function (there is only one call). Recompile rlink32.dll.

Unfortunately I can’t recompile rlink32.dll due to the lack of source code, so I need to patch the machine code. And changing the data type from “Word” to “LongWord” isn’t that easy as you have to patch a lot more places that the compiler would just generate for you (fortunately the 32-bit opcodes are usually smaller than the 16-bit opcodes).

This bug fix for the rlink32 error will be in the next version 5.7 of IDE Fix Pack (for the IDE compiler) and fastdcc (for the command line compiler).

by Andreas Hausladen at December 26, 2014 11:09 AM

Castle Game Engine news

(BETA) After half a year of work, next Castle Game Engine version 5.1.0 is ready :) It is available ...

(BETA) After half a year of work, next Castle Game Engine version 5.1.0 is ready :) It is available on https://sourceforge.net/projects/castle-engine/files/castle_game_engine/ . This is a beta release, an official release will happen this weekend, along with accompanying view3dscene and demo_models.

So if you want to try latest Castle Game Engine feature, grab it! http://castle-engine.sourceforge.net/engine.php contains the latest engine information. Short summary of what's new (more details in the official release announcement soon, but you can also scan the FB/G+ news page to know what happened) :

- Spine support! https://sourceforge.net/p/castle-engine/wiki/Spine/
- Build tool, with great support for Android packaging! https://sourceforge.net/p/castle-engine/wiki/Build%20tool/
- New shiny 3D text implementation.
- Many improvements for Android, 2D games and international text (in UTF-8).

FPC ( http://freepascal.org/ ) version >= 2.6.2 is required to use. We advice using latest FPC 2.6.4, but older 2.6.2 also works.

Also, if you want to test latest view3dscene ( http://castle-engine.sourceforge.net/view3dscene.php ), you can grab the latest binary from http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/ .

December 26, 2014 04:52 AM

December 23, 2014

The Wiert Corner - irregular stream of stuff

jpluimers

If you are into serious software development, then this is a 75 minute PodCast you must listen to: Episode 215: Gang of Four – 20 Years Later : Software Engineering Radio.

Abstract

Johannes Thönes talks with Erich Gamma, Ralph Johnson and Richard Helm from the Gang of Four about the 20th anniversary of their book Design Patterns. They discuss the following topics: the definition of a design pattern and each guest’s favorite design pattern; the origins of the book in architecture workshops; the writing of the book together with the community; the rock-star feeling at the release of the book at OOPSLA conference; the influence of the book on the industry; the evolution of the Observer pattern; and new patterns since the book was released. The interview closes with each guest talking about their current projects.

What I liked

Of course I enjoyed the history of the Gang of Four (and am still sad that John Vlissides passed away).

I even more liked the historic perspective of how the Design Patterns book got established, like having viral marketing in 1994, a community based on an ftp server (there was no WWW back then) and a mailing list, the importance of software conferences, being at the right place at the right time doing the right thing, etc.

The relation to other patterns (wood working, large corporations) was also very enlightening.

Johannes Thönes is an excellent interviewer (great pace, great questions, nice voice, very good way of handling the conversation), and I’m going to make sure I listen to more of his podcasts.

He got the gang to talk about how the Design Patterns book relates to current software development: Dependency Injection, Functional Programming (which should have a pattern book of its own), patterns being part languages (abstract classes to name a simple case), modern, scripted and established languages (not limited to C++, Java, C#, TypeScript and JavaScript).

That’s maybe even the most important part of the podcast: most the book is still very much current, but you need to be aware how the software development world around the book has evolved and place the patterns in that perspective.

–jeroen

via Episode 215: Gang of Four – 20 Years Later : Software Engineering Radio.


Filed under: .NET, C#, Delphi, Development, Java, Java Platform, JavaScript/ECMAScript, Scripting, Software Development

by jpluimers at December 23, 2014 11:00 AM

The Podcast at Delphi.org

Last Minute Christmas Shopping Ideas

If you still have a few people on your Christmas gift list that you just don’t know what to do for, check out the RAD Offer page. You’ll save some serious money, and they will get the best development tool for building highly connected multi-device native apps.

Get Free Bonuses with the purchase of RAD Studio XE7,
Delphi XE7 and C++Builder XE7 until December 31, 2014

Rapid SQL XE6
Rapid SQL® is the intelligent SQL IDE empowering database developers and DBAs the ability to create high-performing SQL code on all major databases from a single interface. Purchase RAD Studio, Delphi and C++Builder XE7 Enterprise or above and receive a license of Rapid SQL XE6. Redeem your license.

New Object Pascal Handbook by Marco Cantu
This brand new 300-page ebook is a complete guide to the current, modern Object Pascal programming language by best-selling Delphi books author and Delphi Senior Product Manager Marco Cantu. This new language manual for new & existing Object Pascal developers covers core language features, object-oriented programming with Object Pascal, and the latest language features like generics, anonymous methods, and reflection in todays’ Delphi compilers.

Mida Converter Basic
Mida Basic for RAD Studio XE7 is a special edition of the popular VCL to FireMonkey converter. Helps converting your VCL forms to multi-device, including data bindings and other advanced features with support for over 200 components.

Castalia for Delphi
Castalia is a premier code productivity plug-in for Delphi. With code refactoring, structural highlighting, parenthesis matching, flow control, highlighting, and live syntax checking, Castalia makes you more productive than ever. Use project statistics and code analysis to better understand your team productivity and code quality.

VCL and FireMonkey
Premium Styles

Customize the look of your VCL Windows applications with five premium styles including Coral, Diamond, Emerald, Sterling or Jet style. Customize your multi-device applications with seven premium FireMonkey styles including Jet, Sterling, Diamond, Emerald Crystal, Emerald Dark, Coral Crystal and Coral Dark styles.

FastCube VCL 2
FASTCUBE VCL is a set of OLAP Desktop components and a tool for effective data analysis. FastCube enables you to analyze data and to build summary tables (data slices) as well as create a variety of reports and graphs both easily and instantly. It’s a handy tool for the efficient analysis of data arrays.

Availability: Rapid SQL XE6 is available on Enterprise and above ESD purchases from Oct 20-December 31, 2014 (network licenses do not qualify). Other bonus pack items are available on purchases from Oct 1-December 31, 2014.See qualifying SKUs.

How to get it: After purchasing, click here to get your free bonus items. (Redeem free items within 14 days of offer expiration date). Not available with purchase of Starter edition.

Restrictions Apply. Not all products qualify for this offer.

Upgrade from any previous version and save up to 45%

Get the upgrade price on Delphi XE7, C++Builder XE7 or RAD Studio XE7 through December 31, 2014 regardless of what previous version you have. Save up to 45% off the regular new user price for the product license and stay up-to-date with automatic enrollment in the Recharge program.

Availablility: All eligible XE7 purchases from Oct 20-December 31, 2014. See qualifying SKUs.

Download and activate your trial and get
Coding in Delphi by Nick Hodges for free.

By activating your trial, you will receive a free copy of Coding in Delphi. This ebook covers a variety of powerful Delphi programming features and techniques including Generics, Interfaces, Exception Handling, Anonymous Methods and more!

How to get it: After activating your trial, click here to download the ebook.

by Jim McKeeth at December 23, 2014 01:21 AM

December 22, 2014

Castle Game Engine news

Two large news from engine development: 1. Android games created using our engine now run happily in...

Two large news from engine development:

1. Android games created using our engine now run happily in Android emulator :) You no longer have to spend your money to see your game on that beautiful 10-inch tablet :) https://sourceforge.net/p/castle-engine/wiki/Android%20development/#is-it-possible-to-test-our-games-using-android-emulator-from-sdk is updated.

2. Text node (text inside a 3D or 2D scene) rendering has been completely rewritten in the engine.

(Warning: a lot of technical details about Text rendering follow. Read only if you're curious :)

The old code rendered complex meshes for each letter, using custom OpenGL code. It is now replaced with sleek code that uses font texture, with a single quad for each letter, by generating a QuadSet for each Text node.

The new implementation has many advantages:

- It's much more efficient. Long text will not kill your framerate anymore.

- It uses the font information from TTextureFont, the same font class used for 2D fonts in TCastleFont. This means that we have simpler code in the engine. No need to deal with separate concept of "outline fonts".

- Rendering works on OpenGLES (Android, iOS) too.

- Rendering works with all modern features: shaders and multitexturing and shadow maps etc. It just goes through our standard renderer pipeline. No more ancient tricks with display lists and GLU tesselator.

- The implementation merely converts Text node to QuadSet underneath (or IndexedFaceSet, for VRML 1.0 or OpenGLES). This makes it much simpler to extend Text/FontStyle implementation.

- Ugly Windows-only outlinefont2pascal program disappears. New fonts information are inside TTextureFontData, which is extracted using TTextureFont and texturefont2pascal cross-platform utilities (based on FreeType).

- Adding extra textures on Text node now works better, you can use Text.texCoord to specify a TextureCoordinateGenerator for them, and text can even be a normal shadow map receiver. See http://castle-engine.sourceforge.net/x3d_implementation_texturing_extensions.php#section_ext_tex_coord

And some disadvantages:

- Font may look bad from very close distance. (Although we will fight with that using http://code.google.com/p/libgdx/wiki/DistanceFieldFonts in the future.)

- Text3D extension node does not make sense anymore (we depend on texture alpha channel to make mesh invisible, so it's not easily possible to render Text3D sides), and right now it just uses flat Text rendering. See http://castle-engine.sourceforge.net/x3d_implementation_text_extensions.php#section_ext_text3d

- Since the font is now rendered using a texture, a usual tradeoff between alpha blending and alpha test occurs: http://castle-engine.sourceforge.net/x3d_implementation_text_extensions.php#section_ext_fontstyle_blending

- VRML 1.0 text with explicit textures is no longer supported. Since the text is now rendered through proxy (converting Text node to QuadSet (VRML 2.0, X3D) / IndexedFaceSet (VRML 1.0) node), and VRML 1.0 doesn't support MultiTextureCoordinate, it is not possible to support in VRML 1.0 an AsciiText node with extra texture (as it would require MultiTextureCoordinate with 2 texture slots --- for font texture and for custom texture).

December 22, 2014 10:30 PM

twm’s blog

Note to self: Do not use double quotes around field names

Note to self:

If MS Access adds double quotes to field names in queries, do not use them!
It won’t complain about them (You’d wish it would), but it just won’t work.

So if you see something like:

SELECT *
FROM t_Mst_Tageserfassung
WHERE ("TeMitarbeiter"=92)  AND ("TeArbeitstag"=#12/24/2014#);

Remove the quotes and it will start to work as expected.

If you need to ensure that the fields are treated as field names, put them into parentheses like this:

SELECT *
FROM t_Mst_Tageserfassung
WHERE ((TeMitarbeiter)=92)  AND ((TeArbeitstag)=#12/24/2014#);

This also works with TAdoQuery in Delphi.

by dummzeuch at December 22, 2014 04:08 PM

Firebird News

Survey to be closed soon

Our survey about what languages you use with Firebird will be closed in a few days. If you have not voted yet, do it now! Knowing what Firebird users are currently using may help in directing future project decisions, etc. The survey is in the right sidebar in the main page of the site.

by Cantu at December 22, 2014 01:41 PM

December 20, 2014

The Wiert Corner - irregular stream of stuff

jpluimers

Earlie this month, I wrote a review about Delphi Cookbook.

Well: as of last thursday, you can get that for USD 5 (or EUR 4.80, so better get yourself a USA account: just ensure your address is in the USA).

Heck: until januari 6th, you can get any eBook or Video on Packt for USD 5.

Note there is even an x-Mas countdown on the way (with each day a free book that is readable/downloadable for 24 hours).

There’s over 2500+ books to choose from, so I’m grabbing this chance to learn a few things on OpenCV, Scala, and PowerShell.

–jeroen

via: Book review: Delphi Cookbook by Daniele Teti, Packt publishing.


Filed under: .NET, CommandLine, Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Java Platform, PowerShell, Scala, Scripting, Software Development Tagged: Delphi Cookbook, Packt

by jpluimers at December 20, 2014 09:08 PM

Pascal Warrior's journey

Data access benchmark: direct query, dOPF object query, dOPF entity query

It's been a long time since my last post (over a year!). In this post I'd like to share some benchmark result of data access using Free Pascal. The setup is as below:

  • Machine: HP Pavilion 14-n038tx
    • OS: Manjaro Linux x86-64 0.8.11 + first update + flash plugin critical security update, kernel 3.17.4-1-MANJARO
    • CPU: Intel Core i5-4200u 1.6 GHz (Turbo Boost up to 2.6 GHz)
    • RAM: 4 GB (stock) + 4 GiB (additional) = 7.6 GiB
    • HDD: Hitachi HTS54757 Rev A50A 750 GB ~= 698 GiB
  • Development Environment:
  • Benchmark Environment
    • MariaDB 10.0.15, default settings
    • Table 1: 2600 rows
    • Table 2: 2654 rows
    • Select query that joins table 1 and table 2 on an integer key
Actual table information is hidden, because they're real table used in my company's product, which is of course a proprietary product. A little info: table 2 has a foreign key to table 1, because it's meant as multilingual information for table 1 rows.

Benchmark flow is simple:
  1. Connect to db
  2. Query
  3. Loop over the result while creating JSON array of object
  4. Write it out (for output correctness comparison)
The result is, well, interesting as well as confusing. Why? Here's the result when I limit my select query result (in the SQL statement) to 2651 rows:


Looks normal, isn't it? A framework will have overhead so direct query will always be faster. But wait, what if I change the limit to 2652 or even without one:


Dafuq? How come dOPF ones get faster? At this stage, I thought the resulting txt files of dOPF might be broken, so I diff them with direct query one. Nope, they're all the same. I have no explanation at the moment because I haven't got the time to dig in what dOPF (or probably SQLdb as its connector) do to make this weird result.

dOPF surely has a big advantage over direct query because it's easy to change backend dbms simply by changing the value of TdSQLdbConnector.Driver. If the result is also faster than direct query, then there's no any other reason to use direct query for portable, cross dbms programming solution.

dOPF as a framework is very modular, it supports:
  • manual SQL
  • entities (result row is automatically converted as Pascal object, with automatic memory management)
  • SQL builder (automatic SQL generation from given conditions)
  • OPF itself (no SQL required in your code, you can save, load and access objects just like any other Pascal objects)
You're not forced to use one, feel free to mix any of them as you like.

If you want to try yourself, the whole package (source files + benchmark script) is available here. You should be able to run this on any supported platforms, provided you have bash (>3.0) & bc installed (because the benchmark script depends on it). Don't forget to edit dbconst.inc to fill it with your database name and query.

Feel free to add more persistence frameworks (tiOPF for instance) or libraries (ZEOS for instance) to make more data available.

by noreply@blogger.com (leledumbo) at December 20, 2014 05:41 PM

Firebird News

firebird2.5: CVE-2014-9323: Segfault in server caused by malformed network packet

A CVE-ID is assigned to this vulnerability CVE-2014-9323 The following distros already patched the bug : Suse , Debian , Fedora , RedHat , CentOS  

by mariuz at December 20, 2014 01:40 PM

December 18, 2014

The Wiert Corner - irregular stream of stuff

jpluimers

Interesting comment by Marco Cantu:

R&D at Embarcadero is working on a 64bit iOS compiler, oh well actually 2 of them, also C++. We’ll support 64bit and “universal binaries” (bundling both 32 and 64 bit binaries) requested by Apple.The Feb 1st requirement is only for new apps, not for updating existing ones, but still we are trying to make a solution available by that time.The roadmap describes the entire year, more than the individual release. This time around we are trying to have it public by January, covering what we expect to deliver in 2015.

–jeroen

via: Just got another reminder from Apple about 64 bit IOS requirements from Feb….


Filed under: Delphi, Development, iOS, Mobile Development, Software Development

by jpluimers at December 18, 2014 07:30 PM

Firebird News

Time to remember the Firebird band Xmas special!

For those who didn’t follow FirebirdNews in the past years, check out the Firebird Band performing a classic Christmas song I hope the guys will enjoy it! Personalize funny videos and birthday eCards at JibJab! Band is: Drums: Alex “Bonham” Peshkov Guitar: Vlad “Vai” Khorsun Guitar: Claudio “Friedman” Valderrama Bass: Adriano “Harris” Fernandes Vocal: Dmitry “Plant” Yemanov

by Cantu at December 18, 2014 06:57 PM

Te Waka o Pascal

On The Shoulders of Giants…

When discussing mobile device application development using Oxygene or other RemObjects Elements technologies, the question of user interface designers doesn’t usually take long to come up (particularly with Delphi developers). Up to now the answer has always been Xcode Interface Builder for iOS/OS X, Visual Studio WinForms/WPF Designers for .Net and… um… your favourite text […]

by Jolyon Direnko-Smith at December 18, 2014 07:57 AM

December 17, 2014

Firebird News

Firebird Advent Calendar 2014

Very nice idea Firebird Advent Calendar 2014 (Japanese) http://qiita.com/advent-calendar/2014/firebird

by mariuz at December 17, 2014 12:05 PM

Vote for Firebird as Database of the Year 2014 at LinuxQuestions

Vote for Firebird as Database of the Year 2014 at LinuxQuestions (must be registered user with at least one Linux related post) http://www.linuxquestions.org/questions/2014-linuxquestions-org-members-choice-awards-113/database-of-the-year-4175528382/ Spread the word on all forums and Firebird communities

by mariuz at December 17, 2014 11:59 AM

Advanced Data Generator 3.3.0 released

Upscene Productions announces the release of: “Advanced Data Generator 3.3.0″ A fast test-data generator tool that comes with a library of real-life data, can generate data to your database, SQL script or CSV files, many filling options, presets and much more. If you develop database applications, you need data for testing purposes! Version 3 included […]

by Martijn Tonies at December 17, 2014 11:02 AM

The Wiert Corner - irregular stream of stuff

jpluimers

A small follow up on MVVM, MVP, MVC, OOD, etc: it is all about structure and using common sense:

When you want to do MVVM with Delphi, there is a great Delphi MVVM demo that Malcolm Groves gave at CodeRage 7 that is on YouTube.

A few resources you should look at after viewing that demo:

Some of it might work with Delphi XE2, but I think you need XE3 or younger for most of the demos.

–jeroen


Filed under: Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at December 17, 2014 05:00 AM

December 15, 2014

The Wiert Corner - irregular stream of stuff

Firebird News

Database Workbench 5.0.6 released

Upscene Productions is proud to announce the availability of the next release of the popular multi-DBMS development tool: ” Database Workbench 5.0.6 “ This release fixes a few MySQL related bugs and introduces new functionality for Firebird 3. “There is so much new in Database Workbench 5, I don’t know where to start”, says Martijn […]

by Martijn Tonies at December 15, 2014 11:47 AM

December 14, 2014

Castle Game Engine news

We present a demo of Castle Game Engine and Spine integration :) Fly the dragon around an eerie scene...

We present a demo of Castle Game Engine and Spine integration :) Fly the dragon around an eerie scene, with animated stuff all around.

* For Android on https://play.google.com/store/apps/details?id=net.sourceforge.castleengine.castlespine ,
* for Windows or Linux on https://sourceforge.net/projects/castle-engine/files/castle_spine/ .
* The source code and data in engine SVN repository, see http://castle-engine.sourceforge.net/engine.php for links to SVN, this demo is inside castle_game_engine/examples/2d_spine_game/ directory.

Have fun! See also the movie on https://www.youtube.com/watch?v=AuI4zgmT-YQ

December 14, 2014 05:16 PM

Recent engine improvements: - Android: Installing and moving applications from/to SD card fixed. -...

Recent engine improvements:

- Android: Installing and moving applications from/to SD card fixed.

- Build tool: Various fixes, also for Android packaging. All Castle Game Engine Android games and examples now use castle-engine build tool for Android packaging.

- Android: Added screen_orientation="any" or "landscape" or
"portrait" to CastleEngineManifest.xml. See https://sourceforge.net/p/castle-engine/wiki/Build%20tool/

- X3D: documentation of new X3D extensions (used by our Spine loader, but may also be useful for other purposes too):

1. NavigationInfo.blendingSort http://castle-engine.sourceforge.net/x3d_implementation_navigation_extensions.php#section_ext_blending_sort

2. CubicBezierXxx interpolators http://castle-engine.sourceforge.net/x3d_implementation_interpolation_extensions.php#section_cubic_bezier_interpolator

3. TextureProperties.guiTexture http://castle-engine.sourceforge.net/x3d_implementation_texturing_extensions.php#section_texture_properties_gui_texture

4. X3DSequencerNode.forceContinousValue_Changed http://castle-engine.sourceforge.net/x3d_implementation_eventutilities_extensions.php#section_forceContinousValue_Changed

December 14, 2014 05:14 PM

December 11, 2014

Firebird News

FireBird Performance Tweaking

Mr. Hartmann wrote on his blog Last week, I posted a story about my interaction with a software developer who uses FireBird (FB) as a back-end for their software. The short version is that they left FB’s settings at default and were using a really, REALLY old version of FB. This caused the application to […]

by mariuz at December 11, 2014 02:06 PM

Software performance investigation vs throwing more hardware

News via Patrick Pierson‘s blog I found this link on reddit under /r/sysadmin. Josh Hartmann has a customer that had slowness issues with a database server. Josh contacted the developer and every time the developer’s response was to add more hardware to the problem. After some investigation he found a few issues with the developer’s setup of […]

by mariuz at December 11, 2014 01:33 PM

December 10, 2014

Firebird News

Testing the Firebird 3 protocol enhancements

In the 9th Firebird Developers Day, we collected donations to sponsor the enhancements of the Firebird wire protocol, to optimize the speed of communication in high latency networks (aka. internet). Dmitry Yemanov implemented the optimizations that were finally available for public testing with the release of the Firebird 3 Beta 1, a few days ago. […]

by Cantu at December 10, 2014 07:59 PM

Firebird Security Updates for v2.1 and v2.5 series

The Firebird project has released Security Updates for the currently maintained 2.1.x and 2.5.x versions (v2.1.7 and v2.5.3 SU1). These updates fix a recently discovered security vulnerability (CORE-4630) that may be used for a remote DoS attack that could be performed by unauthorised users. We recommend Firebird users to upgrade as soon as is practical. http://www.firebirdsql.org/en/news/security-updates-for-v2-1-and-v2-5-series-66011/

by mariuz at December 10, 2014 11:35 AM

The Wiert Corner - irregular stream of stuff

December 09, 2014

The Wiert Corner - irregular stream of stuff

jpluimers

In Delphi 6 and 7, .ddp files were used to store the Delphi Diagram Portfolios.
Often these files were created empty like `Empty.ddp`, so it pays to clean up those.

The below batch file (part of the free BeSharp.net code repository) will help with that. Make sure you download this Empty.ddp file and put it in the same directory as the batch file.

Call the batch file with the path to the directory tree you want to delete the Empty .ddp files from.

–jeroen


Filed under: Delphi, Delphi 6, Delphi 7, Development, Software Development

by jpluimers at December 09, 2014 05:00 AM

December 08, 2014

Firebird News

Firebird 3.0 package progress in #Debian

Here you can check Firebird 3.0 Debian package progress http://anonscm.debian.org/cgit/pkg-firebird/3.0.git/log/ Damyan added quite a few changes compared with version from 3 years ago

by mariuz at December 08, 2014 01:32 PM

December 06, 2014

הבייט הלבן

SMD: מוניטור סריאלי משופר

כמעט כל מי שעובד עם ארדואינו עובד גם עם ה"סריאל מוניטור" המובנה של סביבת הפיתוח, ועובד איתו הרבה. המוניטור הזה מאד בסיסי, מה שהופך אותו לקל מאד לשימוש – אבל גם מגביל את המשתמשים בהרבה אופנים. נכון שהגיע הזמן למצוא תחליף נורמלי? תוכנות "מקצועיות" לתקשורת סריאלית, כמו PuTTY או RealTerm, מציעות הרבה יותר אפשרויות אך … להמשיך לקרוא SMD: מוניטור סריאלי משופר

by עידו גנדל at December 06, 2014 09:25 PM

Castle Game Engine news

Getting closer to next engine release:) Latest news: 1. High-quality image scaling: TCastleImage.MakeResized...

Getting closer to next engine release:) Latest news:

1. High-quality image scaling: TCastleImage.MakeResized method offers new high-quality image interpolation modes, like Mitchell, Blackman, Lanczos, Gaussian and more. See http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/docs/reference/html/CastleImages.TCastleImage.html#MakeResized and http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/docs/reference/html/CastleImages.html#TResizeNiceInterpolation . The implementation uses excellent fcl-image underneath:)

2. The icons for Android apk are now generated using Lanczos scaling, providing much better quality than simple bilinear used previously.

3. Small build tool for Android (see https://sourceforge.net/p/castle-engine/wiki/Build%20tool/) fixes.

December 06, 2014 07:07 PM

December 04, 2014

Firebird News

Rails activerecord-fb-adapter v0.9 includes a major tests overhaul

News via Brent Rowland: Rails activerecord-fb-adapter v0.9 includes a major overhaul courtesy of Ray Zane. 20x more tests now pass. Update : now is pushed to rubygems

by mariuz at December 04, 2014 05:05 AM

The Wiert Corner - irregular stream of stuff

jpluimers

I’ve done partitioned programming (using various layers for different kinds of functionality) for ages.

The first time I can remember of official terms for it, I already used patterns like that for a couple of years.

Back then the parts were from Object-Oriented Design: Peter Coad, Edward Yourdon, back in a time when each part – back then not called common layer – was called “component”:

  • PDC – Promblem Domain Component
  • HIC – Human Interaction Component
  • TMC – Task Management Component
  • DMC – Data Management Component

Back in the 90s, lots of people knew those by heart, nowadays, few people do. That’s how history goes (:

For the people with a long history of Pascal or Delphi among us: Peter Coad even worked at Borland for a short period right before moving his work out of the software development field.

I never was deeply into SmallTalk, otherwise back then I would have known an abbreviation that started much easier and lasted much longer MVC (Model–View–Controller).

The two big things I learned while developing software (for over 25 years now), is that you need to structure your stuff, they way those structures or common layers are called will change over time.

Over the course of time lots of those abbreviations have come, some of gone, others lasted. But the need for structure continued.

The funny thing is that in my world, quite a few work comes in through recruiters. I sift the good and bad ones on how they select me for jobs: are they abbreviation frenzy or do they actually read my curriculum vitae in depth?

For the former, here is a list of software architecture patterns I have used or am still using (:

Note though it is not about those abbreviations, but on the awareness that you should structure your code, use common sense and have a common vocabulary within your group of developers.

It reminds me of project methodologies. I know Scrum, but never liked playing rugby. Given that most methodologies are based on best practices within an organisation, I always tell people I’m a fan of JBF2. It is a Dutch inside Prince2 joke as variation on JBF. So it actually is not a methodology at all, but the urge to following your intuition and use common sense. Which you should always do, even if you follow a formal methodology.

–jeroen

PS: some great Delphi MVVM info.


Filed under: Delphi, Development, Pascal, Software Development, Turbo Pascal

by jpluimers at December 04, 2014 05:00 AM

December 02, 2014

Castle Game Engine news

Easy development of Android 3D and 2D games for everyone using our Castle Game Engine :) Latest improvements...

Easy development of Android 3D and 2D games for everyone using our Castle Game Engine :) Latest improvements of our https://sourceforge.net/p/castle-engine/wiki/Build%20tool/ for Android:

* "install" target, to easily install and run your game on a connected Android device.
* good apk for Android out of the box (with good project name, good qualified name, full debug options (in debug build) and more).
* reading AndroidAntProperties.txt for key store information, to sign release apk.

December 02, 2014 01:53 AM