arundelo comments on PSA: Learn to code - Less Wrong

34 Post author: John_Maxwell_IV 25 May 2012 06:50PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (77)

You are viewing a single comment's thread. Show more comments above.

Comment author: wmorgan 25 May 2012 09:00:57PM *  6 points [-]

Agreed about debugging. Dijkstra said something like, "Debugging is the process of taking bugs out; therefore programming is the process of putting them in." Or consider the revelation of Maurice Wilkes:

As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.

One of the biggest misconceptions I notice in non-programmers is that they think it's mostly typing: "telling the computer what to do." Depending on the task, it's a lot of reading, or researching with Google, or staring intently at text on the screen for long minutes until you figure out what you're doing wrong.

Knowing how to program can often be secret sauce for semi-skilled labor. This resourceful individual claims to have tripled their salary by writing a program to mostly-automate their work, thereby collecting the lion's share of bonuses. At my company, I've saved whole person-weeks of others' time with really simple stuff.

My first software job was working for a guy who saw a need, wrote one program, and he's been supporting his family & lifestyle business for 7+ years by selling licenses for $1K-$10K per seat-year to corporate clients who are absolutely thrilled to buy them. Opportunities like this are everywhere, once you start to notice them.

the second most common letter for an English word to end in

Cribbing a bit from Doug McIlroy:

cat /usr/share/dict/words | \
sed -e 's/.*\(.\)/\1/' | \
tr A-Z a-z | \
sort | \
uniq -c | \
sort -rn

Edit: whoops, John_Maxwell_IV is right about the above program. It's 50% humor, 50% code golf.

Comment author: arundelo 26 May 2012 07:30:37AM *  2 points [-]

Unnecessary use of cat! (And backslashes!)

:-)

Comment author: wmorgan 26 May 2012 07:56:56AM 0 points [-]

The pleonastic cat was intentional (I like the expressiveness), but I didn't know that about pipes. Very cool!

Comment author: arundelo 27 May 2012 05:30:43PM 0 points [-]

It works with && and || too:

touch /var/log/php.log &&
chown nobody:medium /var/log/php.log &&
chmod 640 /var/log/php.log