Calculating Returns on Flipping a House vs Renting vs Investing in Stock

My parents and I have purchased a house that we (mostly through the work of my mom honestly) are renovating.  The project is practically finished and we are at the decision point of asking ourselves: do we sell the house or do we rent it out?

There are a ton of factors to consider:

1) How much could we sell the house for?

2) How much rent could we get for it?

3) If we sell now we will pay tax on the profit at our marginal tax bracket rate (28% most likely)?

4) If we rent it out, how much value will be lost by selling the house later when it’s not in pristine condition that it is now?

5) How much will this area appreciate in value over the next X years?

6) How much will property taxes increase?

7) How much money will we need to invest to maintain the property?

8) What type of return on investment would we be realizing if we didn’t buy the house and just stuck our money in the stock market?

9) If we flipped the house and the invested the proceeds for the next X years, how would that compare with renting the house over those years?

These are just the tip of the iceberg.  Obviously there is no way that we can identify all these values and know all these answers, but in order to try to improve my understanding of the issue, I’ve created a fairly detailed excel file to analyze as many data points as I could think of when it comes to answering: Should I buy this house and fix it up or invest my money elsewhere, and if investing in the property makes sense, should we rent it or flip it?

I’m not an expert at any of this, so take my excel file and its calculations with a grain of salt.  If anyone notices something I’ve done wrong I’d be interested to know so I can update the excel document with more accurate information.

Rent vs Flip Calculations Template Excel Document

Async winform process that reports progress

This is mostly put together from examples I pulled online, but I got it working and I figure other people could use it as well. This has a Form1 form and a ProgressForm form put I tried to put all the code together for this post.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestingAsync
{ 
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Console.WriteLine("Starting..");
            var mgr = new Manager();
            mgr.GoAsync(this);
            MessageBox.Show("END");
        }
    }

    class Manager
    {
        private static ProgressForm _progressForm;

        public async Task GoAsync(Form owner )
        {
            //var owner = new Win32Window(Process.GetCurrentProcess().MainWindowHandle);
            _progressForm = new ProgressForm();
            _progressForm.Show(owner);

            var progress = new Progress<int>(value => _progressForm.UpdateProgress(value));
            await Go(progress);

            _progressForm.Hide();
        }

        private Task<bool> Go(IProgress<int> progress)
        {
            return Task.Run(() =>
            {
                var job = new LongJob();
                job.Spin(progress);
                return true;
            });
        }
    }

    class LongJob
    {
        public void Spin(IProgress<int> progress)
        {
            for (var i = 1; i <= 100; i++)
            {
                Thread.Sleep(25);
                if (progress != null)
                {
                    progress.Report(i);
                }
            }
        }
    }


}

Highlighting the current file in Solution Explorer

Every time I switch version of Visual Studio I need to go looking for how to enable this feature.

When I’m working on a file, I want to see that file highlighted in solution explorer, not some other file.  I don’t want to have to go searching for the current file.  To achieve this, just go to Options>Projects and solutions>General and pick Track Active Item in Solution Explorer.

image

Windows Server 2012: Where are all my processors?

I haven’t worked a ton with Windows Server 2012, but recently while debugging an issue for a client relating to performance on a Hyper-V hosted VM, I was stumped why I was only seeing 1 CPU when I had added 4 vCPUs to the VM.

First, I was able to confirm that the Guest OS was seeing all 4 CPUs by looking in Device Manager.

It turns out that by default (or at least in my case) the CPU utilization is displayed in an aggregated way, making me think that it was only using 1 CPU:

 

image 

By right clicking on the CPU graph and selecting Change graph to… Logical processors you can see all the CPUs.

 

image

Dropping connections to a SQL database

When you are trying to restore a SQL Server database, you might run into the problem of exclusive access, because there are open connections.  You can use this bit of SQL to remove those connections

Use Master
Go

Declare @dbname sysname

Set @dbname = 'name of database you want to drop connections from'

Declare @spid int
Select @spid = min(spid) from master.dbo.sysprocesses
where dbid = db_id(@dbname)
While @spid Is Not Null
Begin
Execute ('Kill ' + @spid)
Select @spid = min(spid) from master.dbo.sysprocesses
where dbid = db_id(@dbname) and spid > @spid
End

 

 

 

Windows 8.1 Everything is blurry and sized too large

I made the mistake of installing Windows 8.1 with the hope that it would fix some of the things I hate about Win8.  Foolish on my part.

Just about everything looked like shit after installation.  Things were sized wrong, text was blurry etc.

After mucking around for a few hours I finally found a fix.  Go to Control Panel->Appearance and Personalization->Display and select “Let me choose one scaling level for all my displays”.

image

Then, on the next screen, select Smaller – 100%

image

One more reboot and things (at least for me) looked back to normal.