Powershell Script to Alias a Command with Parameters

Powershell Set-Alias doesn’t pass arguments to the alias and I want an easy way to launch my editor, so I can easily say: “e file.txt”

Here is my script that launches WebStorm and pass along the parameters (note the special treatment of the “.”

function ws { 
   $a = $args
   if ($args -eq "."){ $a = $pwd }
   &"C:\Program Files (x86)\JetBrains\WebStorm 6.0.2\bin\webstorm.exe" $a
}

Now I can just type “ws .” and open webstorm with the current folder.

Tough Mudder and 6 Startup Lessons Learned

I finished my first ever Tough Mudder on April 20th with some friends.  It was tough and muddy and very similar to a startup journey.  I know it sounds crazy but I was thinking about my startup the entire time I was racing.  It could have been the cold weather or the electric shocks but I learned several lessons during that race.

1 – Startups are Stupid

I tried to explain Tough Mudder to my parents (apparently my friends had similar experiences) and the response was along the lines of “Why would you do that?” and when you tell them you are actually paying for it, you get “WHAT!!!  You are paying for it?”.  So, to the person outside looking in, it does sound like a stupid idea.  It makes no sense.  You are quitting your job to work harder AND for less money.  You must be crazy.

2 – The team is everything

I wanted to give up after the first obstacle.  I wanted to give up after (or more accurately before) every single obstacle.  Had I been running this race by myself, I probably would have or at least it would have been easier to give up.  There is something psychological about being part of a team that forces you to keep going.  I don’t know if it is peer pressure or ego or competitiveness or not wanting to be the only one (or first one) to give up but having a team helps you reach the finish line.  It goes without saying that you have to have a good team.  None of us was especially super fit, we were all exhausted, we all wanted to give up but we rallied each other and kept going.

3 – It is not as bad as you think

Going into this race, I knew I didn’t want to do the Arctic Enema.
If you watch this video, you will know why.  The problem is that it looks really hard and scary and $#*#@ cold, and guess what?  It was all of that, but I did it and it sucked but it was not even close to how sucky I thought it was.  This happens in startups all the time.  Just starting is hard, scary, cold and lonely but it is not as bad as YOU THINK it is.  So, don’t psych yourself out.  It’s tough, but you will get through it and you will survive.

4 – Do your homework

None of us really knew long the race was or how many obstacles there were.  Some of us thought it was 3 miles, 6 miles and even 10 miles long.  I thought there are 3 obstacles, others thought there is 1 obstacle every mile and others thought there were 10 obstacle.  The race was actually 12 miles long and had 20 obstacles.  We should have done our homework and prepared accordingly.  On the flip side, had we really known these numbers, we might have not even attempted.  We knew it was hard but didn’t really know the specifics.  Same goes for startups.  We know they are hard but I am wandering do I really want to know EXACTLY how hard or do I just need to know enough to prepare.  Of course this is different for everyone, some people might not even attempt a startup until they have exact information.  I am not one of those people and I don’t know if that is a good thing or a bad thing.

5 – Find good mentors

Since we didn’t know how long the race was, we kept asking people on the way.  Every single person gave us a different number.  One of the staff members even told us that we have 4 miles left at the 3 mile marker.  She was off by 5 miles.  Same goes for startups, the wrong mentors will point you in the wrong direction and give you bad data.  Even “expert” mentors could be wrong, so make sure you find good and reliable mentors to guide you through your startup journey.

6 – Know when to quit

My friend hurt his knee on the 3rd mile but he wanted to keep going on.  Since we didn’t really know how much we had left, he decided he wanted to finish the race.  Personally, I tried to talk him out of it.  Others motivated him to “man up” and keep going.  Personally, it could have been the fact that I had surgery on my knees years ago and know how painful the physical therapy is and that I didn’t want him to go through that.  I told him, you can finish the race and hurt your knee which could potentially mean surgery and several months of therapy, which means he can’t go to the gym, he can’t play sports, he can’t be active, etc…  So was it worth it to keep going or give up, recover and do it again later.  He impressively limped for 6 more miles.  Impressive?  Stupid?  I don’t know.  This could happen in startups.  If you get hurt or run out of money or run into major issues, do you suffer through it and potentially lose more  (or finish) or do you stop, regroup and try again later?  I don’t know.  I guess it will depend on your individual situation.  I don’t how much pain he was really in so I can’t tell for sure if he was being stubborn or brave!!!

Useful bash history tricks

This is a reminder to my future self (source https://coderwall.com/p/oqtj8w)

Create ~/.inputrc and fill it with this:

"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on

This allows you to search through your history using the up and down arrows … i.e. type “cd /” and press the up arrow and you’ll search through everything in your history that starts with “cd /”.

 

 

The Early Startup Triangle of Death

I wrote 2 posts so far about my startup journey.  The first one was the contract between my wife and I and the second one was about funding my startup.  Basically one is about family and the other about money.  There is a third vertex to this triangle – Time.  Time to actually put into my startup to move it forward.

I still have my day job but I have worked on my startup every single day for the past 30 or so days.  Basically my schedule has been: gym (every other day) > day job (8 hours) > fishbowl (4 hours) > home (2 hours) > sleep (8 hours).  I take Friday night and only put in a few hours on Saturday.

Or in other words my schedule is: money > time > familynot in order of priority of course :)

Money, Time and  Family – the early startup triangle of death.

Time

To move my startup forward, I need to put in a lot of time to get the prototype up and running and build the foundation for a great company and product.

Money

I need money to pay my bills and fund my startup.  Whatever that source of the money is – be it investors or consulting work, it will take time to acquire.

Family

I can probably have more time AND money but then I will have to give up spending time with my wife, family and friends.  This is something I will never compromise on.  I would rather fail and be broke than compromise on this aspect of my life.  That’s a price, I will never pay and will always be an easy decision to make.

Choices

Choice #1: Put time into startup, spend time with family but have no money

Choice #2: Get money, spend time with family and have no time to work on my startup – this is probably the most common choice and is the reason a lot of people have jobs and only dream of one day starting their own thing.

Choice #3: Get money, work on startup and in the process lose your friends, family and probably soul too.  This is a no-go choice for me.

I choose #1 because I am passionate about my startup and love my family and I don’t know how or why or where or when but I have the sense that money will somehow be provided.  God, the universe, luck (or perhaps a bank heist) or something and/or someone else will provide.

Risk it all because it ALL means nothing.  Like someone said in the startup playbook, if you live in a first-world country, you owe it to yourself to take risks.  In the grand scheme of things NONE of these risks are life threatening.  Losing/downsizing your house, damaging your credit score, losing your car, inability to buy organic food, inability to take luxurious vacations and so on are NOT LIFE threatening, they are merely inconvenient.  You will live through all of them.

Should I Take My Friends Money?

UPDATE: Get updates to my Startup Journey by email, click here and see other posts related to my Startup Journey over here.

 

I quit to start my own company and in a few short weeks, I will have no paycheck.  That is scary.  I need money to build my startup and I have been losing sleep over it.

There are several options that I can pursue to raise some money and each one has its own pros and cons.

Consulting

I could do some part-time consulting to cover my expenses.

Pros

  • I get to own 100% of my company.
  • I don’t have to deal with any investors.
  • Little financial risk

Cons

  • It takes my focus off building my company
  • It is not stable.
  • I have to constantly look for the next contract
  • It will cover my bills but won’t be sufficient to grow my company e.g. hire people, pay for services and “stuff”

Credit Cards & Personal Loans

I can just use credit cards and loans to fund the business and pay my bills

Pros

  • I get to own 100% of my company.
  • I don’t have to deal with any investors.

Cons

  • I will run out of money very quickly
  • Extremely high financial risk that affects my family and not just myself

Angel Investors and/or VCs

Pros

  • Access to lots of money (potentially)
  • The right investor can open doors that I don’t even know exist

Cons

  • I have to share my company with others
  • Finding the right investor is time consuming (pretty much a full time job)
  • I will be working with strangers.
  • Investors management overhead
  • The wrong investor can be a pain in the ass that can hurt me rather than help me

Friends and Family

Pros

  • Work with people I already know and trust
  • Opportunity to make money for my friends
  • Much easier to raise money than angel investors
  • Share my success with friends

Cons

  • Risk losing all my friends’ money
  • Managing multiple inexperienced investors
  • Risk of straining relationships that are very important to me.
  • Share my failure with friends

My Gut Feeling

I am leaning towards raising money from friends and family but it is not an easy decision.  I feel like it will be a huge burden and will be constantly worried about losing my friends’ money (and trust).  Although, I have a great deal of confidence that I will succeed but there is no guarantee that I would and it would suck to lose my friends’ money.  What do you think I should do?  Any thoughts?

UPDATE 2: Good discussion going on at hacker news