Posts

Article hero image

JINQ

JINQ (Java INtegrated Query) is an ultra minimalistic library inspired from and mimicking the .NET LINQ. While LINQ is a language level construct, JINQ is composed of types - classes and methods, but to the same effect.

Partial Classes – Java ???

I am really sorry if I tricked you into believing that Java is offering partial class feature. Unfortunately, Java doesn’t. Maybe never will. But I am going to talk about a workaround also presenting the thought process. Hence the length of the post. More ...

Sporting a new look

I am very particular about composing the content of the posts (and pages) on this blog. By content, I mean whatever goes in the body of a post/page – text, image, HTML, etc. I like to keep the content extremely clean and avoid polluting with HTML like I had to on Blogspot. With such content, it is a terrible pain to migrate blogs or render posts flawless and consistent across browsers. Blogger is notorious for that aspect1. More ...

Publishing C++/CLI on LeanPub

I came across LeanPub 1 a few months back. I believe it was through hanselman2 – blog, video or something. I liked LeanPub instantly because of a couple of reasons.

I hadn’t written/published any lengthy material in a long time except the C+/CLI Primer on CodeProject4. Why not publish same, I thought, and actually published5. I wasn’t even expecting any response from anyone since the material was on C++/CLI, a language that gave me the impression that I was the only one using it at the time I published on CodeProject. πŸ˜€ I am really impressed that the material topped more than 50 downloads in about three months since it was published. Heck, a couple of them even paid despite the fact that the material is free. Not only am I humbled by this encouraging gesture but I am also convinced that C++/CLI is still being pursued and will continue to live – production, academic or as a pet language. Go grab your copy of the booklet – C++/CLI Primer. It’s free!

More ...

Lights Preserved

lights preserved

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!

.NET for the next generation

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 ...

final, const and beyond

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;
}
More ...

The unconquerable

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 ...

JAR Tips: Loading dependencies

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 ...

An Unfair World of Tuples, Anons., var and auto

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:-

  1. return an instance of a class that holds the values
  2. return a tuple
More ...