Archive for the ‘.NET’ Category
Posted by jpluimers on 2010/05/25
Having done quite a bit of C and C++ work in the past, I often still use “Yoda Conditions”, especially in environments where you have both = and == as an operator.
So, in a boolean expression, I often put the constant to test in front of the test.
I recently learned at stackoverflow that quite a few people call these “Yoda Conditions”:
“Yoda Conditions”— the act of using if(constant == variable) instead of if(variable == constant), like if(4 == foo). Because it’s like saying “if blue is the sky” or “if tall is the man”.
Thanks to dreamlax for helping me find that.
This is a problem in languages that have both the = and == operators, and the result of an assignment itself is also a value (i.e. allowing a = b = true). Read the rest of this entry »
Posted in .NET, C#, Delphi, Development, Java, Ruby, Software Development, Web Development | 22 Comments »
Posted by jpluimers on 2010/05/21
Scott Dorman udpated his macro to change the target framework version for all projects in a solution to Visual Studio 2010 and published the new macro on CodeProject.
His new macro now supports these target frameworks:
Notes:
- The links are to the download pages of the frameworks; look for “Standalone version” or “Full installer” for non-bootstrap download.
(version 1.1 can be downloaded here, but is not supported in VS2010)
- The “Client Profile” versions are stripped down versions of their “Full” counterpart.
–jeroen
Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Delphi, Development, Prism, Software Development, Visual Studio and tools | 2 Comments »
Posted by jpluimers on 2010/05/14
I always tend to recompile assemblies when something changes they depend upon.
But now I’m even more careful after reading Fabulous Adventures In Coding : Putting a base in the middle.
Especially his checklist is important.
When you use a newer version of an assembly you depend on:
(1) at the very least test your derived types with the new base type — your derived types are relying on the mechanisms of the base types; when a mechanism changes, you have to re-test the code which relies upon that mechanism.
(2) if there was a breaking change, recompile, re-test and re-ship the derived type. And
(3) you might be surprised by what is a breaking change; adding a new override can potentially be a breaking change in some rare cases.
–jeroen
Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Delphi, Development, Prism, Software Development | Leave a Comment »
Posted by jpluimers on 2010/05/13
When you want to deploy WPF, it is important to check if you have sufficient hardware acceleration for your apps.
The most important things to check is the RenderCapability.
It gives you the Tier on which graphics is rendered.
The Tier tells something about hardware acceleration support, including a broad estimate of the pixel shader and vertex shader levels and DirectX versions.
Currently, there are 3 tiers: Read the rest of this entry »
Posted in .NET, C#, C# 3.0, C# 4.0, Development, Software Development, WPF | 1 Comment »
Posted by jpluimers on 2010/04/29
After the excitement of .NET 4.0 and all the tools around it, I totally forgot to mention that SQL Server 2008 R2 got to RTM.
If you are an MSDN subscriber you can download it there.
If you are not, you can download the Microsoft SQL Server 2008 R2 RTM – Express with Management Tools.
Brent Ozar wrote a pretty nice FAQ on the new SQL Server 2008 R2 features, much better than the “what’s new” and press release by Microsoft.
Feature conclusion so far:
- nice new stuff for Business Intelligence
- no new stuff on the engine and T-SQL front
- watch your licensing when doing virtualization; the non-R2 is far cheaper for that
–jeroen (who just turned 41 today)
Posted in .NET, Database Development, Delphi, Development, Software Development, SQL Server | 2 Comments »
Posted by jpluimers on 2010/04/28
The Microsoft patterns & practices Developer Center released the Microsoft Enterprise Library 5.0 last week.
This version of the Enterprise Library has a ton of new features, and now has full support for .NET 4.0 and Visual Studio 2010.
Next to using it from C#/VB.NET, I’m looking forward to see how well this can be used from the upcoming Delphi Prism 2011 release (scheduled to be released on May 15th).
Lots of stuff to experiment with :-)
–jeroen
Posted in .NET, C# 4.0, Delphi, Development, Prism, Software Development | Leave a Comment »
Posted by jpluimers on 2010/04/27
If you have a TechNet or MSDN account, you can download the SharePoint, Office, Visio and Project 2010 RTM builds.
Downloads have become available on April 23rd.
The SharePoint designer is available from the Microsoft Download centre as William Conrwill describes at CodeJedi.NET : SharePoint, Office, Visio and Project 2010 RTM are now available on MSDN.
If you have SA, then as of today (April 27), you can get your volume licenses as well.
William describes more dates in his post Office, SharePoint, Project and Visio 2010 have made RTM!
I’ll be busy playing with all the bits from Delphi and .NET API perspective :-)
–jeroen
Posted in .NET, Delphi, Development, Power User, Prism, Software Development | Leave a Comment »
Posted by jpluimers on 2010/04/22
I usually pick a fresh VM for installing an RTM build, but if you have loads of stuff on your (physical) machine, upgrading RC to RTM can be a real time saver.
Stack Overflow has a nice question Upgrading Visual Studio 2010 RC to RTM answered by Danny Thorpe (yes, two links: blog / wikipedia).
The order is really imporant, so lets repeat that here:
- Uninstall all the VS 2010 parts
- Uninstall the .NET Framework Multitarget package.
- Reboot
- Uninstall the .NET Framework client package
- Reboot
–jeroen
Posted in .NET, C#, C# 4.0, Delphi, Development, Prism, Software Development, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2010/04/20
A client recently asked me what space should reserve to store URLs in their DBMS.
The plurality in the topic title is a hint: different systems have different limits on URL lengths.
But first:
Don’t use long URLs
If you use long URL’s (longer than say a coupe of 100 characters), then usually you have a problem.
First of all: short URL’s are easier to remember, index and search.
Second: long URL’s can pose problems.
It might be that your browser and server support them.
But a user might be behind an intercepting proxy (sometimes invisible to both you and your user) that imposes a URL limit.
In stead of long URLs with a HTTP GET, use shorter URLs with a HTTP POST. Read the rest of this entry »
Posted in .NET, ASP.NET, Delphi, Development, Firefox, Internet Explorer, Opera, Safari, Web Browsers, Web Development | 8 Comments »
Posted by jpluimers on 2010/04/15
Last week, I posted a C# implementation of the tee filter from Sterling W. “Chip” Camden.
Since then I have modified it slightly.
Not because the implementation is bad, but because some pieces of software play dirty when saving their redirected output.
One of those applications is SubInAcl, otherwise a great tool for showing and modifying ACL and Ownership information of Windows NT objects (files, registry entries, etc).
However, when redirecing output or piping it, it writes a zero byte after each byte of text.
I’m not sure why: it might try to face some Unicode output, or just be buggy.
The new sourcecode is below. You can also download the project and binary as tee.C#.7z (you need the freeware 7zip compression tool to decompress this).
Read the rest of this entry »
Posted in .NET, ASCII, C#, C# 2.0, CommandLine, Development, Encoding, Software Development, Unicode, Visual Studio and tools | Leave a Comment »