View Post

Unexpected Database Advantage

In Development by PaulLeave a Comment

Over the past six months or so, I’ve been working on an application to help out one of our other businesses. It’s a Windows application that maintains inventories of products and parts. Early on, I decided to store the data in a SQL Server database. I did that for many reasons including: I could avoid writing file loading/saving code. I …

View Post

Updating a Set of Properties

In Development by PaulLeave a Comment

I finally found a good way to update a set of properties in an API without touching others. Let me explain… Let’s say I have a method that updates a set of properties on an object. It looks something like this: class MyProperties { public int PropertyA { get; set; } public int PropertyB { get; set; } } class …

View Post

Enhancing the Architecture

In Development by PaulLeave a Comment

In my experience, one difference between a “junior” developer and a “senior” developer is how quickly (if ever) they realize that the architecture needs to be enhanced. Let me give you a simple example… I was working on a project that stored & manipulated file paths. Sometimes the code worked on a full path like this: k:\Test\t.txt Other times it …

View Post

Encapsulation Technique

In Development by PaulLeave a Comment

I’m a really big fan of encapsulation. I use it all the time, and I’m always looking for improved techniques. One technique I’ve been using recently (in C#) involves using interfaces, nested classes, and a factory method. Here’s an example: public interface IFoo { IBar GetBar(); } public interface IBar { void SomeMethod(); } public static class Foo { public …

View Post

Processing Applications

In Development by PaulLeave a Comment

I really enjoy writing console applications that do some sort of processing. I did that again a few weeks ago. A client needed an application that read a text file, made various modifications to it, and then output the new file. Some of the modifications included: Removing lines that matched particular patterns. Merging lines that matched particular patterns. Identifying lines …

View Post

Seattle CodeCamp & Exceptions

In Development by PaulLeave a Comment

I went to Seattle CodeCamp last weekend. I learned about a lot of new technologies (to me) including React.js, Azure Machine Learning, and Ionic Framework. I’m planning to investigate those more in the future. But one of my favorite sessions was Adam Furmanek’s “Internals of Exceptions” talk. He had the most practical (and immediately useful) tidbit that I’d heard all day: …

View Post

Android Studio & Java Impressions: Part 1

In Development by PaulLeave a Comment

I wanted to start writing an Android app. But I had a big decision to make: do I use Microsoft development tools (Visual Studio, Xamarin, .NET, C#, etc.) or Google development tools (Android Studio, Java, etc.)? I know the Microsoft tools pretty well. But I’d never used the Google tools. However, since I always like to learn new things , I …

View Post

Immutable objects

In Development by PaulLeave a Comment

Over the past few years, I’ve been using a lot of immutable objects in my code. What are immutable objects, you ask? An immutable object is an object whose state cannot be modified after it is created. For instance, here’s an immutable object: public class ImmutablePoint { public int X { get; } public int Y { get; } public …

View Post

Never Stop Learning

In Development by Paul1 Comment

I’m always trying to learn new things. A great example was when I worked on Microsoft Encarta Class Server. When we started that project, there were only a few developers on it. We needed a database to store information — perhaps something based on SQL Server. But none of us had ever used SQL. So I learned. It took a while …

View Post

How I Develop: Tests

In Development by PaulLeave a Comment

Back at Microsoft, I was known for writing code with very few bugs. Testers often had trouble finding any bugs in my code. Is that because I wrote perfect code the first time? No way! It’s because I wrote automated tests for my code. I proved this once again a few weeks ago. I wrote an application that would help …