Update 12.03B: There are no longer 16 ounces in a Pound
-
Do they happen to be storing the current time in the database as well? :D
"Half this game is ninety percent mental." - Yogi Berra If you can read thank a teacher, if you can read in English, thank a Marine.
-
I am refactoring a project that has basic unit conversion stored in a sql database along with everything else. Each time a business object gets loaded from the database, a separate call to the database is made to get the 3 units that belong to the business object. When is the last time any of these natural conversion has changed? Are they suddenly going to change the amount of milligrams in a gram, or pounds in a ton? If there were any conversions that were irregular like grams in a case or something like that, I understand, but for the natural conversions? The worst part is this database is almost always called over a VPN connection, so bandwidth is critical. The previous programmer could have at least cached the data on the client side or something...
How many ounces are in a pint?
-
I am refactoring a project that has basic unit conversion stored in a sql database along with everything else. Each time a business object gets loaded from the database, a separate call to the database is made to get the 3 units that belong to the business object. When is the last time any of these natural conversion has changed? Are they suddenly going to change the amount of milligrams in a gram, or pounds in a ton? If there were any conversions that were irregular like grams in a case or something like that, I understand, but for the natural conversions? The worst part is this database is almost always called over a VPN connection, so bandwidth is critical. The previous programmer could have at least cached the data on the client side or something...
Netblue wrote:
The previous programmer could have at least cached the data on the client side or something...
That would have been nice.
Netblue wrote:
The worst part is this database is almost always called over a VPN connection, so bandwidth is critical.
Is it possible to make any changes to that or are you stuck with it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Netblue wrote:
The previous programmer could have at least cached the data on the client side or something...
That would have been nice.
Netblue wrote:
The worst part is this database is almost always called over a VPN connection, so bandwidth is critical.
Is it possible to make any changes to that or are you stuck with it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
Paul Conrad wrote:
Is it possible to make any changes to that or are you stuck with it?
There are 8 locations connecting to a central site, VPN over the net. A better way to do it would be SQL replication, but the locations can't support a server of their own, at least not right now.
-
Paul Conrad wrote:
Is it possible to make any changes to that or are you stuck with it?
There are 8 locations connecting to a central site, VPN over the net. A better way to do it would be SQL replication, but the locations can't support a server of their own, at least not right now.
That's a bummer.
Netblue wrote:
A better way to do it would be SQL replication
Sure, but then that could open up a new can of worms when trying to manage all those replications and synchronize them, if you needed to. Maybe not, because I don't know what kind of data flow or volume you are dealing with.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
How many ounces are in a pint?
-
I am refactoring a project that has basic unit conversion stored in a sql database along with everything else. Each time a business object gets loaded from the database, a separate call to the database is made to get the 3 units that belong to the business object. When is the last time any of these natural conversion has changed? Are they suddenly going to change the amount of milligrams in a gram, or pounds in a ton? If there were any conversions that were irregular like grams in a case or something like that, I understand, but for the natural conversions? The worst part is this database is almost always called over a VPN connection, so bandwidth is critical. The previous programmer could have at least cached the data on the client side or something...
Just a second here: What if the application was being used in the UK, then used in the US or Australia? Conversions do vary... ;) (though maybe a localised lookup table, and, sure - why not - a little caching or even dare I suggest hardcoding might help perf a little ;))
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
IF your lucky 20, if your in the states typically 14, unless your local pub has the good glasses that allow a full 16 with 2 inches of head. :-D
You only get two inches of head? :~
-
I am refactoring a project that has basic unit conversion stored in a sql database along with everything else. Each time a business object gets loaded from the database, a separate call to the database is made to get the 3 units that belong to the business object. When is the last time any of these natural conversion has changed? Are they suddenly going to change the amount of milligrams in a gram, or pounds in a ton? If there were any conversions that were irregular like grams in a case or something like that, I understand, but for the natural conversions? The worst part is this database is almost always called over a VPN connection, so bandwidth is critical. The previous programmer could have at least cached the data on the client side or something...
And then somebody suddently alters some conversions in the database and all clients with the cached data will have an update problem until the next session. To avoid this, we now need a way to let the clients know that the cached data is not up to date. And then.... :) Honestly, this is exactly what blind obedience to 'good practices' leads to. Of course it's a good idea to make the database work for its money, but this should nonetheless have been avoided. Quick and dirty solutions to correct this lead to still more quick and dirty patches. Recommended practices can not replace thinking.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'. I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.