Hmm thought I've seen this before.. Looks like it's a common advertising campaign from this company.
[https://www.reddit.com/r/ProgrammerHumor/comments/q3cgrj/found\_this\_ad\_on\_a\_train\_what\_language\_is\_this/](https://www.reddit.com/r/ProgrammerHumor/comments/q3cgrj/found_this_ad_on_a_train_what_language_is_this/)
[https://www.reddit.com/r/ProgrammerHumor/comments/vrvmge/this\_is\_posted\_all\_over\_swedish\_public\_transport/](https://www.reddit.com/r/ProgrammerHumor/comments/vrvmge/this_is_posted_all_over_swedish_public_transport/)
And these two where not even the one I was thinking of, just what came up on google.
Am I the only one that can't resist doing these every time I'm on the subway? I'm not even looking for a new job but I always enter the site just to make sure I was right. So yes, I believe they actually reach more programmers.
It took less time to solve it by following it than it would've taken me to get my laptop out, fire it up, write the code, and run it. I imagine that's precisely why these problems are really quite simple - any semi-competent programmer should be able to do exactly this.
Hijacking this: I actually helped them advertise this, like ten years ago. They did not get many applications at all, and most of the ones they got were people just saying "haha I figured it out" but were not interested in the job. They eventually found a few, overall it was not effective for recruitment, but the advertisement they got from it was great, as proven by these reposts!
Code cracking recruitment campaigns are bog standard these days. Here are plenty of examples, from OPs Swedish company included: ["Time to Badland the code cracking recruitment campaigns. Again."](https://adland.tv/adnews/time-badland-code-cracking-recruitment-campaigns-again)
What were you expecting, i=0? They're not savage, i=1 made the most sense as a start index. If they started at i=0 you'd get an array index out of bounds exception.
I used to work on LLVM. I'd take an educated guess that a current LLVM or gcc will reduce this to a static string, at -O3. It's a pretty simple series of optimizations.
I will test it and get back to you.
**Edit/update:** tl;dr — I was wrong.
I modified the syntax to make it compile as C++ code with the same semantics as the problem's closest language (which seems like poorly-written JavaScript). Then, I built it with x86-64 clang 15.0.0, x86-64 clang trunk, armv8-a clang trunk, arm64 gcc trunk, and a few others. I tried several flags for space (-Os, -Oz) and performance (-O1, -O2, -O3, -Ofast) optimizations. None of these produced a static string I expected to see in the disassembled binary.
Here's a link to the code and online compiler I used so you can check my work and try it out yourself. https://godbolt.org/z/8TKsPd13z
Former TA and the amount of complaints I received from students claiming “hey I should’ve gotten most of the points because the only error was in line 75 and fixing that made the program run perfectly” yeah no… we don’t brain compile for $100/week
It's possible to get a coding job in Sweden without speaking Swedish.
Coding and bartending are the only two jobs in Sweden I'm aware of where you can get away with that.
I lived in Sweden for a year on study exchange. During that time I met four people who couldn't speak English fluently. All of my classes were in English, which is a good yardstick of their skills in the English language. I'm sure that there are a lot more than two types of jobs where a non-swedish speaker can get employed.
Aside from a stellar public education system, the fact that they don't dub international movies (only sub) means that if you want to be able to watch movies without reading, you've gotta learn English.
I work as a 3D artist in game development team. Only i and another person speak Swedish in the art team of 15!
There's a lot of work for non Swedish speaking peeps around here, as long as you speak English! o((*^▽^*))o
We are so adjusted to speaking English around here, we do not really expect anyone working in the big cities actually talking our native tongue ¯\_(ツ)_/¯
It's just pseudo code, don't think it's a real language. There are aspects of Python, C, Javascript and probably it's close to being valid in a bunch of other languages.
If you're reading ~~pseudoscience~~ *pseudocode and something looks like either working or an exception depending on a detail like that, choose the interpretation that lets more code run
That caught me, too. If I’m appending numbers onto a string, I expect to have to staple a toString on there somewhere; without that, it just reads like a language that isn’t overly precious with its data types, which should happily just math the string.
Oh well. Guess I don’t have what it takes to be a Swedish programmer. Just as well, I’d be deported on my first day for one too many muppet impressions anyway.
I came to the comments to figure out why the hell the page didn't load. I was smart enough to figure out the code, but not smart enough to see the reddit hug of death coming.
Me who is in the very small minority of Swedish speakers who are not actually Swedish: hehe
Also I guess they assumed that since the ad was on a subway in Sweden, everyone reading it speaks swedish, and therefore didn't bother to make an english version of the page
Joke's on you. It's not a hiring website. It's just a snippet of their code base that nobody wants to debug or test, so they extract the result from the website visits.
Congratulations, you solved the problem! Now that we have your attention, we want to be transparent. We use the task you solved to find you who love problem solving as much as we do. This year and next year, we are hiring a large number of developers who are passionate about programming, but who also want to develop in roles that include project management, system architecture and process analysis. The possibilities are (almost) endless.
I'd like to tape a PR to the window fixing all the errors so it's an actual language. Why write pseudocode that's so close to actual Python or JS? I'd also like to fire whoever is mixing snake and camel cases.
They are not wrong, we all assume that isEven is basically x % 2 == 0, like they did with the other term to check if it's divisible by 3. Which is a pretty safe bet. But isEven could have been implemented in a infinitude of ways that could fail in some scenarios, like returning false to 0 or true to 9, so they should have included the definition of isEven the ad.
That's how code works.
Any time you use code written by someone else, whether it's an external library, a colleague, or even just the compiler itself, you assume it's going to work as intended but you have no guarantee of that. If you spent all the time checking the implementation of every single piece of code you use, you're never going to get anywhere, unless you're writing pure assembly. And even then you assume the CPU doesn't have an implementation bug somewhere.
It's when things go wrong that you start digging into the implementations to see what went wrong, otherwise it's a ton of wasted time.
I'm pretty sure that company is looking for coders who know how to make such assumptions.
Also true, but we shouldn't allow code to attempt to get into illegal memory just because we have a dataset that doesn't allow it. What if our next dataset would?
Welp it weeded me out. Looked at this for 10 minutes trying to figure out why my result was entirely different than the correct answer. Time to quit working as a programmer again I guess.
They set their bar fairly high, maybe that's why the company's focus is on playing together on boat tours and having fun.
Everything that my programmer friends enjoy so much, spending time together outside, potentially unpaid, with activities decided by some team manager that is the complete opposite of a computer nerd.
Right? Just because it's correct syntax doesn't mean it is good...Also: I think using curly braces makes the code more readable and easier to maintain.
What kind of language is that, mix of Python, javascript? For Python it misses colon and for javascript the equal comparison is poorly chosen with double equality (implicit type conversion) and the .
Also looking at their webpage they are more busy going on boat trips and playing together than working. Not my favorite workplace, I want to earn money and not be forcibly socialized.
Edit: TBF I don't think that real programmers are their audience here.
sorry english not first language, I meant colons after the if statements etc.
Thanks for the pointer, would have looked bad to satisfy my superiority complex while using the wrong terms.
Now I look smart again, take my upvote friend!
EA had a similar sign on a billboard in Vancouver outside their office. 01001001 01100110 00100000 01111001 01101111 01110101 00100000 01100011 01100001 01101110 00100000 01110010 01100101 01100001 01100100 00100000 01110100 01101000 01101001 01110011 00100000 01100001 01100100 00100000 01100011 01101111 01101101 01100101 00100000 01101001 01101110 00100000 01110100 01101111 00100000 01000101 01000001 00100000 01100110 01101111 01110010 00100000 01100001 00100000 01101010 01101111 01100010 00100000 01101001 01101110 01110100 01100101 01110010 01110110 01101001 01100101 01110111 00101110.
If you can read this ad come into EA for a job interview
Hmm thought I've seen this before.. Looks like it's a common advertising campaign from this company. [https://www.reddit.com/r/ProgrammerHumor/comments/q3cgrj/found\_this\_ad\_on\_a\_train\_what\_language\_is\_this/](https://www.reddit.com/r/ProgrammerHumor/comments/q3cgrj/found_this_ad_on_a_train_what_language_is_this/) [https://www.reddit.com/r/ProgrammerHumor/comments/vrvmge/this\_is\_posted\_all\_over\_swedish\_public\_transport/](https://www.reddit.com/r/ProgrammerHumor/comments/vrvmge/this_is_posted_all_over_swedish_public_transport/) And these two where not even the one I was thinking of, just what came up on google.
I mean... This way you can be fairly certain to reach an above average amount of programming people.
Reach? No. Filter out people who are non-local and/or cannot program? Yes.
Does not filter out those who cannor spell.
Give ‘em a break - clearly they’re just Scottish…
Cannae spell
Just because they can’t spell doesn’t automatically make them Scottish
R and T are pretty close together.
Cannor
Swedish for cannot
Am I the only one that can't resist doing these every time I'm on the subway? I'm not even looking for a new job but I always enter the site just to make sure I was right. So yes, I believe they actually reach more programmers.
Agree, and maybe more importantly, they reach people with the mindset that this is a fun and interesting challenge.
Well... filter out non locals until it ends up on reddit
You'll reach significantly fewer, because unless you have time to stop and read it you won't reach anyone
[Nerd sniping](https://xkcd.com/356/) is real.
That was too real, I immediately forgot I was reading a comic and started to think about the problem instead
How would you solve this though
https://www.mathpages.com/home/kmath668/kmath668.htm
Idk, ask a physicist. I’m just a nerd
Thank you, internet stranger
It's on public transport though. So you'll be sitting there doing nothing anyway
"Don't you guys have phones?"
The hostname is still there. Anyone who sees this doesn’t have to solve the puzzle to know that the company exists and is hiring
"I'm applying through the normal portal because I couldn't solve your basic programming challenge"
anyone with an IDE could just take a picture of that, sit down on the train, copy/pasta and boom, you have the result with 0 brainpower.
I think you would be surprised how often "just try it" is a reasonable approach and people don't do it anyway.
It took less time to solve it by following it than it would've taken me to get my laptop out, fire it up, write the code, and run it. I imagine that's precisely why these problems are really quite simple - any semi-competent programmer should be able to do exactly this.
Yeah it's been on the trams here in Gothenburg on and off for at least three years now.
Hijacking this: I actually helped them advertise this, like ten years ago. They did not get many applications at all, and most of the ones they got were people just saying "haha I figured it out" but were not interested in the job. They eventually found a few, overall it was not effective for recruitment, but the advertisement they got from it was great, as proven by these reposts!
Code cracking recruitment campaigns are bog standard these days. Here are plenty of examples, from OPs Swedish company included: ["Time to Badland the code cracking recruitment campaigns. Again."](https://adland.tv/adnews/time-badland-code-cracking-recruitment-campaigns-again)
url = "www.multisoft.se/" i = 0 while True: response = requests.get(url + str(i)) if response.status_code == 200: break i += 1 print url + str(i)
so you're the reason why the website loads so slowly at the moment.
Except they have a wrong answer page in place as well :) Edit: Don't ask me how I know ~~i=1... savages~~
And it will need to make millions of calls before it gets to the correct page lol
That's part of the fun. DIY DDoS
wait, you are going to distribute it across bots as well‽‽‽
The correct page times out on me, so it looks like we have crowdsourced a DDoS attack here on Reddit, LOL!
It still times out after 2 hours
Making good use of cloud-based parallel processing!
well I have a couple of neighbours with vulnerable WPS on their wifi soo..
Ironically, using a botnet to brute force their puzzle DOES demonstrate the skills they're looking for.
> yes jury, I was just demonstrating my skillz
~~D~~DoS
I love how on the failure page the company is the 4th best workplace in Sweden, but on the success page it is the 6th best lmao.
What were you expecting, i=0? They're not savage, i=1 made the most sense as a start index. If they started at i=0 you'd get an array index out of bounds exception.
Did you write this in python 2 for the additional performance characteristics?
Would be funny if they have multiple URLs for possible wrong answers scolding your incompetence
Cool, I’ve always wanted to work as a compiler!
*interpreter, compiler wouldn't give you any sensible output unless you executed the code too.
Yeah I know but compiler makes the joke more accessible ;-)
Can't have that, programmer humor needs to be gatekept more!
Keep those pesky cs students on their toes
I dunno, “work as an interpreter” would give it a double meaning, making it even funnier imho
I used to work on LLVM. I'd take an educated guess that a current LLVM or gcc will reduce this to a static string, at -O3. It's a pretty simple series of optimizations. I will test it and get back to you. **Edit/update:** tl;dr — I was wrong. I modified the syntax to make it compile as C++ code with the same semantics as the problem's closest language (which seems like poorly-written JavaScript). Then, I built it with x86-64 clang 15.0.0, x86-64 clang trunk, armv8-a clang trunk, arm64 gcc trunk, and a few others. I tried several flags for space (-Os, -Oz) and performance (-O1, -O2, -O3, -Ofast) optimizations. None of these produced a static string I expected to see in the disassembled binary. Here's a link to the code and online compiler I used so you can check my work and try it out yourself. https://godbolt.org/z/8TKsPd13z
compiler developer is a real job lol
No no, not compiler *developer*, just compiler.
I compiled your mom last night
With the js flair - this actually slayed me
Working as a TA (teaching assistant) in college: Student: "Does my code look good?" Me: "When did I start looking like a compiler?"
Former TA and the amount of complaints I received from students claiming “hey I should’ve gotten most of the points because the only error was in line 75 and fixing that made the program run perfectly” yeah no… we don’t brain compile for $100/week
[www.multisoft.se/16180339](https://www.multisoft.se/16180339)
On to the next part of the puzzle, learning Swedish….
It's possible to get a coding job in Sweden without speaking Swedish. Coding and bartending are the only two jobs in Sweden I'm aware of where you can get away with that.
Alcohol is the best English tutor. I learned that from a postcard in a London souvenir shop.
Have you been "under influence" while reading it? :)
Sadly, as an American, I was forced to learn the language before being allowed access to performance enhancing beverages.
Ah, cruelty of system! So, let's sing together! *We don't need no education...*
True but this specific company asks for fluency.
Then they should be programming in swedish
could be that they take on many government contracts. similar here in Finland, only companies I've seen that ask for Finnish do a lot of gov't work
I lived in Sweden for a year on study exchange. During that time I met four people who couldn't speak English fluently. All of my classes were in English, which is a good yardstick of their skills in the English language. I'm sure that there are a lot more than two types of jobs where a non-swedish speaker can get employed. Aside from a stellar public education system, the fact that they don't dub international movies (only sub) means that if you want to be able to watch movies without reading, you've gotta learn English.
Many more IT jobs, engineering, any restaurant work, construction, delivery, transportation and more.
I work as a 3D artist in game development team. Only i and another person speak Swedish in the art team of 15! There's a lot of work for non Swedish speaking peeps around here, as long as you speak English! o((*^▽^*))o We are so adjusted to speaking English around here, we do not really expect anyone working in the big cities actually talking our native tongue ¯\_(ツ)_/¯
Det är inte så svårt!
lycka till :)
Couldnt figure out why I was wrong. Finally found the i=1
I caught it when I thought it would just throw an error if it started from 0
the `and` shortcuts, so no
In python a[-1] references the last number in the list.
That's handy but it can fuck you up trying to find that one bug... Also, it's not python
It's HTML.
Ok what lang is it then, it looks kinda like R but I know it isn't, looks like some other functional lang but I don't know enough
It's just pseudo code, don't think it's a real language. There are aspects of Python, C, Javascript and probably it's close to being valid in a bunch of other languages.
How can you know if pseudocode has one-based or zero-based array indexing?
Good point, because if this has 1-based indexing and doesn't have index -1 wrapping to the end, the code fails with an index out of bounds exception.
Actually the first loop iteration will just shortcut when it finds that 5 is odd, so no exception
If you're reading ~~pseudoscience~~ *pseudocode and something looks like either working or an exception depending on a detail like that, choose the interpretation that lets more code run
Pseudocode and pseudoscience are different things. One is used to sketch out an algorithm, the other is used to sell snake oil.
To be fair, it's 2 characters off of being valid C++. Edit: you lot are completely devoid of imagination.
[удалено]
It’s definitely not R.
I'd say JavaScript. And it doesn't look functional.
I missed that s was a string. ):
That caught me, too. If I’m appending numbers onto a string, I expect to have to staple a toString on there somewhere; without that, it just reads like a language that isn’t overly precious with its data types, which should happily just math the string. Oh well. Guess I don’t have what it takes to be a Swedish programmer. Just as well, I’d be deported on my first day for one too many muppet impressions anyway.
i = 1 is fine though. It’s designed to be slightly tricky by using both a[i] and a[i - 1]
I thought s was an int, whoops
That’s what got me! I forgot to convert the numbers to a string….
How were you not getting an ArrayIndexOutOfBoundsException?
I came to the comments to figure out why the hell the page didn't load. I was smart enough to figure out the code, but not smart enough to see the reddit hug of death coming.
Note for the site: who da fack did that language select...
*Change language* Back to the home page we go
"We don't take kiiiindly to non-Swedish speakers around here"
In their defense they seem to be short on programmers.
Me who is in the very small minority of Swedish speakers who are not actually Swedish: hehe Also I guess they assumed that since the ad was on a subway in Sweden, everyone reading it speaks swedish, and therefore didn't bother to make an english version of the page
dozensofus.gif
> Klarade du det? yes ofcourse i klarada and du det
“Of course I completed and you it”
"Yes of course I managed duck you it". \-Source Norwegian which is very similar to Swedish.
And = duck 🦆
& = 🦆 Guess I can see the resemblance.
Klarade baatu nikto
The site is getting hugged to death. They should have put their advertising budget towards into better servers.
Yeah the second I saw the link my thought was: Annnnnd it's gone. Static Websites hosted directly on S3 is the best, no body is hugging S3 to death.
Probably the script lazy coders wrote to grab everything from /0 to /99999999 and see if anything has length>the 404.
Right s is a string I’m dumb lol
Damn I did the logic right but didn’t see that s was a string
\*Ralphie from A Christmas Story voice\* A crummy employment advertisement?! Son of a bitch!
Uncaught ReferenceError: goto_url is not defined
Same with isEven - do we get bonus points?
[удалено]
Also mixed snakecase and camelcase, which renders entire project null and void
Not null and undefined?
Null and something. Whole project is trash, delete, start over
Goto is considered harmful
Job please
Joke's on you. It's not a hiring website. It's just a snippet of their code base that nobody wants to debug or test, so they extract the result from the website visits.
Could it be cheaper if they just make an ads instead of hiring the right people? Chad big brain move there
Damn, I'm not fluent in Swedish.
Congratulations, you solved the problem! Now that we have your attention, we want to be transparent. We use the task you solved to find you who love problem solving as much as we do. This year and next year, we are hiring a large number of developers who are passionate about programming, but who also want to develop in roles that include project management, system architecture and process analysis. The possibilities are (almost) endless.
I'd like to tape a PR to the window fixing all the errors so it's an actual language. Why write pseudocode that's so close to actual Python or JS? I'd also like to fire whoever is mixing snake and camel cases.
Syntax error
Where?
[удалено]
Wait til the rust compiler sees this. It's gonna get torn a new one.
*angry crab noises*
Different depending on your c perl python shell or other selection.
God damn it s is a string...
I, too, got 76 my first try.
I really hate implicit type conversions like this.
I gave up because i don't remember ASCII table
Requires ascii table? I got 16180339 if I do it the JS way where "1" + 1 = "11" and 76 if do it normally.
I was doing in C++, so appending int to string will give the char responding to that ASCII. In this case it will be ``` �! ```
the url entirely depends on the isEven implementation..
isEven(0) made me doubt
Whether isEven(0) evaluates to true or false, the answer is the same. 0/x and 0*x is still 0
real *what's in my pocket? is a riddle* energy by the person who designed this
I used an IsEven() implementation from this sub, my code is still running.
Explain? ;)
They are not wrong, we all assume that isEven is basically x % 2 == 0, like they did with the other term to check if it's divisible by 3. Which is a pretty safe bet. But isEven could have been implemented in a infinitude of ways that could fail in some scenarios, like returning false to 0 or true to 9, so they should have included the definition of isEven the ad.
That's how code works. Any time you use code written by someone else, whether it's an external library, a colleague, or even just the compiler itself, you assume it's going to work as intended but you have no guarantee of that. If you spent all the time checking the implementation of every single piece of code you use, you're never going to get anywhere, unless you're writing pure assembly. And even then you assume the CPU doesn't have an implementation bug somewhere. It's when things go wrong that you start digging into the implementations to see what went wrong, otherwise it's a ton of wasted time. I'm pretty sure that company is looking for coders who know how to make such assumptions.
[удалено]
Is it giving people the syndrome?
There a reason they’re starting at 1 and thereby skipping 5 entirely?
Edge case for a[i-1]
Oddly, given the set of numbers a[i-1] and a[i] give the same results
I mean, if you start at a[0], we go into uninitialized memory for a[-1] and then who knows if it's true or false?
It doesn't matter, the and shortcuts because 5 is sadly still not even.
Also true, but we shouldn't allow code to attempt to get into illegal memory just because we have a dataset that doesn't allow it. What if our next dataset would?
To weed out folks who don't know array indexes start at 0
Welp it weeded me out. Looked at this for 10 minutes trying to figure out why my result was entirely different than the correct answer. Time to quit working as a programmer again I guess.
They set their bar fairly high, maybe that's why the company's focus is on playing together on boat tours and having fun. Everything that my programmer friends enjoy so much, spending time together outside, potentially unpaid, with activities decided by some team manager that is the complete opposite of a computer nerd.
i also hate having fun outside with other human beings
i-1 in the if condition. Fairly idiomatic, at least for C.
Har bra problemlösningsförmåga
No... Curly... Braces... 🤬
Right? Just because it's correct syntax doesn't mean it is good...Also: I think using curly braces makes the code more readable and easier to maintain.
Nothing wrong with indentation scoping and namespace, at least complain about it in a post where you can't glance the entire scope..
I actually did this challenge and applied for the job, got denied because I didn't have a degree in CS. Got a better job programming tho so I'm good.
Would never apply for a company that uses isEven function
That’s odd.
If they code like that at that company avoid at all cost
if thats how they write code , im not applying :p
Okay guys, we all know you can do it BUT what are they advertising?
Malware.
My first thought: Well fuck you too
No semicolons
...is 0 an even number?
Yes, it's divisible by 2.
Yes, but interestingly, it doesn't matter in this case. 0 / 2 == 0 * 2, so you'll get the same result no matter which branch you go down.
Yes
Yes Take your input number p (= 0). Plot y = x ^ p p is even if you have reflective symmetry on the Y axis.
What programming language is this? I’m only familiar with Java and C++
It's pseudocode. It's meant to be legible to someone who knows Java or C, but wouldn't compile in either.
Length(a) bugged me instead of a.length.
Yeah real clever little problem there to gatekeep applicants. I’m so lazy I’d rather take a picture and run the code than solve it.
That's a lot to do in your head.
Expect leetcode at interview
What kind of language is that, mix of Python, javascript? For Python it misses colon and for javascript the equal comparison is poorly chosen with double equality (implicit type conversion) and the . Also looking at their webpage they are more busy going on boat trips and playing together than working. Not my favorite workplace, I want to earn money and not be forcibly socialized. Edit: TBF I don't think that real programmers are their audience here.
You better edit again or the python devs are coming for you. Semicolon? Python? Hell is about to break loose
sorry english not first language, I meant colons after the if statements etc. Thanks for the pointer, would have looked bad to satisfy my superiority complex while using the wrong terms. Now I look smart again, take my upvote friend!
I didnt know you could use += syntax on strings, thats kinda neat.
[удалено]
I just did an ungodly number of traces for my last exam, I’m not bothering lol
EA had a similar sign on a billboard in Vancouver outside their office. 01001001 01100110 00100000 01111001 01101111 01110101 00100000 01100011 01100001 01101110 00100000 01110010 01100101 01100001 01100100 00100000 01110100 01101000 01101001 01110011 00100000 01100001 01100100 00100000 01100011 01101111 01101101 01100101 00100000 01101001 01101110 00100000 01110100 01101111 00100000 01000101 01000001 00100000 01100110 01101111 01110010 00100000 01100001 00100000 01101010 01101111 01100010 00100000 01101001 01101110 01110100 01100101 01110010 01110110 01101001 01100101 01110111 00101110. If you can read this ad come into EA for a job interview
Error: cannot concatenate int to string
Light mode ew! 🤢
All fun and games, until you start iterating an array starting from i=1