

To all who Think Themselves a Programmer - fogus
http://sfbay.craigslist.org/sfc/eng/1246353621.html

======
brown9-2
I can't wait for the overusage of "fail" to die out:

    
    
      curl -s http://sfbay.craigslist.org/sfc/eng/1246353621.html | grep -ci "fail"
      15

~~~
IsaacSchlueter
I don't mind "fail". But the overusage of "ninja" really annoys me to no end.

~~~
lallysingh
Agreed, they may as well say "goon" or "minion." How about "software engineer"
or "professional"?

Well, I guess with the crowd these guys are going for, maybe those terms don't
really apply...

~~~
buckwild
Don't you think the term "hacker" is overused today too? It seems like
everybody and their mother is always "hacking" something.

------
frig
Does this guy look like a ninja to you:
[http://www.gravatar.com/avatar/3b4ddb8b9c296ecf6a7cc338da508...](http://www.gravatar.com/avatar/3b4ddb8b9c296ecf6a7cc338da508f98?s=50&d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-50.png)

?

Because: that is who posted the ad; Stephen Blum, 'lead ninja engineer @
trusted opinion, inc'.

<http://www.linkedin.com/in/stephenlb>

~~~
absconditus
While I have some doubts about the abilities of the poster of the ad, why are
you encouraging people to judge him based on his appearance?

~~~
frig
Is there anything in the ad that isn't _already_ encouraging its readers to
make decisions based on appearance (in this case, that of a fun and elite
group of people)?

In what possible way is 'send us the coolest "hello world" you've got, and
we'll critique your style' not an invitation to judge by appearance?

~~~
ErrantX
true.

now think: how often do you see a job posting make the first page of HN? (one
might say their prime sort of recruitment site...)

I'm going with calling them savvy :)

~~~
frig
Yeah, and in point of fact now that it seems too late to edit my original post
I am going to clarify here: this ad definitely works.

I wasn't specifically intending to make fun of the guy's appearance; he looks
like a normal 20-something, doesn't look overweight, does look like he shaves
regularly, does look like he gets sunlight, etc; it was just that after I
tracked the guy down I was disappointed that he wasn't actually wearing a
ninja mask in his picture (or whatever).

~~~
stephenlb
<http://saymix.com/ninja.png>

~~~
frig
The kid _is_ full of win. A+++, I bow to you.

------
TrevorJ
I felt a bit like I was reading something translated into english by Google.

Putting on a 'better than thou' attitude can be fun and amusing at times, but
it works better if you command a decent grasp on the English language.

------
diiq
Oh, dear. It's so hard to turn down a challenge, but I don't think I'd really
like to work for ninjas. They sound... oblong?

(defun ensure-list (a) (if (listp a) a (loop for i from 0 to a collect i)))
(defparameter l '(0 7 (0 3) (0 3) 7 0 7 (1 4 7) (1 7) (1 7) 1 0 7 1 1 1 1 0 7
1 1 1 1 0 6 (7 1) (7 1) (7 1) 6 0)) (defparameter g (loop for i from 0 to 9
collecting (loop for i from 1 to (length l) collecting ()))) (setf g (append
(list (mapcar (lambda (sp) 's) (car g))) (cdr g))) (defun s () (setf g (append
(list (loop for i from 1 to (length (car g)) collecting (if (< .1 (random
1.0)) 's ()))) (loop for i from 1 to (1- (length g)) collecting (mapcar
(lambda (a b x) (if (and a (or (not (find (- (length globe) i) (ensure-list
x))) (> .05 (random 1.0)))) 's (and b (not (find (- (length globe) i) (ensure-
list x)))))) (nth (- i 1) g) (nth i g) l))))) (defun d (itm) (cond ((not itm)
(format t ". ")) ((atom itm) (format t "$$")) ((listp itm) (d (car itm)) (d
(cdr itm)) (format t "~&")))) (defun start () (dotimes (x 200) (s)(sleep
1/24)(d g)))

(start)

------
blasdel
Publishing the submissions with commentary is genius: <http://saymix.com/>

~~~
brown9-2
Seems like the key to winning is to have the string "lambda" in your
submission.

~~~
andreyf
Throw in a continuation and they'll have a half-boner the rest of the day.

------
ganjianwei
This ad has succeeded to the extent that it's getting pretty popular on Hacker
News and (hopefully) it's attracting the types of programmers they're out to
hire.

Assuming that they've got their 'ideal hire' right, it's almost a win-win
situation for them: if you hate the ad, you probably don't like their culture;
if you love it, you'll apply and you might just fit right in with these
"ninjas".

It alienates some but at least not the people they're trying to hire. I'm not
saying such a culture's going to be great for them, just that posting such an
ad will get them exactly who they want, and some mad publicity as well.

~~~
dasil003
If they want to hire 18-year-old hackers than it's probably okay, but I'm 30,
love a fun work environment, and I'm pretty turned off by being so flip about
CS. How can you praise a candidate for loving Haskell but be so arrogant to
think CS has no value.

~~~
derefr
I imagine that it has no value _to them_. They're not out to create any new
algorithms/systems/compilers/languages, simply to make proper use of the ones
in existing libraries. To put it in the way they'd likely say it: "Ninja don't
_forge_ katana."

~~~
boblol123
I don't understand, they don't care about cs principals, rather they want a
'ninja' who is able to write obscure code in languages people rarely use and
is hard to understand.

WHY would anyone want this?

------
nathanwdavis
This is the type of work environment that I would like to receive and offer
for and then tell them "Sorry, based upon your application process, your
company appears to be a lame place to work."

The job posting seems like something Dwight from The Office would create.

------
Periodic
I thought the point of ninjas was often to get things done with maximum
efficiency. Thus I believe "echo" is a great solution. Why write what someone
has already written for you?

Do they want people who are going to do things in the most impractical and
convoluted way possible? If so, I wouldn't recommend betting on them releasing
a stable product in the near future.

------
hvs
A little too high of a douchey : cool ratio.

------
lukeofman
When I see companies advertising poor real-world ways of engineering, it just
makes me think of the documents I make on my projects showing code made by
some engineers and how a solution could have been made in half the code (or
less), more clearly, more abstracted, more efficient, and fewer bugs.

Do these people use dumb interview questions like asking people to list c
language trigraphs? Sure, someone that knows it might be a good programmer,
but they might also write obfuscated piles of crap that cause bugs since they
over complicate problems.

------
edw519
Just as companies use your resume to screen you, you can use their ad to
screen them.

I hope that they ran this ad to stand out and be hip.

But just in case the people in this company are like the ad they are running,
run, don't walk, the other way from these elitist snobs desperately in need of
an attitude adjustment.

Here's my submission:

digits = [70,85,67,75,89,79,85];

for(i=0;i++;i<7){print chr(digits(i))};

~~~
khafra
I would hijack the ocaml raytracer at
[http://www.ffconsultancy.com/languages/ray_tracer/comparison...](http://www.ffconsultancy.com/languages/ray_tracer/comparison.html),
make 3-d font primitives, and write it out. But I'm a bit underskilled and
unmotivated to do anything other than propose it as the ultimate over-the-top
answer to the ad.

~~~
evgen
The best snarky answer to this ad I have seen was someone who proposed running
random bitstrings through sha1, looking for a hash that was a repetition of
the ascii chars for hello world. The comment on the entry noted that they
would not consider taking the job until the company could provide the string
which would hash to a successful result.

~~~
ErrantX
I ran a custom search across our hash db just now (several billion hashes)
with no luck. :D

------
swolchok
Was going to send this to them, but they requested serious attempts only, so
here you go HN:

WSA:

    
    
      push 10
      push 97
      push 106
      push 110
      push 105
      push 78
      push 32
      push 111
      push 108
      dup
      push 101
      push 72
      push 11
      label 100
      swap
      outchar
      push 1
      sub
      dup
      jn 200
      jump 100
      label 200
      exit
    

Whitespace is actually a really easy-to-code-for stack machine, you just need
an assembler. Now you too can pretend to be elite.

EDIT: post originally included the compiled Whitespace code, but HN does not
approve of that. Fixed the line break problem, thanks to someone reminding me
it needs a blank line before and after.

~~~
edw519
"It also doesn't approve of line breaks."

Indent each line 2 spaces, format it however you want, and resubmit.

~~~
swolchok
Added the 2-space indent; it did not work.

~~~
edw519
Now sure what happened to you. This is a regular line followed by a blank
line.

    
    
      This line is indented 2 spaces.
      So is this one.
      This is the third indented line.
    

After another blank line, now I'm back to normal.

------
DougWebb
The 'win' that said they'd write a genetic algorithm got me interested, but
I'm not looking for a job, so here's what I came up with:

    
    
      #!/usr/bin/perl
    
      use strict;
      use warnings;
    
      our $POP_SIZE      = 100;
      our @GOAL          = map { ord($_) - 32 } split //, 'hello world';
      our $MUTATION_RATE = 0.05;
      our $GENE_LENGTH   = scalar @GOAL;
    
      use constant GENE  => 0;
      use constant SCORE => 1;
    
      my @population = make_initial_population( $POP_SIZE, $GENE_LENGTH );
      my $generation = 1;
    
      while (1) {
          @population = rank(@population);
    
          print as_string( $population[0][GENE] ) . "\n";
    
          last if $population[0][SCORE] == 0;
    
          @population = mutate( sex(@population) );
    
          $generation++;
      }
    
      exit;
    
      ##################################################
    
      sub as_string {
          return join( '', map { chr( $_ + 32 ) } @{ $_[0] } );
      }
    
      ##################################################
    
      sub rank {
          my @population = @_;
    
          for ( my $i = 0 ; $i < @population ; $i++ ) {
              $population[$i][SCORE] = score( $population[$i][GENE] );
          }
    
          @population =
            sort { $a->[SCORE] <=> $b->[SCORE] || $a->[GENE] cmp $b->[GENE] }
            @population;
    
          return @population;
      }
    
      ##################################################
    
      sub score {
          my ($gene) = @_;
    
          my $value    = 0;
          my $num_diff = 0;
    
          for ( my $i = 0 ; $i < @$gene ; $i++ ) {
              my $diff = abs( $gene->[$i] - $GOAL[$i] );
              $value += $diff;
              $num_diff++ if $diff > 0;
          }
    
          return $value * $num_diff;
      }
    
      ##################################################
    
      sub sex {
          my @population = @_;
    
          my $end = $#population / 2;
    
          for ( my $i = 0 ; $i < $end ; $i++ ) {
              my @mother = @{ $population[$i][GENE] };
              my @father = @{ $population[ $i + 1 ][GENE] };
    
              my ( $sp1, $sp2 );
              while (1) {
                  $sp1 = int( rand($GENE_LENGTH) );
                  $sp2 = int( rand($GENE_LENGTH) );
                  last
                    if $sp1 < $sp2
                        && $sp1 > 0
                        && $sp2 < $GENE_LENGTH - 1;
              }
    
              $population[ $end + $i ][GENE] = [
                  @mother[ 0 .. $sp1 - 1 ],
                  @father[ $sp1 .. $sp2 - 1 ],
                  @mother[ $sp2 .. $GENE_LENGTH - 1 ]
              ];
              $population[ $end + $i + 1 ][GENE] = [
                  @father[ 0 .. $sp1 - 1 ],
                  @mother[ $sp1 .. $sp2 - 1 ],
                  @father[ $sp2 .. $GENE_LENGTH - 1 ]
              ];
          }
    
          return @population;
      }
    
      ##################################################
    
      sub mutate {
          my @population = @_;
    
          for ( my $i = 0 ; $i < $#population ; $i++ ) {
              if ( rand() > $MUTATION_RATE ) {
                  my $gene           = $population[$i][GENE];
                  my $chromosone_num = rand($GENE_LENGTH);
                  my $chromosone     = $gene->[$chromosone_num];
                  $chromosone += int( rand(5) + 0.5 ) - 2;    # -2, -1, 0, 1, 2
                  $chromosone %= ( 128 - 32 );
    
                  $population[$i][GENE][$chromosone_num] = $chromosone;
              }
          }
    
          return @population;
      }
    
      ##################################################
    
      sub make_initial_population {
          my ( $pop_size, $gene_length ) = @_;
    
          my @population;
    
          foreach ( 1 .. $pop_size ) {
              my @gene = map { int( rand( 128 - 32 ) ) } ( 1 .. $gene_length );
              push @population, [ \@gene, 0 ];
          }
      
          return @population;
      }
    
      ##################################################

------
sethg
"Well, the pay sucks, but I like the company uniform..."

------
StrawberryFrog
Thanks but no thanks, I can only work for people who speak English* .

Like in the 20th century, when I was born. Call me old-fashioned, but...

* not prejudiced, just not fluent in other languages.

------
stcredzero
This is not necessarily the kind of awesome that makes for success. But it
seems to have been working for them for 5 years, so best of luck.

------
eli
It's just a cheesy job ad. Am I missing something?

~~~
Batsu
Don't think so, but judging by the amount replies on this topic I think they
may have achieved the goal of exposure at no cost all the same.

------
San
Here's an anagram-sorter. (I'm no Python ninja, but I quite liked my idea.)

    
    
      def sort(s):
        listt = list(s)
        listt.sort(cmp=lambda a,b: cmp( ord(b)%len(s) , ord(a)%len(s) ))
        print ''.join(listt),
    
      sort('Oh,well')
      sort('lord')
    

And this is the rather succinct Ruby version:

    
    
      def sort s
        print s.split(//).sort_by.with_index{|a,i|[-(a.ord%s.length),i]}.join
      end
    
      sort 'Oh,well'
      sort 'lord'

------
frig
Additionally: in the spirit of good natured fun, here's my (clearly non-
serious) entry:

'' def findPossibleSolutions(querytext): for result in
GoogleCodeSearch(query=querytext): yield result

def tryOutPossibleSolution(candidate): output = None with
SafeSandboxedEvaluatorFactoryFactory(candidate.language).safeSandboxedEvaluator()
as evaluator: output = evaluator.evaluate(candidate.code) return output

def validatePossibleSolution(candidate, validator): return
validator(tryOutPossibleSolution(candidate))

def giveMeValidSolutionSourceCodes(querytext,validator): for validSolution in
(candidate for candidate in findPossibleSolutions(querytext) if
validatePossibleSolution(candidate,validator)): yield
{'source'=validSolution.code,'extension'=validSolution.languageExtension}

if __name__ == "__main__": helloWorlds = giveMeValidSolutionSourceCodes("hello
world", lambda x: x == "hello world") firstValidSource = helloWorlds() if
firstValidSource: print "helloworld.%s:\n\n%s" %
(firstValidSource["extension"],firstValidSource["source"]) else: print
"helloworld.py:\n\nprint \"hello world\"" # default case ''

Edit: if there's a way to reproduce source code please inform.

~~~
DougBTX
Indent by 2+ spaces, like so:

    
    
      pre

~~~
frig
Thanks.

------
jongraehl
Admit it: if you needed the job, you'd be strutting your best "leet ninja
hacker" moves.

~~~
omouse
Hell yes.

------
Semiapies
"Oblong" can both describe programming skill and be a sentence by itself?

~~~
gaius
Oblong.

------
aarongough
I actually find the whole idea quite amusing! Granted it's probably not a
great way to get employees who are good at _working_ as opposed to hacking
about, but I still like it...

I put my money where my mouth is and sent this in (wait about 6 seconds after
page-load for the animation to start):
<http://aarongough.com/hello_world.html>

~~~
aarongough
Stephen was kind enough to tell me that my entry was 'fail' because it 'Killed
woodland animals'... When I asked him which ones he replied:

    
    
      All of them,
      Best,
        Stephen
    

Wow! Constructive! I was hoping that the ad was written with humor, but
apparently not!

Good luck with that elitism!

------
kwamenum86
My submission: <http://mandelaonline.info/helloworld.html>

~~~
bmelton
I was silly, and ran it in chrome.

------
dryicerx
Sure, I'll bite at this, my submission

    
    
        include<stdio.h>
           int main() {
               for(unsigned long n = 154566997192872; n; n=n>>5) {
                   printf("%c",'`'+(n&31));
               }
           }

------
j_baker
Is it just me, or does anyone else think that hiring someone who can't write a
hello world app without using one of their "fail" methods is a really stupid
idea?

------
jeckel
I guess they want to hire a programmer who would refuse to find the simplest
solution to the problem but rather obfuscate it, making maintainability a
nightmare.

------
sil3ntmac

      $ cat /usr/share/dict/words | egrep -o "(^world$)|(^hello$)"

------
anigbrowl
T-t-t-timecube!

------
okeumeni
First read: WTF!

Second look: Awesomely original

