Sorry for not reading the follow-up discussion earlier.
Silas doesn’t have to wait and learn without getting paid, his current skill level is already in demand.
What do you mean by this? How can I be hired for programming based on just what I have now? Who hires people at my level, and how would they know whether I’m lying about my abilities? (Yes, I know, interviews, but to they have to thin the field first.) Is there some major job finding trick I’m missing?
My degree isn’t in comp sci (it’s in mech. engineering and I work in structural), and my education in C++ is just high school AP courses and occasional times when I need automation.
Also, I’ve looked at the requests on e.g. rent-a-coder and they’re universally things I can’t get to a working .exe (though of course could write the underlying algorithms for).
Is there some major job finding trick I’m missing?
The best ‘trick’ for job-finding is to get one from someone you know. I’m not sure what you can do with that.
Generally speaking, there are a lot of people who aren’t good at thinking but have training in programming, and comparatively not a lot of people who are good at thinking but not good at programming, and the latter are more valuable than the former. If I were looking for someone entry-level for webdev (and I’m not), I’d be likely to hire you over a random person with a master’s degree in computer science and some experience with webdev.
The best ‘trick’ for job-finding is to get one from someone you know. I’m not sure what you can do with that.
Heh, that’s what I figured, and that’s my weak point. (At least you didn’t say, “Pff, just find one on the internet!” as some have been known to do.)
If I were looking for someone entry-level for webdev (and I’m not), I’d be likely to hire you over a random person with a master’s degree in computer science and some experience with webdev.
Thanks. I don’t doubt people would hire me if they knew me, but there is a barrier to overcome.
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.
HAI
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
UP VAR!!1
IZ VAR LEFTOVER 15 LIEK 0?
YARLY VISIBLE "FizzBuzz"
NOWAI IZ VAR LEFTOVER 3 LIEK 0?
YARLY VISIBLE "Fizz"
NOWAI IZ VAR LEFTOVER 5 LIEK 0?
YARLY VISIBLE "Buzz"
NOWAI VISIBLE VAR
KTHX
IZ VAR NOT SMALR THAN 100? KTHXBYE
IM OUTTA YR LOOP
KTHXBYE
It might help to note that dialects—and I don’t see any reason not to consider both the various kinds of ‘netspeak and the various programming languages as such, in most cases of human-to-human interaction—are almost exclusively used as methods of signaling cultural affiliation. In this case, I parsed Bogus’ use of ‘netspeak as primarily an avoidance of affiliation with formal programming culture (which tends to linger even when programs are set out in standard English, in my experience), and secondarily a way of bringing in the emotional affect of the highly-social ’netspeak culture.
It is ‘mammal stuff’, but it seems to be appropriate in this instance, to me.
Thanks. I was mostly kidding, but I appreciate the extra perspective.
(Signalling my own affiliation as a true geek, I actually attempted to download a LOLCODE interpreter and run it on the above, but the ones I could get my hands on seem to be broken. I would upvote it if I could run it, and it gave the right answer.)
Looks right to me, though I wound up reformatting the loop a little. That’s most likely a result of me being in the habit of using for loops for everything, and forgetting the proper formatting for other kinds, rather than being an actual flaw in the code—I’m willing to give bogus the benefit of the doubt about it, in any case.
Pretty much. Both you and bogus apparently forget to put an initial value into var (unless your language of choice automatically initializes them as 0).
Using while(1) with a conditional return is a little bizarre, when you can just go while(var<100).
Of course, my own draft used
if(var % 3 == 0 && var % 5 == 0)
instead of the more reasonable x%15.
Pretty much. Both you and bogus apparently forget to put an initial value into var (unless your language of choice automatically initializes them as 0).
Mine does, but I’m aware that it’s good coding practice to specify anyway. I was maintaining his choice.
Using while(1) with a conditional return is a little bizarre, when you can just go while(var<100).
Yep, but I don’t remember how else to signify an intrinsically infinite loop, and bogus’ code seems to use an explicit return (which I wanted to keep for accuracy’s sake) rather than checking the variable as part of the loop.
My method of choice would be for(var=0; var<100; ++var){} (using LSL format), which skips both explicitly returning and explicitly incrementing the variable.
Evidently writing about the FizzBuzz problem on a programming blog results in a nigh-irresistible urge to code up a solution. The comments here, on Digg, and on Reddit—nearly a thousand in total—are filled with hastily coded solutions to FizzBuzz. Developers are nothing if not compulsive problem solvers.
It certainly wasn’t my intention, but a large portion of the audience interpreted FizzBuzz as a challenge. I suppose it’s like walking into Guitar Center and yelling ‘most guitarists can’t play Stairway to Heaven!’* You might be shooting for a rational discussion of Stairway to Heaven as a way to measure minimum levels of guitar competence.
But what you’ll get, instead, is a blazing guitarpocalypse.
Somehow, the other responses to this comment reminded me of that.
main = putStr . unlines $ fizzbuzz 100
fizzbuzz m = map f [1..m] where
f n | n `mod` 15 == 0 = "FizzBuzz"
f n | n `mod` 3 == 0 = "Fizz"
f n | n `mod` 5 == 0 = "Buzz"
f n = show n
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.
% 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.
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”...)
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:
Programming encourages clear thinking—like evolution, it is immune to rationalization.
Thinking in terms of algorithms, rather than problem-answer pairs, and the former generalize.
Sorry for not reading the follow-up discussion earlier.
What do you mean by this? How can I be hired for programming based on just what I have now? Who hires people at my level, and how would they know whether I’m lying about my abilities? (Yes, I know, interviews, but to they have to thin the field first.) Is there some major job finding trick I’m missing?
My degree isn’t in comp sci (it’s in mech. engineering and I work in structural), and my education in C++ is just high school AP courses and occasional times when I need automation.
Also, I’ve looked at the requests on e.g. rent-a-coder and they’re universally things I can’t get to a working .exe (though of course could write the underlying algorithms for).
The best ‘trick’ for job-finding is to get one from someone you know. I’m not sure what you can do with that.
Generally speaking, there are a lot of people who aren’t good at thinking but have training in programming, and comparatively not a lot of people who are good at thinking but not good at programming, and the latter are more valuable than the former. If I were looking for someone entry-level for webdev (and I’m not), I’d be likely to hire you over a random person with a master’s degree in computer science and some experience with webdev.
Heh, that’s what I figured, and that’s my weak point. (At least you didn’t say, “Pff, just find one on the internet!” as some have been known to do.)
Thanks. I don’t doubt people would hire me if they knew me, but there is a barrier to overcome.
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.
A quick solution to the FizzBuzz quiz:
*in ur LessWrong, upvotin’ ur memez*
For the first time here I’m having a Buridan moment—I don’t know whether to upvote or downvote the above.
It might help to note that dialects—and I don’t see any reason not to consider both the various kinds of ‘netspeak and the various programming languages as such, in most cases of human-to-human interaction—are almost exclusively used as methods of signaling cultural affiliation. In this case, I parsed Bogus’ use of ‘netspeak as primarily an avoidance of affiliation with formal programming culture (which tends to linger even when programs are set out in standard English, in my experience), and secondarily a way of bringing in the emotional affect of the highly-social ’netspeak culture.
It is ‘mammal stuff’, but it seems to be appropriate in this instance, to me.
Thanks. I was mostly kidding, but I appreciate the extra perspective.
(Signalling my own affiliation as a true geek, I actually attempted to download a LOLCODE interpreter and run it on the above, but the ones I could get my hands on seem to be broken. I would upvote it if I could run it, and it gave the right answer.)
integer var
while(1)
{
++var
if (var % 15 == 0)
else if (var % 3 == 0)
else if (var % 5 ==0)
else
if !(var<100)
}
Looks right to me, though I wound up reformatting the loop a little. That’s most likely a result of me being in the habit of using for loops for everything, and forgetting the proper formatting for other kinds, rather than being an actual flaw in the code—I’m willing to give bogus the benefit of the doubt about it, in any case.
Pretty much. Both you and bogus apparently forget to put an initial value into var (unless your language of choice automatically initializes them as 0).
Using while(1) with a conditional return is a little bizarre, when you can just go while(var<100).
Of course, my own draft used if(var % 3 == 0 && var % 5 == 0) instead of the more reasonable x%15.
Mine does, but I’m aware that it’s good coding practice to specify anyway. I was maintaining his choice.
Yep, but I don’t remember how else to signify an intrinsically infinite loop, and bogus’ code seems to use an explicit return (which I wanted to keep for accuracy’s sake) rather than checking the variable as part of the loop.
My method of choice would be for(var=0; var<100; ++var){} (using LSL format), which skips both explicitly returning and explicitly incrementing the variable.
Jeff Atwood also makes this meta point about blogging about fizzbuzz:
Somehow, the other responses to this comment reminded me of that.
Somehow, I believe this is my fault for having mentioned trying it myself, and for that, I apologize.
If all you have is regex s/.+/nail/
Warning: Do not try this (or any other perl coding) at home!
I think anyone who applies to a programming job and can’t write this (in whatever language) deserves something worse than being politely turned down.
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.
As everyone else seems to be posting their code:
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.
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”...)
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.
Querying my brain for cached thoughts:
Programming encourages clear thinking—like evolution, it is immune to rationalization.
Thinking in terms of algorithms, rather than problem-answer pairs, and the former generalize.