Monday, November 26, 2007
My favorite 5 reasons why programmers work on weekends
Programmers don’t really have a fixed schedule. We can work all weekend and take off Monday if we like.
We hate working on Mondays.
We don’t really like sun tanning or physical sports which are usually weekend activities.
52 weekends equals around 832 hours @ $100/hr, or more, that’s a lot of money to throw away.
We have so much outboard gear like iPods, phones, TV Games, etc that it takes the whole weekend to sync it all with our laptops.
More reasons to work on weekends here
Sunday, November 18, 2007
The Ninja
The Ninja is your team’s MVP, and no one knows it. Like the legendary assassins, you do not know that The Ninja is even in the building or working, but you discover the evidence in the morning. You fire up the source control system and see that at 4 AM, The Ninja checked in code that addresses the problem you planned to spend all week working on, and you did not even know that The Ninja was aware of the project! See, while you were in Yet Another Meeting, The Ninja was working.
Ninjas are so stealthy, you might not even know their name, but you know that every project they’re on seems to go much more smoothly. Tread carefully, though. The Ninja is a lone warrior; don’t try to force him or her to work with rank and file.
10 types of programmers you’ll encounter in the field
Ninjas are so stealthy, you might not even know their name, but you know that every project they’re on seems to go much more smoothly. Tread carefully, though. The Ninja is a lone warrior; don’t try to force him or her to work with rank and file.
10 types of programmers you’ll encounter in the field
Wednesday, October 10, 2007
Wrong result on float.TryParse() method
One of the introduced features in .NET 2.0 platform was TryParse() method, very practical and performance wise extension. TryParse method returns a boolean to denote whether the conversion has been successful or not, and returns the converted value through an out parameter.
In this test case I will try to present possible bug in converting string value to float by using this method.
String value that needs to be converted to float is 123,456789101112, expected float value after parsing would be the same number, but number 123.456787 was returned. Sixth decimal was wrongly rounded / generated, and instead of 9 - number 7 is placed.
Is this conversion culture specific, is some hidden mechanism for rounding applied?
Decimal method for parsing string into decimal value is working correctly.
In this test case I will try to present possible bug in converting string value to float by using this method.
float f;
string stringValue = "123,456789101112"; float.TryParse(stringValue, out f);
String value that needs to be converted to float is 123,456789101112, expected float value after parsing would be the same number, but number 123.456787 was returned. Sixth decimal was wrongly rounded / generated, and instead of 9 - number 7 is placed.
Is this conversion culture specific, is some hidden mechanism for rounding applied?
Decimal method for parsing string into decimal value is working correctly.
Subscribe to:
Posts (Atom)
