RobinZ comments on Open Thread: March 2010, part 2 - Less Wrong

4 Post author: RobinZ 11 March 2010 05:25PM

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

Comments (334)

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

Comment author: Morendil 17 March 2010 05:55:26PM 2 points [-]

I'm sorry to be the one to break the news to you, but the IT industry has appallingly low standards for hiring.

For instance, you may be able to get a programming job without at any point being asked to produce a code portfolio or to program in front of an interviewer.

I'd still be keen, by the way, to help you through a specific example that's giving you trouble compiling. I believe that when smart people get confused by things which their designers ought to have made simple, it's an opportunity to learn about improving similar designs.

Comment author: RobinZ 18 March 2010 02:30:14PM 0 points [-]

I tested myself with MATLAB (which makes it quite easy) out of some unnecessary curiosity - it took me about seven minutes, a fair part of which was debugging.

I feel rather ashamed of that, actually.

Comment author: RobinZ 18 March 2010 11:53:36PM *  0 points [-]

As everyone else seems to be posting their code:

% FizzBuzz - print all numbers from 1 to 100, replacing multiples of 3 with
% "fizz", multiples of 5 with "buzz", and multiples of 3 and 5 with
% "fizzbuzz".
clear
clc
for i = 1:100
fb = '';
if length(find(factor(i)==3)) > 0
fb = [fb 'fizz'];
end
if length(find(factor(i)==5)) > 0
fb = [fb 'buzz'];
end
if length(fb) > 0
fprintf([fb '\n'])
else
fprintf('%5.0f\n', i)
end
end

A better program (by which I mean "faster", not "clearer" or "easier to modify" or "easier to maintain") would replace the tests with something less intensive - for example, incrementing two counters (one for 3 and one for 5) and zeroing them when they hit their respective desired factors.

Comment author: Morendil 18 March 2010 02:56:00PM 0 points [-]

I feel rather ashamed of that, actually.

I wouldn't be; I'd take it as (anecdotal) evidence that the craft of programming is systematically undertaught. By which I mean, the tiny, nano-level rules of how best to interact with this strange medium that is code.

(Recently added to my growing backlog of possibly-top-level-post-worthy topics is "how and why programming may be a usefull skill for rationalists to pick up"...)

Comment author: RobinZ 18 March 2010 03:24:58PM *  1 point [-]

I have to admit, I was looking up functions in the docs, too - I would have been a bit faster working in pseudocode on paper.

Edit: Also, my training is in engineering, not comp. sci. - the programming curriculum at my school consists of one MATLAB course.

(Recently added to my growing backlog of possibly-top-level-post-worthy topics is "how and why programming may be a usefull skill for rationalists to pick up"...)

Querying my brain for cached thoughts:

  1. Programming encourages clear thinking - like evolution, it is immune to rationalization.

  2. Thinking in terms of algorithms, rather than problem-answer pairs, and the former generalize.