Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

Psychology of Software and its Users

The fact that Psychology plays an instrumental role in the development, design and everyday use of software is not something that is very apparent to most people. It is something that is hidden within the details, but is also blatantly obvious when to really think about how software is developed, designed and used. Think about this for a moment: Software is designed by people for people to use. Sure, the execution of software code and the process flow within it are a carefully laid out path of l... [More]

Urgency is not Panic, unless you let it be

When you are caught up in the urgency of getting something done it is easy to be blinded by the FUD (Fear, Uncertainty and Doubt) that is causing you to rush and possibly make mistakes. After all, the deadline is fast approaching! Almost every time urgency is accompanied with rushing. Although, it doesn’t have to be. The next time you get into an urgent situation, make sure you "Stop, Relax. Now, GO!" Reflecting on the current situation allows you to remain in control while still getting t... [More]

Execution is Most Important to be Successful

A quote you likely hear a lot is "It doesn't matter what you know; It's WHO you know." Well, when you compare the "what" and "who" it is generally true that the "who" is more important. After all, if you don't know who to sell to then it doesn't matter what you build or do. However, something that is implicit in that quote is that you know how to execute. Execution is probably the most important thing to succeed in both life and business. No matter how much you know, if you can't execute an idea... [More]

Automation is Essential

There are many tasks that are performed repetitively. Some of those tasks often get outsourced. However, in the end someone is responsible for performing those tasks. Automation is the process of setting up some kind of process to perform repetitive tasks with minimal effort from the person responsible. Any time there is a task that is necessary to perform repetitively you must (in today's ever shrinking and increasingly competitive world) consider if that task is worth automating in whole or in... [More]

An Hour Saved is an Hour Earned

Time is the scarcest resource we have. More scarce than land, More scarce than water. More scarce than money. This is one of the reasons that life is so precious. "A penny saved is a penny earned." - Benjamin Franklin This famous quote from Benjamin Franklin can also be applied to Time. We only have so much time. We need to choose wisely how we spend it. An hour spent reading useless Facebook status updates is one less hour spent with your family. An hour spent watching TV is one less hour spent... [More]

Comfort is Overrated. Change is Exciting and Revealing!

We naturally tend to resist change and cling to our comfort zones. Venture out and try something new on a regular basis. You might fail; you might succeed. But, you will never know which if you don’t try. The only way to truly grow as a person, both personally and professionally, is to step out where you’ve never been and try something new. You WILL surprise yourself with what you can handle when you set aside fear and embrace novelty.

Stop. Relax. Now, GO!

Once in a while you need to pause and rest for a second so you can collect your thoughts before pushing forward. The rush of pushing forward all the time leaves little time to reflect on what’s been done and where you’re headed. Don’t forget to force yourself to regain a little perspective once in a while. Stop. Take a breath of fresh air. Now, GO!

Work Smart, Not Hard

There is nothing wrong with working hard. A lot of people have made quite a successful career for themselves by working hard. But, if you keep working hard today, then you will still be working hard tomorrow. It is more important to work smart... [More]

The Follow Or Lead Delimma of Sheep and Wolves

To follow or lead; that is the question. No matter how you look at it, people in our society are constantly following in one capacity or another. However, there are a few people that stand out / take risks / try new things. These are the leaders, the entrepreneurs, the wolves. Without wolves the sheep would never discover any innovation, and the world would stagnate. Are you a Sheep or a Wolf?

Do Trust and Faith belong in Software Development? Not Really!

The words "Trust" and "Faith" don't normally come up in discussion surrounding software development. However, whether we like to say it or not, we really do put a lot of both trust and faith in software. In fact, software developers often put a lot trust and faith in there development tool. While this can be justified in certain cases; it is most often a mistake. The Good When following Test Driven Development (TDD) you basically don't trust anything by writing unit tests to verify everything ... [More]

‘SQL Query’ Micro Design Pattern

There are a few programming practices, that I like to call Micro Design Patterns, that I use over and over again on various software projects I work on. One pattern that I call SQL Query, and use quite frequently when I need to write ad-hoc SQL queries for use within a Data Access Layer. This pattern lends itself to easier testability and a cleaner separation of concerns. What is the ‘SQL Query’ Micro Pattern? Basically, the SQL Query micro pattern involves using a Factory Method to return an ... [More]

Peeking inside the Twitter Windows 8 App

I decide to peek inside the Twitter Windows 8 App package to see what language they are using and to see if I can find any open source projects being used within. Well, I found some interesting stuff… How to view inside the package You can view any Windows 8 app package that is installed on your computer as it resides within the following folder: C:\Program Files\WindowsApps Each package has it’s own folder within that folder. Here’s the full path to the package folder where the Twitter a... [More]

What “var” really means in C#–It’s not “variant”

With the release of C# 3.0 came the addition (among many others) of the “var” keyword. I’ve seen MANY people confused about what this keyword is, does and means. Among these people with incorrect assumptions to the function of the “var” keyword, I have seen programmers/developers with varying amounts / years of experience. So, I’ve decided to write up a simple explanation; actually the same one I’ve told and/or emailed people over the last couple years. “var” is not variant! Since “var” is the... [More]

Windows 8 App: Simple Weight Log–My first Windows Store App

A few weeks ago I built and released Simple Weight Log (my first Windows 8 app in the store.) The app allows you to enter your weight in a log by date and it charts the different weigh-ins in a line graph to allow you to easily visualize weight changes over time. View in Windows Store “Are you trying to loose weight? or, gain weight? If so, then Simple Weight Log will allow you to easily log and track metrics on your progress.” Application Features Simple and easy to use I purposely bu... [More]

SQL Azure: Calculate Database Usage Percentage of Max Size

Some times it can be useful to programmatically monitor your SQL Azure database usage statistics. Luckily, there is some short SQL code that can be run on the database to check how much disk space is currently used and what the currently allotted max database size is. The following script does just that. DECLARE @dbName nvarchar(255) = '{database_name}'; DECLARE @Max BIGINT = CONVERT(BIGINT, (SELECT DATABASEPROPERTYEX(@dbName , 'MaxSizeInBytes'))); DECLARE @Used BIGINT = ( SELECT ... [More]

All Information Workers are NOT Equal or Even Approximate!

There have been information workers for a long time. However, even after all this time, it is amazing that one of the biggest misconceptions is that all information workers are equal (or at least approximately equivalent.) It basically goes like this: an hour of worker A’s time is pretty much equal to an hour of worker B’s time. In reality this couldn’t be further from reality. It’s like saying a high school graduate today is as smart as Albert Einstein. Well, maybe that example is a little ext... [More]

Office 365 + Microsoft Account + Password Expiration = FAIL!

One of my business email accounts is hosted in Exchange Server via Microsoft Online Services. Earlier this year they upgraded us to the new Office 365. Everything went well for a few months after the upgrade, until my password happened to expire on my earlier this week. Below is a solution I was able to figure out to regain access to my account (without calling Microsoft for support/help.) Background This specific email address is also a Microsoft Account (aka Windows Live ID) and has been eve... [More]

Using MiniProfiler with SqlDataSource ASP.NET WebForms Control

I recently implemented MiniProfiler into an existing ASP.NET WebForms application that makes use of databinding to the SqlDataSource control. Since the SqlDataSource uses a DbProviderFactory internally, it is fairly simple to exend the control to utilize MiniProfiler through inheritance and overriding a single method of the SqlDataSource. Here’s a very simple class that inherits from the SqlDataSource control and injects MiniProfiler support to be able to profile the SQL query used by the contr... [More]

Mocking HttpRequestBase.ServerVariables using Moq

Mocking is a very handy tool for unit testing code, especially when it comes to mocking the HttpContext for web application code. However, it’s not as straight forward as you might think to mock the HttpRequestBase.ServerVariables, however once you know what to do it really is pretty simple. Here’s a code example (using moq) that shows how to create a mock HttpContextBase that contains a mock HttpRequestBase with a mock ServerVariables property: public HttpContextBase CreateMockHttpContext() ... [More]

jHash v2.0 Released: Now with Routing Support!

jHash is a small, lightweight (4kb minified / 2kb compressed) javascript library that makes it extremely easy to work with “location.hash". Version 1.0 had the ability to set / retrieve hash root values as well as “hash querystring” values. The newly released version 2.0 includes a new lightweight routing engine that facilitates an easier developer experience when building Single Page Applications. The jHash documentation contains full descriptions of the libraries methods and their usage.... [More]

Design Patterns: Basics of Dependency Injection

Dependency Injection and Inversion of Control (IoC) have become popular buzz words in the .NET development world over the last couple years. However, It seems that not very many developers really know what they are. Like most design patterns they are rather simple in idea, but the various implementations can become complex to someone new to them. Also, it seems that these two are often considered that they must go together or even mistaken as the same thing. This prompted me to write up this sho... [More]

Awarded 2012 Microsoft MVP - Bing Maps

Whether I won MVP or not I would still do what I do. My passion for technology and the pleasure of helping others it what drives me. This marks the 5th time I've been awarded Microsoft MVP, and am honored for this recognition. Thank you Microsoft! Congratulations to all April Fools MVP's; new and renewed! If you are not familiar with the Microsoft MVP Program, you can find information about it here: http://mvp.support.microsoft.com

SQLinq: Use LINQ to generate Ad-Hoc, strongly typed SQL queries

SQLinq is a new library that allows ad-hoc SQL code to be generated at runtime in a strongly typed manner that allows for compile time validation of your SQL code. Why SQLinq? SQLinq is built with the core idea of simplicity and ease of use. SQLinq wont get in your way like other Data Access Layers will. SQLinq is not so much a Data Access Layer (DAL) as it is a code generation tool. Although, it’s not a code generator like others you may be used to. If you look at Entity Framework, you’ll se... [More]

Unit Testing with SqlException in .NET: Only with help from Reflection

If you are writing you code to be able to easily unit test each method, and you would like to unit test situations where a SqlException exception is thrown, then you’ll definitely run into the issue of the SqlException objects constructor being marked “internal.” Members marked “internal” can be a nightmare for unit testing, and they are found all over the place in the .NET Framework. Basically you can’t call “internal” methods, constructors, fields, etc from you own code because it doesn’t resi... [More]

IronJSMVC: Script ASP.NET MVC in JavaScript using IronJS

Personally, I enjoy writing much of my applications using a statically typed language such as C#. However, I would really prefer to be able to write UI logic and script certain parts of my applications using a dynamic language if I could. I was thinking about this and the following question came to mind: What would it be like to write an ASP.NET MVC application entirely using JavaScript? So I thought I’d work up a prototype using IronJS (a javascript implementation for the .NET DLR.) Download... [More]