TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Code Wars (JS, Coffeescript & Ruby)

18 pointsby jehna1almost 12 years ago

17 comments

warfanglealmost 12 years ago
The first Javascript kata fails with an unknown error, even if the code is correct.<p>You probably want to fix this bit too: <a href="http://imgur.com/KqYuCHn" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;KqYuCHn</a><p>Also, if your browser window is too narrow it suddenly thinks you&#x27;re on a mobile device and ceases to work.
评论 #5980102 未加载
评论 #5980523 未加载
评论 #5980404 未加载
评论 #5980038 未加载
评论 #5980322 未加载
nathasalmost 12 years ago
I love when a site asks me to write code that works when its own code doesn&#x27;t.<p>Unknown error.
mattezellalmost 12 years ago
Yea.. Can&#x27;t get this to work..<p>Q: Given 2 strings, a and b, return a string of the form short+long+short, with the shorter string on the outside and the longer string on the inside. The strings will not be the same length, but they may be empty (length0).<p>My Answer:<p><pre><code> function solution(a, b){ if(typeof(undefined) == typeof(a)) a = &quot;&quot;; if(typeof(undefined) == typeof(b)) b = &quot;&quot;; if(a.length &gt; b.length) return b + a + b; else return a + b + a; } </code></pre> Result: &quot;Unknown Error&quot;<p>Of course my solution doesn&#x27;t account for a.length == b.length, but the question is somewhat nonsensical in that it states &#x27;...strings will not be the same length, but they may be empty...&#x27; (2 empty strings would be the same length)...
veinmelteralmost 12 years ago
Aside from the code tester not working properly, their branding and design are ignorant and overzealous.<p>&quot;Katas&quot;? an Ensō? It&#x27;s code, chill out.
评论 #5980572 未加载
评论 #5985562 未加载
paulhodgealmost 12 years ago
Little flakey (running on Chrome Mac). I type in an answer, press Submit, and nothing happens. When I reload it finally updates and shows the next question.
评论 #5979848 未加载
masswerkalmost 12 years ago
Ooops – @setAnnotations:<p>Chrome: &quot;TypeError: Cannot call method &#x27;replace&#x27; of undefined&quot;<p>Safari: &quot;TypeError: &#x27;undefined is not an object (evaluating &#x27;f.text.replace&#x27;)&quot;<p>Firefox: &quot;TypeError: f.text is undefined&quot;<p>Not exactly advertising competence in JS ... (Wasn&#x27;t there any testing?)
cpursleyalmost 12 years ago
I like the concept + UI and have saved the bookmark.<p>Don&#x27;t let the bug comments get you down - this is cool.
Jonlzalmost 12 years ago
Nice, haven&#x27;t touched ruby in awhile but glad it&#x27;s not just me. I was worried when I couldn&#x27;t troubleshoot a simple multiply function:<p>def multiply(a b)<p><pre><code> a*b </code></pre> end
评论 #5980091 未加载
timtamboy63almost 12 years ago
Stupidly buggy. The correct answer tells me &quot;Unknown Error&quot;.
NicoJuicyalmost 12 years ago
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...<p>I&#x27;m glad it&#x27;s their fault, i was actually getting depressed not finding my error...
pschastainalmost 12 years ago
Apparently there wasn&#x27;t a lot of collaboration on the site code itself; as has been mentioned, it&#x27;s pretty buggy. Or maybe that&#x27;s the REAL test...
评论 #5980187 未加载
exolxealmost 12 years ago
Thanks for all the feedback - we got caught in the middle of a performance upgrade so the sites code challenge engine isn&#x27;t working under load right now.
mattattaquealmost 12 years ago
I dig it! Didn&#x27;t get any of the errors everyone else here seems to be experiencing (Chrome on Win, v27). Looking forward to more of this. Nice job.
georgebonnralmost 12 years ago
&quot;The code does not execute properly. Try to figure out why.&quot;<p>I guess the challenge is to build a working version of their site for them?
dccoolgaialmost 12 years ago
I don&#x27;t know what this is, but apparently I&#x27;m &quot;enlisted&quot; now... The design on the site looks really cool, though.
gary4garalmost 12 years ago
I fixed the code, click submit. nothing happens?
评论 #5980123 未加载
georgebonnralmost 12 years ago
Whew. Yeah, I thought I was going crazy.