Counting Source Lines Of Code for Products

While reading through the source code to an app that one of my products depends on I discovered an app called SLOCCount by David Wheeler, a PhD in Information Technology who went to George Mason University.  SLOCCount is short for source lines of code count.  I decided to try it out to see how many lines of code there are in one of my products.  This is is a great utility and if you have a few minutes you should try it out. It took seconds to install and run.

The report delivered by SLOCCount was interesting:

Total Physical Source Lines of Code (SLOC) = 232,451

Development Effort Estimate, Person-Years (Person-Months) = 61.05 (732.59)

(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))

Schedule Estimate, Years (Months) = 2.56 (30.66)

(Basic COCOMO model, Months = 2.5 * (person-months**0.38))

Estimated Average Number of Developers (Effort/Schedule)  = 23.89

Total Estimated Cost to Develop  = $ 8,246,879

(average salary = $56,286/year, overhead = 2.40).

To refine this report, I would first have to come up with a way to exclude directories for open source code that my team did not write.  Next, I would have to adjust the average salary numbers quite a bit.  I don’t know any developers who would work for $56,286 per year.  I wrote David a note about this so maybe the next release will contain more realistic numbers.

David’s is development effort estimate is interesting.  I can’t help but wonder if this is how people managing CMMI projects measure efforts and outcomes.  Maybe it is how they sell things.  If they do then I can understand how things like the Maryland Health Exchange get screwed up so badly.

At any rate, I am glad I discovered SLOCCount today and will keep it in mind going forward.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Is Learning To Code Enough?

If you are thinking about changing careers or just upgrading your skill set by learning to code, you have to ask yourself if learning to code is enough.  Being a software engineer or even a web developer is not just about learning how to read and write in a scripting language like ruby, python or java.  Even if you learn to code, you are going to hit walls that require mathematical thinking or different ways of thinking than what you are used to.  At least not if you are a mere mortal.

This post was inspired by the following events:
A few days ago I listened to episode 6 of Alexis Ohanian’s NYRD Radio podcasts where he was interviewing James Altucher.  A few days before that I watched ‘The Internet’s Own Boy: The Story of Aaron Schwartz‘.  Then I watched Mark Halberstadt‘s Khan Academy video talking about how he went back to school and got his BS in Electrical Engineering after getting a bachelors many years earlier in music.

Mark describes himself as a C student before he spent three years learning math and science through the Khan Academy.  You can watch his video series explaining his process as well as some reflections on going through it via his YouTube channel here.  Mark got a 4.0 GPA when he went back to school at Temple University. Mark comes across as a really smart guy who was not really getting all that much out of school except with respect to music.

James describes himself as having been kicked out of grad school for a variety of reasons including his tenacious pursuit of writing.  He told Alexis that despite having made a ton of money and going to an ivy league school as an undergrad, he would not pay for his kid(s) (I think he said he had just one but that isn’t important here) to go to college.  James comes across as a

Aaron comes was a child prodigy.  He picked up things unusually easily earlier than most and mastered impressed his peers.  Aaron was an add on founder of Reddit.  He came in after the original three founders had started the company and his company that was part of YCombinator stalled.

As someone who got an undergraduate degree in an area that did not require much math or science (Calculus was the highest level math I took in College and Astronomy was the highest level science), I can identify with Mark a lot more than with James.  I think that sometimes people like James think that a system is bad because it was bad for them, but they fail to consider things through they eyes and experiences of other people.

Aaron was certainly gifted, but he also had access to the web early and often growing up.  His family supported his use of computers.  Not everyone has that sort of foundation.  Based on the documentary video, The Internet’s Own Boy, he was a completely autodidactic learner.  He could probably pick up a text on mathematics and make sense of it.  I know a few people like that, but most people are just not like that.

This brings me back to my original idea about whether or not just learning to code is enough. Most people simply need to develop some foundations if they want to be a well rounded and solid software engineer or developer. I don’t know know if these foundations need to be the same as the requisites for computer science or electrical engineering.  Mark is working as a software engineer now.  I have been working on software and doing web development off and on since before college.  The lack of math is not preventative per say, but it is frustrating when I start taking deeper dives into more advanced topics like machine learning, natural language processing and information retrieval which all interest me.  There are times when even things like front-end web development and design involve math at a much less complicated level so someone who assumes that they can just learn to code without studying the foundations may be in for a few speed bumps along the way.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

On Being A Startup Parent

I decided to take a few months off from my regular routine when I learned of the arrival of my first child recently.  So far so good, but it feels like there is something missing most days.  I read ‘The Baby Book’ by Dr. Sears which was quite helpful before and after the our baby’s arrival.  If I could only recommend one book to expecting or new parents, this is it.  My thoughts on being a startup parent today are very different from before.

I expected things to be harder than they turned out to be in our case. I am glad that this is the case.  I did not expect that I would be hustling for crumbs of time 24 hours a day 7 days a week.  For instance, if I want to make an important phone call I either need a babysitter, Juliana, or a bottle of milk combined with a good measure of luck and some lead time to get the baby to sleep.  Going to a coffee meeting isn’t that challenging provided that it is within walking distance which is easy when you live downtown.  Trying to get any work done that requires more than a 30-45 minute focus is nearly impossible without someone to watch the baby or the baby being in nap mode.

Having a baby is like being a startup founder in other ways as well.  You need a support network.  If you have parents who are more than a short commute away then you will consider making some major life changes very quickly.  In many ways this is like choosing to be a solo founder vs. finding co-founders early on.  Having friends and family nearby is a great thing.
Overall, I really did not know what people meant when they kept saying that having a kid will change your life but I do now.  Everything is different.  And I really do mean everything.  In good ways for the most part.

As you might expect, as an entrepreneur I am looking at things and coming up with businesses and solutions to the countless pain points associated with parenting.  I thought about doing a kickstarter for a clothing line, but the time bank required to go meet with a seamstress has not received any investments yet.  I started thinking about apps for just past the horizon in the e-learning, mentoring, and other categories.  So far nothing has stuck.  I’m not determined to find a startup related to being a parent, but it is very tempting.  The 4Moms company has certainly cornered the Apple tile on the baby monopoly board.

One thing that I really do think there is some opportunity around is early childhood learning.  Whether it is the flash cards and flash card apps or the books on how to be a parent, there is a huge gaping hole that exits.  The books out there are largely conceptual, but not constructive.  At least not for early childhood.  I can’t tell you how many books I have read that have said the exact same thing one of several different ways.  There isn’t a lot of innovation going on.  Kristin Barnett’s ‘The Spark: A Mother’s Story of Nurturing Genius‘ is so far among the better reads that I have encountered simply because it tells of how one parent parented in some very uncharted waters.  The book is well written and interesting so it is a good read all around which helps.  Most books on early parenting or early childhood development promise big, but then there is a drop off in the second or third chapter and things digress to repetitive mush or childhood development almanacs like those found all over the place.  There isn’t much quality reading in this category that I have found so far.  Children’s books are also quite disappointing in many cases, but I’m not too harsh of a critic (a funny critique of Goodnight Moon).

One thing is certain, becoming a parent has lead to a substantial increase in my pursuit of comedy relief and the humorous side of life.  Today I discovered a blog called ‘The Ugly Volvo‘ which is quite funny.

As a new parent and an entrepreneurial parent, I am always on the lookout for more interesting reading (e.g. blogs, books, articles), online video content (e.g. Coursera, Youtube), and interesting programs.  Some of the best insights that I have found so far have come from a friend of Juliana’s who taught for the Stanford University Online High School.  Email me if you have suggestions, are interested in chatting about any of this stuff, etc.

Last, but not least, I can say with certainty that our assumptions about women in workforce deserve much more attention. I think it is assumed that women are different than men generally, but my experiences as a new parent staying home to spend time with my first child are enough to convince me that a) this isn’t just a male vs. female thing, and b) that women have a much tougher time than men do during the period leading up to giving birth and during the first year of being a parent.  This is as much an economic issue (child care isn’t consistently high quality or cheap) as it is a people in the workplace being considered fairly by employers, coworkers and government.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Learn To Code In The Time It Takes To Recruit A Coder

The title of this article is something that I would not have said seven years ago.  Things have changed.  Free online learning and local learning as well as mentoring options have proliferated like crazy in the last seven years.  Today, there is no reason why you can’t learn to code in the time it takes to recruit a coder to build your app idea.  It will take you 2-3 months to find a decent coder who will work for sweat equity or a reduced compensation arrangement so take that time and use it instead to learn to code.

I am getting a ton of emails from people asking me if I know a programmer that they can work with from all corners of the earth lately.  People seem to think that they are in a corner without hope.  I feel the need to provide some education for them here.

For starters, if you think you are in a corner now…without a coder…just wait until your coder quits or moves on because you discovered that they can’t build your dream app in short order.  Better yet, wait till you get your app built and you can’t afford to keep it working and you have figured out that things are not quite what you thought they would be.

Bootstrapping an app, be it mobile or web or enterprise, is a lot like building a house that isn’t ready for the inevitable storms (yes, not just one) that are coming.  You think you just hire someone to build you something and that is it? That is not how things work at all.  You are in for a very rude awakening over time.  Initially it will be because you want more than you can get.  After a while it will be because you lose someone and they are replaced by someone who says the previous person did everything all wrong.  If you are lucky you will not have people who flake out on you mid way through a critical project.  Oh, and nobody will care about this as much as you.

So my modest proposal to you, the non-technical founder who is gearing up for an epic hunting campaign for rock star programmers, is this:

You can learn to code in about the same time that it would take you to find a programmer.  And you should learn to code before you find a programmer.  Why?  Because you are building a software product that you will own.  You might not be the best programmer or even a decent programmer right out of the gate, but that isn’t the point.  Your lack of understanding of what you are about to get yourself into is going to weigh you down like a lead balloon as you try to get your startup going.

Learning to code is easier than ever now thanks to the abundance of free online course offerings from companies including Coursera, Udacity and countless others.  I have been thinking about this a lot lately.  If you have not done so already, check out the Learn to Code page (see the menu across the top of this page) here on

You might as well do it even if you are going to hire a programmer.  You are going to want to fix something sooner or later and you might as well get started now.

Feel free to email me if you would like to discuss how to pursue this directly.  I would be happy to discuss how to get headed in the right direction from the start.

Good luck!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Learning To Code

After taking a break following my becoming a new parent, I have re-focused attention on learning to code.  This is an update with some thoughts and reflections on my adventure.

If you are planning on having a kid sometime in the future one thing that I think you should know is that everything you plan on doing or were in the middle of doing will take a back seat for at least 2-3 months.  I had picked up some really solid momentum, but the wind was knocked out of me and it took three months to get back on track.  A lot of things change in three months.  A few of the coursera courses that I had signed up for ended while others started, a few technical projects including some small fires were completed with a little help from a friend, and I decided to start working through Zed Shaw’s Ruby the Hard Way book. I just want to point out that if you compare Coursera to Zed’s book, Coursera is a complete waste of time.  Zed offers some really good suggestions that would not have occurred to me about how to master and learn things in addition to some great ruby instructions.  I met Zed back in 2007 and reading his book has filled in the picture about him quite a bit.  If you need a place to start learning to code, his books are a great place to start.

I have been considering going back to school and getting a Masters in Computer Science or Human Computer Interaction more and more. I can’t say that I really want to pick up a new student loan, but otherwise I really hope to do this sooner or later.  One of the things that I am going to do to prepare for this potential scenario includes working to expand my mathematical knowledge and skills.  I just added a page with some resources that I am looking at utilizing (HERE) Stroud & Booth’s Engineering Mathematics book.

If all goes well then I may just turn myself into a more balanced product manager and founder along the way.  I have had a few interesting conversations with companies about taking on a new role lately, mostly after I got an email from someone at Apple who tried to recruit me. It made me wonder what else was out there enough that I put a few feelers out to see what would come back.  I ended up turning down a few very nice jobs including one with a startup founded by a very successful San Francisco based team trying for a repeat in a new space, a handful of consumer startups (I nearly went for one of these and may decide to sooner or later), and a few more established players.  It has been interesting being on the candidate side of the equation instead of being the one recruiting and hiring people for my team or for startups that I advise.  After becoming a parent I am really tempted to sign up for something where someone else is the captain of the ship so that I can focus on being a solid dad.

Where this adventure in learning to code will lead is still not clear to me. For the near term I will continue on as the lead developer and CEO/head of product for my own startup while advising other people’s startups but if something interesting comes along I may find myself tempted enough to change things up.

If you are going through a similar situation or just want to compare notes feel free to email me. I am constantly impressed by how different people approach things.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Grant Me The Power To Get Unstuck Quickly

Earlier this week I ran into a problem that stumped me and a developer friend with considerably more programming experience.  It reminded me of my racking my brain over a problem when I was in college only to discover that the real problem was an undocumented bug in a proprietary tool that my employer at that time relied heavily on.  I can’t help but wish for less complex application development circumstances, but that is a pipe dream.  As I build back my coding capabilities and programming experience this leaves me wishing that the coding gods will grant me the power to get unstuck quickly.

If you are learning to code the first thing that you have to do is develop an advanced level of mindfulness.  In other words, you have to learn to focus on something without allowing anything to get in the way.  This is not easy.

It isn’t like things are working in your favor as you try to do this.  Language and framework versions are rapidly evolving and frequently being introduced.  Meanwhile, information retrieval tools including Google are struggling to deliver relevant and timely help as we seek answers.

I found myself thinking about this after a migration of an existing app’s code base to substantially faster servers. Part of the migration involved moving several self-hosted git repositories to

Everything about the move was awesome except for a few speed bumps that were easy to identify and get around.  Overall, the migration went smoothly.

Then I pulled down a fresh copy of the code base from Github to make sure everything was working properly.  No dice.  The first time I tried to fire up the app on my Mac Book I was hit with a cryptic error that was hard to resolve.  It was a Ruby on Rails environmental issue that involved which version of gems were being used.

Looking back at the issue now, it was a pretty stupid simple issue to resolve.  Unfortunately, I don’t spend a lot of time working with my Ruby on Rails environment. If that was the case then I would probably have figured out the problem in minutes.

Instead, I sought out solutions to this puzzle via Google and the usual lineup of results via sites that Google prioritizes.  The answers were not easily within reach.  This was frustrating.  I asked someone for help and he was initially stumped using the same method despite considerably more software engineering experience.  I put the computer down and revisited the issue later which lead me to the solution within minutes.

Learning to code is definitely a cumulative effort.  If you are trying to learn to code, with Ruby on Rails like I am or with something else entirely, just remember to be patient with yourself and mindful when it comes to what you are trying to do.  If you an do this then the haystack that your needle is hiding in may just present itself to you and make your effort a more enjoyable one.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Form Good Habits While Learning To Code

If you are anything like me, this is the time of year that you are working on putting your new years resolution into motion.  My resolution this year involves zen habits.  One of the reasons I chose this as a resolution is that I find myself in time crunches more more frequently.  The older you get the harder it is to find time to do the things you enjoy doing in your free time.  Whether it is work, being social, going to the gym regularly or learning something new it seems like the world is out to get you sometimes.  A number of years back I set a new years resolution to get into the best shape of my life.  I learned a lot in the process including the fact that a workout is actually more energizing than a double espresso after a long day at work.  The reduction in my espresso budget was a good thing because the cost of my nutrition and fitness budget ramped up quickly.  Ultimately, that resolution was very successful.  Fast forward to today and I can’t to make it to the gym on a regular basis much less five days a week.  I wish that I could blame it on motivation or the fact that I recently had a daughter, but it is a lot more than that.  Some days it is a work related fire that must be put out.  Other days it is a trip that does not make it easy to make it to the gym.  Attending SXSWi last year is a great example of that – every spare minute was either spent in the car on the way to the event due to a late registration that I had no control over, evenings packed with events and networking, or social meals.  Despite challenges like this I could go to the gym, it is just tough to make it consistently.  All of this boils down to what feels like a time crunch, but that may not be the issue at all.  Since this is about learning to code I will change gears and focus now.  I believe what is really required to succeed at learning to code, even amidst a frenetic or challenging schedule, is your ability to form good habits while learning to code.  Accomplish this and you will be able to break through the time crunch and chaos.

There are a few things that you can and should do before you get started.  I remember that when I made my fitness related new years resolution that I bought a gym membership at a 24 hour gym and moved into an apartment complex with a small gym.  Learning to code is no different.  You should join a programmer user group or two that you can regularly attend and get the right hardware and software setup.  You should also plan on making some friends who can provide mentoring.  There are certainly paid programmer friend options, but if you are having to pay for each conversation you are building yourself a receive for failing unnecessarily fast.

Over the holiday break I read Jeremy Dean’s book ‘Making Habits, Breaking Habits’.  Jeremy points out that we create associations between our environment and certain behaviors and that the coffee shop or place where we spend time learning to code and coding are a sort of Pavlov’s dog situation.  He also points out that changing environments can make even the most ordinary things that we try to do harder.  So pick a place that is comfortable, free of distractions and where you will have what you need.  If you need a coffee shop atmosphere, but want to work from the library or home then invest in an easy to execute caffeination option.  If you want the coffee house vibe, but can’t find the right coffee shop then download the Coffitivity app and get started wherever you want.

In re-training myself to be a coder after quite a long break where I was mostly an ops guy managing teams of product people including designers and developers, I started out creating cheat sheets for myself to learn to code.  I created a cheat sheet for Linux and a cheat sheet for setting up my local development environment.  You can click or mouseover the learn to code button at the top of this page or you can check out my learn to code Ruby on Rails page for a preview.

Creating a cheat sheet isn’t required, but it can help.  Making friends who can help and going to a regular user group for programmers in the language you are trying to learn is even more important.  You should learn how to code, not code by cheat sheet.  The cheat sheet for me has turned into almost more of a bibliography of  past and present resources.  If you take advantage of mine I hope you will let me know what you think of it and make suggestions that will help improve it.  Since I put it up I have had around 20,000 people check it out and some really helpful suggestions along the way.  There are resources on the page that I have not checked out in a few cases.  In one case there is a learn to code resource that someone suggested that requires that you use method that would be different from what you would do if you wrote code on your own laptop or desktop computer.  I pointed this out on the page and I point this out here because this seems like the kind of environmental change-up that could make it harder to succeed along the way.  There are other options out there like this and not all of them are bad.  Just keep in mind that if you do all of your coding on a hosted environment where someone else has done most or all of the setup of the coding environment then you might find it hard to act out the good habits that you have formed while you are learning to code.

Being a coder requires constant learning.  You will learn one language and then learn an entirely different one.  You will do something a certain way and then work with someone new who either requires or convinces you that your code be done differently.  For example: if you were a front-end developer two or three years ago you would have been working with JavaScript one way, but today it is more than likely that you will have been working with Node.js and an iteration of JavaScript with a client side MVC (model view controller) architecture more like what a full-stack or back-end developer works with (e.g. Ruby on Rails, Python and Django).  For me personally, I have a friend who has really gotten into working with Scala and the Akka framework for back-end development along with the JavaScript Play framework for front-end development.   Scala runs on the JVM (Java virtual machine) which means that to work with him on a project I probably need to learn a little Java as well as Scala, Akka and Play.  Meanwhile, I still have to know JavaScript, Ruby on Rails, CSS and HTML along with Linux and a collection of other technologies.

Knowing that being successful as a programmer requires constant learning and super human focus means changing your habits.  You have to choose a few consistent places to learn, practice regularly, and consistently set aside time.  Becoming a parent totally derailed my efforts in this regard during the first three months, but after that I managed to get the train back on the tracks and things evened out.

The habits that are important go beyond when and where.  You must also commit to a routine that combines learning and practice.  While working on my most recent startup I hired quite a few very intelligent and capable students to work with me and the team as junior coders.  As I was starting them out I just had them jump in and learn on the fly.  Part of this was due to our limited budget while an even bigger part of it was due to the assumption that as computer science majors at a top ranked computer science program they would be able to pick things up quickly.  This was a mistaken assumption.  We got code and results, but there are cars that drive too.  Shortcuts were taken, coding horrors were committed, and the technical debt that now has to be paid back is much higher than it would have been had we simply started off by working with them to build a small app from scratch and reinforcing coding best practices along the way.  In the long run we would have saved a lot more time than we saved back putting them to work in a learn on the job sort of way.

You can learn from this too.  Rather than starting off trying to build your vision for the ultimate MVP or app or trying to jump into the works and add features to an existing app you should set your sites on small coding exercises and practice exercises that will make sure that you do things right before you try to do them on your clock or someone else’s.  Code interviews that involve coding exercises are a great reminder of this for me.  If you look at the non-whiteboard coding exercises that people ask people they are interviewing to perform it becomes clear that this effort will not just help you to master coding – it will help you if you ever want to get a job as a coder.  My learn to code Ruby on Rails page and other learn to code pages include links to programming exercises and sites like Code Kata as well as suggestions for how to get started.

Just remember that forming good habits means that you should be setting yourself up for a regular and consistent effort.  You will not be an expert right away, but in time you can become one.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>