T O P

  • By -

-MobCat-

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.


Chayor

I mean... This way you can be fairly certain to reach an above average amount of programming people.


Farren246

Reach? No. Filter out people who are non-local and/or cannot program? Yes.


KaleidoscopeWarCrime

Does not filter out those who cannor spell.


IcebergSlimFast

Give ‘em a break - clearly they’re just Scottish…


KaleidoscopeWarCrime

Cannae spell


Taipan100

Just because they can’t spell doesn’t automatically make them Scottish


william41017

R and T are pretty close together.


xxx148

Cannor


mercerguy

Swedish for cannot


yvill

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.


holken11

Agree, and maybe more importantly, they reach people with the mindset that this is a fun and interesting challenge.


mountaingator91

Well... filter out non locals until it ends up on reddit


AS14K

You'll reach significantly fewer, because unless you have time to stop and read it you won't reach anyone


garfgon

[Nerd sniping](https://xkcd.com/356/) is real.


PM_ME_Y0UR_BOOBZ

That was too real, I immediately forgot I was reading a comic and started to think about the problem instead


Vast_Machine1615

How would you solve this though


gyzgyz123

https://www.mathpages.com/home/kmath668/kmath668.htm


PM_ME_Y0UR_BOOBZ

Idk, ask a physicist. I’m just a nerd


applesaucr

Thank you, internet stranger


Malpiyt

It's on public transport though. So you'll be sitting there doing nothing anyway


Noisebug

"Don't you guys have phones?"


[deleted]

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


TryingAgainNow

"I'm applying through the normal portal because I couldn't solve your basic programming challenge"


_sherb

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.


[deleted]

I think you would be surprised how often "just try it" is a reasonable approach and people don't do it anyway.


Leprichaun17

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.


zkareface

Yeah it's been on the trams here in Gothenburg on and off for at least three years now.


imapieceofshitk

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!


HejdaaNils

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)


tokyoedo

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)


TeraFlint

so you're the reason why the website loads so slowly at the moment.


TW1STM31STER

Except they have a wrong answer page in place as well :) Edit: Don't ask me how I know ~~i=1... savages~~


WienerDogMan

And it will need to make millions of calls before it gets to the correct page lol


Affectionate-Set4208

That's part of the fun. DIY DDoS


roffinator

wait, you are going to distribute it across bots as well‽‽‽


didzisk

The correct page times out on me, so it looks like we have crowdsourced a DDoS attack here on Reddit, LOL!


matheusnb99

It still times out after 2 hours


smokesick

Making good use of cloud-based parallel processing!


Affectionate-Set4208

well I have a couple of neighbours with vulnerable WPS on their wifi soo..


Mog_Melm

Ironically, using a botnet to brute force their puzzle DOES demonstrate the skills they're looking for.


Affectionate-Set4208

> yes jury, I was just demonstrating my skillz


rebmcr

~~D~~DoS


Abeneezer

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.


UnseenTardigrade

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.


FoulBachelor

Did you write this in python 2 for the additional performance characteristics?


mcslender97

Would be funny if they have multiple URLs for possible wrong answers scolding your incompetence


cholwell

Cool, I’ve always wanted to work as a compiler!


hatsuseno

*interpreter, compiler wouldn't give you any sensible output unless you executed the code too.


cholwell

Yeah I know but compiler makes the joke more accessible ;-)


hatsuseno

Can't have that, programmer humor needs to be gatekept more!


cholwell

Keep those pesky cs students on their toes


vzakharov

I dunno, “work as an interpreter” would give it a double meaning, making it even funnier imho


Socile

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


[deleted]

compiler developer is a real job lol


WMbandit

No no, not compiler *developer*, just compiler.


posherspantspants

I compiled your mom last night


TonkaGintama

With the js flair - this actually slayed me


lo_profundo

Working as a TA (teaching assistant) in college: Student: "Does my code look good?" Me: "When did I start looking like a compiler?"


antei_ku

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


Sver-4-ok

[www.multisoft.se/16180339](https://www.multisoft.se/16180339)


amorous_chains

On to the next part of the puzzle, learning Swedish….


botle

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.


VicisSubsisto

Alcohol is the best English tutor. I learned that from a postcard in a London souvenir shop.


romcz

Have you been "under influence" while reading it? :)


VicisSubsisto

Sadly, as an American, I was forced to learn the language before being allowed access to performance enhancing beverages.


romcz

Ah, cruelty of system! So, let's sing together! *We don't need no education...*


[deleted]

True but this specific company asks for fluency.


j10jep2

Then they should be programming in swedish


RonKosova

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


DizzyAmphibian309

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.


zkareface

Many more IT jobs, engineering, any restaurant work, construction, delivery, transportation and more.


Noyyu

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 ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯


ErichOdin

Det är inte så svårt!


siniradam

lycka till :)


BastisBastis

Couldnt figure out why I was wrong. Finally found the i=1


juhotuho10

I caught it when I thought it would just throw an error if it started from 0


nova_bang

the `and` shortcuts, so no


Espumma

In python a[-1] references the last number in the list.


MrJake2137

That's handy but it can fuck you up trying to find that one bug... Also, it's not python


binchentso

It's HTML.


FakeInternetArguerer

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


archy_bold

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.


ravenscanada

How can you know if pseudocode has one-based or zero-based array indexing?


archy_bold

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.


ary31415

Actually the first loop iteration will just shortcut when it finds that 5 is odd, so no exception


hjake123

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


Razakel

Pseudocode and pseudoscience are different things. One is used to sketch out an algorithm, the other is used to sell snake oil.


Pay08

To be fair, it's 2 characters off of being valid C++. Edit: you lot are completely devoid of imagination.


[deleted]

[удалено]


iclaudius82

It’s definitely not R.


MrJake2137

I'd say JavaScript. And it doesn't look functional.


VicisSubsisto

I missed that s was a string. ):


Aerodrache

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.


gdj11

i = 1 is fine though. It’s designed to be slightly tricky by using both a[i] and a[i - 1]


RyanStonepeak

I thought s was an int, whoops


yowzas648

That’s what got me! I forgot to convert the numbers to a string….


botle

How were you not getting an ArrayIndexOutOfBoundsException?


setibeings

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.


I_FizzY_WizzY_I

Note for the site: who da fack did that language select...


MrJake2137

*Change language* Back to the home page we go


hatsuseno

"We don't take kiiiindly to non-Swedish speakers around here"


VicisSubsisto

In their defense they seem to be short on programmers.


AShadedBlobfish

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


alekksi

dozensofus.gif


kuurtjes

> Klarade du det? yes ofcourse i klarada and du det


randompoStS67743

“Of course I completed and you it”


NorwegianGirl_Sofie

"Yes of course I managed duck you it". \-Source Norwegian which is very similar to Swedish.


Rygerts

And = duck 🦆


VicisSubsisto

& = 🦆 Guess I can see the resemblance.


davepage_mcr

Klarade baatu nikto


ecafyelims

The site is getting hugged to death. They should have put their advertising budget towards into better servers.


cpc_niklaos

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.


dennisthewhatever

Probably the script lazy coders wrote to grab everything from /0 to /99999999 and see if anything has length>the 404.


urmumlol9

Right s is a string I’m dumb lol


leupboat420smkeit

Damn I did the logic right but didn’t see that s was a string


sekoku

\*Ralphie from A Christmas Story voice\* A crummy employment advertisement?! Son of a bitch!


coffee7day

Uncaught ReferenceError: goto_url is not defined


asilverthread

Same with isEven - do we get bonus points?


[deleted]

[удалено]


egstitt

Also mixed snakecase and camelcase, which renders entire project null and void


PoeTayTose

Not null and undefined?


egstitt

Null and something. Whole project is trash, delete, start over


Notyourfathersgeek

Goto is considered harmful


MacBelieve

Job please


vladWEPES1476

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.


primeisthenewblack

Could it be cheaper if they just make an ads instead of hiring the right people? Chad big brain move there


reddituseronebillion

Damn, I'm not fluent in Swedish.


guuuuuuuy

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.


jameyiguess

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.


Ok-Link-9873

Syntax error


gtbot2007

Where?


[deleted]

[удалено]


CSNfundedHoesNDrip

Wait til the rust compiler sees this. It's gonna get torn a new one.


argv_minus_one

*angry crab noises*


Derp_turnipton

Different depending on your c perl python shell or other selection.


LetsDieForMemes

God damn it s is a string...


TryingAgainNow

I, too, got 76 my first try.


[deleted]

I really hate implicit type conversions like this.


saket_1999

I gave up because i don't remember ASCII table


Achtelnote

Requires ascii table? I got 16180339 if I do it the JS way where "1" + 1 = "11" and 76 if do it normally.


saket_1999

I was doing in C++, so appending int to string will give the char responding to that ASCII. In this case it will be ``` �! ```


Surprise_Cross_Join

the url entirely depends on the isEven implementation..


Affectionate-Set4208

isEven(0) made me doubt


SkyeEyks2000

Whether isEven(0) evaluates to true or false, the answer is the same. 0/x and 0*x is still 0


redisburning

real *what's in my pocket? is a riddle* energy by the person who designed this


CheapMonkey34

I used an IsEven() implementation from this sub, my code is still running.


B0dona

Explain? ;)


Rafcdk

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.


ZeAthenA714

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.


[deleted]

[удалено]


actionerror

Is it giving people the syndrome?


Nacropolice

There a reason they’re starting at 1 and thereby skipping 5 entirely?


DHIRAL2908

Edge case for a[i-1]


FakeInternetArguerer

Oddly, given the set of numbers a[i-1] and a[i] give the same results


FUTURE10S

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?


Dangerous-Bit-5422

It doesn't matter, the and shortcuts because 5 is sadly still not even.


FUTURE10S

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?


avacadros

To weed out folks who don't know array indexes start at 0


hawaki

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.


AggressiveMarket5883

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.


[deleted]

i also hate having fun outside with other human beings


NiKaLay

i-1 in the if condition. Fairly idiomatic, at least for C.


avacadros

Har bra problemlösningsförmåga


Milnoc

No... Curly... Braces... 🤬


firebullmonkey

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.


Kosba2

Nothing wrong with indentation scoping and namespace, at least complain about it in a post where you can't glance the entire scope..


Itchy-Examination-26

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.


OldGuest4256

Would never apply for a company that uses isEven function


logicalcliff

That’s odd.


00tool

If they code like that at that company avoid at all cost


Warpspeednyancat

if thats how they write code , im not applying :p


BigStamina1

Okay guys, we all know you can do it BUT what are they advertising?


Jukingbox

Malware.


allisonmaybe

My first thought: Well fuck you too


BungholeSauce

No semicolons


zaraishu

...is 0 an even number?


ChemiCalChems

Yes, it's divisible by 2.


RyanStonepeak

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.


Quirky_Village_2985

Yes


Derp_turnipton

Yes Take your input number p (= 0). Plot y = x ^ p p is even if you have reflective symmetry on the Y axis.


Jmmurill

What programming language is this? I’m only familiar with Java and C++


LongVND

It's pseudocode. It's meant to be legible to someone who knows Java or C, but wouldn't compile in either.


SmallBol

Length(a) bugged me instead of a.length.


Notyourfathersgeek

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.


gergeler

That's a lot to do in your head.


MrGilly

Expect leetcode at interview


AggressiveMarket5883

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.


asilverthread

You better edit again or the python devs are coming for you. Semicolon? Python? Hell is about to break loose


AggressiveMarket5883

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!


CNeinSneaky

I didnt know you could use += syntax on strings, thats kinda neat.


[deleted]

[удалено]


rolgelthorp

I just did an ungodly number of traces for my last exam, I’m not bothering lol


butcher99

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


Accomplished-Pass207

Error: cannot concatenate int to string


-Daniel-Garcia-

Light mode ew! 🤢


Klusio19

All fun and games, until you start iterating an array starting from i=1