Thursday, November 20, 2014

Filtering large text files with PowerShell

I found myself struggling to opening and reading large text files and looking for errors. So I made this powershell script:

Get-Content file-name.txt | select -First 5000 |  Foreach-Object{ If ( $_ -match 'ERROR'){$_}  }

Simply it does three things:
Get-Content file-name.txt  gets all of the content of the text file
select -First 5000  gets me the first 5000 lines (this is optional if you want to search all the data)
Foreach-Object{ If ( $_ -match 'ERROR'){$_}  } gets lines with the word 'ERROR' in them

The result is the lines you want. You can use regex for better word matching as well.

To export the result. you can add a "> mytxt.txt" to the line and you will end up with a text file at your directory.



Thursday, April 24, 2014

Book Review - The Lean Startup by Eric Ries

A coworker of mine asked me for help on how to buy an audio book and how to listen to it as he is going on a road trip. I recommended the service Audible as it is easy to listen to audio books. The book that he was trying to listen to was Lean Start up by Eric Ries. I had the book on my to read list as I heard many great things about it. It was also a great timing as I just switched my career and joined a small start up with the goal of learning how to start a successful business.


The Lean Start-up focuses on building the features that existing customers want over building a product that no one wants. The process steps that he talks about share a lot with the Agile software process where the app is driven by constant feedback. Small failures are also considered to be a good thing and are encouraged . 

There are a lot of examples and stories told to support the points made on how the process can help companies. My favorite were the ones where the "lean thinking" was implemented in larger companies. Intuit creating process of the mobile Turbo Tax used all of the ideas that seems to be exclusive to a start-up in a big corporation. I have heard that the secret to Google's success was that it was made of start ups inside a corporation umbrella and it all make scene after reading this book.

While I love the concepts of the book, I felt like the audio version was not the best way to enjoy this book. The examples used kept going back to ones used earlier and it was hard to follow the book structure as all chapters felt to sound as they talked about the same thing (compared to Good to Great Audio book where each concept/chapter used it's own chapter). This is more of a study guide to follow than it is an easy to follow audio book. That being said, I found myself sitting in my car waiting for a good stopping point. The concepts discussed were so relevant and ear grabbing.

Book Summary that I enjoyed:
http://www.kimhartman.se/wp-content/uploads/2013/10/the-lean-startup-summary.pdf
Tuesday, February 4, 2014

Charlotte Start Up Weekend 6: Return of the Jedi

Just a quick reflection about my experience in my second Charlotte Start Up Weekend (CSW6). You can find my last's year thoughts here:
http://amadhammer.blogspot.com/2013/01/startup-weekend-clt.html 

I highly recommend all event participants to take the time to look back and reflect on what they learned, What worked and what they can improve on. It is very helpful.

What is this?
This is the 6th Charlotte Start up weekend. It is an event where participants work over the weekend to create a business. The winner gets a prize package that helps them going further with the business.

But at it's core, it is a networking and hands-on learning event.



How did you prepare and what did you want out of the event?
I had a different strategy this year. Last year, I wanted to put my technical skills on the table. I built a web site and got it going.

This year, I had a different goal: Win the contest... cold truth. Everyone wanted the same thing.. yet it is somewhat selfish when I put it that way. But I want to build a start up and see what lessons I can learn. Winning the contest would give me the chance to do that.

My Pitch:
.. no pitch. A wasted opportunity? I spent my time scribbling down all of the pitched ideas. I wrote "red shirt" next to some pitches and had no idea who was who when they came back they day after wearing different colors.

What went well?
-Decision making. When the teams were announced, I had a "gut" feeling on who can win and who can not. There were a lot of good ideas this year and I wanted to work with three teams (two fitness and one about education). Two of the teams got first and second. 
-Focus. I observed what happened last year and knew what it takes to win. last year, We built a great product  and did not have any potential business. It was clear that we were not accomplishing anything and decided to talk about patents and ideas that could not be done in a weekend. 

What did not go well? (sorry if I offend anyone)
-I did not get to ask people about their pitches before the voting ended.
-My technical skill set was not used (three developers with three different technology stack on the same team).The guilt was very painful to me and I kept going around trying to find things to help out with.
-Did not force myself to meet as many people as I wanted. I need to print out some business cards with personal contact information (Twitter/FB/linkedin) on them.
-I was sick. I had a long work week and I did not eat as well as I should have.

For the future, What would do?
This answer really depends on what I can get out of YouCompleteMe and how it goes. Generally, I am going to stay around the team, learn the ins and out of a startup, and take what I learnt to whatever I am building next.

Who won? How did they win? Do you think X deserved to win instead?
YouCompleteMe,

Yeah I act like a cartoon charachter..but it is worth to quickly highlighting why I think YouCompleteMe Won:
-Working MVP (Minimal Viable product) up and running to handle the business concept.
-Experienced team (5 out of 9 members were at the last start up weekend).A strong diverse team that works together.
-Presentation that explained how our product is a business. Explain the revenue plan
-Explain why we need to win and how we would continue the business beyond the weekend.
-Great video that explained who would use the app.


Basically, We stuck to the formula. We (or I) read the blog by a CSW6 organizer and tried to hit all the points (seriously.. he knows what he is talking about)
http://charlotte.startupweekend.org/2014/01/26/the-final-pitch/

Other teams are solving real problems and they all have potential to grow great business. The biggest reward here is the feedback and network you got. Please prove to everyone that you should have won. Your success will benefit everyone.

Finally
It is a great feeling to win. It validated our work and effort. Our team worked well together and we had a lot of fun. Time flew by very fast that we had to remind each other when lunch and dinners were served. I am really happy that this event exists and I really appreciate the work that the organizers put into this event.


Random points (future blogs maybe?):
-Many people are still leaving after an unsuccessful pitch. You are missing the point of the event and .. it is probably good that your idea was not selected. YES I SAID IT.
-You don't need a website if your business is not technical. Just set up a Google dorm doc and collect emails. 
-Being a developer in a start up weekend kinda sucks. Many of my friends from last year expressed the same opinion and decided that it is not worth coming back. It might be worth it for me to sign up as a "non-technical" to have a chance of pitching and contributing. because .. planning is fun.
-Do some research before you pitch your idea. Talk to others about it and see what they think. Also, does you idea exist already? (so you don't solve a solved problem).


ok enough writing. I need to work on other ideas. Go try out our app
youcompeteme.co


--credit
*photo was taken from detailedblock.com.
*Twitter person who took the second picture I am so sorry I can't find your name