Adding a solution to TFS without adding the NuGet packages.

I was adding a project that I just completed to TFS source control and noticed that it wanted to add the packages to source control also, but I didn’t want that because you are not supposed to add the NuGet packages.  They can be re-downloaded and installed during the build process for anyone that does not have them.

I found this nuget link extremely useful on how to configure the solution to 1) Enable the nuget download and 2) keep the packages from being added to source control.

The basic steps are:

            1. Enable the NuGet package restore.  This will add some NuGet stuff to the solution.
            2. Add your project to TFS, then of course commit the change.

Bible Chronological Reading Plan Differences

I am using the Bible App to try and read the Bible in a year, so I chose the Chronological reading plan from them.  It has been very helpful, but I didn’t feel like I was getting enough out of it, so an elder from my church has a web site with Chronological Study Guides, but sadly, his chronological order does not match the Bible app chronological order because the Bible App order is based on the Blue Letter Bible‘s chronological order and my elder’s guide is based on the NLT (New Living Translation) chronological Bible.

So the question is:  Which order is correct?

I guess it doesn’t really matter, but if you want to use Aaron’s awesome resources, then you probably should choose the NLT bible.

C# Parallel Tasks gives MAJOR Speed Increase

I just used parallel tasks to decrease the time a process took from over an hour to about 2 minutes.  I was wary of creating so many database contexts, but it paid off in a major way!

See the snippet of code below to see how I used the Parallel.ForEach.  .Net created almost 100 threads during the execution.

                Parallel.ForEach(qry, issue =>
                {
                    using (var _db = new WCO())
                    {
                        dobType dob;
                        List<dobType> birthdays = new List<dobType>();

                        foreach (
                            var subIssue in
                                issue.DOBValue.Trim().Split(new string[] { " TO ", " to ", "-", " - " },
                                    StringSplitOptions.RemoveEmptyEntries))
                        {
                            string valueToTest = subIssue;

                            // Try Month Year regex
                            if (tryDateFirstPart(valueToTest, out dob))
                            {
                                logger.Info(string.Format("Parsed {0} to Month: {1}, Day {2} Year: {3}", issue,
                                    dob.month,
                                    dob.day, dob.year));
                                saveParseDOB(dob, issue, _db);
                            }
                            else
                            {
                                logger.Error(string.Format("Could not parse {0}", issue.DOBValue));
                            }
                        }

                    }
                });

Important
If you need someone with my ability to decrease processing times on a full time basis, please contact me through LinkedIn 

Have a great day!

Ability to Sync is a great reason to use Lastpass to save your passwords

I am a user of Lastpass and I am working with a large multi national company on a contract.   They had a new employee start and they were trying to use KeePass, which I hear is a great password manager, but he couldn’t access his passwords because it is trying to use a port that is blocked by the corporate network.

So, Lastpass seems to only use https (Port 443), and all the data (passwords) is also encrypted locally before it is sent to the web site.

So, that means that i can get to my passwords from any corporate network I have ever used, and Lastpass has an app so I can get to all my passsword information from my phone, or iPad as well.   I don’t have an android phone, but I know they have apps for that as well.

If you want to sign up for Lastpass, please use this link and you will get a free month when you sign up for the premium services. https://lastpass.com/f?89236 

Import transactions into YNAB FREQUENTLY!!!!

After watching this video from YNAB I have learned an important lesson.  I have not imported my transactions for two months and now I have to individually approve 235 transactions.  This is going to take a while.  I recommend that you import your transactions frequently.  I think it would be a good practice to do this at LEAST weekly.

If you don’t have YNAB, use this code to save some money.  Currently I think the discount is $6.00
http://ynab.refr.cc/S7JMPGT

Working from home

I used to  have a job where I was regularly able to work from home about 1/2 of the time.  I liked it because:

  • I felt I was more productive.
  • I got about an extra hour in my day because I didn’t have to commute to the office,
  • And, on my breaks, I got to help my wife who was injured on her job and is not able to do a lot of the things that she used to be able to do.
  • My work-life balance improved significantly.

So recently I had worked from home because I had to meet the air conditioning repair guys and I asked my new boss if it was OK.  He replied that it was OK this time, but that I cannot do it anymore because of company policy.

I know this was the deal when I was  hired, but it seems so last century, so I did a little research and found this recent article in Business Week that supports my feelings.  http://www.businessweek.com/articles/2012-06-25/what-people-really-do-when-theyre-working-from-home

I like that the article says ““The whole point of teleworking, from the employee’s point of view, is the ability to fit one’s work into the rest of one’s life, not the other way around, as is the case in the ‘traditional’ office.”

I found another list of benefits on http://en.wikipedia.org/wiki/Telecommuting#Current_trends that include:

    • Saved $$ on commuting costs.  (car, gas, oil, etc)
    • Reduce the environmental pollutants

All that being said, it is not for everyone.  Here is are a few of the top reasons from US News (http://money.usnews.com/money/blogs/outside-voices-careers/2012/08/09/10-reasons-working-from-home-might-not-be-for-you) that are valid reasons you might not be able to work from home:

    • Easily Distracted
    • Lack of motivation
    • You have to be there in person.
    • Lack of focus.

Here are some other articles to consider if you want to allow your employee’s to work from home.

http://gigaom.com/collaboration/scientists-prove-telecommuting-is-awesome/
http://gigaom.com/collaboration/ciscos-take-on-telecommuting-and-productivity/

 

 

Ninject – Dependency Injection

I wanted to learn about Inversion of Control and Dependency Injection.  I found a few good videos on YouTube and a nice tutorial on a blog.  The Blog Post was in two parts:

Part 1:  http://stefanoricciardi.com/2011/01/21/ninject-mini-tutorial-part-1/
Part 2: http://stefanoricciardi.com/2011/02/04/ninject-mini-tutorial-part-2/

Here are the links to the YouTube videos that I found that were helpful:

Tekpub Concepts: Dependency Injection and Inversion of Control
Setup Ninject for ASP.NET MVC – .NET In 60 Seconds  – This is a good example of how you would use it when doing MVC programming.

I was so excited after this, that I found some old code and used Ninject on it.  I had to re-factor the  code and extract some  interfaces, then I set up a simple bind statement and everything just worked!  VERY COOL!

Have fund and I hope these links will help you learn Ninject dependency injection.

Ok, now, I was trying a blog ping utility called something called FeedShark and it wanted me to put this link on the blog.   Not entirely sure why, but here it goes:  www.hypersmash.com

Learning about SOLID programming principles

I have been learning about SOLID programming principles and I wanted to share the resources that I have found.

First, I listed to the father of these principles describe them on the Hansleman show.  This post obviously caused a few ruffled feathers and for fun, you must listen to show #150 to hear some of the aftermath from Uncle Bob.

Then I found a great youtube video of Steve Bohlen from Microsoft show examples in C# on how these principles can be implemented  and what to look for.