Home | About | Amazon Store | Briefing | Investing | Links | Site Search | USX China | StockInsight* | Login | Register

RSS Feed for This PostCurrent Article

Write Software not Novel

When I was taking my first C++ class at graduate school, the professor has a favorite word “you guys should write a program that works, because if it does not work, you are writing a novel not a program”. Although I did wrote “novels” in one of his program assignments, I remembered his words since then, certainly this include my professional life. Writing software that works is not easy, but it’s a goal every developer should strive for.

Assume we are just writing a very simple C++ program (remember the “hello world”), bacially there are two kinds of obstacles or errors we will face. The first is the compile error. Today I fought all day for this kind of error. Most of times compile errors are easy to solve, because the compiler will give you some hints: such as forgetting the semicolumn; variable name does not match (typos); other simple things etc. But sometimes things can get really tricky. I remember one day my coworker came over for help. I went to his cube and we tried to figure out why things do not compile. I looked at the error message from compiler, which is pretty much useless.  So we had to guess and tried different approaches without success. About one hour later, I suddenly found out there is an extra “^H” at the beginning of a header file. Binggo. That solved the problem.

This afternoon I had similar problem, I had to compile some code written by my coworker, which has not been compiled before. This is kind of thing we programmers don’t like to do: deal with other people’s devil. I was puzzled by the compile error for about 3 hours: it was  complaining the std::vector not defined properly. Finally I found out my coworker put some header file inside the class (and another namespace), which is a bit unusal and it caused the conflict of vector. I will talk about the other type of error later on. Hint: compile error is relatively straightforward compared to the other error :-(

Trackback URL

EMail This Post

Bookmark

Save to del.icio.us

Ads

Google
 
Web www.stlplace.com

RSS Feed for This PostPost a Comment

// 最新推荐 Noteworthy
  • John Bogle WSJ op-ed 01/08/2009: 6 Lessons for Investors
  • Buffett NY Times op-ed 10/17/2008: Buy American. I Am.
  • Buffett article Fortune 11/10/2001: Stock Market: What's in the future for investors
  • Berkshire 08 Meeting Q&A Transcript: html (GuruFocus), PDF
  • Google Ad

  • blog

  • China

  • finance

  • Links

  • Major

  • Pro (for ref only)

  • Saint Louis

  • Shanghai

  • Meta

  • Author作者

    "古人云,人不自信谁人信之." Others won't believe in you unless you believe yourself. --Chinese proverb

    Hello, world :-) I am not another stock expert. I am an ordinary guy who believes: by lifetime learning, indepenent analysis and disciplined investing, little guys can achieve great return.

    I grew up in China and currently working on CFA level I this June. Here I'm blogging about business, finance, stocks, other fun stuffs in the US and China. Comments and Email are welcome.

  • Disclaimer声明

    See Disclaimer Page
  • Valid XHTML 1.0 Transitional