Generating Key, CSR and Certificates for SSL

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.

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 keytool utility


Continue reading...

Spring - Reading values from file and injecting to bean property using SPEL

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.

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 Spring SpEL.

To demonstrate this, lets pick example of initializing Jetty SslContextFactory with keystore file and key store password.


Continue reading...

Turning Knowledge into Intelligence and Creativity

What is difference between Knowledge, Intelligence and Creativity?

Knowledge is facts, information, and skills acquired by a person through experience or education by perceiving, discovering or learning.

Intelligence is using that knowledge in different contexts to invent new thoughts, new ideas, etc.

Creativity is using intelligence to create new work, new inventions etc.

Why mere knowledge is not enough?

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.

How knowledge is stored in memory?

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.

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.

How to improve your intelligence?

Whatever you learn, associate it with a meaning, associate it with a different contexts, associate it with similar things - don’t learn anything in isolation. 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.

How to improve your creativity?

Creativity is “just connecting things.” - Steve Jobs

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. Curiosity can help expanding connections and is the essential element for becoming more creative.

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 **

Curiosity will persuade you to seek interesting things, discover new information, explore related things.

Summary

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.

Further Reading

If you are reading this post with curiosity, you would be interested in further reading on this topic. Here are some useful resources.


Continue reading...

Turning adversity into opportunity

The book Happiness Advantage 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.

Things do not necessarily happen for the best, but some people are able to make the best out of things that happen - Tal Ben-Shahar

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.


Continue reading...

Improving Positive Attitude

I wrote about Happiness Advantage Book in my earlier post and the book suggests following exercise to improve your positive attitude.

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.

The book also narrates very interesting experiment done on the luck factor by Richard Wiseman and what he found was

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.


Continue reading...