Archive for the ‘Software Development’ Category
Posted by jpluimers on 2013/08/13
Getting substrings in a batchfile requires you to use the %…:~…% syntax as explained by Rob van der Woude.
Note this only works on batch file variables, so not on batch/function arguments (%1, %2, …)and for-loop indexes (%%f, etc).
This code gets the leftmost three characters of var:
set var=%var:~3%
echo %var%
–jeroen
via Remove the first 3 characters in var in batch file? – Stack Overflow.
Posted in Batch-Files, Development, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2013/08/12
While researching some other historic information about Delphi, I bumped into this thread: New DPMI host – delphi.
If is a small thread describing what kinds and versions of DPMI hosts were available to run Turbo Pascal based programs.
DPMI stands DOS Protected Mode Interface: a way for real mode DOS programs to access protected mode features (mainly memory above the 1 megabyte barrier).
I had plainly forgotten that the DPMI host shipped with Delphi 1, and wasn’t aware you could have a 32-bit DPMI host at all.
Some other memory related abbreviations from that era: Read the rest of this entry »
Posted in Borland Pascal, Delphi, Delphi 1, Development, Object Pascal, Pascal, Software Development, Turbo Pascal | 2 Comments »
Posted by jpluimers on 2013/08/11
Something overwrote the Browsing Path of my Delphi XE installation.
Symptoms:
- When debugging a project in “use debug DCUs” mode, the IDE cannot find RTL, VCL and Indy units.
- When you type `System` in a source file, then press `Ctrl+Enter`, the IDE cannot find the source code to the `System.pas` unit.
It was faster to examine the Delphi XE Library registry settings from Ken White than comparing them with a backup or a fresh Delphi XE install.
Now it works fine…
–jeroen
via: Delphi can’t find System.dcu; what should the default path settings be? – Stack Overflow.
Posted in About, Delphi, Delphi XE, Development, Software Development | Tagged: software, stack overflow, technology | 2 Comments »
Posted by jpluimers on 2013/08/10
Scott Hanselman wrote a Must Read post on Penny Pinching in the Cloud: When do Azure Websites make sense?
The first comment says it all:
Nuts, maybe marketing should put out more stuff like this. I have looked at Azure in the past and learned more from this post than then reading through all the pages of pricing on the Azure site. Thanks
Be sure to also read the comments, for instance this one, as they cover some more in depth explanation.
–jeroen
via: Penny Pinching in the Cloud: When do Azure Websites make sense? – Scott Hanselman.
Posted in Development, Power User, Software Development, Windows, Windows Azure | Leave a Comment »
Posted by jpluimers on 2013/08/09
Just found out this the hard way, glad I found it soon which prevented me from doing like Ondrej Kelle – Google+ – Wasted a few hours with this….:
Debugging 64 bit Delphi applications with Delphi XE2 on Windows 8 does not work
Problem: Debugging a 64 bit Delphi application using Delphi XE2 with Windows 8 results in the error Disconnected session.
Solution: Windows 8 is not a supported platform for versions of Delphi prior to Delphi XE3. To get debugger support for 64 bit applications on Windows 8, you must get Delphi XE3. If you are upgrade sensitive, Embarcadero recommends you get Support and Maintenance along with your next purchase. Support and Maintenance guarantees you all updates for 1 year and gets you 3 support incidents in addition.
The proposed solution is to upgrade to at lease Delphi XE3, but this project is not ready to upgrade just yet.
Anybody with a real workaround (apart from downgrading to Windows 7)?
–jeroen
via Error: Disconnected session.
Posted in Delphi, Delphi XE2, Development, Software Development | 4 Comments »
Posted by jpluimers on 2013/08/08
Peter Leslie Morris asked if Delphi already incorporates the `yield` keyword that C# had introduced in C# 2.
Delphi doesn’t, but for the people interested what it does in C#:
Basically `yield` is syntactic sugar to make it a lot easier to write methods that return enumerators of some sort.
It delays (hence the yield keyword) execution until the enumerator as actually being used.
It is one of the hardest C# things to master (it is the most complicated transformation in the compiler, followed by anonymous methods – well maybe with the exception of async/await), but it can be very useful.
VB.NET doesn’t have it either (thanks André!) has it too, but and also has iterator blocks.
Some start posts on yield:
–jeroen
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Development, Software Development | 10 Comments »
Posted by jpluimers on 2013/08/06
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 8.0, VB.NET 9.0, Visual Studio 11, Visual Studio 2010, Visual Studio and tools | 7 Comments »
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/08/06
I was called by a client that didn’t want to do maintenance on an old Delphi application, but wanted to get dir of an I/O Error 131:
I/O Error 131: ERROR_NEGATIVE_SEEK
MessageText: An attempt was made to move the file pointer before the beginning of the file.
Tough luck: psychic powers told me someone is using an unsigned 32-bit integer to access a file using traditional style Assign/Reset/Seek/Read/Close patterns that Delphi kept as intrinsic routines for Turbo Pascal backward compatibility, and that file has grown over 2 gigabyte in size.
I quickly found an import file had grown over the 2 gigabyte, so this was indeed the case.
The original developers didn’t do the file access using the 64-bit Seek/Position of the TStream descendant TFileStream.
Too bad, as now someone has to dig through the mothballs to find the sources (if they survived 3 different version control system switches), create a working development environment, and fix the bug.
Another instance where technical debt in IT raises its ugly head and the compound interest is really expensive.
–jeroen
via: erikmartin.com – IO Errors in Delphi.
Posted in Conference Topics, Conferences, Delphi, Delphi 5, Development, Event, Software Development, Technical Debt | 14 Comments »