I have a separate blog β Lights Preserved where I get to claim myself a photographer, and where I publish some of my artistic snapshots. π
Nothing entertains me on a Sunday beating the nap and pecking around my old store. Published a few good snaps that brought back good memories. Take a look!
It was about a decade ago when Visual Studio .NET 2002 was launched. Having worked with Visual Studio 6 until then, the new interface was refreshing and powerful along with .NET and the suite of languages, tools and technologies. If you were there, you would have felt times were changing. Beyond the cool and modern interface, Visual Studio .NET 2002 had a lot more to offerβ compared to Visual Studio 6 ββ.NET. It was an exciting time for me back then. More ...
What are your thoughts on the following piece of code?
public String someGibberishMethod() {
int length = someMethodReturningLength();
int sum = 0;
for (int index = 0; index < length; ++index) {
// some code that updates the sum variable
}
SomeClass someClass = new SomeClass(sum);
int sumValueInsideSomeClass = someClass.getSumValue();
// use someText, maybe log or something
String someText = someClass.doSomeOperation(/*some parameters*/);
// use someText, maybe log or something
return someText;
}
Hercules was a strong man; a tall muscular perfect masculine figure. He moved boulders with his bare hands. He stopped elephants and swung them by their tusks. No doubt, he prevented battles by his mere presence. His body drew its strength from within. He was no less than unconquerable.
Even such a mighty Hercules was brought down to his knees. He was taken over by an invisible force that turned him weak and set him on a curse, a terrible painful experience. He started worrying deeply, and wept like a scared kid. There was a time when he fought elephants head on. But this was a battle within that he was losing. He could still win this battle only if he could meet eye-to-eye with the enemy.
More ...If you are writing a typical console based application in Windows, you would end up with an executable (exe). You might also have one or more dependent libraries (DLL). The question is where do we place these DLLs so that they are picked up at runtime by the application; loaded and consumed. Actually it is no brainer, just put them along side the console application executable. Or you could place the DLLs in the System32 directory. Or you could add the directory to the PATH. Well, my point was actually to say that the DLLs can be simply placed alongside the executable and it would be picked up. More ...
It all began when I wanted to return more than one value from one of the methods. Although my attempts ended futile, it was fun exploring and musing how things could have been.
There are at least a couple of options to return multiple values from a method:-
IoC - Inversion of control, is a design that enables fluid flow of control by decoupling tight dependencies between the portion of a code that exhibits behavior and another portion of code that provides required functionality. One form of IoC, as we know, is Dependency Injection (DI). For instance, a TextEditor
could refer an ISpellChecker
instead of direct coupling to a specific implementation of spell checker thereby enabling the text editor to switch spell checker or even use more than one.
More ...
Today, we question our beliefs! Is string really immutable?
string message = "Hello World!";
Console.WriteLine(message); // Prints "Hello World!"
unsafe {
int length = message.Length;
fixed (char *p = message) {
for (int index = 0; index < length; ++index) {
*(p + index) = '?';
}
}
}
Console.WriteLine(message); // Prints what? See for yourself!
Those of us, non-physicists, we do seem to realize that time is eternal. Yet there was a time when time did not exist; tough to comprehend? For us, time is something running on a clock or tracked on a calendar. Let me share what I think about when time did not exist. More ...
In the recent interviews, I asked the candidates the following question:
Is there a difference that I need to consider in the following declarations? Both allocate fixed size array to store integers:
int[] na1 = new int[10];
Integer[] na2 = new Integer[10];