Posts

Showing posts from July, 2018

Dynamic Expression Builder with EF Core

I was recently working on an ASP.NET Core MVC project where the end user wanted to have a search form with several fields with drop down boxes and a couple of free-form text fields. One of the requirements was to be able to put "*" at the front or the end of a search term in the text boxes to indicate a wildcard search. That was the way a previous application worked and they wanted to maintain the same functionality. Since I was working with Entity Framework Core using a generic repository pattern, I wanted to be able to dynamically build the filter expression that I passed to the repository. I created a static Expression builder class with static methods for creating each type of expression needed. public static class ExpressionBuilder { public static Expression GetStringExpression ( string dataModelProperty , string dtoProperty , Expression combinedExpression , ParameterExpression parameterExpression ) { if ( dtoProperty

Nah, Not a Team Player

Image
A few weeks ago when I was visiting the Tech Trek in Ann Arbor, one of the recruiter types at one of the businesses I visited asked if I was a team player. I thought for a second and replied: "Nah, not really". The guy was a little taken back. He said he had never had anyone reply that way to the question. I basically said that if I am on a project and I am the most knowledgeable on the team, I want to be making the decisions.  Now before you start thinking you are glad you aren't working with this jerk, let me give you some context. The company I was visiting was a company that did extreme agile programming. All of their programmers worked in pairs with a single computer at the same desk eight hours a day. Everyone knew how much everyone else made, and there was a very communal feel there. Their approach seemed to work and they got really good results and very high productivity. It just seemed a little too kumbaya to me. I have never worked in a pair program

Manic / Burnout

Image
Last week I was talking to my friend Fritz, and he mentioned that he wrote a post on coding burnout. I thought it was funny because I had been thinking about writing a post on this topic as well. His post was geared more toward getting burned out on a specific coding problem, and things to do to help get you through it. It is a very good post, and I recommend reading it here:  https://fritzpassow.blogspot.com/2018/06/programming-as-cure-for-burnout.html My post is more on larger scale burnout. I really seem to go through two phases in my work life. Like someone with manic depression, I go through manic phases where I am extremely productive and excited about everything I do, but then I have my burned out phase where everything I work on is drudgery. Both of these phases are usually influenced by the type of project I am working on.  Right now I am in one of my manic phases. I am running a project at work that is using modern coding techniques and tools, and I am learning new