Cool stuff: DelphiSpec library, inspired by Cucumber. It runs on top of DUnit.
via DelphiSpec Library Announce « Роман.Янковский.me.
A similar one in the .NET realm: SpecFlow – Pragmatic BDD for .NET.
–jeroen
Posted by jpluimers on 2013/12/22
Cool stuff: DelphiSpec library, inspired by Cucumber. It runs on top of DUnit.
via DelphiSpec Library Announce « Роман.Янковский.me.
A similar one in the .NET realm: SpecFlow – Pragmatic BDD for .NET.
–jeroen
Posted in .NET, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/12/19
Almost a year ago, a thread on “premature Delphi optimization” came by on G+ about this code:
procedure ExchangeInteger(var AValue1, AValue2: Integer); begin AValue1 := AValue1 xor AValue2; AValue2 := AValue1 xor AValue2; AValue1 := AValue1 xor AValue2; end;
I don’t think that was premature optimization, just some code from an old fart that had already been programming in the era where processors had reasons to use it:
Back then, the only efficient way to exchange two variables of the same data type was using the XOR swap algorithm.
Nowadays you have more options, and this is where the fun in that thread began, which I will show in a minute.
The XOR swap algorithm was widely known in the 80s of last century and before, especially because the 6502 processor (oh the days of LISA Assembler) was vastly popular, as was the Z80. Together, they powered the majority of the home computers in the 70s and 80s.
Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, History, Pascal, Software Development, Turbo Pascal, UCSD Pascal | 7 Comments »
Posted by jpluimers on 2013/12/12
StackOverflow user David Heffernan – Stack Overflow has an interesting take on Delphi postbuild events:
At the moment my actiona read:
if exist PostBuild.bat call PostBuild.bat $(Platform) $(Config) $(OutputDir)And then the
PostBuild.batscript calls a Python script so that I can write my scripts in a real language.I actually impose the build actions in a shared option set that I reference from all of my projects. That way I enforce consistency and predictability.
I know others use tools like FinalBuilder but building is so important that I feel it’s worth my effort in rolling my own tooling.
– David Heffernan Feb 14 at 20:24
–jeroen
via: Delphi XE3: Problems with complex pre-build events – Stack Overflow.
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/10/31
The question datetime – Delphi Now() function returns a wrong value – Stack Overflow is similar to my article Delphi – Michael Justin had strange floating point results when his 8087 FPU Control Word got hosed.
Good that stackoverflow user Anton Zhuchkov found out the cause himself: his answer indicates the Precision Control (and rounding) part of the FPU state got hosed by wrongly initializing the Direct3D device.
I edited his answer with some extra links to documentation.
Finally I’ve found the solution. I needed to specify the
D3DCREATE_FPU_PRESERVEflag when creating a D3D device byD3D.CreateDevice.Otherwise, without that flag, all floating point operations are performed with single precision. As the
TDateTimeis a simpleDouble, andNow()functions is consist of simple addition of date value to time value, it all get messed up by DirectX “smart” override.Problem solved. It was a tricky one indeed. :)
–jeroen
via: datetime – Delphi Now() function returns a wrong value – Stack Overflow.
Posted in 8087, Algorithms, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Floating point handling, Software Development | 2 Comments »
Posted by jpluimers on 2013/10/10
Still a C# 4.0 / .NET 4 feature that I need to investigate more deeply: ExpandoObject, partially because I had very bad memories of Variant support in Delphi.
So here are a few links.
First of all: since VB.NET already does late binding with the Object keyword, you cannot use ExpandoObject with Strict On in VB.NET 10.0 and up:
Now the C# links:
–jeroen
Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 5 Comments »
Posted by jpluimers on 2013/09/01
While working on my Delphi: First try on an XSD for .groupproj files, I bumped into an error `Namespace ” is not available to be referenced in this schema`.
I added a targetNamespace attribute to the GroupProj.xsd so the .grouproj files would use the right namespace.
That resulted into two funny errors:
<xsd:element ...>I could hardly find any information about the latter error, but the former gave a few useful hits.
Thanks User weston – Stack Overflow. for answering this: it made me smack to my head (like usual, a case of EBCAK). Read the rest of this entry »
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development, XML/XSD, XSD | Tagged: software, stack overflow, technology | 2 Comments »
Posted by jpluimers on 2013/08/31
Delphi introduced the .groupproj files to support MSBUILD.
I couldn’t find an XSD for it, but need to do some fiddling with those files, so I created one. It’s not very detailed, I think it gets most of the definition right.
The checkin is on my BeSharp.net mercurial repository on BitBucket:
–jeroen
via: jeroenp / BeSharp.net / commit / c122bbdef42e — Bitbucket.
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/08/06
StackOverflow user opcOde wrote something interesting:
Writing device drivers in delphi is hard to impossible.
Here is an attempt to write drivers in delphi.
It is funny to see the link pointing to the DelphiBasics site: Advanced Delphi Driver Development Kit – DelphiBasics.
On my list of things to remember: might come in very useful one day (:
Note that opcOde also has an interesting blog: opc0de | just another enthusiastic coder.
–jeroen
via delphi – Winrollback/DeepFreeze How these softwares work? – Stack Overflow.
Posted in Delphi, Delphi 2010, Delphi 7, Development, Software Development | 9 Comments »
Posted by jpluimers on 2013/07/30
A while ago, I needed routines to work with absolute and relative paths on Windows.
These links were very useful:
Thanks Andreas Rejbrand and David Heffernan for the last two!
–jeroen
via: Conversion between absolute and relative paths in Delphi – Stack Overflow.
Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 4 Comments »