Wednesday, August 8, 2012

Switching from Linux to Windows


I know its a real PITA to switch from linux to windows. But, I have no option when my employee softwares are written in windows :(.
I can live without everything but not without the terminal. cmd in windows completely sucks where the linux terminal is so awesome.
I do not want to use that windows cmd and the horrible pathname styling, and the tab completion, no ls, no pwd. I wonder how windows developers work.
Anyways, after exploring a lot of options I have finally concluded that cygwin is the best bet.
For now, this combination currently serves me, all I want from a terminal
a) cygwin (any other utility can be added as and when needed)
b) cygpath -aw (convert from linux path style to windows path style) and cygpath -pw (vice-versa)
c) ctrl+L for using 'clear' in terminal
d) I miss top though. I was used to use it a lot. Although "ps -W" is an equally good option.

How to get whatever you want in your life

I had copied this in my notes somewhere from the internet. And, as usual do not remember the source. I was reading it yesterday and it really struck me as a very potential option to get what you want.
--
Establish a vision of the person you want to become at some point in the future-- describe that person completely in terms of character traits, opportunities, skills, people you are connected to, even location.  Fix that vision in your mind.  Write it down and post it on your bathroom mirror, even.  Then, own that vision in your mind-- claim it emotionally as if you are there already.  Ask yourself every morning "what will I do today that is consistent with that future me?"  In the evening, ask yourself, "what did I do today that was consistent with my vision?" 

Ultimately, train your brain to be the person your spirit tells you already exists.
--
Respect starts with self. Since my belief system has changed, the way I interact in my environment has changed, and the way my environment interacts with me has also changed. I no longer hide or run away from how I really feel. I don’t gossip or talk about people behind their back. I try as best I can to remain fair and impartial.
--

Sunday, June 10, 2012

PARSEC : md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement

PARSEC benchmarks are generally very easy to build and run, given their super awesome parsecmgmt script. For recent 64 bit systems (with higher versions of gcc and binutils) though, 'dedup' creates a problem. When I try to compile the 'dedup' kernel it fails with "md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement" and similar other errors in the same file at other locations.

If you just want a quick fix do the following:
1) download the latest openssl library. It has been fixed in the recent versions of the ssl library.
http://www.openssl.org/source/openssl-1.0.1c.tar.gz worked for me.
2) replace the source in {PARSECDIR}/pkgs/libs/ssl/src.
3) cd to {PARSECDIR}/pkgs/libs/ssl/src
4) ./config threads -D_REENTRANT --openssldir={PARSECDIR}/pkgs/libs/ssl/inst/amd64-linux.gcc-pthreads (this is for the pthreads config. change accordingly for your needs)
5) Now build dedup.

This should work without any problems. Enjoy :)

Thursday, March 8, 2012

Mercurial or SVN

Since my last post was on SVN, I think its time to make an update about this version control thingy. Trust me guys mercurial(and for that matter git) is way better than SVN. Mercurial may have a slow learning curve but once you get the feel you will be amazed by its power. and again with eclipse we have the awesome mercurial plugin.
The easiest way to go about learning mercurial is
1)Have a start here http://www.joelonsoftware.com/items/2010/03/17.html

2) First clear the basics and only after then start using it. Meanwhile forget everything you have learnt from SVN.

3) Have fun with it. :)

Update: Sep,2014. It looks funny that after all these years git has beaten mercurial to death. More than 90% of the developer community(at least those I know) uses git now. I myself having used both git and mercurial, would recommend git too.

Wednesday, August 10, 2011

How to branch in svn using eclipse

Eclipse is one of the best IDEs I have seen. The subversion support is also quite cool. Just ensure that you the latest version of the plugin installed.
While developing bigger projects , the branch feature of svn is quite helpful. Although now it seems quite easy but it took me some time to figure out the exact details.
So, to create a branch first the project should be setup like::
"project name"
|---- trunk
|---- tags
|---- branches

the folder "trunk" is the mainstream of the project. If you want to create a new branch or new tags.
  • Update your project (Team->update)
  • Create a branch/tag (Team->Branch/tag). Make a new subdirectory in the branches directory if you want a branch or in the tags directory.
  • Now, switch your working copy to this folder.
  • Your branches/tags have been create and you can switch between them whenever you want using (Team->switch to another branch/tag)

Monday, August 1, 2011

the import config cannot be resolved in Eclipse

When you face this the solutions you can use:
1) try refreshing(f5) or rebuilding the project
2) try switching between your workspaces
3) the fullproof method: go to Project -> Clean.

This shall do it. :-)

Thursday, November 11, 2010

The Power of Actions

One day, when I was a freshman in high school, I saw a kid from my class walking home from school. His name was Kyle. It looked like he was carrying all of his books. I thought to myself, "Why would anyone bring home all his books on a Friday? He must really be a nerd." I had quite a weekend planned (parties and a football game with my friend the following afternoon), so I shrugged my shoulders and went on.

As I was walking, I saw a bunch of kids running toward him. They ran at him, knocking all his books out of his arms and tripping him so he landed in the dirt. His glasses went flying, and I saw them land in the grass about ten feet from him. He looked up and I saw this terrible sadness in his eyes.

My heart went out to him. So, I jogged over to him, and as he crawled around looking for his glasses, I saw a tear in his eye.

I handed him his glasses and said, "Those guys are jerks. They really should get lives."

He looked at me and said, "Hey, thanks!" There was a big smile on his face. It was one of those smiles that showed real gratitude. I helped him pick up his books, and asked him where he lived. It turned out he lived near me, so I asked him why I had never seen him before. He said he had gone to private school before coming to this school.

I would have never hung out with a private school kid before. We talked all the way home, and I carried his books. He turned out to be a pretty cool kid. I asked him if he wanted to play football on Saturday with me and my friends. He said yes. We hung all weekend and the more I got to know Kyle, the more I liked him. And my friends thought the same of him. Monday morning came, and there was Kyle with the huge stack of books again. I stopped him and said, "Damn boy, you are gonna really build some serious muscles with this pile of books everyday!". He just laughed and handed me half the books. Over the next four years, Kyle and I became best friends.

When we were seniors, we began to think about college. Kyle decided on Georgetown, and I was going to Duke. I knew that we would always be friends, that the miles would never be a problem. He was going to be a doctor, and I was going for business on a football scholarship. Kyle was valedictorian of our class.

I teased him all the time about being a nerd. He had to prepare a speech for graduation. I was so glad it wasn't me having to get up there and speak.

Graduation day arrived - I saw Kyle and he looked great. He was one of those guys that really found himself during high school. He filled out and actually looked good in glasses. He had more dates than me and all the girls loved him!

Boy, sometimes I was jealous. Today was one of those days. I could see that he was nervous about his speech. So, I smacked him on the back and said, "Hey, big guy, you'll be great!"

He looked at me with one of those looks (the really grateful one) and smiled. "Thanks," he said. As he started his speech, he cleared his throat, and began. "Graduation is a time to thank those who helped you make it through those tough years. Your parents, your teachers, your siblings, maybe a coach... but mostly your friends. I am here to tell all of you that being a friend to someone is the best gift you can give them. I am going to tell you a story."

I stared at my friend in disbelief as he told the story of the first day we met. He had planned to kill himself over the weekend. He talked of how he had cleaned out his locker so his Mom wouldn't have to do it later and was carrying his stuff home. He looked hard at me and gave me a little smile. "Thankfully, I was saved. My friend saved me from doing the unspeakable."

I heard the gasp go through the crowd as this handsome, popular boy told us all about his weakest moment. I saw his Mom and dad looking at me and smiling that same grateful smile. Not until that moment did I realize its depth.

Never underestimate the power of your actions. With one small gesture you can change a person's life. For better or for worse. God puts us all in each other's lives to impact one another in some way. Look for God in others.

"Friends are angels who lift us to our feet when our wings have trouble remembering how to fly."