“Coding Homework” is a small website that I have built to list small problems that one can work on, to learn how to use a new programming language. For example, small problems requiring to read from a file, or to use regular expressions, how to find duplicate files in a folder, and so on.

Note that the problems listed on the site is not for testing your algorithm skills, there are many sites for that already.

This list was inspired by repeated requests and suggestions from readers of A Byte of Python for homework problems at the end of each chapter to exercise the skills they have just learned. So I thought why not make it applicable to any language and multiple programming skill levels. And it’s a good topic that can be collaboratively worked on with the programming community, à la Stack Overflow.

All the content will be licensed under Creative Commons Attribution-Share Alike 2.5 India License so that anybody can reuse this content, especially in classroom situations.

Screenshot of "Coding Problems for Homework" website

I also had my own specific goals when implementing this side project:

  1. Solve the lack of “homework problems” for people to exercise their programming skills, especially in the context of learning a new programming language.
    • I am not trying to replace existing lists but rather focus on making the reader active (providing exercise problems) than letting him/her be passive (reading code listings).
  2. Learn how to do website layouts, specifically how to use YUI Grids CSS.
  3. Learn how to pick colors for website design; ColorCombos turned out to be useful.
  4. Learn to use Google App Engine.

It has been a fun side-project, spending a few hours here and there. It is very far from polished, but the basic functionality works. There is still more to do — adding a search functionality, conforming to standard UI design patterns, caching for the rendered HTML (from Markdown), optimizing the housekeeping code, and so on.

This site itself is a good example on the kind of problems that beginners can work on, but they would not know what kind of problems they can solve and what level of expertise (beginner / intermediate / advanced) would be needed. That is where this list of problems can help.

I request you to spend 5 minutes of your creativity to add a few problems so that beginners and intermediate level folks will have interesting problems to test their learning of a new programming language. Thanks!

It might be helpful to you as well when you’re going to play around with functional languages (Haskell, Erlang, etc.), funky new languages (Ioke), or new languages by big companies (Go).

Link: http://codinghomework.appspot.com

Yesterday was my last day at IonLab, the company that I built with a few friends. It has been a wild ride but I could continue no longer. I am leaving due to internal differences on the progress and transparency in the company.

We have been well-supported in our experience, right from a Govt. of India grant to being one of the few to be selected as a TiE Entrepreneurship Acceleration Program mentee. We owe special gratitude for the people who made that happen and supported us.

But as any been-there-done-that startupper would expect, we delivered on technology, but we sorely lacked in maturity of management skills.

Simply put:

“Shipping is a feature. A really important feature. Your product must have it.” — JWZ

I can’t explain more because it would then amount to washing dirty linen in public.

Anyway, time to move on. Hopefully second time will be better!

I have been reflecting on many of the experiences I’ve had. So I thought I’d jot down the biggest lessons I learned as a startupper:

Stop reading. Start doing.

For every hour that you read, you must gain 3 hours of experience.

I read so much about entrepreneurship, although only after jumping into the startup. One and a half year later, we had made all the mistakes that those articles warned us about. The problem is not in the reading or understanding, the problem is in internalizing what you read. Wannabe startuppers read all the Paul Graham essays and say “Nah, that’s not going to happen to me, I’m going to be awesome and successful”, but when I read his latest essay What Startups Are Really Like, it felt like he crept into my head at night, stole my experiences and wrote a letter to me. Yes, really, it felt like that. But, of course, you won’t believe me. Until it happens to you.

What was the most common response from the YCombinator startups to Paul Graham?

When I look at the responses, the common theme is that starting a startup was like I said, but way more so.

Read those last few words repeatedly 6 times.

And I repeat, my warning to you is that simply reading A-Z of books and essays is not important, you have to internalize the learnings by testing it out on the field and realizing the value for yourself instead of saying “that makes sense” and forgetting about it a few minutes later.

Empathy matters

It is funny how most people will discourage you from doing a startup, and, today, perhaps because things have changed now because of all the media hype, most of my friends were discouraging me from leaving it now!

There are two aspects to this. First, read The Dip and you will know why I decided to quit. As Seth Godin says in the book, “The old saying is wrong – winners do quit, and quitters do win. Winners quit fast, quit often, and quit without guilt – until they commit to beating the right Dip for the right reasons.”

Second, as one of my friends observed, I talked to about 7 people (both acquaintances and friends) whose judgment I trusted. 3 of them sympathized and agreed with my decision and 4 of them admonished me and asked me to “hang in there.” You know what was the clincher? The first 3 had done startups themselves and the latter 4 had not. The latter 4 did not really understand the context, even though they meant well and are intelligent folks.

Imagine that a decision like this was so hard for friends-who-know-you to understand. Imagine how much empathy you should have for the motivations and work life of your customers!

Business is not a big deal, it’s only a mindset

The day I realized that I had started to think in terms of business was this conversation:

Friend: Hey, I wanted to talk to you about a gadget idea. Most phones have large storage space and bluetooth facility. Most cameras have small storage space. I have both of them on trips. I usually run out of space on the camera. So can there be a gadget similar to a bluetooth dongle that can move photos from the camera to the phone?

Me: Interesting… there is much to evaluate there (for example, I want to understand how much battery power it would eat up, which is the major concern when on a trip). But if you’re thinking about such a product, I think we should skip bluetooth and talk about peer to peer WiFi*.

Friend: What? Bluetooth is there on every freakin’ phone out there!

Me: Yes, but by the time you build this new gadget, all the devices would have moved to p2p wifi because it means supporting only one standard. Right now, phones have to support two standards – both wifi and bluetooth which is additional hardware and headache for the manufacturers. Since p2p wifi builds on top of the existing wifi standard, it makes business sense for them to standardize on that. Comparatively, the only advantage of bluetooth, AFAIK, is low power consumption, and that factor will reduce with increasing battery life. So, in 1 or 2 years, bluetooth won’t be the in-thing, and that is when the product will be ready if you start now.

Friend: stunned silence

Me: Did I say something wrong??

Friend: You really are a businessman now.

Me: Heh

See? It’s not a big deal, you just have to learn the right mindset. Note that I didn’t say it was easy, I’m simply pointing out it’s simply a different mode of thinking, and it is doable.

I realized that doing a tech business means you should know both tech and business really well (duh). And since I’m not there yet w.r.t. tech, I’m going to stick to that as my core for the next decade. Or at least, that’s the plan. Coding is still my first love. Update: After some thought and discussions with close friends, perhaps I can contribute in additional responsibilities such as product manager-type responsibilities as well.

* Also see What’s next for Wi-Fi?

Focus matters

A great advice I got from Muki, an entrepreneur was: “Start focusing on three things from day one – relationships, cash flow, balance sheet. You already know how to handle the rest.”

Notice he doesn’t talk about innovation, technology or all those other things. On the same note, the best explanation I’ve seen is that “Innovation is the by-product of a well-executed product”, which brings me to my next point.

“Focus” in the context of startups can be interpreted as good product management skills, which I strongly referred to in my StartupDunia guest post on the recent NASSCOM Product Conclave.

Maintain good relationships with partners, vendors, mentors, and all other folks that you meet in the course of your business. Don’t look at these relationships as opportunistic, look at it as an opportunity to co-create and learn.

Track your cash flow. Yes, you will earn millions later, but if you don’t have money now, you’ll die. You may not realize that the single highest factor why startups die is because of bad cash flow.

Don’t trivialize any aspect

Anything that is not managed will deteriorate, said Bob Parsons.

And it’s very true in this case, whether it is your legal company paperwork (yes, those stuff that you don’t want to be bothered with) or your project timelines (yes, tracking what’s on the critical path is very important, but you already knew that, didn’t you?) or thinking long-term as well as short-term, or networking with similar folks.

We, as tech people, think technology is everything and other people have it easy. I was like that. I learned it the hard way that “Easy is a term you use to define other people’s jobs.” I have a lot of respect for marketing and sales folks now. They have a really tough job, because it is about tenacity and psychology, compared to tech work which is write-once and scalable. Pop quiz: Did you really understand the signifance of that last sentence? If not, go back to my first point.

Have a sense of urgency

For every decision (and you will have a lot more of them than you realize), make sure that you do due diligence but at the same time, have a sense of urgency.

As Tecumseh Sherman said: “A good plan violently executed today is far and away better than a perfect plan tomorrow.”

Bottom-up always wins

This is the single most important learning, if I had to pick one.

Time and again, I’ve observed that bottom-up always beats top-down approach to problems. Note that I’m not discouraging you from planning, but I’m discouraging you from focusing purely on the plan. The plan is a guide to your actions, you should not spend more time on the plan vs. the actions and results!

And you can observe the power of bottom-up thinking time and again, whether it is in terms of societal change or productivity paradigms like GTD or the reason why Wikipedia and open source software are successful. As Linus Torvalds says “Software is grown, not built.” Mull that!

How does this apply to startups? Let us take one specific example: You have a new idea to solve a problem and you want to test if your idea works. If the prototype takes a couple of weeks, then you should go for the prototype. If it will take longer, how do you know that it is worth investing the time? Simple, use Adwords to assess demand for your new product/service. Same thing for doing market research.

Notice that in this example, we first start top-down by ideating and brainstorming, but then switch to bottom-up thinking once the initial plan is done – immediately jump to action by a real evaluation about the need that you are trying to solve. Then decide the second action based on the results of the first action.

How to define failure

This is how I explained failure to a friend: You walk into a new restaurant, and try the food. It can be good or bad. But you still have to pay the bill! You don’t know whether your effort is going to succeed or not, but you still have to put in the effort.

And the friend replied: The problem with most people is, they don’t want to risk eating bad food, that’s why they keep going to the same restaurant, even if they are bored of it!

When to call yourself an entrepreneur

I have this personal demarcation that I will call myself an entrepreneur when I have (1) created something new (2) made money. Until then, I’m a startupper (someone who has done or been in a startup).

This is the End

Hope these reflections are useful for future startuppers and entrepreneurs. All the best! (also see 10 things I wish I was serious about before starting a startup)

As for me, I’m cash-strapped (Didn’t I say lessons learned?), and hence looking for a job (product manager or senior technical role). Do let me know if there are any interesting opportunities out there.

Update on January 15, 2010: I joined Infibeam.

Update on July 04, 2011: Interestingly, Splitterbug is a YCombinator 2011 Summer Batch startup that is pursuing the very same idea. Just goes to show that the idea had and still has potential.

Roorky is a new startup that has created a new file format and software for interactive books. As part of the default installation of the software, they are bundling A Byte of Python free with the software.

What is interesting is that this may help complete beginners who stumble in getting started with IDLE, etc. The most common email that I get asked is when people run python abc.py on the IDLE interpreter prompt and wonder why it is not working – both the concepts of two command lines as well as the concept of running a program is not grokked well by beginners who are getting started, especially people who are self-taught. From that perspective, this is an interesting approach to the problem.

I am still not convinced about this approach because people cannot bypass the learning of how to edit, compile and run the code in the native environment, because that will be needed when writing new programs. It will be interesting how the two opposing needs will be balanced.

But I hope beginners will try it out and see if it helps them get started.

A full size video of a walkthrough of the software is available at the Roorky website.

Note: Be warned that it is a beta software.

  1. There are not enough good problems that tech startups are working on and there seems to be no shortage of funds, platforms and ecosystem partners willing to help startups. The ecosystem is hungry for successes.
  2. Product Management skills are the need of the hour, NOT talks about talks about opportunities in X sector, and so on. When there is no culture of knowing how to execute, rest of the topics are moot points.

⇒ Read more at our event coverage at StartupDunia.com.

Update: This has been cross-posted to the official NASSCOM Emerge blog.