Hacker News new | past | comments | ask | show | jobs | submit login
To all who Think Themselves a Programmer (craigslist.org)
73 points by fogus on July 7, 2009 | hide | past | favorite | 71 comments



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))};


I would hijack the ocaml raytracer at http://www.ffconsultancy.com/languages/ray_tracer/comparison..., 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.


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.


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


At first I thought they were trying to be ironic. But they keep it at such a level that I think they're being serious. In which case, I'd definitely run.


  print 'hell'
  sleep 1500ms
  print 'o'
  for i=0->2
    sleep 500ms  
    cursorleft = cursorleft-1
    print o
  sleep 700ms
  print ' world'


Just Google for japh. There are lots of examples, easy to convert.

I'm a Perl lover which argue that with Moose and CPAN, modern Perl is incredibly good for development in many cases.

But I must say that I never understood the idea of obfuscation in Perl. If you throw out coding standards, it is like tennis without a net. :-)

Edit: If I'd done it from scratch, I'd probably have gone with the curses lib, since it was such a long time since I last used it. (The japh stuff represents at least months of creativity by people that are both smarter and crazier than I am. Don't reinvent the wheel.)


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


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


Why doesn't anyone ever want to hire a coding pirate?


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...


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


"rock star" annoys the hell out of me


Does this guy look like a ninja to you: http://www.gravatar.com/avatar/3b4ddb8b9c296ecf6a7cc338da508...

?

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

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


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?


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?


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 :)


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).



The kid is full of win. A+++, I bow to you.


Frig, how did you figure that out?


I count 4 ninjas in that photograph.


You missed a few, try going frame-by-frame. Remember there's 5+ ninjas there.


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.


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)


Publishing the submissions with commentary is genius: http://saymix.com/


I thought a lot of the submissions were a little ordinary, but the checksum one made me smile.


Seems like the key to winning is to have the string "lambda" in your submission.


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


Agree, I'm still trying to figure out Win 5.


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.


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.


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."


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?


I realize that there are a lot of crappy degree programs out there, but this just plain wrong-headed. CS theory is applicable to anyone writing any kind of software more complex than simple one-off scripts. In fact I would argue that most of a proper CS program is more applicable to more practical problems than 90% of what you do in real world jobs. That's not to say you need CS to be a good programmer or anything silly like that, but the scope of things you learn in a CS degree is pretty much impossible to attain in the workplace without working on an amazing array of different projects.


It's not that CS has no value. It's that formal education in CS may not be what it's cracked up to be.


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.


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.


A little too high of a douchey : cool ratio.


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.


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.


I find the whole idea quite amusing... Reminds me a little of the demo scene back in the day. I put this together with that in mind, simple but I wanted to keep the code neat (JavaScript):

EDIT: Realized I should add an online preview, the animation starts 6 seconds after the page loads... http://aarongough.com/hello_world.html

  function floatPixel ( pixelFilled, pixelSize )
    {      
    this.render = function ()
      {
      if( thisObj.pixelFilled ) thisObj.pixel.style.background = "black";
      if( !thisObj.pixelFilled ) thisObj.pixel.style.background = "white";
      }
      
    this.animate = function()
      {
      thisObj.pixelFilled = true;
      thisObj.render();
      }
    
    var thisObj = this;
    this.pixelFilled = pixelFilled;
    this.pixelSize = pixelSize;
    this.pixel = document.createElement("div");
    this.pixel.style.height = this.pixelSize + "px";
    this.pixel.style.width = this.pixelSize + "px";
    this.pixel.style.cssFloat = "left";
    
    this.render();
    
    this.timer = setTimeout( this.animate, Math.floor( Math.random() * 15000 + 6000 ));
      
    document.getElementById("pixel_container").appendChild( this.pixel );
    }
    
  document.body.style.background = "black";
  document.body.style.textAlign = "center";   
    
  var pixelContainer = document.createElement("div");
  pixelContainer.id = "pixel_container";
  pixelContainer.style.height = "50px";
  pixelContainer.style.width = "900px";
  pixelContainer.style.margin = "200px auto";
  pixelContainer.style.position = "relative";
  document.body.appendChild( pixelContainer );
  
  var pixelData = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100011111000100000001000000011111000000100010001111100011110000100000001110000010000000000000000100010001000000010000000100000001000100000010001000100010001000100010000000100100001000000000000000011111000111110001000000010000000100010000001000100010001000111100001000000010001000100000000000000001000100010000000100000001000000010001000000101010001000100010001000100000001001000000000000000000000100010001111100011111000111110001111100000011011000111110001000100011111000111000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
  
  for( x = 0; x < pixelData.length; x++ )
    {
    new floatPixel( parseInt(pixelData.slice(x, x + 1)), 9 );
    }


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

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


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


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.


Here's mine:

  Hello World
It's valid PHP, and it prints "Hello World".


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


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.


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.


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


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.


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'


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


Hell yes.


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.


Missed the edit interval, so:

  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 ''


Indent by 2+ spaces, like so:

  pre


Thanks.


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


Oblong.


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


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!



I was silly, and ran it in chrome.


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));
           }
       }


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?


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.


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


T-t-t-timecube!


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;
  }

  ##################################################


First read: WTF!

Second look: Awesomely original




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: