View Full Version : Programmers’ Day
Dear Settlers,
Today is the day of the programmer. Have you always wondered how codes look like and how they even work?
Well, you can try to solve the following Code even without being a programmer.
https://ubistatic-a.akamaihd.net/0034/int/website/pictures/2018_08_01_worldwideweb.png
Give it a try and solve the Code. Post your answer in this thread.
Note: Answers will stay hidden until September 17th at 13:00 CEST, this way everyone has a chance to become a coder.
// If you can read this code, tell your Community Manager the secret word and win a small prize.
Var Prize_Crystals
Var reverse = function(s) {
return s.split (“”)reverse( ).join(“”);
}
Var communitymanager = {
Str1: “al”,
Str2: reverse(“hti”)
Str3: reverse(“tne”)
Str4:reverse(“nro”)
Str5: “am”,
Str6:reverse(“ms”)
request: function(preference) {
return preference + “. Secret word: “
+thisstr4+thisstr5+thisstr3+thisstr1+thisstr6+this str2;
}
};
communitymanager.request (Prize_Crystals)
Please note this is just a small "look" into a very complex theme. It is, in fact, not a "real" working code ;)
Parse error: syntax error, unexpected T_STRING, expecting T_OBJECT_OPERATOR in programmers_day_challenge on line 5.
But I guess you want to hear ". Secret word: ornamentalsmith"
PS: unused variables Prize_Crystals, Str1, Str2, Str3, Str4, Str5, Str6. Undeclared variables Prize_Crystal, thisstr1, thisstr2, thisstr3, thisstr4, thisstr5, thisstr6. Calling reverse() causes an infinite loop. This is indeed not a working code. And don't get me started about your coding style :D
Secret word: ornamentalsmith
Secret word: ornamentalsmith
But with assumption that your language has same rules like javascript the result will be "undefined". Because Prize_Crystals variable has undefined value and undefined + ". Secret word: ornamentalsmith" = "undefined"
Hi, there is my guess:
ornamental smith
Florianek64
13.09.18, 18:08
ornamentalsmith
sopticek64
13.09.18, 18:09
ornamentalsmith
my eyes are bleeding, so let's try..
Prize_Crystal. Secret word: ornamenalsmith
HI,
I think, the secrect words is "ornamental smith".
Ticho--Brahe
13.09.18, 18:54
Answer is: undefined. Secret word: ornamentalsmith
It looks at as very abstract code :-) and I guess that in some parts of code missing dots (for better understanding).
--------------------------
Vypadá to jako velmi abstraktní kód. :-) a řekl bych, že v některých částech chybí tečky (pro lepší pochopení).
Hello, answer is: ornamental smith.
Secret word: ornamentalsmith
the whole sentence:
. Secret word: ornamentalsmith
Franta_Vorech
13.09.18, 20:01
Hi, the Secret word is "ornamentalsmith"
Secret word: ornamentalsmith
SwordfishCZ
14.09.18, 07:07
Hello,
I think, that result of this code would be compile error. I don´t know your language, but I have some experience with other languages, so I think, that there's "dot" missing on line 5
return s.split (“”).reverse( ).join(“”);
and also "dots" missing on line17 in all those "class variables"
+this.str4+this.str5+this.str3+this.str1+this.str6 +this.str2;
I don't know if your language is has case sensitive variables ("this.str4" vs "this.Str4") so I'll not comment this.
Anyway if the code somehow compiles, the outcome would be (text in quotes): ". Secret word: ornamentalsmith"
Have a nice day
SwordfishCZ
Misikozisek
14.09.18, 07:37
ornamentalsmith
benko123123
14.09.18, 07:55
. Secret word: ornamentalsmith
. Secret word: ornamentalsmith
Von_Dragon
14.09.18, 09:50
Prize_Crystal. Secret word: ornamentalsmith
Quasimodo666
14.09.18, 09:51
Ornamental smith
. Secret word: ornamentalsmith
Kralyks1234
14.09.18, 21:34
ornamental smith
CZECH: Ten kód sice tak, jak je napsaný nemůže fungovat snad v žádném programovacím jazyce, ale to byl asi záměr. To tajné slovo (Secret word) je "ornamentalsmith".
ENGLISH: I think the code can't work in any programming language, but I believe that was on purpouse. The secret word is "ornamentalsmith".
Florianek64
14.09.18, 22:22
ornamentalsmith
Tararingapatan
15.09.18, 01:10
Secret word: ornamentalsmith
Secret word: ornamentalsmith
secret word: ornamental smith
MarkFreeman
15.09.18, 09:02
ornament alsmith
Prize_Crystals. Secret word: ornamentalsmith
Hello
I made a working code (javascript; verified as a web page in browser GoogleChrome)
Secret word: ornamentalsmith
CODE:
<script>
var Prize_Crystals;
var reverse = function(s) {
return s.split("").reverse().join("");
}
var communitymanager = {
str1: "al",
str2: reverse("hti"),
str3: reverse("tne"),
str4: reverse("nro"),
str5: "am",
str6: reverse("ms"),
request: function(preference) {
return preference + ". Secret word: " + this.str4 + this.str5 + this.str3 + this.str1 + this.str6 + this.str2;
}
}
Prize_Crystals = ":-) I won 20 crystals";
var solution = communitymanager.request (Prize_Crystals);
alert(solution);
</script>
Petroff
Sir_Balthazar
17.09.18, 10:01
Prize_Crystals. Secret word: ornamental smith
Barbaridor
17.09.18, 10:47
ornamental smith ;)
Dear settlers,
We hope you enjoyed your time figuring out the secret word from our fictitious code.
The code we are looking for is ornamentalsmith. Ornamental smith is also acceptable.
Players who got the correct answer will receive the prize via their in-game mail.
Thank you for your participation.
Happy Settling!
BB_Sious
Powered by vBulletin™ Version 4.0.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.