Rajasekar Elango's Blog2018-01-30T23:22:57+00:00http://erajasekar.comRajasekar ElangoHow knowing computer scheduling algorithms can help us to be productive?2017-12-21T00:00:00+00:00http://erajasekar.com/posts/how-knowing-computer-scheduling-algorithms-can-help-us-productive
<p>We all want to get more things done efficiently and quickly. Computers are best at it. So Let’s try to understand some computer scheduling algorithms to see how we can apply them to our daily lives to become more productive at our tasks.</p>
<br>
<a href="http://erajasekar.com/posts/how-knowing-computer-scheduling-algorithms-can-help-us-productive/">
Read entire post...
</a>
How to setup subdomain for aws api gateway?2017-11-01T00:00:00+00:00http://erajasekar.com/posts/how-to-setup-subdomain-for-aws-api-gateway
<p>I needed to setup a subdomain for a REST service hosted in AWS API Gateway.</p>
<p>Many components had to configured correctly to get all pieces to work together. I could not find a concise instructions online and there is too much of stuff to read in AWS documentation. I will share the exact steps I did to get it working so that others doesn’t have to figure it out in a hard way like I did.</p>
<br>
<a href="http://erajasekar.com/posts/how-to-setup-subdomain-for-aws-api-gateway/">
Read entire post...
</a>
Does School Kill Creativity?2017-05-16T00:00:00+00:00http://erajasekar.com/posts/does-school-kill-creativity
<p>We are all born with boundless creativity. But are we educating people out of their creative capacities? If schools are undermining our creativity, What should we do about it? Inspired by Sir Ken Robinson’s famous TED talk, I will share my thoughts based on what I learnt about schools, education and creativity.</p>
<h2 id="introduction">Introduction</h2>
<p>Sir Ken Robinson’s TED talk <a href="https://www.ted.com/talks/ken_robinson_says_schools_kill_creativity">Do Schools Kill Creativity?</a> is the most popular TED talk and has about 45 million views at the time of my writing this. Ken Robinson makes a good case on Schools kill children’s innate creative talents, But in <a href="http://educationbookcast.libsyn.com/podcast/42-do-schools-kill-creativity-by-sir-ken-robinson">EducationBookCast</a> Stanislaw Pstrokonski argues against it and rips apart Ken Robinson’s ideas. In this post, I will share my views on this topic. I will first quote Ken Robison speech followed my ideas.</p>
<br>
<a href="http://erajasekar.com/posts/does-school-kill-creativity/">
Read entire post...
</a>
Cool Mind reading trick to teach maths to kids2016-08-29T00:00:00+00:00http://erajasekar.com/posts/cool-mind-reading-trick-to-teach-maths-kids
<p>I taught a cool mind reading trick to my kid and she loved playing it. It’s based on math and computer science fundamentals and it has interesting things to teach kids of any age 3 or even 13. I’ll share the trick, concepts behind it and the things we can teach kids using it.</p>
<br>
<a href="http://erajasekar.com/posts/cool-mind-reading-trick-to-teach-maths-kids/">
Read entire post...
</a>
How to make great presentations for a training session2016-08-01T00:00:00+00:00http://erajasekar.com/posts/how-to-make-great-presentations-training
<p>I observed effective methods used to make an excellent presentation while attending uberconf - software technical conference. I will share some of the best practices and tips to create an outstanding presentation for a training session.</p>
<h3 id="1-communicate--the-goal">1. Communicate the Goal.</h3>
<p>State one or all of the following.</p>
<ul>
<li>Goal of the presentation</li>
<li>Agenda of what you will learn in the presentation.</li>
<li>What will be the takeaway at the end of the presentation.</li>
</ul>
<p>You need to make sure that they feel that spending next hour or so in this training is worth their time.</p>
<br>
<a href="http://erajasekar.com/posts/how-to-make-great-presentations-training/">
Read entire post...
</a>
What I learnt from uberconf - Software technical conference2016-07-31T00:00:00+00:00http://erajasekar.com/posts/what-i-learnt-from-uberconf
<p>I got to attend the wonderful software technical conference - <a href="https://uberconf.com/">uberconf</a> and I would like share summary of what I learnt from conference in this post.</p>
<h2 id="feedback-about-the-uberconf">Feedback about the uberconf</h2>
<p>Before I jump on to summary of the sessions, let me share my impression about the conference. This is one the best technical conference I had attended. I tweeted</p>
<blockquote>
<p>Uninterrupted flow of food for mind and body.</p>
</blockquote>
<p>The best thing I liked about the conference is that the sessions are 1.5 hours long that gave us enough time to deep-dive and learn the subject. Also, the some of the longer subjects were split into two parts so that we can learn them in depth and do some hands on work. The speakers are not only experts on their subject, they are good mentors and presented their sessions more engaging style.</p>
<br>
<a href="http://erajasekar.com/posts/what-i-learnt-from-uberconf/">
Read entire post...
</a>
Multiplication wheel - Interesting project for teaching multiplication to kids.2016-06-03T00:00:00+00:00http://erajasekar.com/posts/multiplication-wheel-project-teaching-multiplication-kids
<p>In this post, I will share an interesting project we can do with our kids to teach them basics of multiplication and introduce them to programming. I did this with my 5-year-old daughter and it was a huge hit.</p>
<br>
<a href="http://erajasekar.com/posts/multiplication-wheel-project-teaching-multiplication-kids/">
Read entire post...
</a>
Highlights from Book Succeed - How We Can Reach Our Goals2016-06-02T00:00:00+00:00http://erajasekar.com/posts/succeed-how-we-can-reach-goals-book
<p>In this post, I will share my highlights from the book <a href="https://amzn.com/B00475AYJG">Succeed : How We Can Reach Our Goals</a> which I recently read.</p>
<p>We all have goals, but we don’t have an understanding of why we <em>achieve</em> some of them and <em>fail</em> on others. This book is about understanding how goals work, what tends to go wrong, and what you can do to reach your goals.</p>
<br>
<a href="http://erajasekar.com/posts/succeed-how-we-can-reach-goals-book/">
Read entire post...
</a>
Java 8 automatically injecting logger using trait2016-05-31T00:00:00+00:00http://erajasekar.com/posts/java8-logger-trait
<p>This post explains how default methods in Java 8 can be used as a <em>trait</em> to automatically inject logger instances.</p>
<p>To use logging in Java code, we need to add this boiler plate code in every Java class.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">Logger</span> <span class="n">logger</span> <span class="o">=</span> <span class="n">Logger</span><span class="o">.</span><span class="na">getLogger</span><span class="o">(</span><span class="n">MyClass</span><span class="o">.</span><span class="na">class</span><span class="o">.</span><span class="na">getName</span><span class="o">());</span>
</code></pre></div></div>
<p>Like me, most of you would hate copy pasting this line and updating the class name in every Java file. Luckily, Java 8 supports default methods in interfaces which can be used to solve this problem.</p>
<br>
<a href="http://erajasekar.com/posts/java8-logger-trait/">
Read entire post...
</a>
Error accumulation in validation using Applicative Functors2016-05-31T00:00:00+00:00http://erajasekar.com/posts/error-accumulation-java8-functional-validation-javaslang
<p>This post explains how <strong><em>Applicative Functors</em></strong> can be used accumulate validation errors using <a href="http://www.javaslang.io/">Javaslang</a> validation API.</p>
<h2 id="problem">Problem</h2>
<p>To illustrate with an example, let’s say a given stream of pair of date strings in format <code class="highlighter-rouge">MM/dd/YYYY</code>, we want to print difference between them in number of years, months and days. ( For eg <code class="highlighter-rouge">"01/01/2016 , 02/01/2016"</code> should print <code class="highlighter-rouge">0 years , 1 months and 0 days</code>).</p>
<br>
<a href="http://erajasekar.com/posts/error-accumulation-java8-functional-validation-javaslang/">
Read entire post...
</a>
Better Exception Handling in Java 8 Streams Using Javaslang2016-05-27T00:00:00+00:00http://erajasekar.com/posts/better-exception-handling-java8-streams-using-javaslang
<p>In this post, I will provide tips for better exception handling in Java 8 streams using Functional Java library <a href="http://www.javaslang.io/">Javaslang</a>.</p>
<h2 id="problem">Problem</h2>
<p>To illustrate with an example, let’s say we want to print day of the week for given stream date strings in format <code class="highlighter-rouge">MM/dd/YYYY</code>.</p>
<br>
<a href="http://erajasekar.com/posts/better-exception-handling-java8-streams-using-javaslang/">
Read entire post...
</a>
Nikola Tesla : Greatest genius who invented the Electrical Age2015-01-01T00:00:00+00:00http://erajasekar.com/posts/nikola-tesla-greatest-genius-inventor-electrical-age
<p><a href="http://en.wikipedia.org/wiki/Nikola_Tesla">Nikola Tesla</a>
is a greatest genius who invented the electrical age of twentieth century. His inventions, patents, and theoretical work formed the basis of modern <em>Alternating Current (AC)</em> electricity,
and contributed to the development of <em>radio, television</em> and many electrical inventions. I feel his story is important for anyone interested in history of invention and hence this blog post.</p>
<br>
<a href="http://erajasekar.com/posts/nikola-tesla-greatest-genius-inventor-electrical-age/">
Read entire post...
</a>
Groovy - Dynamic properties in Config Slurper2014-12-24T00:00:00+00:00http://erajasekar.com/posts/groovy-dynamic-properties-config-slurper
<p>In this post I will provide quick tip on how to use dynamic properties in Groovy Config Slurper.
Groovy provides a nice utility <a href="http://groovy.codehaus.org/ConfigSlurper">ConfigSlurper</a> for reading configuration files
where settings can be overridden to different values for different environments.</p>
<br>
<a href="http://erajasekar.com/posts/groovy-dynamic-properties-config-slurper/">
Read entire post...
</a>
Explaining programming to kids at great american teach-in2014-12-10T00:00:00+00:00http://erajasekar.com/posts/great-american-teach-in-explaining-programming-kids
<p>I got wonderful opportunity to volunteer for great american teach-in at Morgan woods elementary school, Tampa.
I did presentation on explaining programming to 3rd to 5th grade students.
In this post, I will share by experiences on talking to kids about programming and conversations I had with them.</p>
<h3 id="preparation">Preparation</h3>
<p>The invitation letter from school suggested <em>“share with students something about your career, your experiences, your hobby, or yourself”</em>.</p>
<br>
<a href="http://erajasekar.com/posts/great-american-teach-in-explaining-programming-kids/">
Read entire post...
</a>
How can we deal with influences of past karma?2014-11-27T00:00:00+00:00http://erajasekar.com/posts/dealing-with-past-karma
<p>We have heard about <strong>law of karma</strong> or <em>cause and effect</em>. Every action we do generates a force of energy that returns to us in kind. If we had committed bad actions in past (or in previous birth) inevitably that will bring bad consequences in present life.</p>
<p>My brother wrote an article about <a href="http://innovativeastrosolutions.wordpress.com/2014/03/31/astrology-and-theory-of-karma/">Astrology and Theory of Karma</a>.
This is follow up to that article providing spiritual answer to how to deal with influences of bad karma based on my learnings from <strong><em>Bhagavad Gita</em></strong> and <strong><em>Seven Spiritual Laws of Success Book</em></strong></p>
<h3 id="how-can-we-deal-with-influences-of-past-karma">How can we deal with influences of past Karma?</h3>
<p>There are three things you can do about past karma.</p>
<br>
<a href="http://erajasekar.com/posts/dealing-with-past-karma/">
Read entire post...
</a>
Setting up your blog using Jekyll and hosting it on github2014-11-17T00:00:00+00:00http://erajasekar.com/posts/set-up-blog-jekyll-github-pages
<p>I wrote about my journey that led to choosing <a href="http://jekyllrb.com/">Jekyll</a> based <a href="http://getpoole.com/">Poole</a> framework
as blogging platform for this site in my <a href="/posts/blogging-platform-hackers-octopress-docpad-poole/">previous post</a> .
I have kept skeleton of my site in a separate <code class="highlighter-rouge">foundation</code> branch for others to easily use. You are free to fork mine to use for your own site.</p>
<p>In this post I will provide instructions on how to setup your own blog by using <a href="https://github.com/erajasekar/blog-jekyll">my jekyll project</a> as foundation.</p>
<br>
<a href="http://erajasekar.com/posts/set-up-blog-jekyll-github-pages/">
Read entire post...
</a>
Blogging platform for hackers - Octopress vs Docpad vs Poole2014-11-12T00:00:00+00:00http://erajasekar.com/posts/blogging-platform-hackers-octopress-docpad-poole
<p>In this post I will walk through my journey of discovering right blogging platform for my site, share my experiences and findings along the way.</p>
<p>When I decided to blog, I researched on next generation blogging platforms for hackers.
Mainstream blogging platforms like <strong>wordpress, blogger, tumblr</strong> are designed for naive users and aren’t best for developers.
Because those platforms doesn’t support features programmers would want like code syntax highlighting, theming using frond end frameworks,
Markdown language support, integration with source control repositories, etc.</p>
<h3 id="static-site-generators">Static site generators:</h3>
<br>
<a href="http://erajasekar.com/posts/blogging-platform-hackers-octopress-docpad-poole/">
Read entire post...
</a>
How Children Succeed?2014-10-30T00:00:00+00:00http://erajasekar.com/posts/how-children-succeed
<p>This post is about my reflections on the book <a href="http://amzn.com/B0070ZLZ1G">How Children Succeed</a> which I recently read.</p>
<h3 id="what-matters-most-in-a-childs-development-for-them-to-succeed-in-life">What matters most in a child’s development for them to succeed in life?</h3>
<p>We mostly think that intelligent and smart people succeed, i.e success comes to those who score highest in school, college or competitive exams like SAT, GMAT etc. But in <a href="http://amzn.com/B0070ZLZ1G">How Children Succeed</a>, Paul Tough argues that the qualities that matter more for success are have to do with the <strong><em>character</em></strong>.</p>
<p>In a child’s development, what matters most is not how much information we can stuff into his/her brain in the first few years. But, instead is whether we are able to help him/her develop a very different set of qualities like <strong>persistence, self-control, curiosity, conscientiousness, grit, and self-confidence</strong>. Infact, possessing these qualities helps a child to get high scores in exams consistently than intelligence alone.</p>
<p><em>Economists refer to these as noncognitive skills, psychologists call them personality traits, and the rest of us sometimes think of them as character</em>.</p>
<br>
<a href="http://erajasekar.com/posts/how-children-succeed/">
Read entire post...
</a>
Log4j - Separating log lines to multiple log files.2014-08-27T00:00:00+00:00http://erajasekar.com/posts/log4j-separating-contents-to-multiple-log-files
<p>It’s generally good practise to partition the log lines of your java application into different log files based on functionality/module etc.</p>
<p>For eg. In a web application, we would want application log lines to be logged in to <code class="highlighter-rouge">server.log</code>, whereas information about remote user who made the requests to be logged into <code class="highlighter-rouge">request.log</code>.</p>
<p>This can be done by defining two appenders in log4j properties and configuring them to output to two different log files.</p>
<p>Here is the example log4j properties.</p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">log4j</span><span class="p">.</span><span class="nf">rootLogger</span><span class="o">=</span><span class="no">INFO</span><span class="p">,</span><span class="n">fileAppender</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">logger</span><span class="p">.</span><span class="nf">requestLogger</span><span class="o">=</span><span class="no">INFO</span><span class="p">,</span> <span class="n">requestAppender</span>
<span class="c1">##Don't propogate things logged to requestLogger to other appenders</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">additivity</span><span class="p">.</span><span class="nf">requestLogger</span><span class="o">=</span><span class="kp">false</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="o">=</span><span class="n">org</span><span class="p">.</span><span class="nf">apache</span><span class="p">.</span><span class="nf">log4j</span><span class="o">.</span><span class="no">RollingFileAppender</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="o">.</span><span class="no">MaxFileSize</span><span class="o">=</span><span class="mi">500</span><span class="no">MB</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="o">.</span><span class="no">MaxBackupIndex</span><span class="o">=</span><span class="mi">10</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="o">.</span><span class="no">Append</span><span class="o">=</span><span class="kp">true</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="o">.</span><span class="no">File</span><span class="o">=</span><span class="n">server</span><span class="p">.</span><span class="nf">log</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="p">.</span><span class="nf">layout</span><span class="o">=</span><span class="n">org</span><span class="p">.</span><span class="nf">apache</span><span class="p">.</span><span class="nf">log4j</span><span class="o">.</span><span class="no">PatternLayout</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">fileAppender</span><span class="p">.</span><span class="nf">layout</span><span class="o">.</span><span class="no">ConversionPattern</span><span class="o">=%</span><span class="n">d</span> <span class="p">[</span><span class="o">%</span><span class="n">t</span><span class="p">]</span> <span class="o">%-</span><span class="mi">5</span><span class="nb">p</span> <span class="p">(</span><span class="o">%</span><span class="n">c</span> <span class="o">%</span><span class="no">M</span><span class="ss">:%</span><span class="no">L</span><span class="p">)</span> <span class="o">%</span><span class="n">x</span> <span class="o">-</span> <span class="o">%</span><span class="n">m</span><span class="o">%</span><span class="n">n</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="o">=</span><span class="n">org</span><span class="p">.</span><span class="nf">apache</span><span class="p">.</span><span class="nf">log4j</span><span class="o">.</span><span class="no">RollingFileAppender</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="o">.</span><span class="no">MaxFileSize</span><span class="o">=</span><span class="mi">1024</span><span class="no">MB</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="o">.</span><span class="no">MaxBackupIndex</span><span class="o">=</span><span class="mi">10</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="o">.</span><span class="no">Append</span><span class="o">=</span><span class="kp">true</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="o">.</span><span class="no">File</span><span class="o">=</span><span class="n">requests</span><span class="p">.</span><span class="nf">log</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="p">.</span><span class="nf">layout</span><span class="o">=</span><span class="n">org</span><span class="p">.</span><span class="nf">apache</span><span class="p">.</span><span class="nf">log4j</span><span class="o">.</span><span class="no">PatternLayout</span>
<span class="n">log4j</span><span class="p">.</span><span class="nf">appender</span><span class="p">.</span><span class="nf">requestAppender</span><span class="p">.</span><span class="nf">layout</span><span class="o">.</span><span class="no">ConversionPattern</span><span class="o">=%</span><span class="n">d</span> <span class="p">[</span><span class="o">%</span><span class="n">t</span><span class="p">]</span> <span class="o">%-</span><span class="mi">5</span><span class="nb">p</span> <span class="p">(</span><span class="o">%</span><span class="no">C</span> <span class="o">%</span><span class="no">M</span><span class="ss">:%</span><span class="no">L</span><span class="p">)</span> <span class="o">%</span><span class="n">x</span> <span class="o">-</span> <span class="o">%</span><span class="n">m</span><span class="o">%</span><span class="n">n</span>
</code></pre></div></div>
<p>We have defined two appenders, <strong><em>fileAppender</em></strong> to output to <code class="highlighter-rouge">server.log</code> and <strong><em>requestAppender</em></strong> to output to <code class="highlighter-rouge">requests.log</code>.
Only <strong><em>fileAppender</em></strong> is added to <strong><em>rootLogger</em></strong>, so any <code class="highlighter-rouge">Logger</code> instances created by passing java class will be logged to <code class="highlighter-rouge">server.log</code>.</p>
<p>Example code snippets showing how to log to <code class="highlighter-rouge">server.log</code>.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">RequestProcessor</span> <span class="o">{</span>
<span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">Logger</span> <span class="n">logger</span> <span class="o">=</span> <span class="n">Logger</span><span class="o">.</span><span class="na">getLogger</span><span class="o">(</span><span class="n">RequestProcessor</span><span class="o">.</span><span class="na">class</span><span class="o">);</span>
<span class="kd">private</span> <span class="kt">void</span> <span class="nf">handleRequest</span><span class="o">(</span><span class="n">HttpServletRequest</span> <span class="n">request</span><span class="o">){</span>
<span class="c1">//This message will be logged to server.log</span>
<span class="n">logger</span><span class="o">.</span><span class="na">info</span><span class="o">(</span><span class="s">"Processing Request"</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">}</span>
</code></pre></div></div>
<p>To log to <code class="highlighter-rouge">requests.log</code> the <code class="highlighter-rouge">Logger</code> instance should be created passing <code class="highlighter-rouge">requestLogger</code> as logger name.</p>
<p>Example code snippets showing how to log to <code class="highlighter-rouge">request.log</code>.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">RequestInterceptor</span> <span class="o">{</span>
<span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">Logger</span> <span class="n">logger</span> <span class="o">=</span> <span class="n">Logger</span><span class="o">.</span><span class="na">getLogger</span><span class="o">(</span><span class="s">"requestLogger"</span><span class="o">);</span> <span class="c1">//Should match name of logger </span>
<span class="kd">public</span> <span class="kt">boolean</span> <span class="nf">preHandle</span><span class="o">(</span><span class="n">HttpServletRequest</span> <span class="n">request</span><span class="o">,</span> <span class="n">HttpServletResponse</span> <span class="n">response</span><span class="o">,</span> <span class="n">Object</span> <span class="n">handler</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span>
<span class="c1">//This will be logged to requests.log</span>
<span class="n">logger</span><span class="o">.</span><span class="na">info</span><span class="o">(</span><span class="s">"Received request from user: "</span> <span class="o">+</span> <span class="n">request</span><span class="o">.</span><span class="na">getRemoteUser</span><span class="o">());</span>
<span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
<span class="o">}</span>
<span class="o">}</span>
</code></pre></div></div>
<br>
<a href="http://erajasekar.com/posts/log4j-separating-contents-to-multiple-log-files/">
Read entire post...
</a>
Generating Key, CSR and Certificates for SSL2014-08-26T00:00:00+00:00http://erajasekar.com/posts/generating-key-csr-certificates-for-ssl
<p>If you want to run your application in HTTPS mode, you will need to get SSL certificates from a valid CA (Certificate Authority) like Verisign.</p>
<p>In this post I will provide steps for generating private key, CSR (Certificate Signing Request) and importing signed certificate back to private key store using java <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/keytool.html">keytool</a> utility</p>
<br>
<a href="http://erajasekar.com/posts/generating-key-csr-certificates-for-ssl/">
Read entire post...
</a>
Spring - Reading values from file and injecting to bean property using SPEL2014-08-20T00:00:00+00:00http://erajasekar.com/posts/spring-reading-values-from-files-injecting-to-bean
<p>Sometimes you would need to inject value for spring bean property by reading values from a file. Good use case for this would be injecting passwords into bean property by reading value from a file rather than hard coding password into application context xml.</p>
<p>This can be done by creating property file with values we want to inject and use spring util properties to read values into application context as properties. Then, this property value can be injected using <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html">Spring SpEL</a>.</p>
<p>To demonstrate this, lets pick example of initializing Jetty <code class="highlighter-rouge">SslContextFactory</code> with keystore file and key store password.</p>
<br>
<a href="http://erajasekar.com/posts/spring-reading-values-from-files-injecting-to-bean/">
Read entire post...
</a>
Turning Knowledge into Intelligence and Creativity2014-08-11T00:00:00+00:00http://erajasekar.com/posts/turning-knowledge-into-intelligence-and-creativity
<p><strong>What is difference between Knowledge, Intelligence and Creativity?</strong></p>
<p><em>Knowledge</em> is facts, information, and skills acquired by a person through experience or education by perceiving, discovering or learning.</p>
<p><em>Intelligence</em> is using that knowledge in different contexts to invent new thoughts, new ideas, etc.</p>
<p><em>Creativity</em> is using intelligence to create new work, new inventions etc.</p>
<p><strong>Why mere knowledge is not enough?</strong></p>
<p>Our education system is mostly designed around providing and evaluating knowledge acquired and undermines intelligence and curiosity. if we just keep accumulating knowledge without applying, it will get lost. We need to make knowledge easily accessible to be able gain the intelligence out of it. Let’s think about how knowledge is stored in memory to find out how we can retain knowledge.</p>
<p><strong>How knowledge is stored in memory?</strong></p>
<p>The brain contains dynamic connection of neurons. Anything we retain in memory create new connections or change existing connections in the brain. The things we learn generally get stored in short-term working memory. But brain has only limited space in short-term memory. Most things get discarded out of short-term memory.</p>
<p>We mostly use repetition technique to make items in short-term memory stay long enough. But the biggest problem with memorization through repetition is that it frequetly puts the information on just one connection. The brain always seeks meaning, patterns with exiting information to make more connections. The more ways you have to find a piece of information, the easier it is to retrieve.</p>
<p><strong>How to improve your intelligence?</strong></p>
<p>Whatever you learn, associate it with a meaning, associate it with a different contexts, associate it with similar things - <strong>don’t learn anything in isolation</strong>. This will make it retain in long-term memory. Then knowledge will be easily retrievable when you want to apply it. This can help with generating new ideas.</p>
<p><strong>How to improve your creativity?</strong></p>
<blockquote>
<p>Creativity is “just connecting things.” - <strong>Steve Jobs</strong></p>
</blockquote>
<p>Creativity is using imagination to connect, stretch and merge things in new ways. To improve creativity we need to further expand connections of information in our brain so that it can be easily combined, transformed to create new ideas. <em>Curiosity</em> can help expanding connections and is the essential element for becoming more creative.</p>
<blockquote>
<p>Curiosity is a lens through which you view everything around you. Without it,there are no adventures to be had, With it, there are enough for a million times - **Sean Patrick , Awakening your inner genius **</p>
</blockquote>
<p>Curiosity will persuade you to seek interesting things, discover new information, explore related things.</p>
<p><strong>Summary</strong></p>
<p>We acquire knowledge through learning and experiences. Whatever you learn, try to associate it with as many things you can. Always learn with curiosity to expand your knowledge, expand your ideas. You will able to create something new.</p>
<p><strong>Further Reading</strong></p>
<p>If you are reading this post with curiosity, you would be interested in further reading on this topic. Here are some useful resources.</p>
<ul>
<li><a href="http://www.amazon.com/Awakening-Your-Inner-Genius-Patrick-ebook/dp/B00BERNZ4G">Awakening your inner genious book</a> by Sean Patrick.</li>
<li><a href="http://www.amazon.com/Where-Good-Ideas-Come-Innovation-ebook/dp/B003ZK58TA">Where Good ideas come from Book</a> by Steven Johnson.</li>
<li><a href="http://www.ted.com/talks/ken_robinson_says_schools_kill_creativity">How school kills creativity</a> TED talk by Ken Robinson.</li>
</ul>
<br>
<a href="http://erajasekar.com/posts/turning-knowledge-into-intelligence-and-creativity/">
Read entire post...
</a>
Turning adversity into opportunity2014-08-07T00:00:00+00:00http://erajasekar.com/posts/turning-adversity-into-oppurtunity
<p>The book <a href="http://www.amazon.com/Happiness-Advantage-Principles-Psychology-Performance-ebook/dp/B003F3PMYI">Happiness Advantage</a> suggests the trick to turn adversity into opportunity is to realize that there always exists a path that leads us from failure or setback to a place where we are even stronger and more capable than before the fall.</p>
<blockquote>
<p>Things do not necessarily happen for the best, but some people are able to make the best out of things that happen - <strong>Tal Ben-Shahar</strong></p>
</blockquote>
<p>Success is more about using that downward momentum to propel ourselves in the opposite direction. It’s about capitalizing on setbacks and adversity to become even happier, even more motivated, and even more successful.</p>
<br>
<a href="http://erajasekar.com/posts/turning-adversity-into-oppurtunity/">
Read entire post...
</a>
Improving Positive Attitude2014-08-06T00:00:00+00:00http://erajasekar.com/posts/improving-positive-attitude
<p>I wrote about <a href="http://www.amazon.com/Happiness-Advantage-Principles-Psychology-Performance-ebook/dp/B003F3PMYI">Happiness Advantage Book</a> in my <a href="../../happiness-advantage/">earlier post</a> and the book suggests following exercise to improve your positive attitude.</p>
<blockquote>
<p>The best way to kick-start this is to start making a daily list of the good things in your job, your career, and your life. It may sound hokey, or ridiculously simple— and indeed the activity itself is simple— but over a decade of empirical studies has proven the profound effect it has on the way our brains are wired. When you write down a list of “three good things” that happened that day, your brain will be forced to scan the last 24 hours for potential positives— things that brought small or large laughs, feelings of accomplishment at work, a strengthened connection with family, a glimmer of hope for the future. In just five minutes a day, this trains the brain to become more skilled at noticing and focusing on possibilities for personal and professional growth, and seizing opportunities to act on them.</p>
</blockquote>
<p>The book also narrates very interesting experiment done on the <strong><em>luck factor</em></strong> by <a href="http://www.amazon.com/The-Luck-Factor-Essential-Principles/dp/1401359418">Richard Wiseman</a> and what he found was</p>
<blockquote>
<p>it turns out that there is no such thing—in a scientific sense, at least— as luck. The only difference (and it is a big one) is whether or not people think that they are lucky— in essence, whether they expect good or bad things to happen to them.</p>
</blockquote>
<br>
<a href="http://erajasekar.com/posts/improving-positive-attitude/">
Read entire post...
</a>
Happiness Advantage Book by Shawn Achor2014-08-04T00:00:00+00:00http://erajasekar.com/posts/happiness-advantage
<p>I recently read the book <a href="http://www.amazon.com/Happiness-Advantage-Principles-Psychology-Performance-ebook/dp/B003F3PMYI">Happiness Advantage by Shawn Achor</a> and it was excellent read.
The fundamental idea that this book evangelizes is that <strong><em>happiness brings you success</em></strong> and not otherway around. Here is highlight from the book.</p>
<blockquote>
<p>we have led to believe that happiness orbited around success. That if we work hard enough, we will be successful, and only if we are successful will we become happy. Success was thought to be the fixed point of the work universe, with happiness revolving around it.
Now, thanks to breakthroughs in the burgeoning field of positive psychology, we are learning that the opposite is true.
When we are happy—when our mindset and mood are positive—we are smarter, more motivated, and thus more successful.
Happiness is the center, and success revolves around it</p>
</blockquote>
<p>Here is the number of proven methods suggested in the book that can improve our moods and raise our levels of happiness.</p>
<ul>
<li>
<p><strong>Meditate:</strong> Take just five minutes each day to watch your breath go in and out.</p>
</li>
<li>
<p><strong>Find Something to Look forward to:</strong> If you can’t take time for a enjoyable event right now, put something on the calendar. Then whenever you need a boost of happiness, remind yourself about it</p>
</li>
<li>
<p><strong>Commit Concious Act of Kindness:</strong> Pick one a day of a week and make point of commiting five acts of kindness.</p>
</li>
<li>
<p><strong>Infuse Positivity Into Your Surroundings:</strong> Make specific efforts to infuse positivity in your surroundings and also change your surroundings to keep negative emotions out.</p>
</li>
<li>
<p><strong>Exercise:</strong> Walk, Bike , Run, Play or whatever you can do to keep you moving.</p>
</li>
<li>
<p><strong>Spend money on experiences (but Not on Stuff):</strong> Spend your money experiences like vacation , dinner out etc., instead of things like television, shoes.</p>
</li>
<li>
<p><strong>Exercise a Signature Strength:</strong> Everyone is good at something. A team of psychlogists recently catalogued the 24 cross-cultural signature strengths, you can take this <a href="http://www.viacharacter.org/">survey</a> to indentify your own signature strengths, then try to incorporate at least one of them into your life each day.</p>
</li>
</ul>
<p>The book also provides practical, actionable principles that you can follow to increase your positive attitudes, happiness and become successful in your work and life.</p>
<br>
<a href="http://erajasekar.com/posts/happiness-advantage/">
Read entire post...
</a>