Archive for the ‘Software Development’ Category
Posted by jpluimers on 2012/08/21
Every so often, I come across a pearl that I hand’t read before. This time I was looking for the source of “nothing is more permanent than a temporary solution”, and somehow came across the book 97 Things Every Programmer Should Know.
It is full of interesting concepts phrased in easy to read chapters on important things like “Code in the Languae of the Domain“, “Don’t Repeat Yourself” and many (95 <g>) others.
For a small introduction, read the PDF presentation extract, and the 97 things website.
–jeroen
via: 97 Things Every Programmer Should Know – Programmer 97-things.
Posted in .NET, Delphi, Development, Software Development | 2 Comments »
Posted by jpluimers on 2012/08/18
A question like How do you clear your MRU list in Visual Studio? is why I still like Stack Overflow.
The answers explain how to solve this in a version neutral way, including other MRU lists, and as a bonus point you to handy Visual Studio tools.
–jeroen
via: registry – How do you clear your MRU list in Visual Studio? – Stack Overflow.
Posted in Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2012/08/16
The .NET 4.5 beta has a bug that manifests itself as an AV or an FatalExecutionEngineError in certain circumstances of String.Empty handling, which is fixed by the .NET 4.5 RTM that shipped earlier this month followed by Visual Studio 2010 RTM today.
Eric Lippert on this:
Thanks both to the original poster for reporting it here, and to Michael for his excellent analysis.
My counterparts on the CLR tried to reproduce the bug here and discovered that it reproduces on the “Release Candidate” version of the 64 bit CLR, but not on the final “Released To Manufacturing” version, which had a number of bug fixes post-RC. (The RTM version will be available to the public on August 15th, 2012.)
They therefore believe this to be the same issue as the one that was reported here:
http://connect.microsoft.com/VisualStudio/feedback/details/737108/accessviolationexception-bug-in-net-4-5-beta
Many apologies for the error.
–jeroen
via: c# – What’s the cause of this strange bug? – Stack Overflow.
Posted in .NET, .NET 4.5, C#, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2012/08/16
If anyone knows a better solution than string search/replace, please let me know:
I’m required to write a tool that can handle the below XML fragment that is not well formed as it contains XML declarations in the middle of the stream.
The company already has these kinds files in use for a long time, so there is no option to change the format.
There is no source code available that does the parsing, and the platform of choice for new tooling is .NET 4 or newer preferably with C#.
This is how the fragments look like: Read the rest of this entry »
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, XML, XML/XSD | Leave a Comment »
Posted by jpluimers on 2012/08/15
A few weeks ago, Bill Karwin did a must watch webinar on the prevention SQL Injection titled “SQL Injection Myths and Fallacies“.
Bill Karwin (twitter, new blog, old blog, Amazon) is famous for much work in the SQL database community, including InterBase/Firebird, mySQL, Oracle and many more.
He also:
Anyway, his webinar is awesome. Be sure to get the slides, watch the replay, and read the questions follow up.
Watching it you’ll get a better understanding of defending against SQL injection.
A few very valuable points he made: Read the rest of this entry »
Posted in .NET, .NET 3.5, .NET 4.5, .NET ORM, ASP.NET, Batch-Files, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Cloud Development, COBOL, CommandLine, Database Development, Delphi, Delphi for PHP, Delphi x64, Delphi XE2, Development, EF Entity Framework, F#, Firebird, FireMonkey, History, InterBase, iSeries, Java, JavaScript/ECMAScript, Jet OLE DB, LINQ, LLBLGen, MEF, Microsoft Surface, Mobile Development, PHP, PowerShell, Prism, Scripting, SharePoint, SilverLight, Software Development, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 7, VB.NET, VBS, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Web Development, Windows Azure, WinForms, WPF, XAML, xCode/Mac/iPad/iPhone/iOS/cocoa | 1 Comment »
Posted by jpluimers on 2012/08/14
Last week I posted an in depth answer on StackOverflow.com about the memory allocation difference in Delphi and Fortran, or more accurately in two different kinds of languages.
You have:
- column major order (not only used in Fortran and other science centric languages, but also in the shading languages GLSL and HLSL that can be used in FireMonkey)
- row major order (used in most other languages, for instance Delphi, C, etc)
A very important aspect is the order of for optimized loops. For column major order, the optimum is inside out (as the inner arrays/records are in consecutive memory locations), but for row major order, it is the exact inverse.
One of the consequences is that in Fortran it is a very fast operation to pass an array of inner fields as parameter to a method.
This is what I wrote: Read the rest of this entry »
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Development, Fortran, Software Development | 4 Comments »
Posted by jpluimers on 2012/08/09
A while ago, I needed a way to defer settings to environment variables in a .NET application written in C#.
The easiest way to do this is to keep the same syntax as for expanding environment variables in batch files: use the %ENVIRONMENTVARIABLE% syntax (not the delayed expansion !ENVIRNMENTVARIABLE! syntax).
The reason is that there is a Windows API function ExpandEnvironmentStrings that handles all the expansion magic.
Don’t P/Invoke that function yourself, as there is already a very nice Environment.ExpandEnvironmentVariables wrapper since the .NET framework 1.1 that handles all the gory details for you (like marshalling the strings, making sure that lpDst contains enough space for the expansion).
–jeroen
Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2012/08/08
CodeRush has a nice refactoring to extract a C# string into a resource.
There is a small glitch that when you press undo after that, and there was no string file in your project, then the empty resource file is not always saved.
Upon building your project, you will get an error like this:
---------------------------
Microsoft Visual Studio
---------------------------
The item 'Resources.resx' does not exist in the project directory. It may have been moved, renamed or deleted.
---------------------------
OK
---------------------------
The Resources.resx file is not visible in your Solution Explorer, so you cannot delete it there.
You have to manually edit your .csproj file and remove the Resources.resx reference there.
I’ve had this happen only a couple of times, and cannot yet reproduce this. Until I can reproduce, this is a workaround to remedy the effects.
–jeroen
Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2012/08/07
Now that the there are RadStudio XE3 demos available at SourceForge.net Repository – [radstudiodemos] Index of /branches/RadStudio_XE3, and a post on a Delphi Event in New Zeeland rumours of an eminent Delphi/RAD Studio XE3 version start to raise.
It is fun to watch the activity stats on the SourceForge project RAD Studio Demo Code and correlate them to the Delphi release and update dates.
I made PNG images of two graphs. Click on them to enlarge, or click on the links to get to the statistics pages.
Note that when the span is wide enough, activity gets summed to the start of the month (first picture).
Project statistics graphs
Correlation
The real fun is the correlation with the Delphi Release Dates – Delphi Programming and the Delphi update dates from the Delphi Registered User Downloads.:
| Year-Month |
Date |
Delphi/
RAD Studio
version |
Release/Update |
| 2009-12 |
2009-12-14 |
2010 |
Update 4/5 |
| 2010-08 |
2010-08-30 |
XE |
Release |
| 2011-07;2011-08 |
2011-09-02 |
XE2 |
Release |
| 2011-11 |
2011-11-01 |
XE2 |
Update 2 |
| 2012-04 |
2012-05-18 |
XE2 |
Update 4 + Hotfix |
| 2012-07 |
2012-??-?? |
XE3? |
Release? |
–jeroen
via: RAD Studio Demo Code | Free software downloads at SourceForge.net.
Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Development, Software Development | 5 Comments »