Binary Representation of Decimal Values

More decimal issues, but unrelated to the SQL stuff. The problem being that numbers like 1/10 can be easily displayed in base 10 as 0.1. But, in base 10 we have problems with numbers like 1/3, .3333333333. Well, in binary, they have problems with some of our decimal numbers that you wouldn’t expect. e.g. 0.4 – 0.1 = 0.30000000000000000000004
while 1.4-1.1 = 0.29999999999999999999998.

The problem here is with rounding. I wrote a quick JS function to round these numbers to a significant number of digits.

SQL Server's Stupid "Decimal" DataType

Ok so, on a recent project, for some reason, I set up a few fields, and the corrosponding SP parameters as “decimal” datatypes. What a mistake.

After lots of rounding errors, which were partly ignored because the revised “specs” called for these figures to be integers (later changed to decimals), I found out that a Decimal datatype has no decimal places, unless you specifically declare it.

The reason for this is that a “decimal” is really just another name for a “numeric”. So I guess I can understand that part… but how dumb is it that a decimal, by default, has no decimal places.

I went back and changed everything to float.

Use decimal(x,x) instead of float.  See here for the reason why.

The destruction of my ugly bar

When my wife and I first moved into our house, the first thing we wanted to do was get rid of this ugly, and seemingly useless bar in our basement.

To be honest I have no idea what anyone would have done with this thing, but at some point someone spent a lot of time to install this thing.

The day finally came when I decided it was time to take action (mostly because I have to sell my house very quickly and this thing is ugly).

I wish I had some “before” pictures, but I didn’t think about that when I started.



Some of the junk that was removed, awaiting disposal.



The newly freed space. We are going to make this where we put our TV and stuff.



This was the most interesting part for me. I had to cut some pipes running to the sink in the bar and sweat on a cap. I had never done this before so it wasn’t that easy, and it was made even harder by the fact that I had about 18″ of space to work with in this area behind the bar. But, it’s finally done.

More on AssemblyVersion and AssemblyFileVersion

I just came across this post by Carlos J. Quintero, a .net MVP.

He explains basically what I have been encountering in dealing with versioning of assemblies.

He even points out the bug I found with auto incrementing the AssemblyFileVersion number.

Carlos J. Quintero [.NET MVP] Jun 23, 3:34 am

Newsgroups: microsoft.public.dotnet.framework
From: “Carlos J. Quintero [.NET MVP]” <carl…@NOSPAMsogecable.com> – Find messages by this author
Date: Thu, 23 Jun 2005 10:34:05 +0200
Local: Thurs, Jun 23 2005 3:34 am
Subject: Re: AssemblyVersion numbers and recompiling code
Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse

Hi Joe,

There are 2 versions that you need to take care of:

1) The version of the file: this is the version of “classic” Win32
applications or DLLs, that is, the one shown using the Properties dialog of
Windows Explorer.

It is set with the AssemblyFileVersion attribute in AssemblyInfo.vb file:

<Assembly: AssemblyFileVersion(“1.0.2.4”)­>

Notice that this attribute is not written by default when the file is
created so you need to add it by hand.

This is the version that should be autoincremented but, alas, using “1.0.*”
does not autoincrement it in each build. I would say this is a bug.

2) The version of the assembly: this is the version of .NET assemblies,
which is different than the file version. That is, this is the version shown
in the Property dialog of the GAC in the first tab (the second tab shows the
file version). For example, in Net Framework 1.1, System.Windows.Forms has a
file version 1.1.4322.573 and an assembly version 1.0.5000.0

It is set with the AssemblyVersion attribute in AssemblyInfo.vb file:

<Assembly: AssemblyVersion(“1.0.0.0”)>

Notice that this attribute is written by default when the file is created so
you don´t need to add it by hand.

This is the version that can be autoincremented using “1.0.*” but generally
you don´t want to do this because you want to keep the same assembly version
in each build until you break the backwards compatibility. I would say that
this autoincrement feature is another bug.

So:

– Change always the AssemblyFileVersion on each build.

– Change the AssemblyVersion only if you are breaking the backwards
compatibility. Do not change it for bug fixes or other minor INTERNAL
changes which won´t break clients.

– Clients can be configured through a config file to run against an exact
dll a.b.c.d or with any a.b.* build number (provided that major and minor
digits don´t change). See the .NET Framework docs about this.


Best regards,

Carlos J. Quintero

FSBO

I am still working through all the FSBO crap.

It seems that http://www.buyowner.com/ doesn’t put your site in any MLS, so it doesn’t show up on ChicagoTribune.com or Realtor.com.

http://www.listmefree.com looks like they DO put you in the MLS, but you have to pay a buyers commission.

This site, which I think is just an alias of nuwaymls.com seems to suggest that they get your house in the MLS and Realtor.com but you don’t work with realtors to do the selling… but you use a realtor to list it?