Thursday, October 13, 2016

[Just For Fun] blowing in the log

How many lines of code must a man write down
Before you call him a geek developer?
How many C 's codes must  be compiled? 
Before she learns undefined behaivour?
Yes, and how many times must the memory leaks get take 
Before they believe in Garbage Collector?
The answer, my friend, is blowin' in the log
The answer is blowin' in the debug mode

Yes, and how many years can a feature exist
Before it's  covered as deprecated ?
Yes, and how many years can some people develop CLR
Before they're allowed to be free?
Yes, and how many times can a man turn C++
And pretend that he just doesn't C?
The answer, my friend, is blowin' in the log
The answer is blowin' in the log
Yes, and how many times must a man look up to language specs
Before he can see the while statement not compile?
Yes, and how many ears must one man have
Before he can hear advantages of high order functions?
Yes, and how many lost wake-up problem will it take 'till he knows
That too many applications have not  been wait free?
The answer, my friend, is blowin' in the log
The answer is blowin' in the la debug 


listen(
)->BobDylan.toSing();



*this post contains not personal opinion only for fun :)

Monday, August 29, 2016

Very BigInteger

java.lang.BigInteger is very helpful but I think we should use this class with correct implementation.
If you use this class for keeping Integer values and convert them  into int type you need checking the returned value if it is too big for integer. According to specification,  soft warning is shown but many developers omit this information mostly.


intValue

public int intValue()
Converts this BigInteger to an int. This conversion is analogous to a narrowing primitive conversion from long to int as defined in section 5.1.3 of The Java™ Language Specification: if this BigInteger is too big to fit in an int, only the low-order 32 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInteger value as well as return a result with the opposite sign.
Specified by:
intValue in class Number
Returns:
this BigInteger converted to an int.


Source: https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html