1 month to train an intern
-
Did I say it was ready for testing?
-
Weren't you doing some kind of SourceMod? Is this that?
As for the Intern, are you training them from first principles? Or do they have some (assumed) knowledge from a CS degree or somesuch?
If it's the former, I pity you.
Either way you're fucked
-
Did I say it was ready for testing?
You uploaded it. Expecting something to come out of it seems reasonable to me...
-
I tried it.
I was a little red W. There was a blue square. I couldn't interact with it.
I decided to try walking left and see if anything appears.
One minute in... still nothing. Is the game testing my resolve?
Two minutes... am I still moving? Or am I just spinning in circles? Lost in the vast emptiness of human experience, unable to ever truly connect with another mind? Doomed to walk alone forever.
Three minutes... I miss the blue square. It was'n much, but it was at least SOMETHING. I want to go back.
But can I? Or have I gone too far? Was the blue square merely the symbol of all the missed opportunities in my life? Things I can only reminisce about, but can never go back and correct?
I turn right and push onward.
Am I still moving? Where is the blue square? How long has it been? Minutes? Hours? Days? Weeks?
Then I realize. There's no going back. I will never see the blue square again. I had my chance and I blew it.
A tear rolls down my cheek. I shut down the game and spend a long minute contemplating Ben's message.
Moving forward is our lot in life. Always pushing through into the void. Always one step ahead of the mistakes of our past. The weight of the knowledge presses heavily on me for many minutes to come.
Powerful stuff. But probably would not play again.
4/5
-
Reads like every artsy indie game review ever. And the game quality is probably comparable, too.
-
Hey, Limbo was cool :)
-
No, he missed telling everyone that they have to play this game or they're an incomplete person unable to relate to anyone in the post-this-game future.
-
Wait, all these posts and all this time, and nobody has posted their own solution? Am I on the wrong site? Here's something I hacked together real quick with a couple of regexes:
function splitDomain(domain) { var sub = domain.match(/.+(?=\.\w+\.\w+$)/); var top = domain.match(/\w*\.?\w+$/); if (sub) { sub = sub[0]; } if (top) { top = top[0]; } return [sub, top]; }
-
Nobody posted their own solution because they're not WTFy enough to think they have a correct solution. Tell me what this gives you:
print(splitDomain("www.example.uk"))
-
-
according to chrome:
function splitDomain(domain) { var sub = domain.match(/.+(?=\.\w+\.\w+$)/); var top = domain.match(/\w*\.?\w+$/); if (sub) { sub = sub[0]; } if (top) { top = top[0]; } return [sub, top]; } console.log(splitDomain('www.example.uk'))
result:
["www", "example.uk", $family: function, $constructor: function, each: function, clone: function, clean: function…]
-
So I'm curious. WHY would anyone need to split a DNS name? Some sort of statistical telemetry hooliganism?
-
because i could:
/* Split domain into a top domain and subdomain parts. Returned as array. Eg: "a.b.mysite.com" => ["a.b", "mysite.com"] "mysite.com" => [null, "mysite.com"] "com" => [null, "com"] "" => [null, null] */ function splitDomain(domain) { var sub = [], parts = domain.split('.'); if (!domain) { return [null, null]; } while (parts.length>2){ sub.push(parts.shift()); } return [(sub.join('.')||null), parts.join('.')]; }
i think that gets all the requirements as stated.
-
Still, where are you going to get the TLD list?
You should treat .co.uk as a TLD. There are also others like the below snippet states.
And that's just .co, there's also .edu!
.edu.uk
.edu.nz
.edu.auetc
Running your posted function fails with those faux TLDs. Unless you don't want international support in your codebase.
-
well i implemented the spec as described in the comments above the method. if that was a requirement why wasn't it in the documetnation.
if i actually had to do a proper domain.tld i'l just do a domain query on the provided string and parse out of that. then i don't care about the list of TLDs. i care whether it's a valid DNS entry.
unless i can't do that as part of the programming test in which case i'd probably fudge it so that if it ends in (co|edu).xx then the domain part is 3 parts rather than 2. would probably pass most unit tests.
-
if it ends in (co|edu).xx
This is where the fun (?) starts...guess what? co and edu aren't the only ones. There's also .ac.uk and IIRC .uk has several others, not to mention who knows how many other countries use.
-
.gov.au
.net.au
.org.au
.com.au
.edu.au
.id.au
.conf.auJust off the top of my head. Plus .csiro.au is super-special.
Whatever you're actually trying to do, you should probably think about it a bit more and do something else.
TL;DR: You're Doing It Wrong. Really.
-
with a couple of regexes
Two problems, etc.
You should treat .co.uk as a TLD
No. You shouldn't At least not unless you're going to recognise .uk as a TLD as well. Since the Nominet is
about to startis definitely planning onis already selling *.uk domains.
-
if i actually had to do a proper domain.tld i'l just do a domain query on the provided string and parse out of that. then i don't care about the list of TLDs. i care whether it's a valid DNS entry.
didnt i say that was a subotimal solution?
-
The best solutions are usually suboptimal solutions.
-
Two problems, etc.
You should treat .co.uk as a TLD
No. You shouldn't At least not unless you're going to recognise .uk as a TLD as well. Since the Nominet is <s>about to start</s> <s>is definitely planning on</s> is already selling *.uk domains.
But the problem comes down to the problem statement. If you explicitly want the subdomains of a domain. Then as a website owner, .co.uk looks like the TLD. You do not have any control over .uk or .co.uk.
i.e.Split domain into a top domain and subdomain parts. Returned as array. Eg: "a.b.mysite.com" => ["a.b", "mysite.com"] "mysite.com" => [null, "mysite.com"] "com" => [null, "com"]
You would have a.b.mysite.com return ["a.b.mysite","co.uk"] which is now funky relative to .com,.net etc
-
You would have a.b.mysite.com return ["a.b.mysite","co.uk"]
If it did that, it must surely be broken....
-
Top Level Discomain
-
Didn't we discuss this in one of the other intern threads? There's a significant number of domains you'd want to treat as TLDs in that case; there's a list out there somewhere of domains browsers shouldn't accept cookies on.
..uk is not on that list, as there are ..uk domains which should accept cookies.
-
Didn't we discuss this in one of the other intern threads?
/me scrolls up...
@PleegWat said:EDIT: A short search returns a list at https://publicsuffix.org/list/effective_tld_names.dat . Don't think that's what I used at the time, but if anyone else is looking...
That the one you were talking about?
-
That's the list. It's the only sane way to figure out what is a TLD and what isn't, because it changes from time to time; it's driven by politics and business, not common sense technology. (You probably ought to poll for updates periodically. Every few weeks is likely good enough.)
-
(You probably ought to poll for updates periodically. Every few
---weeksminutes is likely good enough.)
Filed under: ICANNed that for you, we need a new tag cloud to attack
-
the SEO is stong with this one. i went to search for an online WHOIS record for this forum and this is what google did for me:
anyway the best thing i can think of to do is:
10 take input, 20 determine if it looks enough like a domain name 30 fail if not look like a domain name (no dot or something) 40 issue whois query for the domain. 50 get results 60 if no get results remove first token from the domain and goto 20 70 discarded tokens are the subdomain and the remaining tokens in domain are the domain with TLD 80 print or return results 90 if you are still reading say hi! 100 did you say hi? i didnt hear it 110 is anoyne having flashbacks to BASIC?
-
-
I see no Arantor posts. FAIL.
-
-
-
You need to be more memorable?
Exactly. I didn't specify whose failure it was, I merely implied it was - as usual - my own because TRWTF and all that.
-
Scott Adams has been reading your posts again @cartman82:
-
This post is deleted!
-
Sit down @sneakydave. Now open your mouth and lets have a look at that brain.