|
You should not use Double types for financial amounts. Use Integer or Decimal .
|
|
|
|
|
Richard MacCutchan wrote: You should not use Double types for financial amounts In my experience they should not be used, period. They are comfortable for the developer but for technological, scientific and financial problems having a definite precision is actually better than a precision that varies depending on the stored value.
Also, fixed point operation are several orders of magnitude faster than FP ones - not a problem in 90% of software out there but it is paramount in the remaining 10%.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I agree entirely. I would like to know how new developers get to think that floats are the tools to use.
|
|
|
|
|
I'd also suggest you, aside to Griffs suggestions to get a bit into design patterns.
A good architecture solves most problems before they occur, like :
-What does my UI do?
-Could i get a layer between my UI and the data?
-Data classes?
-Do i have duplicate code? -> Can it be handled by one class? (Logic)
-What is my complexity? (Cyclomatic complexity -> root cause of a lot of bugs)
-Interfaces!? (Cohesion instead of coupling)
Normally i'd suggest something like MVC or MVVM but i won't do that anymore, everyone should find the architecture thats fits to the application.
Rules for the FOSW ![ ^]
if(!string.IsNullOrWhiteSpace(_signature))
{
MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
and i was just looking for something general and just one publisher had .. so much... packtpub..now back to checking the books for the other buzz words...
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
|
If you close one eye while on a bike, you're doin' Cyclops
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
This made my day. It's the simple jokes that you get you through the day with a smile on the face.
|
|
|
|
|
With jokes like that I think we will be keeping an eye on you...
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
|
DevOps: Knowing a little bit about everything the business does.
In other words, what we all used to do in the previous century before management decided compartmentalization and siloing was better, if only because it helped management look less stupid because people knew less and talked betwixt themselves less.
That's about all you need to know about DevOps, IMHO.
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
I went up to Belfast and visited the Titanic exhibition to see how it was built.
It was riveting.
|
|
|
|
|
And did the Belfast child sing again ?
|
|
|
|
|
That's the most metal thing I've heard all day!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Puns involving manually wrought metal are hard to beat.
|
|
|
|
|
I have to stop clicking on "Thoughts..." posts.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Was it a one way trip?
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
Yeah, I'm sure they nailed it!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
Oh why do I always get this sinking feeling when I hear bad puns about the Titanic?
It was broke, so I fixed it.
|
|
|
|
|
|
|
|
|
|
MOST. OVERRATED. SONG. EVER!
Is it a good song? I guess... Not my cup of tea.
But is it the best song ever for 40 years straight? Oh hell no!
The song isn't even that easy to listen to, which is usually a death sentence for any pop song.
And now it's even back in the top 40 because of the movie.
It's kind of like a religion.
When are all you people going to grow tired of this song?
Just my very unpopular opinion (because, you know, you're not allowed to trash talk religion)
I guess this post is the end of my career and I'll have to go into hiding now
|
|
|
|