-1

I'm not sure if this is the right forum, but I just noticed that Stack Overflow Jobs advertise in a way indicating that searching for a job there won't return anything?

Stack Overflow Jobs ad

Also, the comment at the end breaks the code, but who's that picky about an ad...

8
  • 8
    Clearly you're bored, so by the ad's logic, shouldn't you be searching for a new job? :)
    – balpha StaffMod
    Commented Sep 23, 2016 at 8:45
  • 1
    Ouch, downvoted. I guess someDevs.lackHumor().
    – Ted Nyberg
    Commented Sep 23, 2016 at 8:46
  • You want to cause some devs to lack humour? You monster! (Unless lackHumor() is a getter, in which case I shall berate you for your naming conventions
    – Pekka
    Commented Sep 23, 2016 at 8:53
  • 2
    any(dev.lacks_humor for dev in all_devs) 🐍
    – jonrsharpe
    Commented Sep 23, 2016 at 8:55
  • 1
    @Pekka I just tried to adhere to the design principles put forth in the ad. :)
    – Ted Nyberg
    Commented Sep 23, 2016 at 9:05
  • @Ted BURN -------
    – Pekka
    Commented Sep 23, 2016 at 9:05
  • Does this make you nervous?
    – user1228
    Commented Sep 23, 2016 at 16:41
  • Answer to this question is simple, no one knows what is the actual code used in the ad so if it is anything like ruby, omitting the "return" is actually preferred. However, it could also be that searchJobs starts an infinite loop as we should always check what else is there available.. ;> Commented Sep 27, 2016 at 17:15

2 Answers 2

22

Stevie and I worked on the copy for that ad. I'm ashamed to say that I failed to adhere to the Command-Query Separation principle: searchJobs both performs the search and displays the jobs on the screen.

To prevent issues like this from occurring in the future, we're going to introduce a comprehensive review system for fictitious pseudocode. Next time you see code in an ad, it will have been through a six-month process of planning and architecture, approved by senior management, and consecrated to Saint Dijkstra.

3
  • Thank you for the exhaustive and informative answer, I shall accept it immediately! The proposed process going forward sounds excellent. :)
    – Ted Nyberg
    Commented Sep 23, 2016 at 10:26
  • 3
    Six months is ridiculous, that could easily be achieved in only 6 to 8 weeks.
    – McNab
    Commented Sep 23, 2016 at 10:56
  • Will each ad have a test suite of its own?
    – Pekka
    Commented Sep 23, 2016 at 11:42
3

You are correct in your assertion that "Stack Overflow Jobs" doesn't return anything. Nothing physical, at least.

Naturally, searchJobs calls renderJobs, which displays the search results found in searchJobs.

2
  • 7
    And in case someone comes complaining that this is impure code -- that's okay. Job search shouldn't be free of side effects. Switching jobs is a change of global state.
    – balpha StaffMod
    Commented Sep 23, 2016 at 8:56
  • While I think searchJobs is a misleading name if it in fact results in rendering, it would explain why there's no need for a return value while still helping devs find new jobs. Thanks! :)
    – Ted Nyberg
    Commented Sep 23, 2016 at 9:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .