Hacker Newsnew | past | comments | ask | show | jobs | submit | barbierocks's commentslogin

Schoolhouse.world | Full-stack web developer | REMOTE (in EST time zone) | FULL-TIME | https://schoolhouse.world

We are a new non-profit startup founded by Sal Khan (founder of Khan Academy) with the mission of connecting the world through learning. Our peer tutoring platform empowers students everywhere with free online tutoring over Zoom. It's still the early days — we just launched our new website and have a couple thousand learners from 40+ countries, with plans to grow this platform to millions. It's been an exciting journey.

We’re a five-person team, and we're looking for exceptional full-stack developers who thrive in a fast-paced environment and can do some of everything.

— Stack: React, TypeScript, Next.js, Node.js, PostgresQL, AWS

— Qualifications: Full stack development, with scalability and devops experience a huge plus. Can build things from scratch. Excited to learn anything and everything.

— $: Competitive salary.

— tl;dr: Foundational role in a mission-oriented startup leading a movement in peer tutoring.

If you're interested, please email us at engineering@schoolhouse.world!


Schoolhouse.world | Full-stack web developer | REMOTE | FULL-TIME | https://schoolhouse.world

We are a new non-profit startup founded by Sal Khan with the mission of connecting the world through learning. Our peer tutoring platform empowers students everywhere with free online tutoring over Zoom. It's still the early days — we just launched our new website and have a couple thousand learners from 40+ countries, with plans to grow this platform to millions. It's been an exciting journey.

We’re a five-person team, and we want people who thrive in a fast-paced environment and can do some of everything:

— Stack: React, TypeScript, Next.js, Node.js, PostgresQL, AWS

— Qualifications: Full stack development, with scalability and devops experience a huge plus. Can build things from scratch. Excited to learn anything and everything.

— $: Competitive salary.

— tl;dr: Foundational role in a mission-oriented startup leading a movement in peer tutoring.

If you're interested, please email us at engineering@schoolhouse.world!


LOL


Here's a cute follow-up: what are all possible outputs of the following program?

    import random

    class C:
        def __hash__(self): 
            # return 0 or 1, with equal probability
            return random.randint(0, 1)

    x = C()
    d = {}

    d[x] = "foo"
    d[x] = "bar"
    d[x] = "baz"

    print(len(d), d[x])


    1 baz
    1 None (?)
    2 foo
    2 bar
    2 baz
If __hash__(x) is recalculated on every indexing (?).


I think that's right.

On a side node, if I recall my old python knowledge right the <1 - baz> and <1 - None> cases are only possible because -- well for one it uses only one object, so the fast check "key is elem" is always true -- but also the object utilizes the default __eq__ function, which tests on object identity. And since the same instance of C is used for all object invocations, this is always true.

The behavior would be different using:

        x = C()
        y = C()

        d[x] = 'foo'
        d[y] = 'bar'
        d[x] = 'bar'
        d[y] = 'qux'
The hash might collide, but the equality will cause the open addressing to skip the element.

I dislike recalling debugging a hash function that wasn't entirely deterministic in some edge cases.


Essentially correct! Instead of `1 None` it'd fail with a `KeyError`. You can get a probability distribution too:

    1 baz       1/8
    KeyError    1/8
    2 foo       1/8
    2 bar       1/4
    2 baz       3/8


Indeed, I got

  Counter({
      (1, 'baz'): 12525,
      (1, 'KeyError'): 12552,
      (2, 'foo'): 12255,
      (2, 'bar'): 25282,
      (2, 'baz'): 37386
  })
from running

  import random
  
  class C:
      def __hash__(self): 
          # return 0 or 1, with equal probability
          return random.randint(0, 1)
  
  def output():
      x = C()
      d = {}
      d[x] = "foo"
      d[x] = "bar"
      d[x] = "baz"
      try:
          return len(d), d[x]
      except Exception as e:
          return len(d), type(e).__name__
  
  from collections import Counter
  Counter(output() for i in range(100000))


I think it would be

  KeyError
instead of

  1 None (?)
but otherwise looks like the right answer to me too.


Hmm that might be a good idea! The point system is supposed to normalize difficulty, but I understand people might skip the egregiously long ones anyways.


Thanks for all the feedback!

1. Hmm, perhaps we could change the game model? Instead of solving as many as you can in three minutes, we could (1) have a set time per problem, and a fixed number of problems or (2) have some system to add back time for correct answers.

2. This is on our todo list!

3. Yes, see my comment from above -- we're thinking of simple ways to accept slight variations. A way to contest variations might is a good idea.

4. How do you propose we do this?

5. So right now, a problem is worth ceiling(length of our solution / 10.0) points. This seemed like a good way to reward harder questions proportional to the time spent solving them. Any other suggestions?


Supporting custom macros seems hard, but we should be able to fix spacing problems if we revamp the comparison logic entirely. Thanks for filing the Github issues -- we definitely welcome any contributions, so let us know if you have any ideas!

Also, we're friends with Evan and have already gotten his feedback. :)


Weird...before the 3-minute limit? Maybe there's a bug somewhere with the timer.


It happens after succesfully finishing several rounds.


1. That's why we added a point system, but I agree the variation in difficulty is pretty wild.

2. See my comment above - comparison is a tough problem right now, the website is pretty simple. We'd like to improve it though!


I think it's a great start - I'm a big fan of typing games like TyperA, and one of the things I enjoy most about blogging or answering questions on stats.stackoverflow.com is formatting mathematical in beautiful LaTex. It just needs to be just a little bit more polished overall to be a really compelling experience.


Tutorial mode is a great idea! Yeah, this is definitely geared towards experienced people.


+1! a tutorial mode would be really helpful. Especially if it included a "reveal (one possible) answer" functionality.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: