Unix Tips & Tricks

I’ve spent the last week in Unix system land, and boy has it been painful! I thought I’d share some of the tips and tricks to save time and aggravation.

1. If you’re coding on a Windows machine, and you hear that annoying “BEEP” everytime you make a mistake in mysql or in a command prompt save yourself from being embarrassed and infuriating your co-works by typing:

>net stop beep

2. Trying to connect to a port that is already in use results in a:

Port already in use: <port #>; nested exception is: java.net.BindException: Address already in use

To find out if the port is already in use, use the following command, and then kill the associated process:

>netstat

3. One of my coworkers added color to grep, which helps tremendously when trying to search for key words that are embedded deep within text.

grep –color RED # add it to your .alias or .bash_profile file

4. This next tip will hopefully save a lot of time debugging scripts, if you have the following lines:

if [ `whoami` != “poornima” ] ; then

echo “Please run this script as user poornima.”

exit 1

fi

There must be a space between the close ” and ] or else the script will error when run.

5. To search for any process name issue the following command:

> ps -ef | grep “keyword(s) you’re looking for”

Complacency

he past few months have been filled with excitement mostly due to Mint.com launching, meeting new friends, traveling, and just enjoying life overall. But despite all the success, and exhilaration I find myself wanting more challenges. I love engineering and what I do. But something in me craves a new obstacle to conquer or to go through some sort of change.

When I was around 10 my dad told me, “if you’re this way now, you’ll never be satisfied in life.” He was probably referring to a present he bought me or something he did that didn’t quite satisfy my desires. Looking back I realize he was 100% correct, and prophetic. I’m not satisfied with my life, and I don’t think I ever have been – I am proud of my accomplishments and generally happy. But, I’ve always and will always be demanding of myself and of others. I want to know more, and grow each day.

I do have times when I get stuck in a routine, or become a lazy. Much like I have with my blog… I realized its been far too long, and I’m almost embarrassed to admit how long its been since I wrote an entry. But I assure you I will make it a point to put out more content and regularly.

Why the sudden change of heart? I recently received a comment from a young girl on my blog in response to “Lifestyles of the Girly and Geeky”. The tone of her comment was all-too familiar to me. It reminded me of myself a when I was wrangling between the decision of going into engineering school or just sticking it out with economics and becoming a lawyer. It was a tough decision, and the years of work that accompanied it were even harder. Sometimes I felt lonely, overworked, unappreciated, but I got through it. When I read Tasha’s comment all those memories resurfaced, and I remembered how I had wished, at the time, that someone could empathize with me.

So here’s to continuing the tradition of seeking excellence, and fighting complacency through my writing and blogging!

Ode to Code

My friend Josh’s birthday party is tonight, and on the invitation it said “in lieu of presents please bring your favorite poem”.  I don’t really have a favorite poem, and I searched around the web for something that inspired me.  But then decided that it would be more fun to come up with my own.  So here’s what I wrote:

Ode to Code

I sit in my cube and type away
sometimes even on Saturday and Sundays

Language it does not matter, java, c, c++ or perl
Every line written is joyful to this girl

I do believe that sometimes it should be refactored
Because I’d hate for it to look like an explosion from a nuclear reactor

Sometimes I’m aggravated by bugs
I curse, and scream, and wish I could just shrug
But I’m the lead test engineer so I just proceed to debug

I can’t fathom the number of lines I’ve written
Or the countless hours I’ve spent on my ass sittin’

Its a pleasure when I can successfully compile
It always makes me smile

I used to want to design hardware
But then web 2.0 came along, and coding became my love affair

Coding, all the time that I spend
Instead of looking for a boyfriend

But who needs a life when I’ve got you
That’s why this yup
Joined a startup!

Its obvious that I’m passionate about my code
Nothing else would deserve such an ode

I’m not just an engineer, I’m a femgineer

  Looks like the job market is hot right now for engineers; Web 2.0 companies are sprouting up everyone, and as always there’s a dearth of quality engineers. So I’m sure it takes recruiters and managers a lot of effort to lure good engineers away from their existing jobs. Now I’m not one to get offended very easily, but I thought it was quite humorous when I recently received this email in my LinkedIn inbox…

Hi Poornima,

I took a look at your profile and you are definitely the kind of guy that we would like to work with for our startup.

Sorry buddy but if you had done a simple Google search on my name you would have realized that I’m probably not the kind of “guy” who would like to work for your startup. Guess they forgot to account for corner cases when they sent out this email!

Top 10 Reasons I haven’t blogged in months

I’ve been getting a lot of flack for not having posted a new blog article so in months, I guess people are actually wondering what this femgineer is upto… Here are my list of excuses/activities that have detracted my focus from writing an article recently:

10. My parents came to visit for a week (need I say more??)
9. Trips/Driving around the freaking Bay Area
8. Trying to stay in shape (swimming, bikram yoga, running)
7. Networking/Socializing
6. Taking care of sick/incapacitated friends
5. Taking care of broken-hearted friends
4. Taking care of my brother for a week
3. Facebook
2. Sleep deprivation (due to 3-10)
1. MINT (job before blog!!)

Her World – Installment 2

He sat in his office admiring her picture. Sara’s beauty was intoxicating, but it was her energy that drew him to her. They hadn’t been together very long, but long enough to know that they enjoyed each other’s company. They had shared many experiences throughout their travels and adventures that had helped them form a close bond. Sara’s lively nature complemented Aidan’s adventurous side. Anyone who met them was amazed by the lively pair’s synergy, and enthusiasm for living life.

In a few days they would proclaim to the world that they wanted to be with one another and no one else. As Aidan continued to stare at Sara’s picture he saw something that puzzled him, Sara’s smile was perfect, but in this particular shot a bit forced. He quickly dismissed the idea, and didn’t proceed to give it a second thought.

“So I think I finally found a date for your wedding!” Josh stepped into Aidan’s office and interrupted his daydreaming.

“Finally.” Aidan retorted with a sarcastic smile.

“Yeah I’ve got a good feeling about this one.”

“What’s different about this one?”

“She’s not much of a talker…but she’s got a quiet intensity about her that turns me on!”

“Any specifics…like what does she do for a living?”

“She’s a muse.”

“What?”

“She inspires the uninspired.”

“And how does she pay the rent?”

“Oh she’s independently wealthy. Apparently she was an i-banker up in NYC, struck it rich a few years back, and retired to become a muse. So fascinating.”

“Josh, what have we talked about?”

“Trust me she’s not a nut. You’ve gotta meet her, you’ll love her, seriously.”

“As long as you’re happy. But take it slow.”

“Yeah, yeah, I’m late to dinner with her, I’ll tell you more later.” Josh waved and walked away.

“Ok but don’t forget rehearsal dinner tomorrow night at 7pm.” Aidan called out to him.

“Of course!”

***

It was a warm summer night, there was a slight breeze blowing in from the window, and the only thing that covered their bodies was a soft thin sheet. She lay on his chest, comforted by his strength. He had a strength and confidence that she hadn’t seen in someone for years. Her eyelids felt heavy and as she drifted into a deep slumber she felt at ease, the last words she whispered to him were, “I’m all yours.”

The next morning they awoke, and he looked down at her. His look made her melt; she was willing to do anything for him, because they understood each other. He quietly left the room, and said, “I’m sorry.” The comfort and security she had felt laying in his arms had been instantly replaced by pain. A pain she had foreseen, and effortlessly submitted to. She had tried so hard to prove that she was worthy of his love, as she had told him he was worthy of hers. But it hadn’t been enough. He was a determined man, and his determination outweighed all her efforts.

Her mind wasn’t at ease, but she submitted to the loss.

Her World – Installment 1

The following is a short story that I’ve been working on for months.

It was a warm summer day.  The flowers from the dogwoods where everywhere, and the air felt sultry with a gentle breeze.  As she walked through the park Jenna reminisced of the times she had spent there with Aidan.  She thought about the pictures he had taken of her by the dogwoods, and by the pond with the giant lilies, and she of him climbing up his favorite giant redwood tree with the large knotted base.  As she looked down at the dark green grass, a sly smile broke across her face, she thought about the night they had spent together on it.    The park’s beauty and serenity captured the essence of their relationship.  She wondered what had caused its demise.  She furrowed her eyebrows and looked up at the bright blue sky, and remembered that single question that had caused so much doubt in her mind, and brought her to this state of solitude.

Jenna sat there patiently reading her book waiting.  Then a friendly familiar face emerged at the door.  They both gave each other a warm hug and proceeded to sit down, and exchanged pleasantries.  It had been a couple of years since the two girls had seen each other, and had much to catch up on.  Each one’s life had changed so much in the past few years one’s for the better the other’s for the worse.  It was funny how the one who had had such a pleasant childhood was now wraught with uncertainty in her family life.  While the other was terribly in love, and completely immune to the distressed world around her and had outgrown her tumultous upbringing.   Neither were particularly close to one another, but they figured this was something that cousins do; they meet, discuss the current events in their lives, and then part ways presuming that their lives will not change much after this brief encounter.

“So tell me about him?”  Nadine asked.  “How long have you two been together?”  The other proceeded to talk about him.  Jenna had wry smile or her face, and her eyes lit up as she spoke of Aidan  And once she started it was almost as if no one else was around.  She described him, as she saw him, beautiful, confident, and loving.

“Is he your world?”

“What does that mean?” Jenna asked.

“He seems to be the only person in your life.” Nadine responded.

“Well…”

“No its perfectly ok.  Its just that he’s your world.”

At the moment Jenna thought nothing of it.  And quickly dismissed her cousin.  She rationalized the notion by thinking to herself my cousin isn’t in love, she doesn’t know what its like.  I fell in love with him the day after I met him, I knew he was the one, and had resolved to be with him, and knew I wouldn’t find anyone else as passionate about life as him.  And he feels the same way about me.

The two were indeed passionate people.   But over the years their passion for each another had subsided, and was replaced by a stronger force, ambition. And as ambition began to drive the lovers apart, the question began to plague her mind.  “Is he your world?” Jenna would mull over it, and wonder if there was something or someone else in the world that hadn’t yet been explored.  If she was missing something.  After all they were so young when they had falled for each other, and they had sheltered each other so much over the years.  Neither had had the opportunity to venture into the world without the other.  Perhaps it was time.  So she took a gamble.  She tore her world apart, and moved on without him.

Mother’s Day

Today is mother’s day.  So happy mother’s day to all mothers and soon-to-be mothers.  I applaud your efforts, passion, and commitment to raising a child.  Although I am not a mother and I’m not sure yet if I ever will be, I’ve been thinking about what it means to be a mother, and how much of an impact a mother has on a person’s life.

Like most mother-daughter relationships, my mother and I have had numerous differences over the years, especially when I was a teenager.   Part of differences were caused by cultural differences; I was trying to assimilate to being an American and adopt Western values, while she was trying to instill her Indian ones in me.  But there was one value that my mother instilled in me that I’ve held onto throughout life; she said, “Make sure you can stand on your own two feet.”

I never questioned her when she said this, because I saw how hard she worked to establish her own identity despite being subject to a very male-dominated culture.  My mom thinks she’s not the smartest person in the world, or the most ambitious, but I know she’s a very strong willed person and that matters more than raw intelligence.  She worked full time, went to school, cooked dinner every night, and still had time to yell at her two kids!  I can’t ever remember a point in my life when she didn’t have a job or wasn’t pursuing a career or her studies.  I suppose subconsciously I follow her example in leading my own life.

This past year my mom told me how proud she was of me.  She said, “You’ve proved yourself as a woman.”  That’s the highest compliment I’ve ever received from her, or anyone woman, and it made me very happy.  Although I think there’s still a lot I need to work on, and I look forward to in life, her compliment made me feel accomplished.

I’m sure that my mom and I will continue to have our differences throughout time, and if I ever have a daughter, she and I will probably have differences too.  Even though we may disagree on particulars I think its important to understand each other.  I’ve learned to understand my mom by evaluating the context in which she’s led her life, and she has done the same for me, as a result we have a mutual admiration for one another.  But it takes time, patience, and the mutual willingness to acknowledge that we are values to each other.  So thank you mom for believing in my and inspiring me to become the independent woman that I am today.

Expectations

Lately, I’ve been thinking about the expectations people have for themselves and with regards to others. Expectations can be concrete goals people have, but also hopes. The questions I’ve been grappling with are: how does one evaluate whether their expectations are reasonable, is one in complete control of the their expectations’ outcome, and finally how should one react in the event that their expectations materialize or don’t?

I know I’m a very demanding person, more towards myself than others, but it depends on the degree of my relationship with other people. The more I succeed and improve the more I expect from myself. And even when I fail I know that I had to take a different approach, and change my perspective, if I wanted to lead a “good life”. Leaving aside the issue of actually trying to achieve your expectations, setting reasonable expectations for yourself can be an arduous task. It takes a great amount of self-awareness; you have to understand your abilities, judge the context, and then constantly re-assure yourself that you deserve to have these expectations.

But how can one stay objective when evaluating themselves and their expectations? I usually look for patterns in my own efforts. I think about a time in my life that I did succeed at something, how I went about about achieving it, and then try to follow that same line of thinking to tackle the new challenge I’ve set for myself. Of course its easier said than done. And being young you don’t have enough experiences to draw upon to know what to expect. Despite age I think here are some fundamental virtues one should follow before setting expectations for themselves. Integrity, honesty, rationality, and self-esteem are the four that I think are the most important. To have integrity means to act consistently and in a manner that doesn’t jeopardize your well-being. Honesty is acknowledging reality and acting in accordance to it. Rationality is using reason as opposed to feelings when arriving at conclusions. And self-esteem is valuing yourself and having self-confidence. To me the first three are the precursors that lead one to possessing self-esteem. It seems likely that people act virtuous when the expectation is self-directed, but in dealing with others their judgment gets clouded.

The prime example is when your expectations are concerning personal relationships, and specifically romantic relationships. People spend a great deal of time getting to know someone, sharing their thoughts and experiences with each other, and then for several reasons the relationship falls apart. Sometimes, the failure of the relationship can be in part due to one or both persons’ irrational behavior. But it does affect them both. Despite who was irrational both question themselves, and especially in terms of what they deserve. Hence, they both have some expectations that are unfulfilled. Leaving aside a person who was irrational, a rational person may question his judgment inchoosing a mate, or think that the time he spent was wasteful and could have been directed towards something else. When one’s expectations don’t materialize they begin to doubt themselves. Their confidence it shaken, and it usually takes them time to heal; to go back to desiring to be in a relationship, and seek someone else. A reasonable person would regain confidence, perhaps take a different approach and set differentexpectations when it comes to dealing with others.

Then there’s the case when your expectations are self-directed. For example, my younger brother recently wrote a proposal for a research project he wanted to be involved in this summer. He’s very passionate about doing research, so he spent a great amount of time on his proposal, andnaturally he expected to get it. But, he didn’t get it. He compared his proposal to the ones written by his peers, and it seemed like he had put in more effort, but hadn’t been rewarded accordingly. He thought that he deserved to be accepted to the research group, given his talents and compared to others, but when he wasn’t he questioned himself. He became critical of his own abilities, the time he had spent writing the proposal, and whether it was reasonable for him to have expected to get into the research project. I tried to re-assure him, and instill confidence in him. I asked if he had gotten anything out of this experience, and to find someone more objective than himself to read over his proposal and give him feedback. When a man is rejected tough love is hard to digest…so to shut me up he proceeded to say that he would just get over it with time.

Fortunately, my brother is also a very demanding person, so he didn’t give in to himself. He wanted to find out the root cause of why he didn’t get the research project. He went to talk to the professor and asked what was wrong with his proposal. The professor admitted to anadministrative error, and that my brother should have been accepted. Obviously my brother was overjoyed at the news. But more importantly, it speaks volumes of his character that he didn’t endlessly sulk when his expectations, initially, failed to materialize. Though his confidence was shaken, and he blamed others it was just a knee jerk reaction. Once he had time to think about the situation more thoroughly, he proceeded to take a very rational approach and tried to understand the cause of his failure so that it wouldn’t happen again in the future.

Having expectations is part of life. Its dealing with the outcomes of the expectations that’s difficult. The real issue is that irrespective of what happens its most important to evaluate either why your expectations did or didn’t come to fruition. And even more importantly to try and be virtuous to avoid a similar predicament. We should be more concerned with how we live our lives over the span of many years, and try to not repeat past mistakes or have the same negative experiences over and over again.

Freedom: Fuel for a Start-up

For almost 7 months I’ve been working at a start-up, and I’ve noticed how incredibly motivated and productive my colleagues and myself are despite the long hours, Hibernate issues, and lack of heat in our building. And even though I’m starting to get a little burned out, I still want to work and talk about the product every day of my life. So I started to wonder why I, and so many other engineers at start-ups, unlike our counterparts at large companies, have this incessant desire to work? To strive for perfection? The most obvious answer is: “you have equity!” But money is not the sole motivating force (if that was the case I would have gone to college and gotten my M.R.S). Others would say its the “entrepreneurial spirit” aka being being young and hungry. This is a valid reason, but I think its a consequence of a bigger phenomenon.

There are many productive people in the world, but what is it that motivates them to stay productive for long periods of time, despite facing success or failure? Its freedom; freedom to create a new product or service, and leave a mark on mankind. Knowing that we have freedom makes us want to improve ourselves, and what we’re working on every hour of everyday.

Freedom is defined as the power to act or speak or think without externally imposed restraints. No where is this more evident than at a start-up. Unlike corporations that fill people’s days with meetings, and enforce stringent policies of decorum and conformity, a start-up gives people the independence to be creative and work uninhibited. So may its liberty that keeps us coding day in and day out.