Wednesday, April 28, 2010

Doesnt have a point of view....

He's a real nowhere man,
Sitting in his Nowhere Land,
Making all his nowhere plans
for nobody.

Doesn't have a point of view,
Knows not where he's going to,
Isn't he a bit like you and me?

Nowhere Man please listen,
You don't know what you're missing,
Nowhere Man,the world is at your command!

(lead guitar)

He's as blind as he can be,
Just sees what he wants to see,
Nowhere Man can you see me at all?

Nowhere Man, don't worry,
Take your time, don't hurry,
Leave it all till somebody else
lends you a hand!

Doesn't have a point of view,
Knows not where he's going to,
Isn't he a bit like you and me?

Nowhere Man please listen,
you don't know what you're missing
Nowhere Man, the world is at your command!

He's a real Nowhere Man,
Sitting in his Nowhere Land,
Making all his nowhere plans
for nobody.
Making all his nowhere plans
for nobody.
Making all his nowhere plans
for nobody!

That just sums up my mood right now.

BTW, I got my GSoC :)
Lets hope I can do justice to the project.

Friday, April 9, 2010

Wait and watch

So finally, the day has arrived. I submitted my GSoC application for Mono. If selected I will be working on adding an infrastructure for on-the-fly code metrics analysis.
I could not execute my 'plan' completely however. Eitherway, the lessons learned this year I will apply next year. During the period of writing and submitting proposals I plan on staying in the cool confines of my room :)
I just hope I have not bitten off more than I could chew...

Sunday, March 28, 2010

Application patterns

Creating big applications is a long and difficult process. It is also very vague and non-linear. Design documents change as per the fluctuating needs of the client, limitations of the development environment and programming language, paucity of time and funding, and of course, developer competence. Before one sits down to start writing code, one must have a conceptual overview of the application. This is the architecture phase. Once this conceptual overview has been fleshed out, one starts thinking about the patterns, data types and algorithms to be used. Note that by patterns I mean application patterns and by data types, I mean abstract data types and not data structures. A queue or a stack is an abstract data type and NOT a data structure, queues and stacks can be implemented using either arrays, linked lists or heaps. These are data structures. Data types provide intent, while data structures provide the means. A pattern I want to discuss is the Producer/Consumer queue.
This pattern is useful if you have jobs that are generated which need to be executed in a sequential manner. So we have a queue of tasks and a worker thread that executes those tasks on-the-fly as they are enqueued in the queue. So how is it implemented? Very straightforward. We have a queue, a locking object, pool of threads and a thread monitor. To enqueue, first lock the locking object and call pulse in the monitor. To consume, simply lock the queue, dequeue, and pass on the task to a waiting thread. To dispose simply enqueue NULL in the queue and wait for the threads to terminate.

Friday, March 26, 2010

Lamer and lamer

Obsession is not a good thing. Well, most of the time it is, but becoming too obsessed with something will make you a very lonely person. Obsession is also a sign of greatness; no man who was a master of his craft was a sociable person (exceptions are always there though). Perhaps loneliness is the price one pays for everlasting glory? Anyway my "plan" is coming around quite nicely. If I am lucky I could get 3 maybe 4 slots. If that happens I can rest easy....for some time ;)
So for some news; placed 4th in Eastern Groups, 4th in powerlifting :( , completed Dragon Age: The Awakening, and cramming my head with a lot of code.
Presently I am working on a on-the-fly analysis of code. Lets see how this will turn out.

Wednesday, March 17, 2010

Code Metrics Addin update (beta version available)





I have been working quite a bit on the metrics addin. In the process I also learned quite a bit about the idiosyncrasies of the C# language as well as gained familiarity with NRefactory and the MonoDevelop Dom model. The next logical step would be to implement CQL which should be quite straightforward as I will just need to map CQL to LINQ queries and query the context data structure that I already have.
Here is a screenshot for you to enjoy. A very weird thing is that NRefactory refuses to parse lines in between # regions. So a namespace defined as
#if_something
namespace name1#else_something_else
namespace name2
{....

will not be parsed. Somehow the Dom model recognizes it though.


Saturday, March 6, 2010

Diligence and discipline

Two words that are definitely missing from my life right now. On the academic front I have lost all interest. Seriously, at this point of time in my life, I am sick and tired of never ending exams. They are totally pointless and a complete waste of time. I have no interest in suggesting alternatives because that will be an exercise in futility. Speaking of which I have a powerlifting event I have to participate in tomorrow. I did a 80 kg benchpress some time back. Hope I am in good form tomorrow!
My code metrics project is going on pretty well. Have a lot to learn though, especially the .NET threading model and GTK# as well. I also need to get started with all the pending work of SMS Invite :)

Thursday, February 18, 2010

A lot to write about....

...but no time to write it. Will write a long one after exams which end next Friday. Till then, must study, must study, must study....