Archive

Archive for December, 2013

Happy New Year

December 31, 2013 Leave a comment

Hello everyone,

Wish you all a happy and prosperous year ahead.

Happy New Year!!!

दुर्जनः सज्जनो  भूयात्  सज्जनः  शान्तिमाप्नुयात्।
शान्तो मुच्येत बन्धेभ्यो मुक्तश्चान्यान् विमोचयेत्॥

स्वस्ति  प्रजाभ्यः  परिपालयन्तां  न्याय्येन  मार्गेण  महीं महीशाः।
गोब्राह्मणेभ्यः शुभमस्तुः नित्यं लोकाः समस्ताः सुखिनो भवन्तु॥

काले  वर्षतु   पर्जन्यः  पृथिवी  सस्यशालिनी।
देशोऽयं क्षोभरहितो ब्राह्मणाः सन्तु निर्भयाः॥

सर्वे   भवन्तु   सुखिनः  सर्वे  सन्तु   निरामयाः।
सर्वे भद्राणि पश्यन्तु मा क
श्चिद्दु:खभाग्भवेत्॥

May the wicked become good, may the good realize peace, may the peaceful be released from all bondage; and may the released redeem others.

Well be it with the people; may rulers protect the universe adhering the path of righteousness; may there be welfare always to cows and the learned; may all the worlds be happy .

May the clouds rain at the proper time; may earth be rich with crops; may this country be free from riots and may the spiritual be free from fear.

May everybody be happy; may everybody be free from disease; may everybody come by happy events; may nobody have any misery.

Credits: http://kalyana-kalpataru.org/prayer.html

Advertisements
Categories: Miscellaneous

In search of a client-side templating solution

December 20, 2013 3 comments

After a long time I am posting a technical entry. I am in search of non intrusive client-side templating solution. The following are the requirements

  • Non intrusive Should not require something like

ko.observable, ko.mapping and then tableMetadataViewModel.name(), tableMetadataViewModel.name(‘Employees’)

Ember.Object.create, tableMetadataModel.get(‘name’), tableMetadataModel.set(‘name’, ‘Employees’)

The problem with these kind of solutions is that these solutions are no longer Plain Old JavaScript Objects. They introduce a tight coupling with the templating library / framework which is implicit.

  • Is reactive / supports ‘Live Templates’ To Quote from Wikipedia

For example, in an imperative programming setting, a := b + c would mean that a is being assigned the result of b + c in the instant the expression is evaluated. Later, the values of b and c can be changed with no effect on the value of a.

In reactive programming, the value of a would be automatically updated based on the new values.

A modern spreadsheet program is an example of reactive programming. Spreadsheet cells can contain literal values, or formulas such as "=B1+C1" that are evaluated based on other cells. Whenever the value of the other cells change, the value of the formula is automatically updated.

In this specific context, when I update the name of the table object by setting an alias like

table.alias = ‘e’

It should automatically update in the UI.

  • Two-way data-binding

when I update the name of the table object by setting an alias like

table.alias = ‘e’

It should automatically update in the UI.

And when I update the alias in the UI, it should update the object model.

  • Model as the single-source source of truth In this specific context, when I update the name of the table object by setting an alias like

table.alias = ‘e’

All the places in the UI where table is rendered as a view should be updated.

Reactivity and Two-way data-binding go a long way in helping Model as the single source of truth.

  • Modular
  • Supports defining templates in external files and plays nice with requirejs text plugin.

  • Performs efficiently
  • Supports r.js optimizer & requirejs text plugin

For example splitting the application into small modules that have a single responsibility requires writing many modular templates. But i may result in poor performance if we make many calls to load them from the browser. Bundling them with the r.js optimizer for example can reduce this performance hit.

Granular re-rendering

Reactive templates should not mean the whole template is re-rendered every time model changes.

For example modifying an item, adding an item or deleting an item in a list should not re-render the whole template and instead just re-render / add / delete the concerned item nodes and the whole list or worse the whole template.

No dirty checking

    For example angularjs uses dirty checking that impacts the performance negatively.

Read this to see what I mean http://stackoverflow.com/a/18381836

  • Plays nice with other legacy frameworks / libraries
  • Recently I tried my hand with Polymer Web Components Stack. I ran into a hard to identify issue. Finally the issue was joint.js(+jquery) which I was using in conjunction with polymer was walking the DOM tree and made an assumption that the root node is the document node. Which is not true when it comes to shadow dom.

  • Fits well with Nicholas Zakas’s Scalable Application Architecture
  • Can I find the templating solution that fits well with Nicholas Zakas’s Scalable Application Architecture? Time has to tell.

http://www.youtube.com/watch?v=vXjVFPosQHw

object.observe, web components based?

    Some sort of a dom based templating solution based on object.observe on the modern browsers and an object.observe polyfill in other browsers which do not support object.observe should be good. But looks like knockout, ember etc are not taking up the object.observe route yet. May be I will end up forking knockout and implement one myself.

A build-time two-step transform view?

    Taking a hard dependency on a single templating solution, esp. for a product does not seem right.
    Are there any adapters / abstractions available that help one switch templating solutions over the same Model?
    Any suggestions comments would be welcome.

Year (Career) in review

December 20, 2013 2 comments

I thought of retrospecting on 2012 and my career. It was really below average year for me. Those who have not seen me out of action for such a long time may be wondering, What happened to this guy? Well, to sum up all the problems I went through, this one phrase is enough.

Death-march project, Misplaced trust.

The more the height (trust) is the greater will be the impact when you fall.

What went well

Even though on the material plane everything went haywire, on the spiritual plane I have started.

What went wrong

I placed my trust in the wrong set of people

Chose a death-march project, (even though I knew it was a death-march) on basis of the misplaced trust.

The learnings

  • Workaholism as a way of life is a bad thing.
    • I sent my wife with my parents when she had to go for a test to confirm pregnancy.
    • I was not there with my wife when my daughter was born.
    • I hardly spent any time with my daughter when she was growing up.

    Indeed if I look back, all this seems stupid. I can never get these moments back in my life.

https://codingarchitect.wordpress.com/tag/workaholism/

From peopleware

Workaholics will put in uncompensated  overtime. They’ll work extravagant hours, though perhaps with declining  effectiveness. Put them under enough pressure and they will go a long way toward spoiling their  personal  lives. But only for  a while.  Sooner or  later the message comes  through to even the most dedicated workaholic: Once that idea is digested, the worker is  lost  forever after to the project. The realization  that one has  sacrificed a more  important value (family,  love, home,  youth) for a  less  important value  (work) is devastating.

 

  • I was a zero in the spiritual plane till now. I learnt the hard way as to where to place trust. The only thing that is  trust worthy, permanent is the almighty itself.
  • There are no perfect leaders to depend on, be your own leader

Who are responsible

    To those who helped and to those who back stabbed
    Vazhga Valamudan
    I am the only person responsible. No one else.

What next

    To those interested in What I am planning to do next? I want to be away from this industry till financial situation permits. What next? Whatever it might be, please do not ask me to come back to this industry again. It hurts, every time someone asks me this (Even though the intentions may be noble). If you are well wisher, pray that I find a suitable choice and do not have to come back to this rut again.
Categories: Others