tag:blogger.com,1999:blog-9998024517127287042024-03-19T14:10:30.064+05:30VedantaTree ~ The Tree of KnowledgeThe Tree of KnowledgeMohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.comBlogger143125tag:blogger.com,1999:blog-999802451712728704.post-69371108910194093012021-02-07T11:58:00.012+05:302021-02-07T11:58:59.941+05:30Art of Clean Code - Logging<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnp9x2G1IB83Yl6Cy7rmtV58g2Ccfh-gz-7iQSwRU7cLi6EpgGLndaCHROGwqHm3brDwLouNSkxYcah1WcC9PcwZ3VmTgnmvkfITHkT9AJ9PQBEzOR6IFXcoxc-mpUq5HbbMVnejal_o/s720/Art+of+Clean+Code.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="693" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnp9x2G1IB83Yl6Cy7rmtV58g2Ccfh-gz-7iQSwRU7cLi6EpgGLndaCHROGwqHm3brDwLouNSkxYcah1WcC9PcwZ3VmTgnmvkfITHkT9AJ9PQBEzOR6IFXcoxc-mpUq5HbbMVnejal_o/s320/Art+of+Clean+Code.png" /></a></div><br /><p><br /></p><p><br /></p><p></p><blockquote> "In some ways, programming is like painting. You start with a blank canvas and certain basic raw materials. You use a combination of science, art, and craft to determine what to do with them." - Andrew Hunt</blockquote><p></p><p>My first lesson for importance of logging was in 2001-02, from my manager and coach Puneet Agarwal. We were building a framework for Data Bound Swing Components which can be used to design any application using a custom Net Beans kind of IDE, to enable rapid application development.</p><p><br /></p><p>Design was to extend Swing Components, attach metadata for data source/s in context and pass it across component hierarchy using component life cycle events like add/removeNotify, and extend paint/print functions to render the components using data. This seems like a simple design flow, but had complex implementation due to hierarchical nature of UI elements. Data needs to be passed (and cleaned too) from parent to children and vice versa. Which means, any break in this recursive flow or any small miss (ex: even mishandling of data loading in repeated rendering events trigger by Swing) could cause issue in data loading, in rendering, memory management, and on focus kind of user facing features also.</p><p>The only savior to debug in such complex recursive programming environment was 'art of logging'. This is when my manager taught me the importance of logs, including right level of logs with right level of information and easy to understand format. I still remember that lesson and follow it that,</p><p></p><blockquote>Logging is an Art</blockquote><p></p><p>Fast forward today, we have much advanced features in IDE, ex: breakpoints, debug mode etc. These are making debugging much easier with live runtime data and control on start, restart and stop of events. Having said that, when there is issue in server or distributed environments, logs are very useful to understand the issue in one go by looking at logged data. Even in local dev environment also, it is much easier to see the whole system state by reading the properly crafted logs in one go.</p><p>Hence an effective logging is very important for clean code, a code which can be maintained easily for long, a code which can run in production without causing distress in nights for developers / ops / users and is easy to debug and fix quickly if there is any issue.</p><p>Let's talk about few of the important basics to make logging effective, and hence to write a clean effective code.</p><p><br /></p><h2 style="text-align: left;">Have a common understanding of 'Format of Logs'</h2><p>Yes, it is important. Refer to previous blog here about clean code, where we discussed about having standard formatting for codebase in a team, as it makes reading code easy. Same principle applies to logs also. If there are different kinds of log formatting, and patterns, it takes time to understand, and makes sense of it.</p><p></p><blockquote>We should be able to read logs like a Story . A story narrating the state of system in simple words</blockquote><p></p><span><a name='more'></a></span><p><br /></p><p>Hence, decide on a format together as a team, and follow it. Sample format:</p><p></p><ul style="text-align: left;"><li>A message telling stage, state of the system. state1[value1] state2[value2]</li><li>Error caused by <reason>. Expected behavior was <expectation>. errorMessage[message], exception stacktrace if available</li><li>and so on..</li></ul><p></p><p>Format is not that important, however, having a common understanding of format is.</p><p><br /></p><h2 style="text-align: left;">Have a common understand of 'What to Log'</h2><p>Similar to format of logs, having common understanding of 'what to log' is equally important. It helps to instill habit of logging right information as part of team culture, irrespective of components or developers. Ultimately, it helps to have symmetrical logs, with similar level of information which anyone can read, makes sense of the system state/error and can try to fix it. It helps to remove dependency on one person or even one team sometime, at least to understand the system state or cause of failure. Ex:</p><p></p><ul style="text-align: left;"><li>Incoming calls to system with parameters, and response codes or states.</li><li>Outgoing calls, parameters, and responses from other services. (of course after keeping security guidelines for logging in consideration)</li><li>and so on..</li></ul><p></p><p><br /></p><h2 style="text-align: left;">Have a common understanding about 'Level of Log'</h2><p>Logging levels are important. What if all the logs have been put in 'info', it will make system super slow in live environment. Logs, string operations have significant impact on performance. And what if most of the logs are in debug, and there is no way to understand the important states in prod environment without enabling the debug mode, which will slow down the whole system. Same is for warn, error, and fatal too.</p><p>Define what should go where. Do we want to log all incoming and outgoing calls in info to understand important system interaction data. Do we want to log all intermediate important events in info. Do we want to log all state changes in debug, so as to debug any issue by just switching these on. Do we want to log db access failure as error, or it should be logged as fatal as we dont have any fallback db to failover automatically.</p><p>Have a common understanding as Team and follow it.</p><p><br /></p><h2 style="text-align: left;">Define Infra, Tools to read the Logs</h2><p>Defining tools and required infra to ingest, digest, and present log information in easy to retrieve and easy to read format is very helpful. If setup correctly, it saves lot of efforts (especially in distributed environments) of finding log files from different machines, collating data and then of making sense from multiple sources.</p><p>There are lot many awesome log analysis tools available nowadays, both open source and commercial. Pick one which makes good sense for your product, team and organization and use it. It is time, efforts savior and save team from frustration too in case of production issues.</p><p>Few examples of tools and framework: ELK, Graylog, Splunk, Sumologic, Logmatic. Here is one of the good blogs briefing about these tools.</p><p><br /></p><h2 style="text-align: left;">Use all of above hard work for Monitoring, Alerts, and Stats</h2><p>Once logs are in place, format and level of information is defined, tools to digest and present logs are configured. We are all set to utilize this information for higher purpose, which is to make life even easier and to make product more rich.</p><p>Setup monitoring on specific logged data and keywords which can help to raise alerts in case of any bad and good both kind of events. Support teams, dev teams can be informed at first sign of issue in system, giving them chance to act proactively, manage the issue or users or both.</p><p>An effective log monitoring system could be life savior by monitoring Vital Health signs of System proactively</p><p>Data generated by logs can be analyzed further to understand the usage pattern. This data can further be used to enhance, improve system resilience or product features also. Ex:</p><p></p><ul style="text-align: left;"><li>Analysis of traffic volume for all APIs can help to scale system and services proactively.</li><li>Analysis of pattern for feature usage can help to define the strategy for future feature enhancements, by understanding user behavior proactively.</li></ul><p></p><p>There are many good blogs and resources available online for logging best practices and for tools, which can help to research best strategy. However, The most important aspect is to have a common understanding of log patterns, and analysis need. Once these basics are defined, agreed and followed at team level, rest of the ecosystem can be built easily around that.</p><p><br /></p><p>We shall discuss more about error handling and documentation in next blogs.</p><p>Till then, Happy Coding..!</p><div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-43338511042895119152021-02-07T11:52:00.001+05:302021-02-07T11:53:06.391+05:30Art of Clean Code<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCfnRSzRJ6GaKGcsp1Q_p2PWMT_29-TMKiG34OTSuwGGOuwSQaXDbaBUMzBN1lV0HphXWeQnaCPz1Zb_xobzkrd2WUXKN9GMK1GjUK2HhtFgZRgNTSilfEnMDlNyj7OchtyTOQMBlo63M/s720/Art+of+Clean+Code.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="693" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCfnRSzRJ6GaKGcsp1Q_p2PWMT_29-TMKiG34OTSuwGGOuwSQaXDbaBUMzBN1lV0HphXWeQnaCPz1Zb_xobzkrd2WUXKN9GMK1GjUK2HhtFgZRgNTSilfEnMDlNyj7OchtyTOQMBlo63M/s320/Art+of+Clean+Code.png" /></a></div><br /><p><br /></p><p><br /></p><p> If someone ask me who is my Guru for Java, I would say 'Sun Microsystem' and 'Apache Foundation'.</p><p>I am from a generation, where most of the programming learning was by reading Java source code. Internet was not a big store of many rich blogs or forums, and hence reading through code was the best resource. Moreover, kind of components we built, were not possible without understanding the behavior of system we are extending. Hence reading through code was almost mandatory for building right extension, and the products.</p><p>One notable thing, I still remember and admire about Java and Apache kind of products source code is, clarity of code constructs and rich documentation, code which speaks its intention very clearly. That made the code reading experience enjoyable and easy like a story book. I remember reading tons of code of Swing, Concurrent library, Collections and Apache Axis etc like a novel. Much of the credit of reading such large codebase was to that effective coding and documentation style, which developers followed to write such code.</p><p>Fast forward today, we are in era where doing more by writing lesser code is sought after style. With availability of functional language, many abstract language constructs and lambada expression kind of support, it makes all the sense and makes code less bulky too.</p><p>Yesterday or today, then or now, basic principles of writing clean code are same and equally required. Ultimately it is all about art of writing readable code, clean code, a code which speaks of its intention clearly, where it is hard for bugs to hide, a code which can tell about any dysfunction loudly.</p><p>What is clean code:</p><p></p><blockquote>Any fool can write code that a computer can understand. Good programmers write code that humans can understand - Martin Fowler</blockquote><p></p><p></p><ul style="text-align: left;"><li>A code which can be read easily by anyone and everyone other than its original author.</li><li>A code which speaks of its intention clearly, either with write naming convention or with documentation as relevant</li><li>A code where it is hard for bugs to hide</li><li>A code which can tell about any dysfunction in system loudly itself</li><li>Let us talk in brief about some of key enabler principles for clean code.</li></ul><p></p><p><br /></p><h2 style="text-align: left;">Meaningful Names - Names which reveals intention</h2><p>If I need to choose one most important thing for clean code, I will pick this. That is its importance for code readability and maintainability.</p><p>Picking right name, which can reveal its intention of existence is very important. It takes time to pick right name, however, that effort and time are worth it as it could save hours of efforts later to understand the code or any issue.</p><span><a name='more'></a></span><p><br /></p><p>Simple thumb rule > As soon as one read name of class or variable or function, it should tell loudly 'Why I exist'. This rule applies to names of Package, Class, Variable, Function, database tables, columns, property files, properties everything. Even name of iterator variable in for loop is equally important to keep code readable.</p><p>Few pointers:</p><p></p><ul style="text-align: left;"><li>Use pronounceable names. Use full name, rather than acronym which needs a dictionary later. Ex: ctrlGpForPt > controlGroupforPatients.</li><li>Don't be afraid of long descriptive names if it makes reading easy. Let VM, compiler, IDE handles lengths for us.</li><li>Avoid confusing names for similar constructs, make clear distinction. Ex: accountActivation, accountToReactivate, accountActivated < has high potentional of confusion while reading the code.</li><li>Use same pattern for similar operations. Ex: getRecords to get data from database, instead of using get, fetch, retrieve at different places</li><li>Use domain names as much possible, as it helps reader later to make sense of code quickly as long as they understand the product domain. Ex: jobProcQueue > accountProcessorQueue</li><li>Names should make reading code simple, rather than need to juggle the logic and multiple name <> construct relations in mind for readers.</li></ul><p></p><p><br /></p><h2 style="text-align: left;">Keep Length of Constructs in Check</h2><p>It could be asked that what's in length if names are good, and code is clean. However, length of implementation for any construct defines the complexity for readers. Human mind can keep limited complexity and data in memory at a time. More we add to this, more it needs to juggle with memorizing and cross referencing.</p><p>Solution is to keep length in check for classes, and functions both. Easiest approach is, if there is some code doing related work, bundle it in separate function and call. Reading a function of 50 lines with 10 function calls of meaningful name is much easier than reading and understanding function of 500 lines.</p><p>Hence, break the implementation in multiple small functions with meaningful names.</p><blockquote><p></p><blockquote><blockquote>Keep it smaller than small!</blockquote></blockquote><p></p></blockquote><p><br /></p><h2 style="text-align: left;">Principle of Single Responsibility</h2><p>This is not only the architecture principle (Read more here), but equally applicable to low level design or function implementation and code readability also.</p><p>We started this article with principle that names should reveal the intention. How is that possible if a function or class is carrying multiple responsibilities.</p><p>If any class or function is serving more than one intent, break it further.</p><p><br /></p><h2 style="text-align: left;">No Side Effect Code</h2><p>It is an extension of previous point.</p><p></p><blockquote>A code should do what it is supposed to do. Nothing more, nothing less.</blockquote><p></p><p>Ex: Login function should check the authentication, may check and initialize the information for authorization. But, it should not initialize the JSON structure for UI Rendering. That will be like cutting the concerns, which defeat Principle of Single Responsibility and clear intentions both.</p><p><br /></p><h2 style="text-align: left;">Have Same Code Format in a Product</h2><p>How would you feel about reading a book which has 10 different fonts, indentation and color styles in 10 chapters. Not comfortable surely. Same is with code. Having same format across the classes, packages, modules make it easy to read the code.</p><p>Solution: Define formatting rules with team, and follow it everywhere. It is one of the easiest thing to implement by agreeing and defining a common code formatter config which is used by all developers in IDE.</p><p><br /></p><h2 style="text-align: left;">Length of a Line</h2><p>Does it really matter..... ?</p><p>Yes, it matters a lot. Length of line should be set according to normally used monitors width. It might be good to have 40 or 80 line length earlier with smaller screen, but now with wider screen monitors, it makes all sense to have it at least 120 as standard.</p><p>It makes code readable by keeping contents in same line, rather than reading multiple lines. Visualize reading a function name with 5 parameters in 3 lines, verses in one line.</p><p><br /></p><h2 style="text-align: left;">Keep Related Code next to each other - Better Top Down</h2><p>Although finding function is easy with IDE shortcuts. However, reading should be easy just by mouse scroll also in a class. Hence, it is advisable to keep related code next to each other, and better in top down format where reader can start from top and keep following next methods down similar to book reading.</p><p>One step closer to writing code which can be read like story book!</p><p><br /></p><h2 style="text-align: left;">Assert if something is not as Expected</h2><p>Assertions are not only to just check parameters. These are powerful tools to validate the behavior of system, when no one is looking at it.</p><p>Don't we expect our car to tell if engine oil or coolant is less. Or if there is some impurity in fuel. Why, because it makes our life easy by taking proactive action timely that also without spending hours to understand the reason before car breaks down.</p><p>Same is true for Software Systems too. A system should tell if something is not correct in it. Tastefully designed assertions (+ monitoring, alerting) can make developers life much easier by shouting erroneous conditions before these become big issue, like corruption of whole data in system.</p><p>Hence, spend quality time in designing assertions in your code. And before that, define a standard to log and report these assertions.</p><p><br /></p><blockquote><p>A self-validating system (code) is the best system!</p></blockquote><p>There are few more important aspects of clean and maintainable code, which are Error Handling, Logging, Tests for Self validating Systems and Documentation. We shall talk more about these in next blog.</p><p><br /></p><p>Till then, happy coding..</p><p><br /></p><div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-43461424279782828072020-10-25T14:05:00.003+05:302020-10-25T14:06:52.646+05:30Story of Story Points<p></p><p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">"Let's
use Story Points</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Why?</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">We
are following agile now</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Yayy..
story points!</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">How
many hours these epics, stories will take?</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">But
we are using story points..</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Yeah,
but we still need to plan. Hours are better for that. 1 SP - 5 hours. ok?"</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Heard
this story of story points many times.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">-----</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">It
is important to understand why do we need Story Points? Is it mandatory for
being agile? Are hours prohibited?</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">The
key motive for story points or hours is that we need to estimate the work, so
we can tell what can be achieved in given time. Hence, we try to estimate.
Hours are used since long because time is easy measure for us, and we can
quantify easily, 'accurately'.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">However,
it become challenging when we found that even after best try, it is hard to
estimate the time. It is more and more true in non-mechanical activities, where
outcome depends on many intangible factors like skills, information available,
mood, motivation, environment and so on.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">If
estimates can not be done accurately, then why to estimate. Let us just keep
working and ship whatever is done. And this is also one of the philosophy and
may work in specific setup. However, most still need a roadmap with understanding
of possibilities which feed into overall plan of business.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">'Possibility'
is the key word here. We gradually understood that accurate estimate is not
semantically and practically right. However, we can try to have best guess
based on available information, which reflects the possibilities. As long as,
we accept this fact, that we are talking about possibilities, hours or story
points or tshirt size or anything else works.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">If
we consider this, ultimately, it boils down to 'common understanding'. Common
understanding that when we are estimating, we are talking about possibility. If
we all are good with this, any unit can be used for estimation.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Building
up on this understanding, let us talk about common understanding. How easy or
difficult is it to have common understanding with many people of different
skills set, experiences, background, motives, different stakes and
responsibilities. There are so many psychological factors, which makes it
difficult to have this common understanding, more so if unit of measurement
(hours) is traditionally used for accurate outcome. As soon as, we say x hours,
it triggers a mental understanding of accurate number and then we want to see
that getting materialized. People usually understand that estimates are just
estimates. But as soon as we attach it with Hours kind of definitive measure,
it build up expectations of accuracy. This is the key challenge to address.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p><p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span></span></p><a name='more'></a><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";"><br /></span><p></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">To
address above challenge, efforts were made to bring some kind of abstraction.
That's where Story points help. With story point estimation,</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<ul type="disc">
<li class="MsoNormal" style="line-height: normal; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">We are not
estimating individual story, rather we are estimating 'stories' relatively
in respect of each other. It removes the feeling of accuracy, being
relative.<o:p></o:p></span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">We are
separating amount of work and efforts required to complete this work.
Story points reflects amount of work (considering complexities/risk etc)
Which helps in having common understanding faster. It is easy to agree on
amount of work, than for efforts required to complete it.<o:p></o:p></span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">Estimates
are given by team, for team. These does not reflects any individual
capacity. Hence we are focused more on team capability, rather than
individual stars.<o:p></o:p></span></li>
</ul>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Let
us take an example</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Team
A is based in Singapore, have 5 team members. Team does outdoor activities
every month, which is relay cycling. First month, they choose from office to
East Coast park. Because whole team is familiar with area, it was easy to
settle on distance estimation from office to park (assuming no google map :) ),
say x km. Everyone agrees after some discussions, that it feels like x km, normal
route with good roads from office.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">How
much distance each can cover depends on individual cycling speed, practice,
fitness, cyclic condition etc. Hence, distance covered by each team member can
vary a lot. Team agrees that everyone will cycle for a given time. Distance can
vary based on individual capacity.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">First
month, member A cycles 'a' km, B covers 'b' and so on. Finally team covers y km
in decided time, which is equal to x-n, few km less than actual park distance.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Next
month, they went again for same route. As they already have experience of this
route, they knew in advance that how much they can cover. However, when they
cycled, weather was nice and hence members were able to cover few more km due
to pleasant environment, ie y+n.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Next
month, same route, they were able to cover whole x km. Because team got
experienced about route, knows all the turns and hurdles, and members were also
getting more skilled in cycling.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Following
month, they picked a new target. They agree on distanced which was Y km. This
time, as they are well aware about team capacity, so they set y-x as first
month target. And they were able to meet that.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Next
month, they went again with same target. But they were able to cover lesser
this time, because one team member was not in good mood and hence was cycling
slow.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">After
cycling for 5-6 months, now they know how much they can cycle together in
relay. They know each team members usual capacity, and capability to manage
hurdles. They also consider other moving factors while calculating like mood,
weather, road conditions etc. And accepted that these can again change anytime
to either side.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">In
this story, distance/complexities from office to East Coast park is Story
Points. Which is an estimate of total work, not the time needed to cover that.
Total time to cycle is the sprint duration, which is fixed based on
whatever team thinks appropriate. The average distance covered by team over the
months is the velocity of the team.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Overall
team knows their capacity now (velocity) and can try to estimate any new target
based on this understanding in much better way. But they are still open for
variation as there are always many moving factors.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Team
B is based in USA. They are also doing similar relay cycling. They interact
with Team A once in a while to discuss. To their surprise, they were covering
much lesser distance than Singapore team. On further discussion, they found it
is because they have many new members in team who just started cycling and
weather is also very cold which slows down the pace.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Finally
both understand and agree, that velocity of Team A and B will be different as
team, experience, weather, geography is different.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Next
month, Team Manager comes with a new opportunity of cycling in a place, new to
both the teams. Both teams explored about place for whatever information they
could get. They give their estimates of distance/complexity/risk ie story
points based on understanding of place by each team. Estimates were different
from both the teams, as their understanding and assumptions of new place, and
understanding of story point in each team is also different. Everyone also
agrees that as it is new place, there can be some surprises which may impact
the velocity.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">As
estimates i.e story points were different from both teams, teams decided to
pick items one by one, and start delivering it. If any of the team finish
before their estimation, it can always picks more. Ultimately goal is to
complete the work as Team, while appreciating factor that every team has different
understanding of story points and velocity also.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">But
how does it work in overall planning and budgeting for management: Size of team
i.e. capacity is fixed. Manager knows the velocity of team. Any new work is
estimated by team as story points, which divided by velocity gives idea of
tentative timeline.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Isn't
it just tentative, as sprint points are telling the amount of work and not the
time required. Velocity is just the average of amount of work delivered by
team. And that's right. Estimates are meant to be tentative, even if we use
hours.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Why
can't we use hours then</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<ul type="disc">
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">Relative
vs Absolute: Story points are estimation of amount/complexity/risk of
work, and is relative to other work items. While Hours is a wish to have
absolute value for time required to complete it, in an effort to bring
certainty in estimates.<o:p></o:p></span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">Acceptance
of Diversity, Safe Environment: Velocity reflects the team's capacity to
deliver the work. While hours trigger the judgement of individual capacity
to deliver the work. Story points, which are estimates at team level,
accepts inherently that people have different skill set, and experience
which will result in different amount of work. Story point and Velocity at
team level provides an abstraction over this, and creates a safe
environment for team while accepting the diversity.<o:p></o:p></span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">Trust in
People over Tracking: Story pointing and velocity based planning also
strengthen trust in team, people. Where we believe that team has best
intention to deliver and will keep picking work as they complete the last
one. Hours triggers the usual tracking routine, with possibility of going
into how many hours were committed, how many have been consumed, who took
more time and why. It is vicious loop, once we slip in that. On other
side, trust empowers and motivate people to deliver more than what one can
think.<o:p></o:p></span></li>
</ul>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Does
that mean that we should not use hours at all - We should leave it to team. If
team is feeling more comfortable talking in term of hours as it can give them
more concrete data at least for immediate work in hand, they can choose to talk
in hours.; However, for distant roadmap, hours always fail the planner. Hence
it is better to go with abstract units, which can inherently reflects the
uncertainty.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Are
story points mandatory for Agile - No. Agile does not talk about estimation
methodology. Agile is philosophy, mindset about doing the work and how team can
operates to maximize the outcome. It is not a framework or set of procedures to
follow.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">There
are discussions around #noestimation too. If we combine above points, it is on
similar lines where we build a good team, and then trust team to deliver, and
don't spend time on estimates which always changes. Rather we increase the
frequency of re-planning and adopting to new realities. Team delivers more this
way, rather than by giving estimates, try to stick to estimates by working
overtime or vice versa, and being questioned later with a possible dent on
motivation.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">In
agile, (customer) Story matters over anything else, and a trusted team is what
it takes to build the (success) Story.</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">What
is your story of story points or 'Being Agile'..</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<p class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; vertical-align: baseline;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman";">Few
good references:</span><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p>
<ul type="disc">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">https://www.ispi-llc.com/blog/2018/8/8/anti-pattern-assigning-story-points-during-backlog-grooming<o:p></o:p></span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">https://medium.com/serious-scrum/12-common-mistakes-made-when-using-story-points-f0bb9212d2f7<o:p></o:p></span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in; vertical-align: baseline;"><span style="font-family: "Times New Roman",serif; font-size: 12pt; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";">https://tech.xing.com/when-story-points-misfire-88b068bfc97c?gi=3972383b8250<o:p></o:p></span></li>
</ul>
<p class="MsoNormal"><span style="font-family: "Times New Roman",serif; font-size: 12pt; line-height: 107%; mso-bidi-language: HI; mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span></p><br /><p></p><div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-59981979777542459672018-12-21T05:27:00.001+05:302018-12-21T05:30:26.595+05:30Daily Stand-Up - Not Just a Ritual<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="color: #172b4d;">
<span style="font-family: inherit; letter-spacing: 0px;">Here is a brief write-up about Daily Stand-up ritual of 'Being Agile' journey. </span></div>
<div style="color: #172b4d;">
<span style="font-family: inherit; letter-spacing: 0px;"><br /></span></div>
<span style="color: #172b4d; font-family: inherit;"><span style="letter-spacing: 0px;">Motive is to give quick overview about this </span>ceremony<span style="letter-spacing: 0px;">, sharing some of the </span>learning<span style="letter-spacing: 0px;">. For detail reading, I would recommend the link given at the end of this article. </span></span><br />
<div style="color: #172b4d;">
<strong style="letter-spacing: 0px;"><u><span style="font-family: inherit;"><br /></span></u></strong></div>
<div style="color: #172b4d;">
<span style="font-family: inherit;"><strong style="letter-spacing: 0px;"><u>What is the purpose</u></strong><span style="letter-spacing: 0px;"> of daily stand-up:</span></span></div>
<ul style="color: #172b4d; margin: 10px 0px 0px;">
<li><span style="font-family: inherit;">Shared understanding of goals and current status </span></li>
<li><span style="font-family: inherit;">Plan your day (self-management)</span></li>
<li><span style="font-family: inherit;">Coordinate efforts, ask for help, offer help</span></li>
<li><span style="font-family: inherit;">Ensure team communication</span></li>
<li><span style="font-family: inherit;">Identify as a <u>Team</u></span></li>
</ul>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;"><strong><u><br /></u></strong></span>
<span style="font-family: inherit;"><strong><u>What are daily stand-up basics</u></strong>, and these are designed for important purpose (refer to links given at the end):</span></div>
<ul style="color: #172b4d; margin: 10px 0px 0px;">
<li><span style="font-family: inherit;">Fix time</span></li>
<li><span style="font-family: inherit;">Fix place</span></li>
<li><span style="font-family: inherit;">Must not be more than 15 min</span></li>
<li><span style="font-family: inherit;">Whole team gather themselves</span></li>
<li><span style="font-family: inherit;">Everyone derive her/his status following three scrum magical questions. <strong>Important:</strong> It is all about sharing plan, not the task names. Focus should be, what I am doing to contribute to delivery.</span></li>
<li><span style="font-family: inherit;">Breakout session at the end or later, if anyone need to discuss more</span></li>
<li><span style="font-family: inherit;">Share plan which makes sense to team in bigger context for delivery, It is not about status sharing.</span></li>
<li><span style="font-family: inherit;">Only PIGs are allowed to speak. Chickens can join as listener although (refer to scrum pig/chicken story please)</span></li>
</ul>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;"><br /></span></div>
<div style="color: #172b4d; margin-top: 10px;">
<strong><u><span style="font-family: inherit;">NOT to do:</span></u></strong></div>
<ul style="color: #172b4d; margin: 10px 0px 0px;">
<li><span style="font-family: inherit;">Not being regular</span></li>
<li><span style="font-family: inherit;">Coming without preparation</span></li>
<li><span style="font-family: inherit;">Story telling </span></li>
<li><span style="font-family: inherit;">Problem solving</span></li>
<li><span style="font-family: inherit;">Using it as reporting or tracking meeting, </span></li>
<li><span style="font-family: inherit;">Reporting to a Leader or to SM or to Manager. It is all about team communication.</span></li>
<li><span style="font-family: inherit;">Work assignment - Mostly, it is done during sprint plan and weekly scrum. There could be few exceptions like helping anyone or any critical work, which team can take call.</span></li>
<li><span style="font-family: inherit;">Running across locations (Soln: break in co-located teams. Share the brief in Teams space – only if day to day work is too interdependent - which is neither ideal, nor productive)</span></li>
</ul>
<div style="color: #172b4d; margin-top: 10px;">
<strong style="letter-spacing: 0px;"><u><span style="font-family: inherit;"></span></u></strong><br />
<a name='more'></a><strong style="letter-spacing: 0px;"><u><span style="font-family: inherit;"><br /></span></u></strong>
<strong style="letter-spacing: 0px;"><u><span style="font-family: inherit;">General Guidelines:</span></u></strong></div>
<ul style="color: #172b4d; margin: 10px 0px 0px;">
<li><span style="font-family: inherit;">Please ensure presence during daily stand-up. This is very <strong>important. </strong></span></li>
<li><span style="font-family: inherit;">Start gathering at scrum board yourself at decided time, instead of waiting for someone to call.</span></li>
<li><span style="font-family: inherit;">Groom habit to share your updates and plan yourselves, without a need of someone putting efforts to move the baton. It is your time to share, coordinate and plan the day.</span></li>
</ul>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;"><br /></span></div>
<div style="color: #172b4d; margin-top: 10px;">
<u><strong><span style="font-family: inherit;">Recommended Flow:</span></strong></u></div>
<ul style="color: #172b4d; margin: 10px 0px 0px;">
<li><span style="font-family: inherit;">Team gathers at decided time</span></li>
<li><span style="font-family: inherit;">One person (can do in sequence of who came last :) ) start sharing his/her status and plan using 3 questions, along with moving or adding new tickets on scrum board. Ex: </span><ul style="list-style-type: disc; margin: 0px;">
<li><span style="font-family: inherit;">Team member A: I completed the validator implementation yesterday and pushed the code. I picked transformer feature, but could not complete as I am not clear about some design aspects. I shall continue with transformer implementation today, if someone can help me to solve design gaps. Or I shall pick the E2E test case, next item in back log. </span></li>
<li><span style="font-family: inherit;">Can someone help me today for design discussion?</span></li>
<li><span style="font-family: inherit;">Team member B: I can help today. We shall decide time after this meet.</span></li>
<li><span style="font-family: inherit;">Rotate to next member.</span></li>
</ul>
</li>
<li><span style="font-family: inherit;">At the end of update, people can ask brief question if any. </span></li>
<li><span style="font-family: inherit;"><strong>Important:</strong> Any longer discussion, or problem solving, or technical discussion - please raise hand to do break out session later.</span></li>
<li><span style="font-family: inherit;">Rotate in whole team. </span></li>
<li><span style="font-family: inherit;">Done!</span></li>
</ul>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;"><br /></span></div>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;">Remember, <u><strong>Agile is all about self-organization</strong></u>, taking feedback, keep adapting to these and keep improving - of-course delivery in smaller chunks, along with increased level of human to human interactions. All these rituals are just enablers for these basic principles.</span></div>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;"><br /></span></div>
<div style="color: #172b4d; margin-top: 10px;">
<span style="font-family: inherit;">Following a <strong style="letter-spacing: 0px;"><u>highly recommended</u></strong> read:</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">- <a href="https://martinfowler.com/articles/itsNotJustStandingUp.html" style="color: #0052cc; letter-spacing: 0px;">https://martinfowler.com/articles/itsNotJustStandingUp.html</a></span></div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-64283492922670424092018-10-28T00:43:00.001+05:302018-10-28T00:43:23.798+05:30What Great Leaders Do - Continuing<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
Covering rest of the two points which I promised in <a href="https://www.vedantatree.com/2018/10/what-great-leaders-do.html" target="_blank">previous post</a>. </div>
<div>
<br /></div>
<div>
<b>4. Create a sense of Belonging and Purpose</b></div>
<div>
<br /></div>
<div>
An important feeling for all of us is feeling of 'I belong here'. This feeling is everything. It defines the comfort for us, for team. It defines the efforts, real contributions, and the results. It defines how much team is connected with the Organization. </div>
<div>
<br /></div>
<div>
Fostering this feeling is not easy. Leaders helps to create, nourish, and empower the environment which can help in fostering this feeling.</div>
<div>
<br /></div>
<div>
'<u>Promote Environment for Being thyself</u>' - This is the big contributor to feeling of Belonging. If people feels, they are accepted for what they are and need not to change just to fit in, they feel comfortable. It is not about being rigid, or averse to change or learning. Rather it is more helpful to promote learning. Learning comes from adaptability and adaptability starts with being comfortable with oneself, without being defensive or faking any of the trait just to fit in. Once people are comfortable in being what they are, they are actually better aligned to learn and improve to next level, while being connected to the Organization. </div>
<div>
<br /></div>
<div>
One of the mistake we can do is to have one mold to make everyone perfect and fit in our own world. That is a trap which seems like working at first, and is very well doable with all the great powers, but it will eventually stop people from learning and to use their genuine talent. Eventually they either just 'fit in' or don't belongs to the place. In both the cases, we loose the talent.</div>
<div>
<br /></div>
<div>
Leaders accept their team for who they are, however, have genuine interest to help them to learn, grow and become better version of themselves.</div>
<div>
<a name='more'></a></div>
<div>
'<u>Making everyone feel Valued</u>' - Everyone likes recognition, everyone like to feel valued for what they do. Leaders recognize the importance of this and ensure that they make it priority in their conversations. They ensure to communicate in a way which promotes the value of team members, either in-person 1:1 or in meeting, depending on individual needs. </div>
<div>
<br /></div>
<div>
It is not about 'lip service', however, leaders are genuinely interested in ensuring that everyone become valuable. Hence, they design assignments in a way which can utilize individual talent. Leaders learn to make even 'a simple looking assignment' valuable, by genuinely linking its impact to higher goals and by encouraging innovation and creativity in every smallest thing.</div>
<div>
<br /></div>
<div>
Team feel encourage when their work has a visible impact on the team and Organization goals. "A person who feels appreciated, will always do more than what is expected"</div>
<div>
<br /></div>
<div>
'<u>Give a purpose</u>' - People have innate desire to do something better, bigger which they can be proud of. Leaders believes in this and give right platform to team to achieve this. They connect smallest work with bigger goal of Organization and give team a purpose to strive for. Purpose helps everyone to be focused, to move in right direction, to be clear while making decisions, and to feel connected with their work and hence the Organization. </div>
<div>
<br /></div>
<div>
Purpose is important in work, and in life both. It encouraged us to keep moving even in challenging times as well. </div>
<div>
<br /></div>
<div>
Having a clearly defined purpose to align with, being valued for the contributions and individual skills without a need to change, just for the sake of fitting-in, connect the people with team and Organization both. It encourage sense of belonging, which define the whole experience for individual, for team and for Organization. </div>
<div>
<br /></div>
<div>
<b>5. Promote Learning</b></div>
<div>
<br /></div>
<div>
We talked about 'learning' throughout the article, be with 'Invest and Trust' or 'Sense of Belonging and purpose'. Learning is the key throughout leadership journey. None of previous points can be achieved without learning continuously. Leaders understand its importance well, and hence they are open for the learning themselves and ensure learning culture for team as well. </div>
<div>
<br /></div>
<div>
What is learning culture - where everyone is open for the learning and actually doing it. Where learning and hence sharing is encouraged and rewarded and is well aligned with goals.</div>
<div>
<br /></div>
<div>
How to build such culture: </div>
<div>
<br /></div>
<div>
<u>Set an Example, Lead by Example</u> - There is no better approach than to set the example for the teams. Leaders lead by example for learning as well, by sharing what they know, and by learning what they don't know. Leaders themselves keep learning and team follows that.</div>
<div>
<br /></div>
<div>
<u>Promote expertise of others</u> - Leaders are good in picking the individual's expertise and then in promoting it. It not only helps to bring the recognition for individuals, but also promote the learning for other team members from that expertise. </div>
<div>
<br /></div>
<div>
<u>Do it Consistently</u> - Leaders are consistent in promoting the learning, and in sending right messages to support it. It is not 'one day' or 'one event' or 'one training' job. Learning is a continuous activity which teams need to adopt in every activity they do. Ex: Any and every ceremony in Agile or project management is an sharing and learning opportunity. Every retrospective, every broken delivery or every conflict around is a learning opportunity. If it is not already, make it a learning opportunity.</div>
<div>
<br /></div>
<div>
It is an ancient wisdom that 'Learning never ends'. And in such a fast changing era, where technologies and skills are getting replaced every couple of years, there is no option but to keep learning for growth of team and Organization both. Leaders know and believe in it whole wholeheartedly. </div>
<div>
<br /></div>
<div>
"Leadership and Learning is indispensable to each other" - John F Kennedy </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
This brings us to the end of the list finally. Hoping all would have become leaders by now. If not, please start practicing :). Everyone is a Leader or Everyone has capability to be a great leader. It is matter of knowing yourselves, accepting whatever it is, and then move on for a learning journey. 'Of course leaders are born.Then they are made'</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b><i>"Leadership is not about titles, positions or flow charts. It is about one life influencing other" - John C Maxwell</i></b></div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Anonymoushttp://www.blogger.com/profile/18064920213670122888noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-3799196106576089772018-10-13T15:51:00.002+05:302018-10-14T11:41:11.019+05:30What Great Leaders Do<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
'What Great Leaders Do' - I don't buy the greatness of 'Great' word, it is simply a search keyword :) </div>
<div>
<br /></div>
<div>
Whenever I think what leaders do, few flashbacks always help me, when I heard following advice from my mentors.</div>
<div>
<ul style="text-align: left;">
<li>'Let us see how we can solve this problem yours way'</li>
<li>'Show people what you think, so they know what you think, and your management style'</li>
<li>'Understanding context, Respecting everyone, Integrity in words and actions are important ingredients to manage the talent'</li>
</ul>
</div>
<div>
Adding some observations and learning, I experienced so far. Promising, will not make it a long list, but explanation for each point could be long. </div>
<div>
<br /></div>
<div>
<b><span style="color: #20124d;">1. <u>Ensure that People feel safe</u></span></b></div>
<div>
<br /></div>
<div>
This is the first priority for the leaders. They reflect this in all of their actions, and words. They work on it day in, day out. </div>
<div>
<br /></div>
<div>
Why does this has to be a day in, day out job. Because once you are in leadership role, every action impact the masses. The way you communicate, listen and respond, write emails, body language, how you respond to conflicts, how you react to mistakes and failures, all these are followed closely by the team. Every single action is a clue for team, to deduce that how safe they are around you.</div>
<div>
<br /></div>
<div>
Why does feeling safe so important. Let us understand it from neurological perspective. </div>
<div>
<br /></div>
<div>
When Human being faces threat (physical or mental), our self-defense mechanism kicks in and make us ready for 'fight or flight'. Result, arteries get tightened and tensed to pump more blood to body elements. Heart works rapidly and hard. When body is working so hard to manage the threat, naturally our brain can not focus on creativity, executive functions or social engagements. </div>
<div>
<br /></div>
<div>
Hence, if team is not feeling safe, we loose Creativity, Executive thought process and most importantly Social Engagements which is the basis of team work. Loosing these means, loosing the team and organizational goals as well.</div>
<div>
<br /></div>
<div>
Next, important point is how to ensure this safety net.<br />
<br />
<a name='more'></a></div>
<div>
A simplistic option is, say and believe that 'it is ok to make mistakes'. Of course as long as we are learning from mistakes. The day your team believes that you believe in this, they will become more transparent, will start sharing ideas, and will start taking risks to experiment and innovate. The day they believe that they are not judged for accepting mistakes, they will start taking ownership.</div>
<div>
<br /></div>
<div>
Not being judged, for every mistake or failure, has a big impact on the way team places itself.</div>
<div>
<br /></div>
<div>
It is also about practicing high moral standards and ethics by leader, which increase team's confidence in leader. It is about doing 'Right' things, even if it takes choosing tougher path. It is not about having 'guts' to do the right things - if we are not at war. It is more about having stamina, persistence and intentions to keep moving for right things.</div>
<div>
<br /></div>
<div>
What more a team can cherish than knowing that their leader always tries to do right thing, which means s/he will not do wrong for team as well (another safety net).</div>
<div>
<br /></div>
<div>
Now these actionable items could be quite contextual. How to decide what is Right and what is not. What is morally high standard and what is not. This needs another book itself to discuss or may be life time efforts to understand. </div>
<div>
<br /></div>
<div>
To start with, one thing which leaders do is 'Walking the Talk, and Talking the Walk'. And this helps people around to feel safe. Reason, they see what it is. Safety comes from knowing the unknown.</div>
<div>
<br /></div>
<div>
To solve puzzle of moral standards and ethics, one easy approach is to be connected with your values in your actions. 'But how do I know my values'. I like the practice to visualize what you would like to hear from people at your funeral or more importantly, if this is your last day, what would you like to cherish if you look back. These practices helps to understand your values, i.e. 'what you value most'.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b><span style="color: #20124d;">2. <u>Invest in People and Trust them</u></span></b></div>
<div>
<br /></div>
<div>
This is the Most important 'work item' for leaders all the days, all the time. </div>
<div>
<br /></div>
<div>
Leaders believe in 'We', not in 'I'. Leaders know that it is team which delivers, not a star performer, not even leader. Leaders enjoy mentoring, coaching and grooming people. They love to do these, and breathe these all the time. </div>
<div>
<br /></div>
<div>
Investing in people, grooming them to right level is beginning of the journey. Result blooms when we start trusting and empowering them to take actions. 'Trust' is the key for actual growth. 'Investing in People' can nourish the skills, however, 'Trusting people' put them on path to deliver great results for Organization, and for themselves. It takes them forward on growth path.</div>
<div>
<br /></div>
<div>
Providing clear directions, clarity of goals and then grooming team to self-organize their own time and work is another important trait of leaders. This is like providing playground after initial training, which 'actually' makes them great players. This also helps in empowering people, who are closest to the actions, to take real decisions (which are usually better).</div>
<div>
<br /></div>
<div>
Coaching, mentoring, keep grooming to next level, trusting and empowering team to take real decisions and actions are the keys for building high performing teams. It bumps up the productivity of Organization.</div>
<div>
<br /></div>
<div>
It also opens the great potential for growth for everyone around. Leaders don't feel threatened with growth of people, rather they feel thrilled. Giving power is the great way to build real power over time.</div>
<div>
<br /></div>
<div>
It may be a thankless job sometimes, and not the easy one for sure, but a great trait of Leaders. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b><span style="color: #20124d;">3. <u>Understand Emotions and Are Empathetic </u></span></b></div>
<div>
<br /></div>
<div>
Being emotionally mature is another important traits of leaders. This is probably the most difficult as well.</div>
<div>
<br /></div>
<div>
It may not be right to say that Leaders do it naturally. Human emotions are as complex as life. However, leaders are conscious about importance of emotions, and its effect on every aspect of work and life. They put conscious efforts to understand and learn more about it. </div>
<div>
<br /></div>
<div>
They keep training themselves with every new emotional hit, or challenge and scenario.</div>
<div>
<br /></div>
<div>
Leaders try not to react. They train themselves to listen, process the information, take pause, process (multiple loops may be) and respond with empathy. Here we get another 'keyword', empathy. What is empathy.</div>
<div>
<br /></div>
<div>
'Empathy' is ability to understand another person's experience, perspective and feelings. And importantly, it is also about acknowledging and sharing the feelings.</div>
<div>
<br /></div>
<div>
How to be good in Empathy (and EI - Emotional Intelligence). It starts with being self-aware. You need be able to show empathy to yourselves at first. You need to understand your emotions first. That is a great playground for leaders to practice, experiment all sort of techniques. More you get skilled in 'Being Self Aware', more you gain Emotional Intelligence. Application of this learning comes in form of empathy, means being considerate about other emotions, feelings and perspective. Perspective is a sum collection of our viewpoints, which is largely driven by our experiences (which defines our emotions).</div>
<div>
<br /></div>
<div>
Empathy is like being self-aware, being aware about other's emotions and circumstances, continuously keep scanning about vital sign of emotion movements, understand these to understand the perspective, and to act accordingly then. </div>
<div>
<br /></div>
<div>
There could be significant business cost when Leaders lack Empathy. Lack of empathy could be the prime reason for major tsunami in corporate world, for many of the conflicts, in all sort of organizations. </div>
<div>
<br /></div>
<div>
Emotional intelligence is not about keeping people happy. It is more like a data gathering tool by keeping your emotions in control, being neutral in observing, gather information as it is, and then have an opportunity to utilize it. You may choose not to act immediately or can even choose to take advantage of it. Or you can act compassionately. </div>
<div>
<br /></div>
<div>
What is this compassion now.</div>
<div>
<br /></div>
<div>
Compassion is actually the most important tool in Leader's toolkit, which helps to utilize all these intelligence, knowledge and awareness. 'Compassion' is the intent to contribute to the happiness and well being of others, and that's where it become an important attribute for being Leader. Leaders try using EI, for the benefit and well being of people and Organization.</div>
<div>
<br /></div>
<div>
Remember, Compassion plays an important role in this whole cycle. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
I found following two points also a common traits of leaders, will write more some other day. </div>
<div>
#Create a sense of connection and Belonging</div>
<div>
#Promote Learning</div>
<div>
<br />
<span style="font-family: inherit; white-space: pre-wrap;">Are these traits naturally gifted, do Leaders behave like this all the time. May not be. We are trainable for good and bad both, so is for the leadership skills. Practice these more. Find your reason, trigger, motivation to remind you and practice these more often. Here I buy the 'Greatness' of Great word. <b>Great Leaders</b> could be who practiced these traits so much, that it becomes natural or a habit for them. </span></div>
<div>
<br /></div>
<div>
What's about great communication, great charisma, and great confidence and so on. Ahh.. we are talking about 'showing' Leadership traits now, do another google search please :) </div>
<div>
<br /></div>
<div>
<br /></div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-59284700992787782232018-03-14T08:08:00.000+05:302018-10-13T08:57:56.143+05:30Monolithic vs Decoupled Schema<div dir="ltr" style="text-align: left;" trbidi="on">
<div align="center" class="MsoNormal" style="text-align: center;">
<br /></div>
<div class="MsoNormal">
Let us understand what we mean by Monolithic and Decoupled
architecture, Schema with an example. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-size: 14pt; line-height: 107%;"><b><u>Setting up a library<o:p></o:p></u></b></span></span></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-size: 14.0pt; line-height: 107%;"><br /></span></u></b></div>
<div class="MsoNormal">
Let us take example of library. A new library is opening up.
It would have many books, may be on various subjects. First task for librarian
is, to store the books in library. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Librarian started with obvious approach first, i.e. start putting
all books in shelf, one after other. It was quick. She puts all the books
quickly in the shelves; and created an index to search any book. <span style="mso-spacerun: yes;"> </span><o:p></o:p></div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqf6WAHZAlGVEtT-PtRaczYDDfjw_jcTbFPk7Q_2tMgaVTYfap9XYhEeGkXKkjFrAhXsSV7sQnnZ2qkADUfHSizz17iKeWek10qRUNb-EXmqovRVwjP-10VPSXoVW1h5KeI3YUwqnNvbs/s1600/Library+Structure+1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="382" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqf6WAHZAlGVEtT-PtRaczYDDfjw_jcTbFPk7Q_2tMgaVTYfap9XYhEeGkXKkjFrAhXsSV7sQnnZ2qkADUfHSizz17iKeWek10qRUNb-EXmqovRVwjP-10VPSXoVW1h5KeI3YUwqnNvbs/s320/Library+Structure+1.jpg" width="320" /></a></div>
<div class="MsoNormal">
<span style="mso-spacerun: yes;"><br /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_2" o:spid="_x0000_i1026" type="#_x0000_t75"
style='width:286.5pt;height:207pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/mohigupt/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Benefits: <o:p></o:p></b></div>
<div class="MsoListParagraphCxSpFirst" style="text-align: left; text-indent: -0.25in;">
</div>
<ul>
<li><span style="text-indent: -0.25in;">It was quick, easy, and less work. Just one simple
storing strategy, every new book will go to next available space.</span></li>
<li><span style="text-indent: -0.25in;">You have all sort of books at one place, which
means just keep updating one index for every new book – no need to maintain
separate indexes.</span></li>
<li><span style="text-indent: -0.25in;">Readers can find all sort of books at one place
for all of their tastes. They need not to go to multiple places. Just iterate over
and you will find what you need.</span></li>
<li><span style="text-indent: -0.25in;">For librarian, access management is easy. Anyone
having access to library, can access any book easily. Less time spent on
management.</span></li>
<li><span style="text-indent: -0.25in;">It is easy for readers to refer any other
related book also. For ex: if you reading astronomy book, and need to refer a
math book. It might just be somewhere in same row.</span></li>
</ul>
<!--[if !supportLists]--><o:p></o:p><br />
<div class="MsoListParagraphCxSpMiddle" style="text-align: left; text-indent: -0.25in;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="text-align: left; text-indent: -0.25in;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="text-align: left; text-indent: -0.25in;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="text-align: left; text-indent: -0.25in;">
<o:p></o:p></div>
<div class="MsoNormal" style="text-align: left;">
All setup done. Things started rolling. All good so far. Eventually
library become popular and started getting more readers and requirements for
new books. Librarian started ordering more and more books on various subjects. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Challenges:<o:p></o:p></b></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><br /></b></div>
<div class="MsoNormal">
However, as volume of books increased, Librarian started
observing <b style="mso-bidi-font-weight: normal;">few issues</b>. Like: <o:p></o:p><br />
<br />
<a name='more'></a></div>
<ul style="text-align: left;">
<li><b style="text-indent: -0.25in;">Readers:</b><span style="text-indent: -0.25in;">
Mostly readers have interest in one or two categories of books. They just look for
these, and not for diverse set of books.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->However, as all the books are placed in one
bookrack, it was time consuming for readers to look for relevant book, and to
understand the whole big library index. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->They were spending more time on searching the
right place of information, rather than reading the actual information. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Few of the readers started logging their frustration
too. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><b style="text-indent: -0.25in;">Readers
& Librarian</b><span style="text-indent: -0.25in;">: Whenever there is a new lot of books or existing are
getting old in library, librarian need to rearrange the books. Because it was
one single category, it means that whole index chart needs to be updated every
time. </span><span style="text-indent: -0.25in;"> </span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Readers: It was demanding for them to learn new
changes again and again due to the size of library, even when they are not
really reading books from affected categories. They are spending time to
readjust to new changes, even when they are not really related to that change. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->It was also demanding more time from librarian,
because whole index chart needs update, more work.<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><b style="text-indent: -0.25in;">Librarian:</b><span style="text-indent: -0.25in;">
Once library founder ‘the one who is investing’ asked to put some books at
priority window, librarian has to obey. But, as there are lot of books, many
readers, she was very busy and was really out of time to update the whole index.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->As there is a single inventory or index,
librarian either need to change the whole index of all books, or will keep it
dirty for whole set of books. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->She fall back to second option of keeping it
dirty to follow the orders. But that means index is disturbed for whole
library. Would have been limited to<span style="mso-spacerun: yes;"> </span>one
category, in case if we have categories.<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><b style="text-indent: -0.25in;">Librarian:</b><span style="text-indent: -0.25in;">
Reader A comes and ask for a book of history.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->It took librarian bit of time to look for that
specific book. Reason, even if we have index, but the index itself is huge. <o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Librarian, being a human being, is limited by
her own capacity to go through with that massive information of indexes or
domain knowledge. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Gradually librarian figured out that current structure is
becoming difficult to manage. She learnt from these findings and rearranged the
books, this time based on categories. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-size: 14.0pt; line-height: 107%;">Revised structure<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now library has various racks named based on category of
books, like Math, Science, Management, Astronomy, History, Finance etc. A
comparatively much smaller index is maintained for books, which become easy to
remember, recall. Even a smaller index is maintained for racks as well. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shape
id="Picture_x0020_3" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:296.25pt;
height:195.75pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/mohigupt/AppData/Local/Temp/msohtmlclip1/01/clip_image002.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjGtODZhLr4dD2gXRLJGAneVISqv09TIUR6HmysPHFrvBpG59iZT6TJQ_7L2QBFUdEvxEp7Zv8vhUtKzXitAyPGhP2ivtTt4zc2v7Xq_6RvNHHPdNPKaDa3GhZbl-O6HSATzzfI0nKX68/s1600/Library+Structure+2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="261" data-original-width="395" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjGtODZhLr4dD2gXRLJGAneVISqv09TIUR6HmysPHFrvBpG59iZT6TJQ_7L2QBFUdEvxEp7Zv8vhUtKzXitAyPGhP2ivtTt4zc2v7Xq_6RvNHHPdNPKaDa3GhZbl-O6HSATzzfI0nKX68/s320/Library+Structure+2.jpg" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Results, with this one change, most of the above challenges
were resolved. <span style="mso-spacerun: yes;"> </span><o:p></o:p></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="text-indent: -0.25in;">Readers were very happy as they were able to
find a book quickly and easily.</span></li>
<li><span style="text-indent: -0.25in;">Librarian is also happy now as it reduced her work
a lot, lesser long queues. She can respond to changes quickly with lesser
impact area.</span></li>
<li><span style="text-indent: -0.25in;">Any new Reader can easily understand the
structure, as it is smaller.</span></li>
</ul>
<!--[if !supportLists]--><o:p></o:p><br />
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoNormal">
Overall, lesser work for Librarian and Readers both, More
productivity and quality time spent on real work which is studying. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Ball starts rolling, things were moving good. Gradually librarian
figured out more points.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-size: 14.0pt; line-height: 107%;">Added benefits:<o:p></o:p></span></u></b></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-list: Ignore;">-<span style="font: 7.0pt "Times New Roman";"> </span></span></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li>For Readers:</li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Readers are spending more productive time on
doing actual reading. Earlier they kept on waiting for where to find the right
information. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Readers can refer to index themselves easily, as
it is much smaller and easy to navigate now. Earlier they were mostly confused
and were keep on waiting for librarian for every new need. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">§<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Whole system is moving towards self service
mode, reducing dependency on one point.<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->New readers, who mostly focus on one category of
books, were able to understand the index fast – even if they are lesser
experienced in library system. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">§<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Reason, information is in much smaller pockets
for them to digest. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->One great silent point for improving
productivity, earlier readers use to distracted by non-related information also
easily as it sits next to the main book. They usually spend lot of time just looking
at books i.e. lesser focus on main reading. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">§<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->This was improved a lot, as now there is no obvious
scope of cross-referencing and distraction. Much cleaner approach to study. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="text-indent: -0.25in;">For librarian,</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Changing the index structure based on any
special need, become much easier, due to size and reduce dependencies. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Index system also become much easier, as it is designed
for one specific category, for specific needs of that category.<span style="mso-spacerun: yes;"> </span><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">§<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Lesser collisions, or smaller size indexes. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->It become easy to manage the changes, and the
after impact on readers. Change in one category was not impacting the readers
of other categories. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "wingdings"; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">§<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Lesser waste of time on managing emotions and
complaints. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Maintenance activities like Tallying the books
and indexes become easy, as now librarian can do it category by category,
instead of going big all the time. <o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Any dirty work due to any special need was
limited to one category only, was not impacting the whole system.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-size: 14.0pt; line-height: 107%;">Innovation, Evolution to next Level<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-size: 14.0pt; line-height: 107%;"><br /></span></u></b></div>
<div class="MsoNormal">
What more, as changes can be contained to one small section
of books now, <o:p></o:p></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-list: Ignore;">-<span style="font: 7.0pt "Times New Roman";"> </span></span></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><span style="text-indent: -0.25in;">Librarian even found it easy to experiment
various new technologies now.</span></li>
</ul>
<o:p></o:p><br />
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Ex: Librarian noticed that Readers of computer category
were mostly asking for e-books, CDs. She decided to experiment and brought in an
E-books system for computers with audio devices, replacing hard copies. It
saved space. Readers were also happier. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->This change was only possible because change was
limited to one book category, one rack. Librarian may never experiment this, if
it has to be done for whole library. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="text-indent: -0.25in;">Once computer’s books moved to e-books system,
librarian even moved ahead to make it available 24 hours by exposing it on
internet.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Rest of the books still accessed in manual mode,
when you are in library physically. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Hence, it become possible now for each category to
have its own protocol of access, without having dependency or impact on other.<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Increased scope of innovations, experimentation <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u><span style="font-size: 14.0pt; line-height: 107%;">Challenges and Solutions for Revised
Structure<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There were very few cases when previous system of mixed
categories seems better, like: <o:p></o:p></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="text-indent: -0.25in;">Some experienced readers, who usually cross-reference,
and read more than one category of books, find it easy to have all books at one
place, as it was easy to pick the books.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Solution was to make indexes handy so that they
can quickly refer to other categories. <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->And a little efforts on educating that new
system is easier for bulk of the readers and for maintenance also.<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="text-indent: -0.25in;">Some experienced readers were not finding it easy,
as they need all related books at one place to read easily.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Solution: Check for specific use cases of these
users and make a special rack which contains all of such taste books (may be a
copy). <o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -.25in;">
</div>
<ul style="text-align: left;">
<li><span style="text-indent: -0.25in;">Auditors question was, how can I see the all the
books in one go now, overall books auditing.</span></li>
</ul>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Solution: Books are still there in library, the
only change is the rack. These racks are placed next to each other and are
approachable whatever way it can help. <o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l1 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: "courier new"; mso-fareast-font-family: "Courier New";"><span style="mso-list: Ignore;">o<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Further, we can copy and paste index or usage
data of all the categories at one place to refer. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
All of these challenges also mitigated gradually. Overall,
librarian, Readers, Management, Maintenance staff, all are happier now with a
change in how we store the books. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Now let us refer back
to terms to map with Software Development: <o:p></o:p></b></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo2; text-indent: -.25in;">
<!--[if !supportLists]--><span style="mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-list: Ignore;">-<span style="font: 7.0pt "Times New Roman";"> </span></span></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo2; text-indent: -.25in;">
</div>
<ul>
<li><span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span><span style="text-indent: -0.25in;">First library system > Monolithic
Architectural pattern</span></li>
<li><span style="text-indent: -0.25in;">Improvised library system > Decoupled pattern</span></li>
<li><span style="text-indent: -0.25in;">Librarians > DBAs, Developers</span></li>
<li><span style="text-indent: -0.25in;">Readers > Developers, Micro-Services</span></li>
<li><span style="text-indent: -0.25in;">Auditors > Business users</span></li>
<li><span style="text-indent: -0.25in;">Experienced Readers > Users who are using
this system since long and are well versed with this structure. </span><span style="text-indent: -0.25in;"> </span><span style="text-indent: -0.25in;">Who are much experienced in system over the
years and hence can remember and process all of information effectively.</span></li>
</ul>
<i><br /></i>
<i>* Credit goes to my wife, the co-blogger, for tossing this example :) </i><o:p></o:p></div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-64231113283801704222016-09-07T21:32:00.002+05:302016-09-07T21:32:56.999+05:30Own the Problem and Solve ItProblems are problematic and sometime so much problematic that this demand last pint of efforts from us and still challenge us more. But, problems are part of life and will continue to be there. Hence only way to deal with problems is to 'Deal' with these.<br />
<br />
One of the common phoenomenon I found is, we are more worried by thinking about problem than actually by the problem. We keep on thinking about problem, by doing all permutation and combination for all possible scenarios, outcomes, what if situations, and get defeated multiple times even before facing the actual problem. Seems, this is more problematic than actual problem. This mentality or habbit (quite common, you are not special) creates more pain for us than what actual Problem can do. We keep on struggling with these problematic thoughts for days, months or years sometime, but won't take a step to solve it. Result, many a times, we are making a Mountain out of a Molehill or a Bigger Mountain from a small mountain, or pushing our head against that Mountain rather than to take a step to side and walk around this.<br />
<br />
Why we do this. What is the solution.<br />
<br />
Let us address it step wise. We do this because many a times, we stuck in a loop of thinking, anticipating, visualizing, fearing and the repeating all again. We don't take even a single step considering that result won't be good. We have high inertia.<br />
<br />
What is the solution. Solution is to take first step towards solution. We all have solution. It may not be perfect, or may not be the right one. But we all have capacity to think about solution. So taking step towards solution is the only way out. It is perfectly fine to make a wrong decision. However, it is good as long as we have courage to review it and change our course of action. But what absolutely wrong is, if we don't even take a step. So the solution is to own the problem, think about solution, pick the best from your options, and start executing. If it is right, your problem will be solved. If it is not right, at least you will learn to take next step.<br />
<br />
Problems are part of life, and will continue to be there till we exist. Problem free life is not a reality and is not going to be happen. However, a life with solutoins for problem is feasible. So strive for that. And only way out is, Own the problem and take first step to solve it.<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-31665557037051871292016-02-08T21:53:00.001+05:302016-02-08T21:53:41.032+05:30What is In-Memory Database Management System<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="margin-bottom: .0001pt; margin: 0in;">
In Memory Database is a fascinating field for a programmer, for an
architect, and for technology leaders. Let us try to understand in this
article, what is In-Memory DB and why are these so useful. <u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
As a programmer,
designer or architect, whenever I work with traditional databases, one major
area to be conscious about is, that database access should be designed
carefully. This is because traditional database system store everything on
disk, and hence any access or update to this data could be one of the slowest
operations in application flow. Undoubtedly, a lot of research and improvements
have been done to improve the performance of disk based database systems with
improved storing, searching and retrieving logic. Still, disk access, being
mechanical operation, always have limitations. And this is one of the important
reasons to be fascinated about in-memory database systems. <u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
Visualize a system
where all data (or all data required for curernt context) is sitting in memory.
Which means, we can expect a lot more efficient and faster access to data.
Database software can have much simpler logic to manage the data, as there is
no need to manage the loading/unloading of pages in memory. There is no need to
work on time taking locking mechanism to safeguard the data on disk, as access
in memory is much faster and chances of conflicts are extremly small which
change the way we design database system algorithms. It also means that we can
exploit the best available CPU power (which is increasing continuously) to process
the data available in memory, having no limitation of disk access. This could
also mean that there is no need of another layer of caching system. Rather,
database itself will be working like in-memory cache. There are many more
benefits if we design the system considering in-memory database system. <u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
Let us understand
what is In-Memory Database System (IMDS). It is a DBMS which maintain all data
primarily in Main Memory. Data will be loaded in memory even if it is in GB or
TB. A few highlights:<u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif;">•<span style="font-stretch: normal;"></span> </span>With 64 bits computer architecture, systems are capable to
address 16 EB of data (1 TB * 1000 * 1000). 82% of the enterprise application’s
databases are below 1 TB, growing with an average speed of 10% per year, which
means that In-Memory database systems can cater to most of the applications now
and in coming future as well. <u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif;">•<span style="font-stretch: normal;"></span> </span>Does not need write or read to Disk, hence no dependency on
mechanical parts and their performance limitations. When<span class="apple-converted-space"> </span><span lang="EN-US">all data is stored
in single address space, it reduces the complexity of storage algorithms, no
need now of loading and unloading the pages in memory</span><u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif;">•<span style="font-stretch: normal;"></span> </span>Much faster than Disk based traditional DBMS.<span class="apple-converted-space"> </span><span lang="EN-US">Having all data in
memory means that data is available at our finger tips, only microseconds or
nanoseconds away.</span><u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif;">•<span style="font-stretch: normal;"></span> </span>And it supports ACID properties of Database, including D
(durability) </div>
<div style="margin: 0in 0in 0.0001pt;">
</div>
<a name='more'></a><o:p></o:p><br />
<div style="margin: 0in 0in 0.0001pt;">
With above, it is
also important to understand that what IMDS is not, to break out of various
myths.<u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.55in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">No. IMDS is not
the traditional Disk based DBMS with just having all data loaded in memory (as
cache work). Rather internal design, algorithms are quite different and
hopefully much more improved than traditional database system leveraging upon
the flexibility to assume whole data in memory, and no disk access overhead.
Hence, of course, IMDS are not a caching technology, rather a full fledge DBM
solution</span><u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.55in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">IMDS are not
volatile, rather these can support ‘D’ of ACID with perfect durability and with
advantage of various flexible durability options.</span><u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.55in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">IMDS are not the
embedded database only. These work good for embedded applications by providing
small foot print, however, these are equally efficient and rather better in
some aspects for large time critical applications and can work in client – server
architecture.</span><u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.55in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">A common myth is
that IMDS may need a long time to populate the in memory store on startup.
Actually, it is not.</span><u1:p></u1:p><o:p></o:p></div>
<div style="margin: 0in 0in 0.0001pt 0.55in; text-indent: -0.25in;">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="line-height: 107%;">To have a better perspective of </span><span style="line-height: 107%;">functioning and
technology, let us put few of the architectural attributes of IMDS. <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="line-height: 107%;">•<span style="font-stretch: normal;"> IMDS can work b</span>oth as
Embedded Single Process or in Client Server Architecture model.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">IMDS
is Partition Aware. Normally, vertical partitioning is done by Normalization
kind of design strategies. IMDS supports horizontal partitioning by breaking
the table data by rows. For example, one of the criteria to break the rows can
be demographic data.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">IMDS
supports ‘Shared Nothing’ Architecture, which ensure Useful for high
availability and fault tolerant design.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Mostly
better Data Structures have been used in IMDS, like T-Tree rather than B-Tree<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">It
needs simpler concurrency control as locks need to be maintained for lesser
time having all data in memory.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">With
IMDS, data is being stored at various nodes with multiple copies of same data.
It enable scalable infrastructure model, as new nodes can be added easily, data
will be replicated to this new node as per data design.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Disaster
recovery is also easy as multiple copies of data on different nodes is
available by design.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<span style="line-height: 107%;">Considering
all of above, here are few of the advantages of IMDS:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 0.75in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Symbol;">·<span style="font-stretch: normal;"></span><span lang="EN-US"> </span></span><span lang="EN-US">IMDS can provide
extremely fast transactions processing by overcoming limitation of traditional
database to read write data using mechanical operations on disk. As per POC
done by ‘McObject’, reads are 420 times faster and writes are 4 times faster
than disk based operations<u1:p></u1:p></span><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">These are highly
scalable with horizontal and vertical scaling</span><u1:p></u1:p><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">These can ensure
high availability with replicated data among multiple nodes</span><u1:p></u1:p><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">Can also support
highly fault tolerant design with active – active, or active stand by strategies</span><u1:p></u1:p><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-stretch: normal;"></span> </span><span lang="EN-US">These provide
support for SQL Standards</span><u1:p></u1:p><o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 0.75in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Symbol;">·<span style="font-stretch: normal;"></span><span lang="EN-US"> </span></span><span lang="EN-US">These do supports
most of the database connectivity standards i.e. JDBC etc<u1:p></u1:p></span><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="line-height: 107%;">With so many good things to write, article
won’t be complete without mentioning few of the challenges with IMDS, which
need more research in coming years. These are:<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Durability</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Although
IMDB designs are already evolved enough to support durability, but these comes
at the cost of synchronizing some data with persistent storage using
checkpoints, transaction logging or some high volumn of data transfer across
the nodes</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Future
direction could be to improve SSD technologies (solid state drive) and use
these to store the data for durability purpose. These are slower than RAM, but
much faster than disk.</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">One
more bit problem</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">In
Memory data storage is limited by the total memory space computer architecture
can handle. As of now, it is limited to 16 EB. However, if data goes one bit
behind this limit, it will pose a challenge which is bound to come in future.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">SSD
or PCM (NVRAM) kind of technologies can be used to store data and would help to
avoid ‘one more bit’ kind of problems in future. <u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="line-height: 107%;">I hope this article would have helped you
to start with IMDS by giving an overview. Please refer to a detailed paper
published by us<span class="apple-converted-space"> </span><a href="http://ijettjournal.org/archive/ijett-v6n6p158">here</a>.<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="line-height: 107%;">Let us close the article by listing few of
the IMDS solution available in market to give you a reference to explore
further:<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Commercial
Solutions</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">ExtremeDB
by McObject</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">TimesTen
by Oracle</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">SQLFire
by VMWare</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">SolidDB
by IBM</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Hana
by SAP</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Big
Memory by Terracotta</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Altibase
HDB/XDB by Altibase</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> <span class="apple-converted-space"> </span></span></span><span lang="EN-US" style="line-height: 107%;">Open
Source Solutions</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">Memsql</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">CSQL</span><span style="line-height: 107%;"><u1:p></u1:p><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">MonetDB<u1:p></u1:p></span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;">
<span lang="EN-US" style="font-family: Arial, sans-serif; line-height: 107%;">•<span style="font-stretch: normal;"></span><span lang="EN-US" style="line-height: 107%;"> </span></span><span lang="EN-US" style="line-height: 107%;">H2Database</span><span style="line-height: 107%;"><o:p></o:p></span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
</div>
<div class="MsoNormal">
<br /></div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-89841895540309690952015-09-14T20:37:00.000+05:302015-09-14T20:37:00.160+05:30Attitude Builds the Great Products<div dir="ltr" style="text-align: left;" trbidi="on">
During starting years of my career, I was interviewed by a start-up company. Recruitment manager (read CTO) explained me some complex product idea and asked, "Can you implement it". I was not able to understand those complex pieces completely (being slow by nature in new writings :) ). I replied, "I am not very through with whole thing. However, if it is logically feasible, we can do it for sure." And I was hired.<br />
<br />
The product concept and the technologies were very new for the team. It was a uphill learning task. Team average experience was around 5 years (excluding the manager). Still team had done wonderful job. With a team of 10 people, we developed a beautiful product with many complex and feature rich components that also in months’ time frame. Whole system was developed on self-validating test workflows, following TDD kind of advance methodologies which were very new and challenging for that 'junior' team. We challenged our every existing belief and drew new lines on learning graph every day, while producing some very interesting product pieces. Definitely, there were many environmental factors which contributed to this wonderful work. However, one of the main factors was the right attitude and willingness to accomplish.<br />
<br />
Later, I asked my manager that how he selected me without even asking much technical question. He replied, "I have looked for right attitude in all the candidates and that paid us well".<br />
<br />
Other experience: I was working with another project team, a very experienced team having much bigger resource pool. Team was enhancing and managing an accounting product. Product was having some issues in core implementation, due to which we were getting lot of bugs around the years. Course of action was to patch the data or correct the current broken flow of application by temporary fixes. Team was spending many hours in this exercise. Although team had great skills and experience, however, nobody was willing to fix the core issue. Reason, that would need complete rewrite of that component; a critical piece of the product. And it was comparatively easy and less risky to make fixes. Hence, due to lack of right attitude and driving force, we kept on putting hours of efforts in fixing the bugs only.<br />
<br />
By now, we already know the difference between first and second example. It is not (only) about skills and experience, but, it is more about right attitude. In second example, team was much experienced and bigger. Many of the members were skilled enough to do right things and do the things right. However, differentiating factor was the right 'attitude'. It needs a high level of 'can do' and risk taking attitude to say, "Let’s build something better even if it mean scrapping existing piece of code. Let’s write a good product, where team can spend time adding value to the product instead of fixing issues and doing plumbing work around the year. Let sit and figure out, how we can improve the things".<br />
<br />
Finding skills and experience could be easy, however, finding and developing right attitude needs a lot of efforts. Also it does not end with the attitude of individuals, rather attitude of leaders also play a big role in developing this whole eco-system. In first example, it was the leader who has given weightage to the right attitude over skills, education and experience. It was the leader who has promoted the attitude to take the risk and to challenge the stagnant beliefs to improve the product.<br />
<br />
When right attitude is mixed with right set of environment, people take action. They become passionate for the goals, for the things which they are doing. They go extra mile to build what they believe in. A very important element in producing great products is the attitude of people working on it.<br />
<br />
It takes whole village to build a good product and a successful Organization, however, it takes a right set of attitude of team and the leader to build and groom that village.<br />
<br />
What is your experience for role of 'attitude' in building great products, what are your examples?</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-20541783101862373312015-08-07T22:43:00.001+05:302016-09-07T21:13:29.581+05:30Thank You Mentors<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
When I started moving in professional career, I came to know about term 'Mentor'. Wondering what it is, I found that many of the people were talking about being mentored by various great personalities. And it is said to be a great opportunity to learn and grow. I was not even aware about it, hence I started feeling insecure and kind of left out. Am I not worthy enough or I am not looking for one. Why I haven't found one so far..<br />
<br />
However, eventually I found that it is not always the single person who comes in formally, wearing a hat of 'Mentor' and bestow her blessings. Rather, it could be more than one people who keep sharing their wisdom and experience informally with us, either intentionally taking interests in us or casually just sharing few hints from their wisdom and life experiences.<br />
<br />
At the age of 19, when I joined my first job to manage a mechanical workshop of 20 people, I found it very difficult to deal with people who are much older and experienced than me. Then my senior 'Dinesh Sharma' hold my hand and said, "You have to be bold and confident to deal with them. Also, Understanding their context, Respecting everybody and Integrity in yours 'words and action' is an important ingredient to manage the talent". And that lecture worked for me.<br />
<br />
My few first days as Software Engineer, I was completely lost in a whole new world. People around me were using terminologies which were unknown to me. I was feeling like I don't know anything, especially when anybody comes to you and said, "Hey, you are working on this since morning.. that is 2 hour job if you use xxxxx". I got a supportive voice from <a href="https://in.linkedin.com/in/vikasjoshi" target="_blank">Vikas Joshi</a> who came and sat next to me, saying, "Let us see how we can solve this problem your way". He made me aware about new terminologies, and at the same time assured me that there is not only one, but multiple ways to define and solve any problem. A specific terminology can be good to communicate, but is not the core of solution. He encouraged me to keep learning and keep working steadily and sincerely.<br />
<br />
There are even more. My mother who keeps sharing her priceless hard earned experience of life with me, who keeps on mentoring me since childhood and taught to face the life 'seeing in eyes of challenges'. Many of my friends, who shared one or other important lesson with me at every foot step. Many of the great writers, who have shared their valuable experiences in form of great books. One taxi driver, who met me one morning and shared important lesson of life saying, "Life gives us hints about next path. It is we, who want to stick with existing roots or beliefs. Best is to recognize the hints of nature, accept it and move on". There are many more ranging from my childhood teachers to my office cleaner who shared few dews of wisdom from their life experiences unknowingly and unconditionally.<br />
<br />
So I feel confident now that I got so many mentors in life which shaped my thought process, the way I am. And what more, life gives us what we wish for, when we need it. Recently I got <a href="https://www.linkedin.com/pub/ramesh-dharma/9/759/536" target="_blank">Ramesh Dharma</a> as my first formal mentor. Since last one year, he is listening to me with all good patience and sharing his fine tuned experience with me. I don't know when I crossed the formal lines and even started reflecting my emotional side also. But he is managing every aspect maturely and is sharing his best of life experience to shape a new path for my journey.<br />
<br />
Thanks to all of my great mentors for shaping my life, my journey..<br />
<br />
#ThankYouMentor</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-27708690287812944602015-07-15T20:49:00.000+05:302015-07-15T20:49:44.237+05:30Inclusive Leadership - An Effective Leadership<div dir="ltr" style="text-align: left;" trbidi="on">
On a Friday evening, I was working late in office. I was struggling to fix an issue. That was a complex issue, and I was not finding any solution even after spending many hours on it. I thought to take a break, and decided to work on it after having dinner. I was about to go, when my manager walk over to me, and<br />
He asked: 'Hey mohit, how is it going'.<br />
I said: 'Not that good. We are not reaching anywhere. This issue would take time'.<br />
He said: okkk. But, this is very critical issue and you are not leaving today without fixing it.<br />
Bang.. ! Those words didn't sound good. I thought in my mind 'I can't leave, I am not free to leave..'. I felt bad.<br />
I closed my laptop and told my manager, 'It is 9 pm already. I am tired now. I can't work more today. CU tomorrow..' After saying that, I left the office (sadily)<br />
I reached home. I was very sad. I thought, I could have reacted differently. I was feeling bad, as I never behaved like that with my manager earlier.. I was tensed. I believe my manager would have also felt bad.<br />
Overall, it was an unpleasant experience for both..<br />
<br />
.............................<br />
Moving to another incidence..<br />
<br />
Few months later, in another project, we had similar kind of scenario. Whole team was packing the bags to leave from office on a Friday evening. Our manager came to our area<br />
and said, 'Hey guys, I have a situation here to discuss and I need your help'.<br />
'Help', that word sounds good to ears. As a normal reaction, we asked, 'ok, tell us please'.<br />
He said 'One of the critical functionality is having issue and client is incurring loss due to this. We need to fix it asap'.<br />
As soon as he said this, we understood that we need to stay back. Our mind started thinking of our plans for evening, like movie, outing etc. However, then our manager add more to his previous sentence.<br />
He said 'I know it is already late and you might have some plans already, however, this issue is important and we have to find a solution as a team for this situation. Still if anyone has any commitment which is more important, do let me know. We can discuss and manage that'.<br />
<br />
Everyone in team accepted to stay back. Even few of us came forward with different innovative ideas to fix the issue. Bonus point was, manager stayed whole night with us.. cracking jokes, arranging food for us and so on. We stayed there for 30 hours appx and left next day after fixing the issue. We were tired but were not sad. Rather, we enjoyed with each other, and took all the ownership to get the work done.<br />
<br />
What was the difference between these two incidents.<br />
<br />
In both stories, manager's intention was to get the work done; which was critical for project or organization. There was nothing wrong in that. However, there was a difference..<br />
<br />
In first case, manager had made the decision and tried to force that to team. He had not shown the emotional consideration towards the feelings of his team. <br />
In second incident, if you noticed, 'We' word was used more than 'I' or 'you'. Manager explained the situation along with its impact. He tried to involve everyone in the decision and pulled them on a common platform to take a collective call. Moreover, he conveyed it effectively that he understood 'what team is sacrificing i.e. their personal time' and he openly acknolwedged that.<br />
<br />
In both the situations, managers were clear that they need team to stay back and work late to control the situation. But how they conveyed the message, that had made a big difference.<br />
<br />
The way we communicate, and involve others in decision making has a big impact. It can make the whole environment tensed or can make people work even for 30 hours happily. Supporting your team, making everybody feel involved in decision making and that their opinion is respected, they are valued, is a big trait of successful people managers. When employees feel included at work, they become better team players and more likely to go above and beyond expectations, suggesting new ideas of getting work done. This, for sure, boost overall organizational performance also.<br />
<br />
And this is not only applicable in office, but also in our personal life, in day to day dealings.<br />
<br />
Good thing is, we have the options to choose. We can choose either first experience or can go for second leadership style. Choose the best..</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com1tag:blogger.com,1999:blog-999802451712728704.post-91569965575856633352015-04-11T21:26:00.003+05:302015-04-11T21:46:49.327+05:30Design Considerations for Audit Trail Implementation<div dir="ltr" style="text-align: left;" trbidi="on">
Auditing the operations in any application is a very common requirement for security and auditing purpose. Auditing can be done at various levels with varying level of details. Overall prime requirements for Audit Trail are:<br />
<div style="text-align: left;">
</div>
<ul>
<li>Collect enough information to determine, </li>
<ul>
<li>Who has done the changes, </li>
<li>What are the changes, </li>
<li>When these changes have been done, Locale etc</li>
<li>What user scenario was in action, i.e. the operation context</li>
</ul>
<li>To capture all user actions, even if some of these are not reaching to DB or would be interacting with external services directly (rare, but happens in some cases)</li>
<li>Successful and unsuccessful logons or other security related operations</li>
<li>Management of collected audit data, which could be very large. </li>
<li>Search operations on collected data</li>
<li>Display the collected data to Users in presentable format as and when demanded </li>
</ul>
<br />
Considering above requirements, there are various design approaches to implement the audit trail in system. Few of these are given below (considering a JEE application, however, many of these are generic)<br />
<br />
<ol style="text-align: left;">
<li>Implement DB triggers to capture any change in data states and log in audit tables</li>
<li>Log audit data in business services, which means collecting the required data in each business service operation and log it using some abstract Audit service to some data store</li>
<li>Using generic logging framework like Log4J to log the auditing information to desired format and data store and later parse these logs to extract the required data</li>
<li>Interceptors based approach to intercept all operations, collect the data and log it through Audit service. Here interceptors can be of DAO layer interceptors like Hibernate Interceptors or Service level interceptor using AOP.</li>
</ol>
<br />
All of these approaches have their own pros and cons. As obvious, one approach can not be fit for all. Application state, project requirements and scope can define the right set of implementation. So lets discuss the pros and cons of each of these approaches to understand it more.<br />
<br />
<h3 style="text-align: left;">
Database triggers</h3>
Database triggers can do really well and nothing can escape from the triggers. Once these are set carefully on all levels, all changes are bound to pass through these and hence will be captured in audit tables.<br />
<h4 style="text-align: left;">
Pros:</h4>
<ul style="text-align: left;">
<li>Whether it is simple user operation, or any change is being done by DB admin; all kind of changes will be captured by triggers.</li>
<li>A comparatively simple approach, in aspect, that no code change is required and it can be implemented directly at database level without disturbing the code.</li>
</ul>
<br />
<a name='more'></a><br />
<h4 style="text-align: left;">
Cons:</h4>
<ul>
<li>Lack of application use-case context at database level, and hence it could be difficult to create a complete scenario from the auditing data, especially when data is hierarchical and composite</li>
<li>There are high chances to miss the scenarios which are not even reaching to database, like any operation which was failed due to input validation, or an operation which is going directly to external service</li>
<li>Performance hit due to very fine grained auditing, which otherwise can be coarse grained at business layer</li>
</ul>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Business Service Auditing</h3>
Other approach could be to identify the Audit data in business service and log it using some abstract Audit Service. This is a comparatively coarse grained implementation in code itself.<br />
<h4 style="text-align: left;">
Pros:</h4>
<ul>
<li>Benefit of logging from Business service is that code has complete business context to log with Audit Trail data</li>
<li>Coarse grained logging based on user operation and also based on the operation context, Business Service can decide what data is required to be logged along with all suitable attributes from client request or database</li>
<li>Being coarse grained in nature, it is better for performance </li>
<li>It will capture those scenarios also which may not hit the DB</li>
</ul>
<br />
<br />
So practically all cons specific in trigger based approach are handled here. However, this is not without weak points.<br />
<h4 style="text-align: left;">
Cons: </h4>
<ul style="text-align: left;">
<li>It needs a lot of code in all the business services and operations. Any new implementation will need to follow the same notion to implement auditing logic</li>
<li>Change in auditing requirement means, change in all the services. Hence maintenance and improvement can be time consuming.</li>
</ul>
<br />
With Business service level approach, most of the cons of trigger based approach have been handled. However, one major setback is lack of abstraction and hence it results in repeated implementation in all business service. It can be hard to maintain. Lets move to next alternative.<br />
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Hibernate Interceptor</h3>
To Solve the weak points of service methods based implementation, another approach is to use the Hibernate interceptors. Of course, this approach is feasible if application is using Hibernate or any ORM similar to it. Following this approach, simple hibernate interceptors can be set for all database operations. Now all DB calls will pass through it and will give a centralized place to log all required audit data.<br />
<h4 style="text-align: left;">
Pros: </h4>
<ul style="text-align: left;">
<li>Centralized place to put audit logic, and hence no duplicate implementation</li>
<li>Business operation context i.e. use case information can also be passed as part of data object itself</li>
</ul>
<h4 style="text-align: left;">
Cons:</h4>
<ul style="text-align: left;">
<li>It would not be able to capture the scenarios where no DB interaction has been happened. </li>
<li>Use case i.e. business operation context information has to be passed explicitly using data objects, kind of overloading the data objects</li>
<li>In case of any DB error, whole operation along with audit data can be rolled back.</li>
<li>Applicable only if application is using Hibernate or similar technology </li>
</ul>
<br />
Hence Hibernate interceptors are solving many problem points, however, we still have few more points to address.<br />
<br />
<h3 style="text-align: left;">
AOP Interceptors at Business Service Layer</h3>
Here comes the next solution in form of Application interceptor using AOP. AOP is quite commonly used technique nowadays. Even if application is not using it, it is not difficult to plug in. A generic AuditingInterceptor can be designed and implemented to intercept all operation calls coming to services and to log the data using some generic 'Auditing Service'. Business context, i.e the Use case information can be provided by service method using annotations. Partial information which is bound to come from User Interface or Client facing layer, can be passed from that layer with other data. Using annotation, service can define the granularity of data to be stored with auditing and so on. This seems to be addressing most of the weak points defined with previous approaches.<br />
<h4 style="text-align: left;">
Pros:</h4>
<ul style="text-align: left;">
<li>A generic implementation, no duplicate code</li>
<li>A clean implementation, flexible enough to pick the changing context from service methods itself using annotations and from the data passed from client layer.</li>
<li>Easy to maintain and enhance </li>
<li>Completely context aware</li>
<li>Can capture audit data irrespective of whether it is reaching to DB or not, and is not impacted with DB errors in service operation. </li>
</ul>
<h4 style="text-align: left;">
Cons:</h4>
<ul style="text-align: left;">
<li>A performance penalty for every call, however, practically it is negligible and will happen in other approaches also. </li>
<li>Client layer may also need design elements to pass some context information, if required. (not an absolute con but a requirement)</li>
</ul>
<br />
With last approach, we have reached to a point where we have addressed most of the concerns. However, as said previously, it does not imply that all should use this approach. Even trigger based approach can be a best candidate if application scope is limited, or application behavior can be mostly covered by using triggers easily. Like in legacy applications, this approach can work well without making much code changes.<br />
<br />
Having discussed various approaches to implement Audit Trail, lets discuss a few points in brief to manage the auditing data from performance and management perspective.<br />
<br />
One solution to improve the performance could be to design a Asynchronous queue processing based 'Audit Data Service'. So Auditing interceptor will keep on pushing the data to this queue. Another thread/s will pick the data from this queue and will persist it to desired storage channel. This can offload some of the performance overhead and can work well if application can bear the very minute chance of any missed auditing log due to system abrupt failure. Anyhow, alternative backup could be to pull the general application logs from file system to find any missed trigger.<br />
<br />
Another main design challenge mostly is how to store the data, i.e. in which format. One of the commonly used approach is to store all data in RDBMS. However, at times, it can be slow to store large amount of auditing data. Rationalizing the data from whole bunch of data during auditing process can be costly from performance point of view. It may not be required to dump whole data in RDBMS as it is. Hence, next optimization point could be, if we can simply dump the auditing data to some fast storage media as it is, and later optimize it for best use.<br />
<br />
One of the approaches could be, if Audit data processor pick the data from queue, convert it to XML representation (using any XML serialization API) and dump the whole load of data to any nosql database. Now, NoSQL database will have all auditing data for a user, operation, date and time, module etc. To represent the data, i.e. to show this data to end user, call can be taken to directly pick the data from NoSQL database or offline jobs can be scheduled to parse the relevant data from NoSQL store and arrange it in RDBMS. This will give a good efficient audit information system while retrieving/searching the data.<br />
<br />
Any or mix of any of above approaches can be used to implement the audit trail in application. What is your approach, share it please.. </div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com2tag:blogger.com,1999:blog-999802451712728704.post-22164205259170404732015-03-25T14:40:00.000+05:302015-03-25T14:42:26.775+05:30How to Stream Media from Window PC to Xbox One<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
XBox One provides features to stream media from your PC and to enjoy the media on common entertainment box i.e. XBox. Below are simple instructions to setup the streaming of media contents from PC to XBox one, along with solution for one commonly faced problem. Hope it will help.<br />
<br />
<b>Note:</b> Instructions are given considering window 7 PC.<br />
<br />
<b>On XBox One:</b><br />
<br />
<ol style="text-align: left;">
<li>Make sure that Xbox One is connected to your home network, either via wired or wireless connection.</li>
<li>Download the ‘Media Player’ app from Xbox Store. This will help you to explore the media on PC remotely. </li>
<li>Go to into the “Preferences” option through the user settings menu. Make sure that the “PlayTo” streaming option is checked. </li>
</ol>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiYsrGhFmEj8Vp_k2WPWTrG2YODxp1Cpr-dTWKl4C7_BtHMOc6jJwUACG-gP2bhIZfNTkH7mVm6LmijKzM-jKkQqMUvduNQifJ9ywcppXAsQ4uJeFsx2boiXJWUyruq72X1FsQ4O5CcH8/s1600/Allow-Streaming.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiYsrGhFmEj8Vp_k2WPWTrG2YODxp1Cpr-dTWKl4C7_BtHMOc6jJwUACG-gP2bhIZfNTkH7mVm6LmijKzM-jKkQqMUvduNQifJ9ywcppXAsQ4uJeFsx2boiXJWUyruq72X1FsQ4O5CcH8/s1600/Allow-Streaming.jpg" height="385" width="640" /></a></div>
<br />
<br />
<b>On PC:</b><br />
<br />
<ol style="text-align: left;">
<li>Switch over to your PC. </li>
<li>Go to Start menu and click on “Devices and Printers”.</li>
<li>Use ‘Add a device’ and add Xbox one as one Device. </li>
<li>Open Window Media Player</li>
<li>Go to ‘Stream’ menu and enable the ‘Allow Remote Control of my Player’ and ‘Automatically Allow Devices to play my Media’ options. </li>
</ol>
<br />
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8K7tXm_yYU8jYI0dNcH4mNJJE1GOL2urxDLGYzXfdJR_7j_TObd2imT63IDRlWHnZDWox29iqezZznyh-LFURMfCzOFJ-ZpClGHrvHqLm2ambBVhdvRobch7p882M6qcLO1bZnnxOoL8/s1600/WindowMediaPlayer-Settings.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8K7tXm_yYU8jYI0dNcH4mNJJE1GOL2urxDLGYzXfdJR_7j_TObd2imT63IDRlWHnZDWox29iqezZznyh-LFURMfCzOFJ-ZpClGHrvHqLm2ambBVhdvRobch7p882M6qcLO1bZnnxOoL8/s1600/WindowMediaPlayer-Settings.jpg" height="356" width="640" /></a></div>
<br />
<br />
<b>How to Play:</b><br />
<br />
<ol style="text-align: left;">
<li>Now in your window explorer, go to any multimedia item. Right click on it. You will see option as ‘Play to > XboxOne’. </li>
<li>Select it and selected item will be played on Xbox one.</li>
<li>Alternatively, you can add the media items to your Window Media Player library and play these to Xbox one from there. </li>
</ol>
<br />
<br />
<b><u>Common Problem</u>: </b><br />
<b><br /></b>
While streaming media to Xbox one, sometimes, control gets stuck at ‘Contacting Media Server..’<br />
To solve it,<br />
<br />
<ol style="text-align: left;">
<li>Open Window Services (Run > Services)</li>
<li>Look for ‘Window Media Player Network Sharing Service’. Stop this service. </li>
<li>Look for ‘UPnP Device Host’ service. Stop this service. Start it again.</li>
<li>Now start ‘Window Media Player Network Sharing Service’.</li>
<li>Try streaming the contents to Xbox one now. It should work now.</li>
</ol>
<br />
Run Media player on Xbox one. Explore the media on PC remotely and enjoy the media streaming to Xbox one.<br />
<br />
<br />
<br /></div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-27917394584719583902014-10-07T20:58:00.001+05:302014-10-07T20:58:56.175+05:30Leading by Example - An Interesting Approach to Lead<div dir="ltr" style="text-align: left;" trbidi="on">
Albert Einstein once said “Setting an example is not the main means of influencing others, it is the only means.” <br />
<br />
To compliment this quote, let me tell you a story. Story begins 16 years back when I started working as shop supervisor in a mechanical workshop. Workshop had around 25 skilled technicians. Most of them were in age group of 30s to 50s. It was a challenging job for a 19 year old boy to manage these experienced and skilled workers. Hence I had various wonderful learnings during this job. Following is one of such interesting learning.<br />
<br />
Very first day, when I entered in the workshop, I found it very unclean and untidy. There were some obvious reasons for being dirty. Like being a mechanical workshop, there was lot of scrap production daily. Lot of oil was being used for lubrication along with various coolants also. However, still there were good reasons to believe that it can be comparatively cleaner. I felt a need to change or improve. Being very new to the Organization, I decided to wait for sometime. Eventually I started discussing with team members about cleaning the place. One day I got a simply reply from few workers for not cleaning the workshop, that was, "Either we can clean the workshop or can complete our day job. You tell us what we need to do". Sound familiar :). Even today sometimes I heard similar reasoning that, "Either we can improve the code/process, or can make the delivery". I understood the problem and gave it some more time.<br />
<br />
One morning, I thought that I should clean my place at least. My place comprised of one table, chair, cupboard, some documents and lot of dirt. I spent 3-4 hours and cleaned it completely. All the workers were looking at me quite surprisingly. At the end of the day, I was happy that I did what I liked and what I should have done. There was no expectation around. Next morning, 2-3 of the workers came to my seat and told me that they also wanted to clean their place. They asked, can I manage the time break for cleaning. I took the responsibility and told that I shall manage it. They called all other workers and discussed with them. That day, all the them worked as a team and cleaned the workshop for 4-5 hours. Results were obviously pleasant. Workshop was completely changed, air was purified. All of the co-workers were appreciating the change themselves. Earlier they had to find a clean place to have their tea, now whole workshop was cleaned enough to sit anywhere.<br />
<br />
<a name='more'></a><br />
It was a great learning for me, that how a small example can inspire group of people to do good action, for good change. I took that learning with me.<br />
<br />
Here are few 'take away points' from this story, which tells us the basic ingredients of 'Lead by Example' practice. <br />
<br />
<ul style="text-align: left;">
<li>Show that it is feasible and doable</li>
<li>Share information in small chunks which others can understand quickly and can adapt easily</li>
<li>And one important point, don't forget those 2-3 workers which came to the table next day asking for permission to clean. Those were the change agent, which actually helped to propagate the change. Don't ignore the change agents, rather empower them. Show your trust in them. </li>
</ul>
<br />
So all good so far. However, as a word of caution, please don't expect result of example so early always. Sometimes, you may not get the results for days or weeks even. There can be a phase of frustration when nothing is happening. Patience is required in such scenario. Let us take another example to understand this. Suppose I joined an Organization recently. Nobody knows about me much, no carry forward reputation. In meeting room, I found that most of the people are not putting the chairs back to their place after meeting. I started putting chairs back in their position, in expectation that others would follow. However, nothing happened. No one noticed. I was the only one doing that for next 2-3 weeks. Bad? Not entirely actually, and hopefully will never be. After sometime, at least few other team mates started doing that. I just had to have some patience. But still impact was slow and not widespread.<br />
<br />
Now, lets change the scenario a little. Instead of me, it is the team manager who is putting the chairs back in place. What would happen? Most of the team will take the clue and will follow him. Why, because he already has a relation of trust, respect or authority with all team members. Hence, relation of trust or respect matters while setting the example. This respect or trust can come from any factor; like if you are experienced and hence have respect in team due to your skills, or you are having a good designation, or you are empowered by your seniors. It is an important point, or otherwise example would take time to show the impact.<br />
<br />
Conclusion: 'Lead by example' is an awesome leadership practice which mostly works. Practice it wherever you can, just keep low expectations and have patience. It is equally applicable in your personal life too. And don't ignore the change agents, they are very important.<br />
<br />
Let me conclude the article with a beautiful quote from Mahatma Gandhi - "Be the change, what you want to see in the world".</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-20170931596978585672014-09-06T20:10:00.000+05:302015-08-01T11:55:31.436+05:30Vedic Math - Divsion by 9<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>Note</u>:</b> Vedic Math Blog has been moved to <a href="http://vedicmath.vedantatree.com/">http://vedicmath.vedantatree.com/</a>. Please bookmark the new address for new and existing blogs.<br />
<br />
Let us learn, how to do 'Division' operation using 'Vedic Math'. Conventionally, we do it like following:<br />
<br />
Divisor ) Dividend ( Quotient<br />
---------<br />
---------<br />
_________<br />
Remainder<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> <br />
However, in the Vedic process, the format is<br />
Divisor ) Dividend<br />
--------<br />
__________________<br />
Quotient | Remainder<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> <br />
Let us first start with one of the special case of division i.e. <b>Division By 9</b>, a very interesting and simple technique.<br />
<br />
When dividing by 9, the remainder is always the digit sum of the original number.<br />
<br />
<b>For 2-digit number divided by 9 </b><br />
To divide ab by 9 : Rewrite ab as a | b . The quotient is a, and the remainder is simply a + b.<br />
<br />
a | b<br />
| a<br />
---------<br />
a | a + b<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<b>Examples: </b><br />
<b><br /></b>
<b>12 divided by 9</b><br />
Here quotient = 1 and remainder = 1+2 = 3<br />
<br />
<b>23 divided by 9</b><br />
Here quotient = 2 and remainder = 2+3 = 5<br />
<br />
<b>70 divided by 9</b><br />
Here quotient = 7 and remainder = 7+0 = 7<br />
<br />
Now, let us discuss the cases when remainder is greater than 9 :-<br />
<br />
<b>86 divided by 9</b><br />
Here quotient = 8 and remainder= 8+6 = 14 ( >9 )<br />
So we add one in the quotient and becomes 9 ; and<br />
remainder becomes 5, after subtracting 9 from 14<br />
<br />
New quotient = 9 and New remainder = 5<br />
<br />
<b>75 divided by 9</b><br />
Here quotient = 7 and remainder = 7+5 = 12 ( >9 )<br />
So, New quotient = 8 and New remainder = 3 (12-9=3)<br />
<br />
Also, notice here, that the new remainder is just the digit sum of the old remainder.<br />
<br />
<b>For 3-digit number divided by 9</b><br />
<br />
ab | c<br />
a | a + b<br />
---------------<br />
ab + a | a + b + c<br />
<br />
Quotient: ab + a ; Remainder: a + b + c. However, remember that the remainder should be less than 9. And if remainder is greater than 9; we add 1 to quotient and subtract 9 from the remainder.<br />
<br />
<a name='more'></a> <b>Examples:</b><br />
<b>124 divided by 9</b><br />
12 | 4<br />
1 | 1 + 2<br />
------------<br />
13 | 7<br />
Quotient = 13 and Remainder = 7<br />
<br />
<b>311 divided by 9</b><br />
31 | 1<br />
3 | 3 + 1<br />
------------<br />
34 | 5<br />
Quotient = 34 and Remainder = 5<br />
<br />
<b>267 divided by 9</b><br />
26 | 7<br />
2 | 2 + 6<br />
------------<br />
28 | 15 (add 1 to quotient ; subtract 9 from remainder or digit sum of the remainder i.e. 1+5=6)<br />
29 | 6<br />
Quotient = 29 and Remainder = 6<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<b>Examples for 4-digit number</b><br />
<b> 3121 divided by 9</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2KKG_2BkR2wO0sDayE7fYidbqc04E0AMXsK00oysyAp1nti_KnY5l1uscltSnshLPfDXV5G-OESDM_RMVIQc-Kv1vA_lNrMyWkSQsx2yH69fwS1t70M0sHS7lulCe-z9hJpyDiTamABg/s1600/i1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2KKG_2BkR2wO0sDayE7fYidbqc04E0AMXsK00oysyAp1nti_KnY5l1uscltSnshLPfDXV5G-OESDM_RMVIQc-Kv1vA_lNrMyWkSQsx2yH69fwS1t70M0sHS7lulCe-z9hJpyDiTamABg/s1600/i1.png" width="400" /></a></div>
<br />
<b>3172 divided by 9</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg56Uo_G-M7NhA_H5R6JG2OLn2RfFs7iMxiIlqItnNyzOPxiFTIq7BhZHQTWZg5zAYLvvKNqqnlFz4cXcp58gostkyWHYMqeof6q-_i8MKj1_xBhEJhDe7f_oEgB3XfvbEeZrHPJJoiqWc/s1600/i2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg56Uo_G-M7NhA_H5R6JG2OLn2RfFs7iMxiIlqItnNyzOPxiFTIq7BhZHQTWZg5zAYLvvKNqqnlFz4cXcp58gostkyWHYMqeof6q-_i8MKj1_xBhEJhDe7f_oEgB3XfvbEeZrHPJJoiqWc/s1600/i2.png" /></a></div>
<br />
<b>Example for 5-digit number</b><br />
<b> 42111 divided by 9</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRFlJL0MNKqwFKhvwAbEfXdMArz8k9K30NbTDAs0N3YPQsByjNXK4vbhG80Am4fr11XXxlKoizR63VKfa_E9lrcRWdxk76wRsPz16Mv0GosHxO1448QGnqwWn_wW5JYt4IiwaxYFx4j7M/s1600/i3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRFlJL0MNKqwFKhvwAbEfXdMArz8k9K30NbTDAs0N3YPQsByjNXK4vbhG80Am4fr11XXxlKoizR63VKfa_E9lrcRWdxk76wRsPz16Mv0GosHxO1448QGnqwWn_wW5JYt4IiwaxYFx4j7M/s1600/i3.png" /></a></div>
<br />
<b>Example for 6-digit number</b><br />
<b> 214091 divided by 9</b><br />
<br />
21409 | 1<br />
The first digit 2 is write down as the first digit of the quotient. Take this 2 and add to the next digit '1'. This gives 3 as the next<br />
digit. Working this way 3+4 =7, 7+0 =7 , 7+9 = 16 and the remainder is 16+1 = 17<br />
2377 16 | 17<br />
carry 1 on the left, gives<br />
23786 | 17<br />
The remainder 17 > 9 , so add 1 to quotient and subtract 9 from remainder.<br />
23787 | 8<br />
Q= 23787, R = 8<br />
<br />
I hope, you would enjoy using this interesting and simple technique. In case of any query, please post in the comments.<br />
<br />
<div style="background-color: white; color: #333333; font-family: arial; font-size: 14px; line-height: 22.3999996185303px;">
<b><u>Follow us:</u></b></div>
<div style="background-color: white; color: #333333; font-family: arial; font-size: 14px; line-height: 22.3999996185303px;">
<ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">On Facebook at <a href="https://www.facebook.com/VedantaTree" style="color: #5588aa; font-weight: bold; text-decoration: none;" target="_blank">VedataTree@Facebook</a></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">On Twitter at <a edantatree="" href="https://draft.blogger.com/null" https:="" style="color: #5588aa; font-weight: bold; text-decoration: none;" target="_blank" twitter.com="">@VedantaTree</a></li>
</ul>
</div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Pooja Guptahttp://www.blogger.com/profile/05546620860288557452noreply@blogger.com1tag:blogger.com,1999:blog-999802451712728704.post-2157292214754599012014-08-20T11:28:00.000+05:302015-08-01T11:56:24.641+05:30Vedic Math - Cube Roots of more than 6-Digit Number - Part III<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>Note</u>:</b> Vedic Math Blog has been moved to <a href="http://vedicmath.vedantatree.com/">http://vedicmath.vedantatree.com/</a>. Please bookmark the new address for new and existing blogs.<br />
<br />
In this article, we are going to learn an interesting Mathematical technique to find, if the given number is a perfect cube or not. It is very important step while computing cube roots. Infact, before applying any method to find the cube root, we have to check whether it is perfect cube or not and then accordingly we choose the technique. For example, following scenario tells us the importance of finding perfect cube step while computing the cube root.<br />
<br />
<b>Example :</b> 1728 has cube root 12 since two groups are 1 and 728. From 728, we derive last digit as 2 from 1 (first group), we derive first digit as 1.<br />
So, cube root of 1728 is 12. <br />
But now, if number is 1278, which again has two groups: 1 and 278. It can derive the same last digit as 2 and first digit as 1 , which implies that cube root of 1278 is 12, which is not true because technique stands true for perfect cube root only.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
There is a simple technique to check whether the number is perfect cube or not. For this, we add the digits of the number. See the below chart in which we add the digits of cubes from 1 to 10.<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzArDlBmQwMmXWp7Jox5Oxfuo2y8a22JZBDma1QhO9si5f_cirkzimfyZSlHRCGs_FbjQQuz1UfQNi0SGxemDUxZ64lT6lmPtby6f9bymT8bkOURU9Bc3DvcZ2PABywGFT_4pkHXzS7g/s1600/img12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzArDlBmQwMmXWp7Jox5Oxfuo2y8a22JZBDma1QhO9si5f_cirkzimfyZSlHRCGs_FbjQQuz1UfQNi0SGxemDUxZ64lT6lmPtby6f9bymT8bkOURU9Bc3DvcZ2PABywGFT_4pkHXzS7g/s1600/img12.png" width="400" /></a></div>
Above example shows that sum of digits of a perfect cube is either 1, 8 or 9. However, it is not true that all numbers which sum to 1,8 or 9, will be perfect cube.<br />
<br />
<b>For example,</b><br />
Sum of digits of 1728 and 1278 are same i.e.(1+7+2+8) = (18) = 9 . But 1278 is not a perfect cube.<br />
<br />
Hence if sum of digits of a number is not 1,8 or 9, we are very sure that the number is not a perfect cube. However, a number may not be perfect cube root even if sum of digits is 1,8 or 9. To scrutinize that, we need to apply factorisation. If number is small like 1278, factorisation is good method. See below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_DK-BHkCBs7Wjjf89Fud4Wm-g-cGaeUCGu89NIBnuoenAsktQqnxabaoY63Ms4Q09B14HjgQ9-pZf9ns-Bq1QXUv-946ln9iSWaWaH_M7obZKNIpVIe97KmHPHZa_xXdtiH8dHoovAnk/s1600/img13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_DK-BHkCBs7Wjjf89Fud4Wm-g-cGaeUCGu89NIBnuoenAsktQqnxabaoY63Ms4Q09B14HjgQ9-pZf9ns-Bq1QXUv-946ln9iSWaWaH_M7obZKNIpVIe97KmHPHZa_xXdtiH8dHoovAnk/s1600/img13.png" width="320" /></a></div>
<br />
For bigger numbers, factorisation could be time consuming technique. Hence, for large numbers, we shall apply general method of finding the cube of root.<br />
<br />
<b>Case 2 </b>: Cube root for all the cubes, whether perfect cubes or not. (Case 1 discussed in last two articles)<br />
From last two articles, we conclude about the sequence of digits (a+b+c)³ as:<br />
(1) The first place by a³<br />
(2) The second place by 3a<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>b<br />
(3) The third place by 3ab<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3a<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c<br />
(4) The fourth place by 6abc+b³<br />
(5) The fifth place by 3ac<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3b<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c<br />
(6) The sixth place by 3bc<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span><br />
(7) The seventh place by c³ ; and so on.<br />
<br />
In <b>'General Technique'</b>, we find Dividends(D), Quotients(Q), and Remainders(R). Steps involved as:<br />
(1) First determine D, Q and R<br />
(2) From the second dividend, no deduction is to be made.<br />
(3) From the third, subtract 3ab<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span><br />
(4) From the fourth, deduct 6 abc+b³<br />
(5) from the fifth, subtract 3ac<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3b<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c<br />
(6) from the sixth, deduct 3bc<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span><br />
(7) from the seventh, subtract c³. ; and so on.<br />
<br />
(a) Quotient(Q) is closest minimum exact cube to the first cube i.e. 'F' term used in last two articles.<br />
(b) And, Reminder(R) is the difference between the first group and closest minimum exact cube.<br />
(c) Dividend(D) is found by multiplying the 'Square of Quotient(Q)' by 3 (Q<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>*3)<br />
<br />
<a name='more'></a>Lets take an example to make it more clear.<br />
<b>Example 1 : 248858189</b><br />
<br />
(1) First arrange the numbers in groups i.e. 248,858,189<br />
Here, N = 3<br />
First group(248) has closet minimum exact cube (216) which is 6³. So, First Quotient(Q) = 6<br />
First Reminder(R) = 248-216 = 32<br />
First Dividend(D) = 6<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>*3 = 108<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAp-clE82YBsfXJhXang34tKei7Ze00J8pLWh6WVXyqOjW4_ngdj6Bow24l-6CQb4HZN4sk_LJLccUg3Ec-UeaYeslSWCZ5e51byiudKRkOXqxE2psVTPL1Z6kTQoz36_AmmUR9dXl15g/s1600/img14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAp-clE82YBsfXJhXang34tKei7Ze00J8pLWh6WVXyqOjW4_ngdj6Bow24l-6CQb4HZN4sk_LJLccUg3Ec-UeaYeslSWCZ5e51byiudKRkOXqxE2psVTPL1Z6kTQoz36_AmmUR9dXl15g/s1600/img14.png" /></a></div>
<br />
(2) The second Gross Dividend is 328. We don't subtract anything at that point. We only divide it by 108 and write down 2 and 112 as Q and R.<br />
[<b>Important Note : </b>Here we are taking quotient to be 2 instead of 3; because if we take it as 3, the reminder comes out 4 (328-108*3) and third dividend turns out 45 which is absurd and will not be dividable by 108]<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNGT4qps3O-ABHpJ71KlOdsA0c9NP9p1KJPd9QiFT-1NIc0rW2AopLbN3JWc5vF1uG2unmlmTREzhJa78HmgaWnUebK74kdlT_3jYqJKD68Q4fEJyYaLzQIzylfXL9kgksY2l7voKRDN4/s1600/img15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNGT4qps3O-ABHpJ71KlOdsA0c9NP9p1KJPd9QiFT-1NIc0rW2AopLbN3JWc5vF1uG2unmlmTREzhJa78HmgaWnUebK74kdlT_3jYqJKD68Q4fEJyYaLzQIzylfXL9kgksY2l7voKRDN4/s1600/img15.png" width="640" /></a></div>
(3) The third Gross Dividend is 1125. Subtract 3ab<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> (here, a=6, b=2, first two quotients) i.e. 3*6*2<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> = 72 from 1125 (i.e. 1125-72=1053) Therefore, Third Actual Dividend is 1053; divide 1053 by 108 gives 9 and 81 as Q and R.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju9WVF0KCZHzcNcstxCsrrQP9cXuQwl9mUi7UbTsIkYtd-HuTcB7T5ydsBPtEYG3fUX8FEhix9kQnNY1K2bYU2srjClcxo2lA2-Fkd49LaQj8vfypxkA6Aa_jhuCEmLwj8O7eMMK6AQWg/s1600/img16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju9WVF0KCZHzcNcstxCsrrQP9cXuQwl9mUi7UbTsIkYtd-HuTcB7T5ydsBPtEYG3fUX8FEhix9kQnNY1K2bYU2srjClcxo2lA2-Fkd49LaQj8vfypxkA6Aa_jhuCEmLwj8O7eMMK6AQWg/s1600/img16.png" width="320" /></a></div>
<br />
<br />
(4) The fourth Gross Dividend is 818. Subtract 6abc + b³ (here, a=6, b=2, c=9) i.e. 6*6*2*9+2³ = 656 from 818 (i.e 818-656=162) So, Fourth Actual Dividend is 162. Divide this again by 108 and write down 0 and 162 as Q and R.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWZ4pgGzP59Fe7n3fL9SdIIXXWlR2Vf04OMj9hrlTMef3odAXpfO_bbZZ2f64LeXYSck8MkD15AEpqxYWqti6Jxg7Vh0fVxzQU60_bdAqr6r5lANALXZZrXa8bUnrP881sEjwpptlV5bY/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="93" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWZ4pgGzP59Fe7n3fL9SdIIXXWlR2Vf04OMj9hrlTMef3odAXpfO_bbZZ2f64LeXYSck8MkD15AEpqxYWqti6Jxg7Vh0fVxzQU60_bdAqr6r5lANALXZZrXa8bUnrP881sEjwpptlV5bY/s1600/1.png" width="400" /></a></div>
<br />
<br />
(5) The fifth Gross Dividend is 1621. Subtract 3ac<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3b<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c (here, a=6, b=2, c=9) i.e. 1458+108 = 1506 from 1621 (i.e 1621-1506=55) So, Fifth Actual Dividend is 55. Divide it by 108 and write down 0 and 55 as Q and R.<br />
<br />
(6) The sixth Gross Dividend is 558. Subtract 3bc<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> (here, b=2, c=9) i.e. 486 from 558 (i.e 558-486=72) So, Sixth Actual Dividend is 72. Divide this by 108 and write down 0 and 72 as Q and R.<br />
<br />
(7) The last / seventh Gross Dividend is 729. Subtract c³ (here, c=9) i.e. 729 from 729 (i.e 729-729=0) So, Seventh Actual Dividend is 0 and write down 0 and 0 as Q and R.<br />
<br />
Put decimal after 3 digits (N=3). After decimal there are all zeros. This means that the given number is a perfect cube and the cube root is 629.<br />
(After putting decimal, if there are still numbers except 0's than the number is not perfect cube)<br />
<br />
Steps involved in finding dividend, quotient and reminder for (a+b+c+d)³ are:<br />
(1) First determine D, Q and R<br />
(2) From the second dividend, no deduction is to be made.<br />
(3) From the third, subtract 3ab<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span><br />
(4) From the fourth, deduct 6abc+b³<br />
(5) from the fifth, subtract 6abd+3ac<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3b<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c<br />
(6) from the sixth, deduct 6acd+3bc<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3b<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>d<br />
(7) from the seventh, subtract 6bcd+3ad<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+c<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span><br />
(8) From the eighth, subtract 3bd<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3c<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>d<br />
(9) From the ninth, subtract 3cd<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span><br />
(10) From the tenth, subtract d³; and so on.<br />
<br />
<b>OR </b>We can convert (a+b+c+d) into (a+b+c). By considering first two groups into one group.<br />
<b>For example: 12278428443</b> can be written as<br />
12, 278, 428, 443 (a+b+c+d)<br />
12278, 428, 443 (a+b+c)<br />
But, in second, we shall get the first quotient bigger.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd7iKhyphenhyphenmXFI2JP2cEbOyzH9TBD0gar6ml3FDb62zgALSgWJDzfkYOov-0-Q7tEEEQKKhwdpzOFHoNLfnM6BIob1ieD5AJuudKAx9BLMlkn1BXK6dWdF0N8LeRy-olRhCg5bkUW9dYPFgU/s1600/img17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd7iKhyphenhyphenmXFI2JP2cEbOyzH9TBD0gar6ml3FDb62zgALSgWJDzfkYOov-0-Q7tEEEQKKhwdpzOFHoNLfnM6BIob1ieD5AJuudKAx9BLMlkn1BXK6dWdF0N8LeRy-olRhCg5bkUW9dYPFgU/s1600/img17.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7qKI_6LbmW9AThpJDSwVyLJIoPlbHldrLrzUm_ac6d-MF1Epi2agv6duYPaAyfI0G3iUo3f95BUmi-rmD9Gy_Exv5g8PMLiP2nD28IFq-uG3Q0VKBJJbf-njBhIv2bLFmu1VQSf9gA7U/s1600/img18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7qKI_6LbmW9AThpJDSwVyLJIoPlbHldrLrzUm_ac6d-MF1Epi2agv6duYPaAyfI0G3iUo3f95BUmi-rmD9Gy_Exv5g8PMLiP2nD28IFq-uG3Q0VKBJJbf-njBhIv2bLFmu1VQSf9gA7U/s1600/img18.png" width="320" /></a></div>
<br />
Lets take one more example of an imperfect cube (not a perfect cube).<br />
Find cube root of 417 upto 3-decimals place.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTFbj9lhExjV95WWnAuYrpo1oXoS2E78GtpjdTe5npT7611nbz5_zYYGnMxalTJJIGoY13GuFhSUL2aarsJgW_TEk24fAaV1efJ_Z8o67HDboUvYRQFEBk67qLEDoczDxzYIIhoymcWHE/s1600/img19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTFbj9lhExjV95WWnAuYrpo1oXoS2E78GtpjdTe5npT7611nbz5_zYYGnMxalTJJIGoY13GuFhSUL2aarsJgW_TEk24fAaV1efJ_Z8o67HDboUvYRQFEBk67qLEDoczDxzYIIhoymcWHE/s1600/img19.png" /></a></div>
<br />
So, <b>Cube root of 417 is 7.471</b><br />
<br />
Hope these methods will help you all in computing cube root of the number.<br />
<br />
In the upcoming articles, we will discuss about various techniques of division using Vedic Math.<br />
<div>
<br /></div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Pooja Guptahttp://www.blogger.com/profile/05546620860288557452noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-45686102894240975732014-08-04T10:37:00.000+05:302015-08-01T11:56:43.629+05:30Vedic Math - Cube Roots of more than 6-Digit Number - Part II<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>Note</u>:</b> Vedic Math Blog has been moved to <a href="http://vedicmath.vedantatree.com/">http://vedicmath.vedantatree.com/</a>. Please bookmark the new address for new and existing blogs.<br />
<br />
In <a href="http://www.vedantatree.com/2014/07/vedic-math-cube-roots-of-more-than-6.html" target="_blank">last article</a>, we have discussed the method to find cube root of more than 6-digit numbers; especially the odd numbers. Today we shall discuss the procedure for even numbers. In this procedure, only two extra steps are added, one in the beginning and other at the end. Rest all is same. <br />
<br />
<b>Procedure:</b> As first added step, we keep on dividing the number by 8 till we get an odd cube. Following it, same method of successive elimination of the digits will apply. At the end, multiply the cube root by 8 to obtain the cube root of the original number.<br />
<br />
<b>Example : 2840362499528</b><br />
First, we continue without using those two additional steps, which will help you to understand the problems arises while dealing with even cubes.<br />
<br />
The cube root of the cube 2,840,362,499,528 (say, F + J + H + M + L )<br />
Here, N=5 (means that cube root will be of 5 digits number)<br />
L=2 (i.e. 2³=8, matching with the last digit of the last group '528')<br />
and F=1 (i.e, 1³=1, nearest cube of first group '1')<br />
<br />
Step1 : L=2 & L³=8. Subtracting this, <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDrH8SIbHdElXVPD8-KpEyIhzz1xEYOmtwCQp-9waK3D_yumpQ9i0Rk7z4iHcyW4rRWYvclIrxlqmh7BaUjc8S9yuH5qIrARprInVe-hp6Rgqqy-IUqk7WJ2wYowCVb8z_VWCD7__rj0g/s1600/img6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDrH8SIbHdElXVPD8-KpEyIhzz1xEYOmtwCQp-9waK3D_yumpQ9i0Rk7z4iHcyW4rRWYvclIrxlqmh7BaUjc8S9yuH5qIrARprInVe-hp6Rgqqy-IUqk7WJ2wYowCVb8z_VWCD7__rj0g/s1600/img6.png" /></a></div>
Step2 : 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M=12M (substituting L = 2)<br />
Hence, 12M = Number ending with 2<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Here M is either '1' or '6' (ambiguous values)<br />
Lets take 6 (pure gamble)<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Now, Deducting 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M = 12M = 72 <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzPmsQZRYQs-ZWxDtLhvRF_Og_NXshXAWFOprnXnIp0qPXs5L1YCvmrEmyUzP-94wwpslOXP0d0q5HbcSecjupXEDoRJJ4yq0SDtA976t-rBzAX-A3-6FbNLPte_b-cstRYbARRot1aJg/s1600/img7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzPmsQZRYQs-ZWxDtLhvRF_Og_NXshXAWFOprnXnIp0qPXs5L1YCvmrEmyUzP-94wwpslOXP0d0q5HbcSecjupXEDoRJJ4yq0SDtA976t-rBzAX-A3-6FbNLPte_b-cstRYbARRot1aJg/s1600/img7.png" /></a></div>
Step3 : 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>H = 12H + 216 (substituting L = 2, M = 6)<br />
12H + 216 = Number ending with 8 <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> 12H = Number ending with 2 <br />
Here H is either '1' or '6' <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Lets take 1 (again gamble)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Now, Subtract 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>H = 12H + 216<br />
= 228 <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYYG_YDchJ1r2pzMoC5uPUp3kCsnisgeKsI_9kmvl0TlO9sGPMpxTTrZsvcC6jTJXmoa_hInkPwFbmpuRonl8t9nCACTTduNYbXFdfpuB99KxYpy9tkN-uM04ka5Fd3vPlMesQO04AlgY/s1600/img8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYYG_YDchJ1r2pzMoC5uPUp3kCsnisgeKsI_9kmvl0TlO9sGPMpxTTrZsvcC6jTJXmoa_hInkPwFbmpuRonl8t9nCACTTduNYbXFdfpuB99KxYpy9tkN-uM04ka5Fd3vPlMesQO04AlgY/s1600/img8.png" /></a></div>
Step4 : 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>J+6LMH+M³ = 12J+12+216 <br />
= 12J+228<br />
12J+228 = Number ending with 6 <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>12J = Number ending with 8 <br />
Here J is either '4' or '9'<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
Lets take J = 4 <span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
Since we already know 'F' , so no need to know the expansion of (F+J+H+M+L)³ <span class="Apple-tab-span" style="white-space: pre;"> </span><br />
Therefore, <b>cube root is 14162</b> (F=1, J=4, H=1, M=6, L=2) <br />
<a name='more'></a><br />
In the above example, we see that there are so many ambiguous values like in step 2, 3, 4. To solve this problem, we divide the number by 8.<br />
So, <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijN_yt7hHoiqMWZw5yrthGL8CGKxg2ievFh6-dnQRpWj-IBWcV2H3XSy0mMRl2XELCeacWTs7se15mqgA65DZaQ7rQvVAsIQmRDllYe_L46qiMlxke__9f0gCbugyiu07NxIBgkanmVYs/s1600/img9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijN_yt7hHoiqMWZw5yrthGL8CGKxg2ievFh6-dnQRpWj-IBWcV2H3XSy0mMRl2XELCeacWTs7se15mqgA65DZaQ7rQvVAsIQmRDllYe_L46qiMlxke__9f0gCbugyiu07NxIBgkanmVYs/s1600/img9.png" /></a></div>
After first division by 8, if we get the last digit as odd number; we shall consider this number. If last digit is still even, we shall again divide by 8 till the last digit comes out to be an odd number. Remember one more thing, we will multiply the final output by 8 only once and not the number of times we divide it by the number (like, after dividing 3 times '792 994 249 216' by 8, we get '1 548 816 893', an odd number. Then we calculate the cube root of this odd number. Finally we shall multiply the cube root with 8 only once,<br />
output*8 = Final Cube Root)<br />
<br />
<b>For, 355,045,312,441</b><br />
N=4,<br />
L=1 (1³=1)<br />
F=7 (7³=343 < 355)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
Step1 : L=1 & L³=1. Subtracting this, <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVFtI4RHlS7fPQbXCAKUy_2uZlEwOTRWgsy5yrUwzlq6PMbJXONI0P-sWNFeqkqC7Lw51b5-wmr_c7osDZOADxwzeqCJl1S5HzqgeEdE0QM0_GeWSh8Na4-aPf56P6qO5frS1fSVmJlaE/s1600/img10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVFtI4RHlS7fPQbXCAKUy_2uZlEwOTRWgsy5yrUwzlq6PMbJXONI0P-sWNFeqkqC7Lw51b5-wmr_c7osDZOADxwzeqCJl1S5HzqgeEdE0QM0_GeWSh8Na4-aPf56P6qO5frS1fSVmJlaE/s1600/img10.png" /></a></div>
Step2 : 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M=3M (substituting L = 1)<br />
3M = Number ending with 4<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> So M should be 8 <br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Now, Deducting 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M = 3M <br />
= 24 <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsfC3uggGLbl9pGEWRFMN0MpzlqkdfBECUAcAg4NQ-v5VRQRvItdtr1sDgZr-4BEc5qdSjaGa3pNWbltJ0r-nyBsEbAGW33EsWhuF42f9HmO2BZ9ZHq5w-B4WcyiWqp2sR7FroeSOzlt0/s1600/img11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsfC3uggGLbl9pGEWRFMN0MpzlqkdfBECUAcAg4NQ-v5VRQRvItdtr1sDgZr-4BEc5qdSjaGa3pNWbltJ0r-nyBsEbAGW33EsWhuF42f9HmO2BZ9ZHq5w-B4WcyiWqp2sR7FroeSOzlt0/s1600/img11.png" /></a></div>
Step3 : 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>H = 3H + 192 (substituting L = 1, M = 8)<br />
3H + 192 = Number ending with 2 <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> 3H = Number ending with 0 <br />
Hence H = 0 <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Therefore, Cube Root is 7081 (F=7, H=0, M=8, L=1)<br />
<br />
<b>The Cube Root of the original number </b>= 7081*8<br />
= <b>14162 </b><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
In next article, we shall learn to find the cube root for all cube numbers (whether perfect or not). Thanks for visiting the blog. Please keep sharing the knowledge by posting in 'comments' section.<br />
<br />
If you like the article, you may contribute by:<br />
<br />
<ul style="text-align: left;">
<li>Posting your comments which will add value to the article contents</li>
<li>Posting the article link on Social Media using the Social Media Bookmark bar</li>
<li>Connecting with 'VedantaTree' on Facebook (<a href="https://www.facebook.com/VedantaTree">https://www.facebook.com/VedantaTree</a>)</li>
</ul>
<br />
<div>
<br /></div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Pooja Guptahttp://www.blogger.com/profile/05546620860288557452noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-54458019739876904722014-07-21T20:27:00.000+05:302015-08-01T11:56:57.231+05:30Vedic Math - Cube Roots of more than 6-Digit Number - Part I<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>Note</u>:</b> Vedic Math Blog has been moved to <a href="http://vedicmath.vedantatree.com/">http://vedicmath.vedantatree.com/</a>. Please bookmark the new address for new and existing blogs.<br />
<br />
Back after a long break. In <a href="http://www.vedantatree.com/2013/06/vedic-math-cube-roots.html" target="_blank">previous article</a>, we learn how to find the cube root of 4 or 5 or 6 digits perfect cubes. Let us continue it further and discuss how to find the cube root of perfect or imperfect cubes.<br />
<br />
In this article, we shall learn to find the cube roots for:<br />
1. Cube root of perfect cubes, for any number of digits.<br />
2. Cube root for all the cubes, whether perfect cubes or not.<br />
<br />
To summarize what we have learned till now for cube root:<br />
<br />
Arrange the given number in three-digit groups, starting from right to left. A single digit, if any left over at the left hand side, is counted as a simple group itself. The number of digits in the cube root will be the same as the number of digit-groups in the given number itself.<br />
<br />
<ul style="text-align: left;">
<li>169 will count as 1 group </li>
<li>1 258 will count as 2 groups </li>
<li>43 781 will count as 2 groups</li>
<li>2 154 890 will count as 3 groups</li>
</ul>
<br />
If the given number has 'n' digits, its cube root will be having n/3 or (n+1)/3 digits. Also remember few other points from previous article:<br />
<br />
The Cubes of the first nine natural numbers <br />
1³ = 1 2³ = 8 3³ =27 4³ = 64 5³ = 125 6³ = 216 7³ = 343 8³ = 512 9³ = 729 10³ = 1000<br />
From it, we understand that<br />
<br />
<ul style="text-align: left;">
<li>1,4,5,6,9,0 numbers repeat themselves in the ending of their cubes</li>
<li>2,3,7 and 8 have their complements from 10, at the end of their cube</li>
</ul>
<br />
Let us start with actual technique now. Any number can be written in an algebraic expression. For example, if arithmetical number is 'dcba', it can be written in algebraic form as:<br />
<b>Algebraic Expression is</b>: a + 10b + l00c + 1000d.<br />
<br />
Now if we need to find the cube of a number 'cba', algebraically we can expand it like <b><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-SG; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG;">(a+10b+10<sup>2</sup>c)<sup>3</sup></span></b>. Let us expand it:<br />
<b><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-SG; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG;">(a+10b+10<sup>2</sup>c) <sup>3</sup></span></b> <span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-SG; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG;">= a<sup>3</sup> + 10 (3a<sup>2</sup>b) + 10<sup>2
</sup>(3ab<sup>2</sup>+3a<sup>2</sup>c) + 10<sup>3 </sup>(b<sup>3</sup>+6abc) +
10<sup>4 </sup>(3ac<sup>2</sup>+3b<sup>2</sup>c) + 10<sup>5 </sup>(3bc<sup>2</sup>)
+ 10<sup>6</sup> (c<sup>3</sup>)</span><br />
<br />
Now removing the powers of ten and putting the result in algebraic form, it tells us the formation of cube as:<br />
(1) The units' place is determined by a³.<br />
(2) The tens' place is contributed by 3 a<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>b<br />
(3) The hundreds' place is contributed to by 3ab<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> + 3a<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c<br />
(4) The thousands' place is formed by b³ + 6abc<br />
(5) The ten thousands' place is given by 3ac<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> + 3b<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c<br />
(6) The hundred thousands' (lakhs') place is constituted of 3bc<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> ; and<br />
(7) The millions' place is formed by c³.<br />
<br />
The number of zeroes in the various coefficients of the expanded Algebraic Expression are the basis of the formula / analysis.<br />
<br />
<b>Case1 : Cube root of perfect cubes for any number of digits</b><br />
<br />
Suppose we have a cube number n of any number of digits. To find its cube root, find following:<br />
- The number of groups (N) in cube (as we discussed above to make the sets of 3 digits)<br />
- First digit of cube root denoted as 'F' (Nearest cube root of first group from left) <br />
- Last digit of cube root denoted as 'L' (Cube root of last group from left)<br />
- Middle numbers of cube root(i.e. 'M' or 'H' or 'J'....), we shall find using the procedure.<br />
<br />
Following are the steps for the procedure:<br />
(i) From the units' place of given number, subtract the L³ (i.e. a³, refer to algebraic expression above); and that eliminates the last digit of the number.<br />
(ii) From the ten's place, we subtract 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M (i.e. 3a<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>b) and thus eliminate the second last digit (penultimate digit).<br />
(iii) From the hundreds' place, we subtract 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> + 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>F (i.e. 3ab<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span> + 3a<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>c) and hence eliminate the pre-penultimate digit.<br />
and so on<br />
<a name='more'></a><br />
Let us understand it with an example.<br />
<br />
<b>Example 1 : 83453453</b><br />
<br />
First arrange the numbers in groups i.e. 83,453,453<br />
Here the number of 3 digit groups i.e. N = 3 (that also means that cube root will be of 3 digits number)<br />
Last digit of the number is 3. The last digit of cube root of the number ending with 3 should be 7 (i.e.7³ = 343) So L = 7<br />
The first group is 83 , the closest minimum exact cube to 83 is 64 which is nothing but 4³, therefore, F = 4<br />
<br />
Hence N = 3, L = 7, and F = 4<br />
<br />
And let us proceed to find the middle number:<br />
<br />
<b>Step1</b> : L=7 so L³=343 <br />
Now subtract '343' from the last digit <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3EJON8D8Syh608MfKL2EFlsBEUW1nBZixDULVb0ixQt33vUMOillncPa0-kSD5U7-RKsucoWtMWgNyiGflNlvsM3tF2vKsVx4x5XPyKAC0klXtw2jQ0TaBV24EJYck1QbcrLlt_boxKg/s1600/img1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3EJON8D8Syh608MfKL2EFlsBEUW1nBZixDULVb0ixQt33vUMOillncPa0-kSD5U7-RKsucoWtMWgNyiGflNlvsM3tF2vKsVx4x5XPyKAC0klXtw2jQ0TaBV24EJYck1QbcrLlt_boxKg/s1600/img1.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
This eliminates the last digit of number, and give way to calculation of middle numbers<br />
<br />
<b>Step2 </b>: 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>= 147M (substituting L = 7)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Now the last digit of 147M is '1' (which is the last digit of the number '8345311' after subtracting in first step).<br />
Hence, 147M = Number ending with 1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>So M should be 3 ( because 147*3 can give a number ending with 1)<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Deducting 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M = 147M = 147*3 = 441<span class="Apple-tab-span" style="white-space: pre;"> </span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNSflXcLW8XhJ7NEsM9U-jbcXneP1MX0QPy9h5-qxY1vydWN_-XdqqUugyCsfzuZdRUP0QCaBG-L3yHZrpE36PUP24IukaFSQwS1cSzySBjgNCGAmyuex2AoqeJo_zrehZdmKC3fY0KAE/s1600/img2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNSflXcLW8XhJ7NEsM9U-jbcXneP1MX0QPy9h5-qxY1vydWN_-XdqqUugyCsfzuZdRUP0QCaBG-L3yHZrpE36PUP24IukaFSQwS1cSzySBjgNCGAmyuex2AoqeJo_zrehZdmKC3fY0KAE/s1600/img2.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
This eliminates the second last digit of number, and give way to calculation of further numbers.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<b>Step3 </b>: 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2 </sup></span>+ 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>F = 147F + 189 = ending with 7 (last digit of '834487' )<br />
147F = Number ending with 8 (i.e.834487-189)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> Hence, F = 4 (147*4 can give a number ending with 8)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> <br />
Hence,<b> Cube Root = 437</b><br />
<br />
<b>Note:-</b> The last step can be skipped safely, as we were already aware about the the first digit of cube root i.e. F.<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<b>Example 2: 13824</b><br />
Arrange the number in groups i.e. 13, 824<br />
Here N=2 (which means that cube root will be of 2 digits number)<br />
L = 4 (i.e. 4³ = 64) and<br />
F = 2 (exact cube near to 13 is 8 i.e.2³)<br />
Therefore, <b>cube root = 24</b><br />
<br />
<b>Example 3 : 76928302277</b><br />
Arrange the number in groups i.e. 76, 928, 302, 277 (say, F + H + M + L )<br />
Here N = 4 (which means that cube root will be of 4 digits number, FHML)<br />
L = 3 (i.e. 3³ = 27, matching with the last digit of the last group '277')<br />
and F = 4 (i.e, 4³ = 64, nearest cube of first group '76')<br />
<br />
<b>Step1</b> : L=3 & L³=27. Subtracting this, <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLn56FHkXMZM1TEd44rzbvSDPPHiaJqI0u3oSdJFKOiAdt866qnOsitmB5BuI6Yk6dG5QOxOt1sMzjqG85GAezyl2N4irxzkknzmFLsXtHeAO2Wbc7_VgPvaE6QpdZ_-GgQc60Xwx-6Gk/s1600/img3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLn56FHkXMZM1TEd44rzbvSDPPHiaJqI0u3oSdJFKOiAdt866qnOsitmB5BuI6Yk6dG5QOxOt1sMzjqG85GAezyl2N4irxzkknzmFLsXtHeAO2Wbc7_VgPvaE6QpdZ_-GgQc60Xwx-6Gk/s1600/img3.png" /></a></div>
<b>Step2</b> : 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M=27M (substituting L = 3)<br />
Now the last digit of 27M is '5' (which is the last digit of the number '7692830225' after subtracting in first step).<br />
Hence, 27M = Number ending with 5<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>So M should be 5 ( because 27*5 can give a number ending with 5) <br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Now, Deducting 3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>M = 27M <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> = 135 (27*5) <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpihxGrKiJKA_jEnJwD6u5w4Wrug42hHRSUVxbVEdryViTlFLzZ5_AOsl05j0qJA_Zi8YJ44ltOttGex4PRkIF79ebyn9BDwowwOnTffON82YHK2BOrDz09lDMgse_DTkD9zSltSyFDeI/s1600/img4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpihxGrKiJKA_jEnJwD6u5w4Wrug42hHRSUVxbVEdryViTlFLzZ5_AOsl05j0qJA_Zi8YJ44ltOttGex4PRkIF79ebyn9BDwowwOnTffON82YHK2BOrDz09lDMgse_DTkD9zSltSyFDeI/s1600/img4.png" /></a></div>
<b>Step3 </b>: 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>H = 27H + 225 (substituting L = 3, M = 5)<br />
27H+225 = Number ending with 9 <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>27H = Number ending with 4 (i.e.769283009-225) <br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Hence, H = 2 (27*2 can give a number ending with 4) <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>So, 3LM<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>+3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>H = 27H+225 = 27*2+225 = 279 <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaTxgmUu0f_XYLX9tQI4nbVG0VehagcQKDvW67vHgmwAgj-QYzFu0TPKxQTvdYryeDvUygsvvPZqMktzvYbnqG4KSY_oqsPw6dHj3hmUhH8YZ-JAw78Z-mMqneJX2snPfQueWHhMQ-oU/s1600/img5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaTxgmUu0f_XYLX9tQI4nbVG0VehagcQKDvW67vHgmwAgj-QYzFu0TPKxQTvdYryeDvUygsvvPZqMktzvYbnqG4KSY_oqsPw6dHj3hmUhH8YZ-JAw78Z-mMqneJX2snPfQueWHhMQ-oU/s1600/img5.png" /></a></div>
Therefore,<b> cube root is 4253</b> (F=4, H=2, M=5, L=3) <br />
<br />
<b>Note:</b> According to the procedure, we can determine the first digit by the same method of successive elimination of the digits. For this, we have to expand (F + H + M + L)³. And, on expanding, we find that in the 4th step i.e. thousand's place number, 'F' appears to be '3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>F + 6LMH + M³'. We need to deduct this value to eliminate the fourth digit. So,<br />
<br />
3L<span style="font-family: "Calibri","sans-serif"; font-size: 11pt; line-height: 16.866666793823242px;"><sup>2</sup></span>F + 6LMH + M³ = 27F+180+125 <br />
= 27F+305<br />
27F + 305 = Number ending with 3 <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>27F = Number ending with 7 <br />
Hence, F = 4<br />
Therefore, <b>Cube Root = 4253 </b> <br />
<br />
[For reference, <b><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-SG; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-SG;">(10<sup>3</sup>d+10<sup>2</sup>c+10b+a) <sup>3</sup></span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> = a<sup>3</sup> + 10 (3a<sup>2</sup>b) + 10<sup>2 </sup>(3ab<sup>2</sup>+3a<sup>2</sup>c)
+ 10<sup>3 </sup>(b<sup>3</sup>+6abc+3a<sup>2</sup>d) + 10<sup>4 </sup>(3ac<sup>2</sup>+3b<sup>2</sup>c+6abd)
+ 10<sup>5 </sup>(3bc<sup>2</sup>+3b<sup>2</sup>d+6acd) + 10<sup>6</sup> (c<sup>3</sup>+3ad<sup>2</sup>+6bcd)
+ 10<sup>7 </sup>(3bd<sup>2</sup>+3c<sup>2</sup>d) + 10<sup>8 </sup>(3cd<sup>2</sup>)
+ 10<sup>9</sup> (d<sup>3</sup>)]</span> <br />
<br />
<b>Note</b>:- Again, in case of perfect cubes, the last step can be skipped safely, as we are already aware about the the first digit of cube root i.e. F.<br />
<br />
<b>Important point to notice</b> is that above method can be applied for odd cubes only. If the cube is even, then we would found ambiguous values at each step; like we may get two possibilities of M, H,.... We shall discuss the procedure to find cube root of such even cubes in next article. Till then, practice above procedure and keep posting your queries and share any findings.<br />
<br />
------------------------------------------------------------------------------------------------------------<br />
If you like the article, you may contribute by:<br />
<ul>
<li>Posting your comments which will add value to the article contents</li>
<li>Posting the article link on Social Media using the Social Media Bookmark bar</li>
<li>Connecting with 'VedantaTree' on Facebook (<a href="https://www.facebook.com/VedantaTree">https://www.facebook.com/VedantaTree</a>)</li>
</ul>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Pooja Guptahttp://www.blogger.com/profile/05546620860288557452noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-56864690673806072122014-05-04T21:01:00.003+05:302014-05-04T21:01:58.951+05:30Spring RoutingDataSource to Work with Multiple DataSources - II<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="tr_bq">
<span style="font-family: inherit;">In <a href="http://www.vedantatree.com/2014/03/how-to-design-spring-application-to.html" target="_blank">previous article</a>, we have discussed about using Spring 'AbstractRoutingDataSource' to dynamically routing the database call to desired database (i.e. data source). This is very handy feature and useful in various scenarios. </span></div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">One important use case can be in multi-tenant application. In multi-tenant application, one of the database design consideration can be to use separate database for each tenant. It helps to keep the data of each tenant separate, and would be good for performance also. And, good design would require to use the same application layer code to work with all tenant and their specific database. In this scenario, use of 'AbstractRoutingDataSource' can help to achieve these design considerations. Extend the AbstractRoutingDataSource to create a custom 'MultiTenantRoutingDataSource'. Use a thread local application context state holder to maintain the tenant state for current flow. Use this thread local context in extended 'MultiTenantRoutingDataSource' to return the tenant specific data source. Again keep in consideration please, that Routing Data Source will be invoked by TransactionManager before starting the transaction only. Once transaction is started, data source can not be changed. </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Let us see the example of data source definition in Context for dynamically switching between OLTP and Reporting Database: </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><span style="background-color: white; color: #252c2f;"><bean id="dataSourceOltp" name="oltpDataSource" class="..PooledDataSource"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><property name="targetDataSource"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><jee:jndi-lookup jndi-name="jdbc/DB" cache="true" /></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></property></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></bean></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><br /></span></span><br />
<span style="font-family: inherit;"><span style="background-color: white; color: #252c2f;"><bean id="dataSourceReportDb" name="dataSourceReportDb" class="..PooledDataSource"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><property name="targetDataSource"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><jee:jndi-lookup jndi-name="jdbc/ReportDB" cache="true" /></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></property></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></bean></span><br style="background-color: white; color: #252c2f;" /><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><bean id="customDataSource" class="com.a.b.common.db.DBCustomRoutingDataSource "></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><property name="targetDataSources"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><map key-type="com.a.b.util.DataSourceConstants"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><entry key="OLTP_DB" value-ref="dataSourceOltp"/></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><entry key="REPORT_DB" value-ref="dataSourceReportDb"/></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></map></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></property></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><property name="defaultTargetDataSource" ref="dataSourceOltp"/></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></bean></span><br style="background-color: white; color: #252c2f;" /><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><bean id="txAwareCustomDS" name="txAwareCustomDS" class="org.springframework.jdbc.datasource.Transac tionAwareDataSourceProxy"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><property name="targetDataSource" ref="customDataSource"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></property></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></bean></span><br style="background-color: white; color: #252c2f;" /><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><bean id="CustomTxManager" class="org.springframework.jdbc.datasource.DataSou rceTransactionManager"></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"><property name="dataSource" ref="txAwareCustomDS" /></span><br style="background-color: white; color: #252c2f;" /><span style="background-color: white; color: #252c2f;"></bean></span></span><br />
<span style="background-color: white; color: #252c2f;"><span style="font-family: inherit;"><br /></span></span>
In above context definition, we may define data sources for multiple tenants in place of OLTP or Reporting Database. To extend the design further for multiple tenants, definition can be made dynamic.<br /><br /><b><u>Important Note: </u></b><br /><br />If you are using TransactionAwareDataSourceProxy with DataSourceTransactionManager, it should always be the outer most wrapper in the hierarchy. Keep data sources hierarchy as following: <br /><br />TransactionAwareDataSourceProxy > Routing Data Source > Lazy Data Source > Pooled Data Source<br /><br />Reason is, DataSourceTransactionManager will never work with TransactionAwareDataSourceProxy, rather it picks the wrapped data source to work upon. DataSourceTransactionManager has special handling for TransactionAwareDataSourceProxy to work with actual DataSource wrapped in it. So it is important to keep the TransactionAwareDataSourceProxy as outer most layer. Or otherwise, DataSourceTransactionManager will not be able to handle the transactions properly. Read more at following links: <br /><br />Java Technology Enthusiasts - <a href="https://www.linkedin.com/groups/Spring-How-set-Transaction-Manager-4183182.S.5844352941690990596" target="_blank">How to set Transaction Manager Programatically</a><br />
Spring Forum - <a href="http://forum.spring.io/forum/spring-projects/data/jdbc/746453-problem-in-managing-transaction-with-abstractroutingdatasource" target="_blank">Problem in Managing Managing Transaction with AbstractRoutingDataSource</a><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">------------------------------------------------------------------------------------------------------------</span><br />
<div>
Hope it will help. Please share comments for addition. You may contribute by:</div>
<div>
<ul>
<li>Posting your comments which will add value to the article contents</li>
<li>Posting the article link on Social Media using 'Social Media Bookmark' bar</li>
<li>Consider joining us at '<a href="https://www.linkedin.com/groups/Java-Technology-Enthusiasts-4183182" target="_blank">Java Technology Enthusiasts</a>' linkedin group to participate in discussions</li>
<li>Connecting with '<a href="https://www.facebook.com/VedantaTree" target="_blank">VedantaTree</a>' on Facebook</li>
</ul>
</div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com4tag:blogger.com,1999:blog-999802451712728704.post-22660353393445407272014-03-23T18:34:00.000+05:302014-03-28T08:55:10.725+05:30New Version 3.1 of ExpressionOasis Released<div dir="ltr" style="text-align: left;" trbidi="on">
New version 3.1 of <a href="https://code.google.com/p/expressionoasis/" target="_blank">ExpressionOasis</a> has been released.<br />
<br />
<u><b>Release Notes:</b> </u><br />
<br />
<ol style="text-align: left;">
<li>Grammar class is made configurable now. Developers can implement custom Grammar class and can specify this in configuration. ExpressionOasis will pick this at runtime. </li>
<li>Made grammar.xml path configurable by exporting it to config.xml</li>
<li>Improved code of ExpressionFactory to improve the performance</li>
<li>Defined new way to add function definition by providing new API in Grammar interface </li>
<li>Exposed Grammar through ExpressionEngine Class, so that user can get the metadata if required and also can add specific metadata like custom function identification etc</li>
<li>Added three new String operation expressions > startsWith, endsWith, contains (Contribution by Girish Kumar) </li>
<li>Made config.xml path configurable from System Property (Contribution by Girish Kumar)</li>
<li>Improved documentation</li>
</ol>
<div>
<b><u>Download:</u></b></div>
<div>
<ul style="text-align: left;">
<li>ExpressionOasis at <a href="https://code.google.com/p/expressionoasis/wiki/Downloads" target="_blank">Google Code</a></li>
<li>ExpressionOasis at <a href="https://sourceforge.net/projects/expressionoasis/files/expressionoasis-3-1/" target="_blank">SourceForgeNet</a></li>
</ul>
</div>
<div>
In case of any issue or any new requirement, please log it <a href="https://code.google.com/p/expressionoasis/issues/list" target="_blank">here</a>. If you are extending the framework to add new features, please consider to contribute these back to the project. It will help everybody whosoever is using the ExpressionOasis.</div>
<div>
<b><u><br /></u></b></div>
<div>
<b><u>Follow us:</u></b></div>
<div>
<ul style="text-align: left;">
<li>On Facebook at <a href="https://www.facebook.com/VedantaTree" target="_blank">VedataTree@Facebook</a></li>
<li>On Twitter at <a edantatree="" href="https://draft.blogger.com/null" https:="" target="_blank" twitter.com="">@VedantaTree</a></li>
</ul>
</div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-37929467408482409702014-03-01T14:05:00.002+05:302014-05-04T12:06:54.593+05:30Spring RoutingDataSource to Work with Multiple DataSources<div dir="ltr" style="text-align: left;" trbidi="on">
Finally back to blogging. It was a long journey to get ready, pick the pen (i.e. computer) and start writing again. Writing is a matter of habit.<br />
<br />
Today we are going to discuss about using multiple data sources with Spring Transaction Management. Scenario is,<br />
<br />
<ul style="text-align: left;">
<li>Application is having lot of legacy code</li>
<li>Application needs to work with more than one databases</li>
<li>There are some legacy methods in application which are supposed to work with any one of the database depending upon use case. Same method could be invoked with different data source context for other transaction.</li>
<li>Application is using Spring Transaction Management</li>
<li>Requirement of Spring Transaction Management is to declare data sources and associated transaction manager with application context (1 to 1 relation)</li>
</ul>
<div>
<br /></div>
<div>
What would be the initial design considerations. </div>
<div>
<ul style="text-align: left;">
<li>Define all required data sources in application context</li>
<li>Define corresponding transaction managers too</li>
<li>Use any of the Persistent Template to implement the DAOs.</li>
<li>Define desired transaction behavior on service methods</li>
</ul>
<div>
<br /></div>
<div>
We are done with basic infrastructure code. In above steps, missing part is how to tell application code about which data source to be used from multiple data sources defined in context. It can be done by specifying the specific transaction manager (related to desired data source) with Service transactional attributes. Transaction manager can be defined either at class level or at method level. Or a good approach could be to use Transactional advice and define the transaction manager in context configuration with a pattern to identify the methods. </div>
<div>
<br /></div>
<div>
A general workflow would be; whenever any service method is called using Spring Framework, Spring will see if there is any transaction proxy available for that method. If yes, transaction proxy will get invoked. It will work with defined transaction manager and will start a new or use existing transaction (based on transaction attributes). It will also try to attach the connection with the current transaction (thread local based implementation). Connection will be retrieved from the data source which is associated with the transaction manager (defined in context). This connection will be linked with current transaction as synchronized resource. Please note, that connection may be attached lazily in case of 'LazyConnectionDataSourceProxy'. In this way, Spring enables the scenario to use multiple data sources in application based on specified transaction manager. All the methods invoked during the service call, or from nested methods will go to the database which is associated with current transaction manager (and the data source).</div>
</div>
<div>
<a name='more'></a></div>
<div>
<br />
However, a tricky scenario could be, if we have legacy code and have some methods which needs to be worked with one database in one call and with other database later depending upon the use case. How to manage such scenario where database will be decided on the fly based on the 'use case' or application context. One solution could be to break the methods or services and create two (or more) different services specific to a database, hence design separate services based on their concerns. All the requests targeted for a specified database will go to the related service. This service is aware about database and hence can use the right transaction manager and data source. This solution can solve the issue, and would result in better code also. But, it could be time consuming (even if desired and good for quality) to create wrapper services for whole legacy code at once. It will need a lot of development and testing efforts to test whole service layer again. At time, Project schedule may not allow you to do such huge changes. </div>
<div>
<br /></div>
<div>
Solution for above problem could be in 'Dynamic Data Source' routing. In above scenario, requirement is to work with multiple data sources, and need a transaction manager which can choose any one of these data sources, based on application state and can manage the current transaction in that context. This concept is supported by Spring framework by providing a class named as 'AbstractRoutingDataSource', where one wrapper data source is defined having map of many other data sources against some user defined keys. Actual data source, used to pick the connection, can be decided at runtime based on the user requirement. User can override the 'determineCurrentLookupKey' method to return the user context specific key identifying the desired data source for current scenario. Any custom logic can be implemented to decide the right data source for current use context. To implement it: </div>
<div>
<div>
<ul style="text-align: left;">
<li>Define different data sources in context configuration</li>
<li>Extend the 'AbstractRoutingDataSource' and define your custom implementation to return the lookup key depending upon custom logic. Override 'determineCurrentLookupKey' method.</li>
<li>Define your custom Data Source having Map of different required data sources against various lookup keys</li>
<li>Define a transaction manager using above routing data source</li>
<li>Use this transaction manager with legacy methods which need to work on different data sources</li>
</ul>
</div>
<div>
Now, whenever Spring proxy needs to start the transaction, transaction manager will interact with custom routing data source to pick the connection. Routing data source will route the call to specific data source returned for that scenario based on look up key. Hence right data source, i.e. connection will be picked for current transaction. It will enable the scenario to use different data sources with same transaction manager. Same methods will be invoked with different data sources based on user context.</div>
</div>
<div>
<br /></div>
<div>
Here one important point to consider is, 'determineCurrentLookupKey' method will be invoked only when Transaction Manager will start the transaction. Hence, data source can be decided only at the beginning of transaction and can not be changed in between (which is also not desirable). So if you are changing the context value to impact the current lookup key in-between the transaction, it won't take effect. </div>
<div>
<br /></div>
<div>
Refer to following link for example code: https://spring.io/blog/2007/01/23/dynamic-datasource-routing </div>
<div>
<br /></div>
<div>
<div>
Hope it will help. Please share comments for addition. You may contribute by:</div>
<div>
<ul style="text-align: left;">
<li>Posting your comments which will add value to the article contents</li>
<li>Posting the article link on Social Media using 'Social Media Bookmark' bar</li>
<li>Consider joining us at '<a href="https://www.linkedin.com/groups/Java-Technology-Enthusiasts-4183182" target="_blank">Java Technology Enthusiasts</a>' linkedin group to participate in discussions</li>
<li>Connecting with '<a href="https://www.facebook.com/VedantaTree" target="_blank">VedantaTree</a>' on Facebook</li>
</ul>
</div>
</div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-75866307961463610562013-08-19T20:50:00.000+05:302013-08-19T20:50:34.795+05:30What is Functional Programming - II<div dir="ltr" style="text-align: left;" trbidi="on">
In <a href="http://www.vedantatree.com/2013/07/what-is-functional-programming.html" target="_blank">previous article</a>, we have discussed about basic concept of Functional Programming in brief. Continuing with same, today we shall discuss more about it.<br />
<br />
Although there are many concept in Functional Programming which are different than Imperative programming style. However, following four points are very important and differentiating factors. These are:<br />
<br />
<ul style="text-align: left;">
<li>True Functions</li>
<li>First Class Functions</li>
<li>High Order Functions</li>
<li>Focus on result, rather than on structure and procedure to do it</li>
</ul>
<br />
True functions, we have already discussed in previous article. These are the functions without any side effect and is a main building block for functional programming. These makes the parallel and concurrent programming easier.<br />
<br />
First Class functions are the functions which can be presented anywhere in a program, like a variable. These can be passed as argument to any function, can be returned as value from function, can be assigned to a variable or can be stored in a data structure. These functions are the basic building block in functional programming. Java like languages does not have this feature. One possible similarity can be an anonymous class only, which can be passed as argument to any function in Java, but that is also quite limited in scope.<br />
<br />
High Order functions are the functions which can take First Class functions as parameter or can return these as return value.<br />
<br />
Combining above two type of function, we can write very dynamic programs. Imagine, a variable is passed to a function with another logic definition and hence added all possible dynamic behavior in same method. We can do this in Java also, by passing some commands or executors etc. But it is not that flexible. In Java, anyhow, we need to write a class even when we only need an behavior. Functional programming allows to define the functions directly without thinking about class structure and allow to pass these to other methods. A much easier and quick implementation. <br />
<br />
Fourth and important point is that functional programming advocates the focus on result, rather than on procedure of implementation or structure. Following this concept, Functional Programming languages provides a lot of abstract implementations for various repetitive tasks, like for iterating over collection, for parsing and reading any element from XML etc. In a language like Java, our focus used to be on good Object structure and the implementation logic. While iterating over a list, we plan whether we should use index based iteration or should use iterator. For XML parsing, we plan which parser we should use and so on. However, functional programming languages hide these implementation details from the programmer and provides high level syntax for performing such functions. Now if implementation is hidden from programmer, and is being taken over by language itself, it means that any programmer can implement the program much faster in functional programming. However, it means we are banking upon language capability to make a good decision or logic to perform these actions.<br />
<br />
Doesn't this feel like loosing control to the language. Like in Java, we have control over every piece of code. We can open the source code and can see how List.add is working. If we are not happy with it, let us extend the list and write a custom logic to add the items in List. Hence a complete control what we want to do. So is that OK to loose all control to language and just use the high level language syntax. A big doubtful point from a programmer working with Java kind of language, hard to digest. What if language is not perfect, or having bugs.<br />
<br />
However, let us see the positive side of this approach. If programming language is providing the abstraction for such repetitive tasks and implementation logic, it means lesser coding for a feature implementation. Less coding also means lesser issues in implementation and more outcome, more focus on business code and hence the result. Further, in most of the cases, implementation done by language can be much better than ours. We may not be expert in all logic implementation. And as and when language implementation will improve its implementation logic for functions, our program will be benefited automatically. Any improvement in code means improvement for our application also without making any change. Eventually languages will try to have better and better implementation with almost zero bugs and better performance. Hence if language implementation is that good, do we really need to have control on these basic logic implementation. Shouldn't we focus our energy on writing something more meaningful for business i.e. the business application functionality. Lets put all our efforts for business features.<br />
<br />
For a Java programmer, the program structure given by functional programming languages is hard to digest. It is a altogether new structure with much different organization of objects, and classes etc. But if we think, it is just another way of writing the program and it is good if we are getting more work done by writing lesser piece of code. For example, if we are interacting with computer or machines, we always want to get more work done by machine in smallest possible instructions. If we need to send an email, we always like a single command like 'Send Email to ABC with following contents', rather than to write a complete low level program to interact with mail server. Functional languages are only that kind of step for programming approach. These can make programming much easier task if used properly. And eventually we can reach to a point when one line of instruction will perform all required functions, for which we used to write a whole 2000 line class in Java. Actually Java is also evolving in that direction with many new utilities, AOP, lambda expressions etc. So this will be the requirement of future and is worth to embrace.<br />
<br />
I hope it will help. We shall keep discussing more concept about Functional Programming. </div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-53323630426850554332013-07-14T16:03:00.001+05:302013-07-14T16:03:46.449+05:30Solution - 'gem install mysql2' Fails<div dir="ltr" style="text-align: left;" trbidi="on">
Today I spent some good hours to debug the issues while installing 'mysql2' gem. It was failing again and again stating that 'libmysql' not found (even after applying the solution I mentioned in <a href="http://www.vedantatree.com/2012/06/how-to-install-redmine-2-project.html" target="_blank">previous blog</a>). To share, I am mentioning all the steps from previous blog with today findings.<br />
<br />
<ol style="text-align: left;">
<li>Install 'MySQL' on your machine. Choose the installation depending upon your machine architecture i.e. 32 or 64 bits</li>
<li>Have devkit installed on your machine. It can be download from '<a href="http://rubyinstaller.org/downloads/">http://rubyinstaller.org/downloads/</a>'</li>
<ol>
<li>Download right installer for your machine i.e. 32 or 64 bits</li>
</ol>
<li>Install devkit by following instructions at '<a href="https://github.com/oneclick/rubyinstaller/wiki/Development-Kit">https://github.com/oneclick/rubyinstaller/wiki/Development-Kit</a>'</li>
<li>Go to <MySQL installation dir>/lib and copy the 'libmysql.dll' to <ruby installation dir>/bin</li>
<li>Try running gem install mysql or mysql2</li>
<li>It should install now. However, if you still face problem, follow steps given below</li>
<li>Try specifying the --with-mysql-lib and --with-mysql-include options with gem command by specifying the mysql installation respective directories</li>
<li>If it still fails to load the 'libmysql', ensure that you don't have space in the path of MySQL installation directory. </li>
<li>Simple solution could be to copy the lib and include folders to a simple path like C:/mysql and specify the path of include and lib folder with gem command using --with-mysql-lib and -include options</li>
<li>Hopefully it should resolve the issue</li>
</ol>
<div>
Hope it will help. </div>
</div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0tag:blogger.com,1999:blog-999802451712728704.post-13321566454490748582013-07-07T20:57:00.001+05:302013-07-21T10:59:11.935+05:30What is Functional Programming<div dir="ltr" style="text-align: left;" trbidi="on">
Today we shall discuss about Functional Programming in brief. Functional Programming is a different paradigm than Imperative style programming. Imperative programming includes change in states with functions, however, Functional programming advocates functions without any side effect, i.e. no effect on any of the state. This is a big difference in programming approach with many other implementation level differences.<br />
<br />
Let us understand bit in detail, what is Functional Programming and how is that different than Imperative Programming.<br />
<br />
For development using Java like language, we mostly follow Imperative style programming. Where a Class like data structure contains some state or represents state. Functions are implemented to work on this state. Functions make changes in states based on current state or passed parameters. End result is, once functions are executed, the shared states may be changed.<br />
<br />
Functional Programming supports the concept of Pure functions. It states that function implementation should not have any side effects. It means that functions will not modify any state. These will only act on the parameters and will return the result. No state will be changed anywhere else. This also means that does not matter, how many times, you call these functions; if parameters are same then result will always be same. This is one of the biggest difference in approach.<br />
<br />
Let us discuss, how does this difference matter. With above understanding for Imperative style programming, if we want to support concurrent execution, we can apply concurrent programming concepts using threads and locks to safeguard the simultaneous update of states by multiple threads. We use different kind of locks, synchronized blocks etc to support the concurrent programming. Although with mature API support like java.util.concurrent, concurrent programming is getting much simpler now; but still it needs lot of care and knowledge to implement a perfect program. Moreover, we understand many scenarios only when program actually runs on multiple processors and scenarios changed with number of concurrent streams. So testing the concurrent programs is hard.<br />
<br />
However, what if there is no shared state to modify through functions like in 'Functional Programming'. Then there is nothing to safeguard in concurrent or parallel processing. There is no overhead of locks and hence the concurrent scenarios testing. Results will always be same from a function irrespective of whether it is being executed by one or multiple threads by multiple processors. Functions just act on the passed parameters and return the result. Isn't that a big relief. Certainly, it can make parallel programming a lot more easier. Programmers can focus on business logic implementation instead of managing the concurrent programming scenarios. Further, it is entirely feasible and easy to process different functions in parallel on parallel processing units. Different implementation functions can be submitted to different processors. As there is no shared state to access or modify, so there is nothing for the processors to compete for. These can work parallel in harmony. So with proper designing, results can be utilized later from different processing units to form the final result.<br />
<div>
<br /></div>
From above discussion, it would be becoming clearer that Functional Programming is having edge when it comes to parallel processing and make it comparatively very easy to manage. This is one of the major difference in programming style and the benefits. That is why Functional Programming languages like Scala are getting popular. Why not, demand is for parallel processing after all.<br />
<br />
There are many other differences also. Like, Functional Programming supports the concept of 'First Class' and 'Higher Order functions'. 'First Class' functions are, which can be presented in a program anywhere like any other first class member can present, for example anywhere like a Number type member, or as parameter or return value of a function. High order functions are, which can take other functions as parameter or can return these as return value. <br />
<br />
We shall discuss more for these implementation level differences and other concepts with coming articles. </div>
<div class="blogger-post-footer">If you like the article, you may contribute by:
-Posting your comments which will add value to the article contents
-By Posting the article link on Social Media using the Social Media Bookmark bar
-By Connecting with 'VedantaTree' on Facebook, and at Twitter @VedantaTree </div>Mohit Guptahttp://www.blogger.com/profile/12573963006864893379noreply@blogger.com0