Friday, 18 December 2015

Given, when, then

One of the most fascinating games that humans play is Chess because it is not just a great mind game (or game of minds), it is also a game that enables many institutions and disciplines to function in a standard, universally acknowledged manner.

The fundamentals of Chess begins with the opening.

A chess opening is a sequence of moves that have to be played in a certain way (not as in 'discipline' that you have to play so but in a form much like how constellations are identified). There are many chess openings, as there are many constellations and design patterns (software), that are identified with the formation of the pawns structure, the placement of the other pieces in relation with the pawns etc.

Much like other conventions, many are puzzled as to why these openings emerge. One of the best way to understand the need for Chess Openings, as an accepted tool of study to play better and competitive chess, is by looking at one of the most popular Chess Openings of them all - the Dragon variation of the Sicilian defense.

The Sicilian - Dragon variation

As the name suggests, it is played by the player playing Black hence, the name 'Defense' but it is popular because of the high octane attack that it enables for Black on the Queen side of the Chess board.

The 'simulated' Dragon

Sicilian Dragon is one of the few variations in Chess Openings that can be explained clearly not just as an opening but why the Black Bishop serves its purpose at g7.

Here is a 'simulated' dragon (the theory is the same but the Bishop's position is not where it should be even though the diagonal remains the same) that loses black two to three moves that shows in the subsequent moves of the game how handy the two or three moves 'lead' time, also called as 'tempo', could have been for black.

Edit: This game was being played Live while I wrote this and I expected the 'tempo' was lost for Black and that White would capitalise on it, in the subsequent moves (if White had been enterprising and sacrificed with Ndxe6, fxe6, followed by Bxc5 !! recovering the sacrificed Knight, losing the White Knight on C3 immediately, but following with either Rxd6 or Bxd6, winning the exchange and a pawn and, of course, the simplest bxc5, Qa5 Ncb1 not Nb3 because Qxa3+ wins back a Knight with Bxc3) but...!

Given that the black Bishop was not in 'f6' but in 'g7'. 

And after just 7 moves, after move 15...Bf6, here is the resulting board position!

And after just another move, White is in total disarray.

The reason why it is called the Dragon !

Season's greetings, happy holidays and wishing a great happy new year for all my readers, followers, blogger family and friends ! :)

To be contd.

Monday, 7 December 2015

The Scrum Planner

Organizing the story board is usually dependant on the automated tool that is used. Often, when we use a real life story board like a white board, there are the same maintenance issues that usually pertain to communication. How to convey the right picture to the team?

When a task is slipping or lagging, do simple updates in stand-ups help or do you need an additional input? And if you do, where should the output, a graph or alerts, be conveyed to - the team, the management or presuming you are doing Scrum, with the ScrumMaster?

Role based users - the Scrum Planner is accessible only for Scrum-mers and the Sprint Planner only for the Sprint-ers !

The Scrum / Sprint Planner does just this - it helps you with a template of pre-assigned roles and responsibilities as defined in Scrum and as an experienced Agile practitioner, like me, would use it. Developed for Excel, this add-in is the complete solution for all your Scrum needs. Follow my blog to stay updated on the release date for this tool.

Sunday, 4 October 2015

Working with Code 2015 using Sharepoint 365

This (please refer to the steps below) will work only if you use IE as your internet browser. 

1. Open your Sharepoint site (Site Collection).
2. Click on Documents in the left pane menu.
3. Click Library on the tab above.
4. In the Ribbon menu, locate "Open with Explorer" and click it.
5. Once the Windows Explorer opens, copy the url
6. Click Map Network Drive from Windows Explorer's left pane and paste this URL.
[7. Check if Keep me signed in option had been checked when you logged into your Sharepoint site otherwise, an error may occur. If it still does not work, check if your Sharepoint site is added to your browser's Trusted sites].
8. Open Visual Studio Code or copy/paste your existing VS Project to this location.
9. Microsoft's OneDrive will take care of syncing the files/folder with your Sharepoint Document Library.

So, beyond Napa 365 and Visual Studio 2012 Ultimate, you can now also use the lightweight super IDE - Code!

Happy Code-ing !

Tuesday, 22 September 2015

A case of too much thinking !

Imagine my chagrin, as I was watching "Pawn sacrifice", a week after mentioning it in another blog post, that most of the mentions of Life and other magazines in that post, were actually happening in front of my eyes.

They must have showed it in the promos that I had seen, was what I told myself but what about the creeps that are somehow beginning to look like stalkers to me, who invariably find a seat, (*next or near to me*, without this correction, it sounds quite pompous as if creeps should not find a seat even in a near-to-empty cinema hall) in a near-to-empty cinema hall?

This time the moron was more eager to make some munching sounds (for those not familiar with Indians, these are creepy types that go around thinking that if they 'irritate' others, they are either making them 'cute' to others, when they describe such moronity or that they are 'psyching' others.) as if to make me specially take note that 'it' was making those sounds!

Probably, the nutcase wanted to make a point 'tellingly' that 'it' had read my blog post because there was another similar creep, talking to its friend, outside the cinema, that "These are the kind of people that people hear about" and then repeated it, tellingly, even as the other remonstrated that once was enough! Quite clearly, a case of too much thinking beyond what their faculties could allow them.

The point is while you expect some to respond, if not favorably upon reading a blog, to at least not make my life 'stalked' and 'witch hunted'.

Co-incidentally, this is how the life of Fischer, the American Chess genius, was thought best to be described as by the filmmakers of the bio-pic. Strange!

Nevertheless, the biopic, as they call it, is well made.

Boris Spassky, played by Liev Schreiber, is almost like how we, my friends and I, used to talk about Spassky in our childhood - with awe and admiration.

To be absolutely objective, Schreiber seems to have got stuck with the introverted, controlled-in-a-repressed-manner roles - The Manchurian Candidate, even in the Omen - you name them and he looks "ready to look troubled" like an instant mix of "troubled and haunted by ghosts" pack.

But in all fairness, good enough a portrayal of Spassky to merit an Oscar for the best supporting role. I am sure the Russians would agree, too, and back him for the award.

And hey, in my previous blog post on the same topic, I had mentioned that Tobey Maguire looks more like Karpov than Fischer.

Made, then, only with having seen the promos and the ad banner but yet, how right I was.

This was not the Fischer that we used to visualize and probably, not as the screenplay writers must have either, because at many places, the dialogues clearly left me feeling that, "This line should have been spoken by some other type of character, in a lighter vein, but not this person."

I am almost certain that Fischer would have been appalled at how he was being cast had he been alive to see the movie but all credit to Maguire for having produced such a film and for having learnt Chess for the film !!

And they also show the real Bobby Fischer during the credits, bulky, tall and heavily bearded.

Myself, I am almost sure that no Hollywood producer is going to consider me for a role after this or even talk to me for not having praised one of their fraternity or if not praised, at least not have picked on the film at all.

But, as I said at the beginning of the post, the same applies to many blog readers, who are setting stalkers and witch hunters, however harmless they may be!

Sunday, 20 September 2015

Stunning combination - a treasure!

I have often noticed that I am a very humble person.

It is not as if I am bragging about something that most of the fraternity that exist in my imagination would give their life for but seriously.

The fact is I am so because there are two sides that war away to nutty glory over me (Here! I am not bragging.) because when the one faction says "Give him some space", the other cramps me up with creeps; when the one says, he is so 'humble', the other brings out something in me to show I am arrogant; when the one get the picture, right?

No matter what, the two factions are always there and here I am, with loads and loads of talent (at times, to the level of genius), commitment, willingness to put in hard work, tonnes of patience and humility, and not in the cover of Life or at the Oscars or the Emmy because these two factions insist on being the 'perfect' mother - father combination to me that even my real parents could not have been.

The fact is because of these two factions constantly at me for as long as I can remember, I have developed some kind of a defence mechanism within me that keeps failing the one or the other and so, I decided to carefully monitor where all I made mistakes (Btw, don't get carried away as one nutcase did because I don't usually make mistakes, in fact, hardly, or rather, I don't make mistakes at all. As I said, I am a humble person and such proclamations about myself are rare so don't think I am bragging again) when playing Chess and why.

Finally, I think I have made the grade as per myself. For, here I was sensing that this opponent on Facebook Chess that had bet 10K would definitely have something up her sleeve as they usually rig up a match with high stakes like disconnecting my internet or having a far higher rated player playing in her place.

But I surpassed myself because here I was playing one of the longest combinations that I can recall having devised.

Take a look at the boards that I managed to screen capture and see how the Bishop is placed at a6 to prevent me from castling on the King side. That is how long the combination was.

Board position 1

Board position 2

Board position 3

After board position 3, I played (let me annotate it as move 3) 3. Ng6 and black responded with ...Ra8-e8. And I played,

4. Qa4.

If 4...Nxf2 5. Nf-g5+ Kxg6 6. Qxc6+ Kf5 7. Qd7+ Re6 8. Qxe6++ !!

Board position 5

Board position 6

Board position 7

From here, evolves another combination that starts not with Nxe5+ but with (let me annotate it as move 8)

If 8. ...Ke8 9. Qb8+ Kd7 loses both rooks for Black with Nxe5+.

8. ...Kf6

If black had played 8. ...Ke6, 9. Nxf4+ black's Queen forked ! But this, losing the Queen, was probably the best way for Black.

9. Rxf4+ ! Rf5
10. Qe7 ++ !!

The depth of the combinations is what makes the game my best ever.

I am sure I can brag about this win even though it has not won me the world championships or any tournament prize.

I treasure it.

"Everest 3D", the movie

Little did I know when I did not put a box in an architectural design - The DropBox Facade pattern - (nothing as fancy as getting it patented but just a few boxes made in a word processor to resemble a design) that I had committed some hara kari or mata kari or hira kari (not sure which kari it was but the Tamilians will vouch that it must have been some curry).



Just thought I would start it off on a different note because I am getting more bored with these creeps than "Jack the ripper" must have been when he did not find women to rip off that are bent on spoiling others' day at the movies or maybe it is simply because they speak. So how worse can it be that they are so shameless as to want to speak at all? Maybe 'they' were not prepared that I would go to watch "Everest". :D

That was the beginning of about 30 minutes of expensive 3D reels reeling away with only crunches of popcorns keeping me interested. I almost reached out to grab a handful from the bucket next seat.

It is only when the story of collecting some name and money for some kids back there as the reason for climbing Everest does the 'spirit' behind such expeditions make an impression.

It is not a gripping movie, not even a spectacular one, except for a few seconds of 'unbelievable' shots of views from 'impossible' angles of the heights and those, too, do not exhilarate because the mind tells you 'that is so unbelievably impossibly beautiful so must be graphically generated on a computer' but the eeriness of barren, white ice and vast stretches of mountain ranges with no signs of vegetation makes you wish if you should watch the movie at your home theater.

One of the best scenes, though, was the helicopter (a word that is supposed to trigger some anxiety because it gets used also as a 'chopper') landing at a camp and the subsequent take-off. The filming of it conveyed how incredibly tough it must be to fly the helicopter at that altitude, with the winds, but the same intensity is missing in the filming of the climb itself.

The 'storm' scene is beautifully filmed with the sheer speed of the change of the weather in those heights - "this mountain makes its own weather" - well depicted but possibly the movie is begging somebody to notice the clean aesthetics of the camera angles while showing the dead bodies and death in Everest, in an impassioned manner, without sensationalizing the tragedy, that is.

It did make me think 'tragic' more than a Greek tragedy has ever done.

Friday, 18 September 2015

Pawn sacrifice - Not Fischer?

That heroes, from Bobby Fischer to Za (one of the many unsung heroines), have been treated badly and consistently over a period of time is not such a great concern, but what is, is that even Hollywood did not think it necessary to show a semblance of Fischer at least as how he was physically.

Image source: Wikipedia

Imagine this picture of Fischer almost resembling Captain America and yet Hollywood did not find anyone closely matching the height or appearance, even if fugitive status and franchise start with 'f'!

Image source: Wikipedia

The reason I find such deviations so odd as to warrant a mention in my blog is because many go around memorizing how to respond and how to 'position' themselves with their opinions by memorizing all those personalities, foreign, who may have either a fugitive status or a refugee or some unlawful stain to them and this, they consider as some kind of a patriotic, strategic stance (although mentioning that they themselves may never even have talked to greatness is definitely not demeaning myself) and then pointing out all the other persons' 'mistakes in life', who praise or glorify those 'tainted' greats, as due to them not following 'protocol'.

It is very important, this bloated 'protocol', because there is a coterie that attempts to prove such 'thinkers' right by maliciously causing others who do not fall by the protocol to be shown deliberately and forcedly in bad light, with the excuse that it is meant as a 'lesson' for the younger in the organization and circles.

Sometimes it is also important to think otherwise - some individuals bring an incredible lot with them for the country and Fischer was the one, who brought the Soviet Union to its knees at its own game - Chess and, respect for the US, with his genius.

The legends that the chess manuscripts and the stories that exist about Fischer's impact on the Soviet grandmasters of that time, especially Botvinnik, Tal and Spassky, carry, are simply fabulous fables that only the Chess knowledgeable could appreciate.

Titles like the 'lone American warrior defeating the mighty Soviet Union' also has considerable historical significance because of how the USSR would begin to see this genius, who time and again ridiculed Botvinnik's predictions and derisive remarks. For not only had Fischer tamed the might of the super grandmasters of the era, he had also probably ignited a spirit that paved the way for the end of the Cold War.

Saturday, 12 September 2015

The DropBox Facade pattern

The advancement and move towards leaner approaches in the software development lifecycle should not just stop with processes and the refinement of activities within the processes but must also extend to programming, design and implementation techniques.

For instance, there is the web server that always listens to a client on a specific port using a protocol is the standard definition of the web application architecture.

But why should a server listen all the time? If there are no clients then it is a waste of server resources. Technology advancements now provides the luxury of thinking as per one's needs and not as per the constraints of the technology used.

NodeJs provides the right platform to implement such a server, which does not keep listening but has the smart sense to switch off when no client is talking to it.

Footnote (usually known as PS for the dense in haste and the out of context) - This pattern is based on the Node.Js framework, which has a certain unique flavor! :)

'Switching off a server' is not to be taken in the 'hardware' context but as a web app server that can be started and stopped for each app instance.

Tuesday, 1 September 2015

CI with VS Code 2015 - Gulp with a grunt!


Grunting was pretty easy compared to gulp although everybody would tell you otherwise - by everybody, I mean the really knowledgeable ones, that is - the reason being a gulp error that does not seem to resolve except by leaving an ugly footprint in the output.

Grunt was simple - all tasks happening right there while gulp uses 'pipes' making it faster than grunt but leaving the error handling part difficult. This means a failing test reported by mocha would result in an unhandled error !

But where there is a problem there should be a solution, this is the world of logic, right?

The solution is to invoke a grunt task from gulp ! :D

In the gruntfile.js is the 'execute' task 

which I invoke from the gulpfile.js !

To make it clearer, change the gulp.start from 'execute' in the gulpfile to 'grunt-mochaTest':

So, now, instead of the ugly message, you have a warning message, which, too, disappears if all tests pass as below:

To make this integration happen between grunt and gulp, you need the 'gulp-grunt' package. npm install it and happy gulping with a grunt!

Sunday, 30 August 2015

VS Code 2015 - Grunt, mocha, mysql, unit test with chai

VS Code 2015 is a simple, no-nonsense editor.

This means that there will be lots of post-coding tasks that need to be performed using some other tools. For instance, automating builds, tests, deployment and execution apart from numerous other tasks like clean, copy, coverage, log, database read/write etc.

Although the task of maintaining all these software development and team activities may look daunting outside of the magical environment of a full fledged IDE like Visual Studio usually is, it is rather simple because of the packages that integrate with Node.js framework.

grunt is one such package that is similar to NAnt and Ant but has one additional advantage - it can perform, continue and wait on tasks asynchronously!

To use grunt, install it with,

> npm install grunt (-watch, contrib-execute etc)

To use mocha, use the same install method with npm.

Mocha is another simple 'describe-it' unit testing tool for testing JavaScript, Backbone and other client side scripting languages, similar to Jasmine.

And 'chai' adds flavor to the unit tests with the expectations and even 'promise'-s of a BDD.

Chai, too, can be installed using the npm tool.

>npm install chai

The story - watch changes to a file.

Simple steps - add the 'watch' task to the GruntFile.js as below:

Run 'grunt watch'

And every time a change is made to the source file that is being watched, the watch target will get triggered as above:

Change made to the the SQL query causes the watch target to get triggered again:

The actual rows in the DB:

and the package.json:

There are the usual caveats that you may need to reckon with like where to install the packages.

Tip: Always check the node-modules folder of your application. It should look like in the below figure:

The unit test using chai and mocha are as simple.

Execute the test using 'mocha' as:

Uncomment the 'done' lines for async callback to work seamlessly without any timeout issues related to the network or when connecting or retrieving data.

Needless to say, the unit tests wired into grunt tasks and coverage ruling the outcome of the tests and the build is ideal and this, too, is simplified now with grunt, node, mocha and blanket. 

Absolutely delightful tools for Agile!

Saturday, 29 August 2015

Visual Studio Code (Code) 2015 - OmniSharp and some tips

The lightweight VS Code has its pitfalls.

For instance, as I made some rapid calculations on the disk space available for VS 2015 Community Edition to download and install (as it says that a minimum of 6 or 4 GB of hard disk space is required across all available drives, I had made a decision - VS Code is what I would use instead.

VS Code requires only 58 MB of space. Not even in our wildest imagination could we ever have thought of downloading a fully functional Visual Studio without having to calculate the internet speed, the disk space and whether any additional service packs and third-party libraries or add-on components had to be additionally installed.

But, as I said at the beginning, VS Code 2015 has its hidden pain areas. It requires node.js and DNX and DNVM (Dot Net Execution and Dot Net Version Manager), though why you required the additional manager is quite a valid question because 'version redirect' and the config changes were doing the same but the new vision to accommodate Mac and make Visual Studio accessible across multiple platforms is possibly the reason.

What this means is that you can switch the 'use' of the current runtime, view or create aliases and manage all the installed versions of the CLR in your machine.

The Execution Engine(DNX)

DNX is the execution environment as Code does not have any executing environment of its own but relies on Node.js or Mono. There is a misconception that I read in one of those 'code...' dot com that ASP.Net 5 now allows you to develop ASP.Net apps using Notepad without having to open Visual Studio - not so. The article probably missed out in mentioning that Roslyn needs to be installed for Ctrl-F5 to work from Notepad.

The hidden problem is because Code is lightweight, it relies on intellisense to be provided as a plugin from OmniSharp

and OmniSharp makes a big deal about being in the same drive as the Node.js installed and this is not documented anywhere! Despite a fix to the omnisharp.cmd file that has been updated in the Git !

To start off, once you have downloaded VS Code, download Yeoman, a scaffolding tool (since Code does not come with templates as in regular Visual Studio versions) to generate complete project related works ! Download the .zip file and extract the downloaded "yo.master".

Next step is to download Node.js, make sure to download the latest version from here. Once downloaded and installed (make sure in the same drive as Yeoman and Code), open a command prompt and type 'npm install -g generator-aspnet'.

This will install the generator that will allow you to use the 'Yo' tool to generate specific projects, for instance,

'yo aspnet'


and you are ready to create your first project with Code.

Select the type of application, give it a name and wait for the project directory etc to be created. Once done, navigate to the newly created folder.

execute the command, as shown in the yo command screen, "dnu restore". 

This will download all nuget packages and set the project.json for the newly created app.

Once done, just type "code ." to open the application !

The new 'References' shows how many references to an object, variable or member exists in code plus a new "Unnecessary using directive" helps.

To run, simply type "dnx . web" to start the server in Windows at the command prompt: 

or navigate to 'hosting.ini' (this file may vary as per the type of application) and click the link to open the web app in your default browser. For Mac, you may need to use "dnx . kestrel".

Any changes to code means restart the server.

and the web site is up at localhost.

Awesome, isn't it? :)

The amazing 'new' VS Code 2015 - a dream !

It - Visual Studio Code - is a new dream for 'old' fashioned devs, who get tired of watching the new gen take a power nap or go for a refill of their water bottle or simply hang their feet (around) while waiting for Visual Studio open, load a solution or check the source control or at times, quite simply hang!

VS Code is totally no-nonsense - no useless, overloaded features that a developer may never use. Instead, you get a feel of using a Notepad!


1. No solution/project.

Either open a file/folder (and if contains a valid VS project, it will open) or use a .json file.

This is it. The ultimate version of the Visual Studio that I have been using for over a decade!

The whole solution and the projects are ready to use in a jiffy and the folder structure is as is. And opening files of other types does not cause a minute lag to open - it is there as soon as you click the file!

2. You can git the file with the changes with just one click.

You have changes to the code? You don't need to to go to the Team Explorer, check the pending changes and spend 10-15 minutes to stage  a one line code change - simply click the 'Stage' button!

3. Commands at your finger tip to modify any editor/environment/package usage.

but you can go overboard with it, if you do not have your senses right ! :D

4. Debug - done with a .json launch configuration file. You will now need node.js if you wish to use VS Code! Debug using the config file or Attach to a port already running the app.

5. Working files - shows the most recently worked files and the unsaved ones!

An absolutely brilliant product !