Contents

46 Articles
6 Comments

Search

4 years Ago

Entity Framework Generated SQL

Published by Marco on

This article originally appeared on earthli News and has been cross-posted here.


Microsoft just recently released Visual Studio 2013, which includes Entity Framework 6 and introduces a lot of new features. It reminded me of the following query that EF generated for me, way, way back when it was still version 3.5. Here’s hoping that they’ve taken care of this problem since then.

So, the other day EF (v3.5) seemed to be taking quite a while to execute a query on SQL Server. This was a pretty... [More]

.NET 4.5.1 and Visual Studio 2013 previews are available

Published by Marco on

The article Announcing the .NET Framework 4.5.1 Preview provides an incredible amount of detail about a relatively exciting list of improvements for .NET developers.

x64 Edit & Continue

First and foremost, the Edit-and-Continue feature is now available for x64 builds as well as x86 builds. Whereas an appropriate cynical reaction is that “it’s about damn time they got that done”, another appropriate reaction is to just be happy that they will finally support x64-debugging as a first-class... [More]

Deleting multiple objects in Entity Framework

Published by Marco on

Many improvements have been made to Microsoft’s Entity Framework (EF) since we here at Encodo last used it in production code. In fact, we’d last used it waaaaaay back in 2008 and 2009 when EF had just been released. Instead of EF, we’ve been using the Quino ORM whenever we can.

However, we’ve recently started working on a project where EF5 is used (EF6 is in the late stages of release, but is no longer generally available for production use). Though we’d been following the latest EF... [More]

A provably safe parallel language extension for C#

Published by Marco on

This article originally appeared on earthli News and has been cross-posted here.


The paper Uniqueness and Reference Immutability for Safe Parallelism by Colin S. Gordon, Matthew J. Parkinson, Jared Parsons, Aleks Bromfield, Joe Duffy (Microsoft Research) is quite long (26 pages), detailed and involved. To be frank, most of the notation was foreign to me—to say nothing of making heads or tails of most of the proofs and lemmas—but I found the higher-level discussions and conclusions quite interesting.

The abstract is concise and describes the project very well:

“A key challenge for... [More]”

Visual Studio & Resharper Hotkey Reference (PDF)

Published by Marco on

It’s always a good idea to familiarize yourself with the hotkeys (shortcuts, accelerators, etc.) for any piece of software that you use a lot. Using a keyboard shortcut is often much faster than reaching for the mouse. Applications with a lot of functionality—like Word, IDEs and graphics tools—have a lot of hotkeys, and they will help you become much more efficient.

 At Encodo, we do a lot of our programming in Visual Studio and Resharper. There are a lot of very useful hotkeys for this IDE... [More]

6 years Ago

ASP.Net MVC 3 auf Mono/Linux

Published by Marc on

In letzter Zeit hatten wir von der Encodo vermehrt Berührungen mit Mono, da eines der Projekte heterogen mit Windows- und Linux-Hardware (ARM Prozessorarchitektur) operiert. Wir nehmen dies zum Anlass um den aktuellen Stand von Mono zu “protokollieren”.

In dem Projekt hat es sowohl C#-Services (Konsolen- und Service-Apps) wie auch Webanwendungen. Eine dieser Webanwendung muss sowohl auf Windows (.Net 4) wie auch auf Open-Embedded-Linux (Mono) laufen.

Da wir für die .Net-Webentwicklung von... [More]

Saving & Loading Performance in Quino

Published by Marco on

The GenericObject in Quino had recently undergone a performance overhaul, as documented in the article, Improving performance in GenericObject…but we weren’t finished yet.

I’m going to assume that you read the overview on “How Data Objects are Implemented” and understand what the GenericObject actually is. In the other article, we optimized performance when creating objects in-memory and when loading and setting values. Those optimizations were driven by an application that used Quino data... [More]

Improving performance in GenericObject

Published by Marco on

Quino is Encodo’s metadata framework, written in C#/.NET 4.0. Since its inception four years ago, we’ve used it in several products and the code base has been updated continuously.

However, it was only in a recent product that one of the central features of the framework came under scrutiny for performance issues. It turned out that reading and writing to Quino data objects was a bit slower than we needed it to be.

How Data Objects are Implemented

A typical ORM (like Hibernate or Microsoft’s... [More]

Encodo C# Handbook 7.17 – Using System.Linq

Published by Marco on

I’m currently revising the Encodo C# Handbook to update it for the last year’s worth of programming experience at Encodo, which includes a lot more experience with C# 4.0 features like optional parameters, dynamic types and more. The following is an expanded section on working with Linq. A final draft should be available by the middle of April or so.

7.17 – Using System.Linq

When using Linq expressions, be careful not to sacrifice legibility or performance simply in order to use Linq instead... [More]

Encodo C# Handbook 7.30 – Loose vs. Tight Coupling

Published by Marco on

I’m currently revising the Encodo C# Handbook to update it for the last year’s worth of programming experience at Encodo, which includes a lot more experience with C# 4.0 features like optional parameters, dynamic types and more. The following is an expanded section on working with Linq. A final draft should be available by the middle of April or so.

7.30 – Loose vs. Tight Coupling

Whether to use loose or tight coupling for components depends on several factors. If a component on a... [More]

Troubleshooting a misbehaving designer in Visual Studio 2010

Published by Marco on

This article originally appeared on earthli News and has been cross-posted here.


Anyone who’s used Visual Studio 2010[1] for a non-trivial Windows Forms project has run into situations wherein the designer can no longer be opened. Usually, it’s because the class encounters null-reference exceptions when referencing data that is unavailable until runtime. Those are easy to fix: just avoid referencing that data in the constructor or load-routine while in design-mode.

However, sometimes Visual... [More]

7 years Ago

Overriding Equality Operators: A Cautionary Tale

Published by Marco on

This article originally appeared on earthli News and has been cross-posted here.


tl;dr: This is a long-winded way of advising you to always be sure what you’re comparing when you build low-level algorithms that will be used with arbitrary generic arguments. The culprit in this case was the default comparator in a HashSet<T>, but it could be anything. It ends with cogitation about software processes in the real world.

Imagine that you have a framework with support for walking arbitrary... [More]

Getting Started with .NET / C# 4.0

Published by Marco on

Every once in a while, I get asked if I have any suggestions as to how to get started with .NET/C# development. Generally, the person asking has a good background in programming and design. In order to really use a language and library, though, you want to know which concepts and patterns are used in a language as well as what those patterns are called, how to use them and so on. If you don’t know what’s already available, you end up reinventing the wheel or doing things in an inefficient way.
... [More]

Sealed classes and methods

Published by Marco on

This article originally appeared on earthli News and has been cross-posted here.


According to the official documentation, the sealed keyword in C# serves the following dual purpose:

“When applied to a class, the sealed modifier prevents other classes from inheriting from it. […] You can also use the sealed modifier on a method or property that overrides a virtual method or property in a base class. This enables you to allow classes to derive from your class and prevent them from overriding... [More]”

Cross MonoTouch off the list

Published by Marco on

This article originally appeared on earthli News and has been cross-posted here.


Apple presented the iPhone OS 4.0 late last week. The new version includes hundreds of new API calls for third-party developers, including long-sought-after support for multi-tasking. The changes extended to the licensing agreement for iPhone developers, with section 3.3.1 getting considerable modification, as documented in the article, Adobe man to Apple: ‘Go screw yourself’ by Cade Metz (The Register). That section now reads:

“Applications... [More]”