Latest Comments
Search
Stuff I like
  • The Essays of Warren Buffett: Lessons for Corporate America, Second Edition
    The Essays of Warren Buffett: Lessons for Corporate America, Second Edition

    Read this review post

  • The Five Rules for Successful Stock Investing: Morningstar's Guide to Building Wealth and Winning in the Market
    The Five Rules for Successful Stock Investing: Morningstar's Guide to Building Wealth and Winning in the Market

    Read this review post

  • Programming Pearls (2nd Edition)
    Programming Pearls (2nd Edition)
  • Pattern Recognition and Machine Learning (Information Science and Statistics)
    Pattern Recognition and Machine Learning (Information Science and Statistics)
  • Programming Collective Intelligence: Building Smart Web 2.0 Applications
    Programming Collective Intelligence: Building Smart Web 2.0 Applications
  • Dyson DC25 Ball All-Floors Upright Vacuum Cleaner
    Dyson DC25 Ball All-Floors Upright Vacuum Cleaner
  • Sigma 30mm f/1.4 EX DC HSM Lens for Canon Digital SLR Cameras
    Sigma 30mm f/1.4 EX DC HSM Lens for Canon Digital SLR Cameras

Powered by Squarespace

Entries in computer science (10)

Sunday
Nov012009

What I have learnt as a Journeyman

I have been working at Google for almost two years now. Google is a great place to work in - great benefits, outstanding colleagues and, well, a stable job in today's economy. And to think this all started with my wife applying for me on her own accord [see Making a career choice]. I have grown immensely as a software engineer, but there is still so much room to grow. Here are a few tidbits that I have picked up along the way:

Unit testing - when your code is live and serving traffic 24/7, it enables me to sleep better knowing that it is tested. The tests range from small (each library has unit tests for each individual function) to big (integration tests that the service can connect to all backends and work as intended). Using Mock objects helps to test environments in a controlled fashion. Unit-testing for failure conditions have saved production crashes in numerous occasions. [See Google Testing Blog]

Refactoring works. Especially with those nifty unit tests written to ensure everything works.

Code does smell, and at Google, it's usually my own first working implementation. Oh, wait, that's why refactoring works.

Mapreduce is my hammer - all nails shall tremble in its presence.

Patterns, paradigms and ideology are great, but don't let it get in the way of getting things done. Overengineering is your worst enemy.

Tuesday
Oct272009

Why you don't learn how to write programs in university

A while back some Ministry of Education officials visited Google and were wondering how to revamp the 'A'-level Computer Science syllabus. I think the viewpoint that the software engineers had were that school never taught us software engineering. This article from Joel (of Joel on Software fame) articulates this point nicely:

I have some limited experience with this, having worked with a group of Rose-Hulman students over the course of their final year project. We let them pick their own schedule, and, of course, they put everything off until the last minute and produced something that was incomplete. The typical CS assignment expects students to write the “interesting” part of the code (in the academic sense of the word). The other 90% of the work that it takes to bring code up to the level of “useful, real-world code” is never expected from undergrads, because it’s not “interesting” to fix bugs and deal with real-world conditions, and because most CS faculty have never worked in the real world and have almost no idea what it takes to create software that can survive an encounter with users.
-Joel Spolsky, Capstone projects and time management

Friday
Jul102009

Randomize lines in bash

while read line; do echo "$RANDOM $line"; done < $1 | sort | sed -r "s/^[0-9]+ //" > $2


... sigh... or just
shuf $1 > $2

Sunday
Apr122009

In Challenging Times, the Tide Changes

Geeks are So In

In the early 1960s when he was choosing a career, Professor Chamberlin recalled, technical people were respected and well paid. Money, he said, was part of the equation. “But the bigger part of the motivation for me,” he said, “was that I would be doing exciting and important work and that my contributions would be appreciated.”
--With Finance Disgraced, Which Career Will Be King? [nytimes.com]

The universities in Singapore have release information regarding the grade profile of students entering each course of study. [NTU] [NUS] [SMU]

A comparison between common courses at the various universities at the 10th percentile (letter grades are for GCE A-Level grade combinations, and floating point numbers are the polytechnic diploma GPAs):

CourseNTU(H2/H1, GPA)NUSSMU
AccountancyAAB/B, 3.71AAA/B, 3.64ABB/A, 3.60
BusinessAAB/B, 3.63AAB/B, 3.50ABB/B, 3.49
EconomicsABB/B, 3.48BBC/C, 3.39BBB/B, 3.30
Law-AAA/AAAA/B
Information Systems, NTU Comp Eng, Computing (IS)BCC/C, 3.38BCC/B, 3.54BCC/B, 3.16
Social Sciences, Psy, SocioBCC/B, 3.39BBC/C, 3.39BBC/B, 3.28
Reproduced from [Jay Lim's Blog]

Some observations: Computer Science/Engineering has the one of the lowest admission cut-offs, except when considering polytechnic diploma GPA for NUS (at which point, CS actually has a more stringent requirement than even Business).

It is true - we simply do not get the best and the brightest in Computer Science. And while I imagine it would be very difficult for an entrepreneur with solely non-technical background to create the next big thing in software and Internet technology. The faculty in NUS routinely relies on foreign students to prop up the quality of the student base - an illustrative example is a fellow Singaporean in Google who had my PhD supervisor as his supervisor for his project. In the first meeting between the professor and the student, the professor simply assumed the student was not Singapore and asked, "so, which part of China are you from?".

Geeks make money - No?

Do not fill young people's heads with too much nonsense like how they have to look cool. Sell the cool ideas they work with. Teach them to see that you can make money and be rich only if you have something worth selling, and that is where engineers come in.

Years ago, engineering was the top school to go to.

Today, everyone wants to be in business and make money and that is why our young flock to anything and everything to do with business, finance and economics.

-- Straits Times Forum Comment - Focus on engineers' 'cool' ideas, not their image [straitstimes.com]

As my colleague (in Google mind you) likes to quip: "If you are in software engineering for money, you are in the wrong business."

If you are the gahmen, hear my plea

Singapore might want smart and hardworking generalists to be to civil servants by enticing them with extraordinary salaries. But if you want a striving science and technology sector, specialists have to be nurtured. And my last rant: uhm, propping up A*Star scholars like trophy dogs is not the way to go, simply due to the overemphasis of look-at-my-scholars-with-their-high-grades, aren't they adorable sense of it all.
Rejected by Harvard? Not a problem. You're in good company.

The list is, well, impressive. Investor Warren Buffet, Sen. John Kerry, D-Mass,
Rolling Stone magazine founder Jann Wenner, NBC "Today" show host Meredith
Vieira, former "NBC Nightly News" anchor Tom Brokaw, New Yorker magazine
editor David Remnick, CNN founder Ted Turner, folk rock legend Art Garfunkel,
Matt Groening, creator of the animated television series "The Simpsons," Sun
Microsystems chairman Scott McNealy, Memorial Sloan-Kettering Cancer Center
president Harold Varmus, and Columbia University President Lee Bollinger
round out the list.

-- Non Ivy League Graduates

Tuesday
Oct282008

Back to books

Don't tell my wife, but I have bought some reading material since she returned to Singapore. Yeah, I'm a chronic book buyer (and sometimes book reader).

"A Random Walk Down Wall Street" is the first investment book that I read, and to this day, I constantly refer to it and base my investment philosophy of investing the bulk of my money in indices. The book is quite lengthy and goes into a diatribe of the history of investing (starting from the 16th century!). It explains financial theories such as modern portfolio theory and also includes practical advice regarding taxes and retirement funds such as IRA and 401(k)s.

 

I went ahead and bought some books which have been sitting in my Amazon cart for a few months now.

 

 


"The Intelligent Investor" is written by Benjamin Graham, a proponent of Value Investing. Warren Buffett calls this "the best book about investing ever written." Can't argue with the world's richest man (for now).

 

I browsed through "The Neatest Little Guide to Stock Market Investing" in a book store and it's a nice little package that explains financial jargon in layman terms.

 

 

 

While I was at it, I also got some coding books (ya'know, so that I can keep my job). Now that I think about it, I do tend to overspend on books. Ah well. These two books look interesting, and I can stand to be a better software engineer and less of a computer scientist, especially at my current position.

 

I will write reviews for these books after I finish reading them.

Friday
Aug082008

Computer Go Advances

A professional 8-dan player has been defeated by MoGo, a computer Go program that uses Monte Carlo tree search algorithms, in a 9-stone handicap game on a 19x19 board. [usgo.org] [slashdot.org]

This represents a major milestone in computer Go, and is also, evidence that the Monte Carlo tree search algorithm is a viable search technique that works in high branching factor domains. In my honest opinion, the budding graduate student in computer games research can easily find applications of this technique in emerging problems which are unsolvable by traditional techniques.

Think RTS, think war games, think huge risk mitigation situations like epidemic simulations. sigh I had a research proposal rejected a year ago based on this concept, and, as a result, made me switch from academic research to industry.

Thursday
Jul312008

Lots of papers, few implementations

Why aren't there more open source text summarization projects?

There seems to be a ton of papers on text summarization. I would like to get my hands on something decent to experiment with. And don't tell me Mac OS X Summarize service or Microsoft Word. :)

Monday
Jul142008

Just in case you missed it...

Google has open sourced protocol buffers.

Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats.

Protocol buffers are a great technology. It is one of those things that you typically don't stop to think about - what kind of technology goes into a car, a computer or a plane when you are using it?

And that's not the only cool technology that Google has released - check out our Google C++ Testing Framework and Google commandline flags module for C++.

Wednesday
Jun252008

Software Engineering

"Make everything as simple as possible, but not simpler."

- Albert Einstein

Writing software is a messy business - You are tasked with coming up with a solution that works. This is probably best exemplified by the Netflix Prize competition (see wikipedia article for a quick overview if you have not heard of it before).

One consensus I got at KDD Cup 2007 was a slight disappointment at the "hackish" nature of the leading team, which later won the 2007 progress prize. Their winning solution is described here.

It is easy to have bloat creep into code as bugs are fixed and features are added.

One positive plus of working in Google is the inclination to frown on code bloat, and engineers are recognized for coming up with simpler implementations. This philosophy of constant iteration of software engineering ensures that systems are capable of keeping up with features while being maintainable. (Unit testing is HUGE here too)

Saturday
Aug042007

Make Mathematics Sexy, Smart and Desirable

CSI has driven so many people into forensics that colleges have started whole new programs because of it -- can we do the same for the rest of science?
- Aaron Swartz's thoughts on Science Foo Camp 2007

Agreed. Movie and TV shows can bring a career path into the limelight and the focus of popular opinion - This newspaper article noted that undergraduates studying forensic or archaeological science have increased more than 30% since the introduction of shows like the CSI series.

However, it seems to be that not all publicity is good publicity as a educational promotional tool. Ever noticed how mathematicians are always portrayed as a little ... strange?

Despite the show Numb3rs, which features a mathematician using mathematics to solve high-profile crimes, it nevertheless portrays the protanganist as socially awkward (but hey, then again, he gets the girl). This follows in the same vein as A Beautiful Mind and Good Will Hunting. The result is a job in which people envy for its social status ("he's such a genius, I wish I was as smart as him"), but is simulatenously not desirable ("oh, I don't want to seem like such a freak").

Can we have a show with a sexy, smart (is this adjective redundant?) and desirable mathematician?