|
You know how it is in programming.
When you're doing something right people will wonder if you've done anything at all.
That's why you never hear of the good ones.
It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Yeah, its really hard to remove those pesky inverted commams from a string.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
I once asked myself the question how I could add them... Of course nothing that a quick Google search couldn't answer.
Removing them... Now that's a whole different matter. Perhaps a nice addition for .NET 5.0? Optional inverted commams for everyone!
It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
|
|
Why remove them? Why not just un-invert them? Much more challenging.
|
|
|
|
|
I found this line of Lua code in a graphical application and thought it qualified as both weird and wonderful.
local PI = math.asin(1) * 2
What an interesting little trick to calculate Pi.
Unfortunately the math library has math.pi. If that was not implemented in an earlier version I would write the whole 3.14etc. rather then use this mathematical trick.
|
|
|
|
|
genius
In code we trust !
|
|
|
|
|
Fueled By Caffeine wrote: I would write the whole 3.14etc
Good luck with that!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Four decimal places ought to be good enough for anyone.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
In my view, in the absence of a math.pi this is a far more sensible option than the whole 3.14etc. It's not a trick.
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Phil J Pearson wrote: more sensible option than the whole 3.14etc
Meh. Copy-and-paste http://www.piday.org/million/[^]
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
While PI = math.asin(1) * 2 may be mathematically correct, it's probably not the most accurate representation of π you could create. It depends upon the arcsine function implementation. You might get lucky in case they shortcut the value for an argument of 1, and simply return the library's value of π. If not, they're going to do the arcsine calculation using a numerical method that will approximate something close to π.
In other words, it would be more precise if the library simply gave you its value of π. For casual calculations, the difference may not matter. If you're doing a simulation, having your value of π off by a couple bits could have long-term consequences.
Software Zen: delete this;
|
|
|
|
|
Interesting, that asin ine use of a math function.
|
|
|
|
|
|
And i understand only the 'inherit master page,inherit master page,inherit master page' part....
"When you don't know what you're doing it's best to do it quickly"- SoMad
|
|
|
|
|
The topic actually contained two full stops. After reading the first few lines I had already expected it to contain none at all. However they didn't really help.
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
Rohan Leuva wrote: When you don't know what you're doing it's best to do it quickly"- SoMad>
Similarly, I think it was the Flying Karamazov Brothers who said, "It doesn't matter how you get there if you don't know where you're going."
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
Ah, that was so much easier than trying to figure out a captcha.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
It's on a website my kid sister probably doesn't frequent.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Was it like this?
Uncheck □ this -> □ if □ you □ are □ not □ a bot □.
|
|
|
|
|
No, just the one checkbox.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Can't find it with Google. Is the most relevant result hidden from me?
|
|
|
|