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

I was a little confused by the constructor for Player in the class example. Wouldn't the following be more appropriate:

  constructor(x = 0, y = 0) {
    this.x = x;
    this.y = y;
  }
(i.e. this way if "new Archer('Legolas', 5, 6);" the x and y values will not be ignored.)


Sure that works too, plus its a great way to point out initializing default arguments.


After many hours I failed to complete Level 4. How frustrating! But what a great experience. I think Stripe did a great job at building a programming challenge. By going through the challenge I learned something new in each of the following: Python, Ruby, Scala, Go, Node/Javascript, Git, Hashes, DDOS, Consensus Algorithms, raft, transactional logs, Inverted Indexes, BitCoin, IRC Chat, and more. Thanks Stripe you made me a better programmer.


You're very welcome. Glad you enjoyed :).


I took Brian Harvey's SICP course, what I didn't realize until I read this article is that I was in the first class he taught in 1987. I remember helping a friend in the course. We stared at five lines of code while I tried to explain it, he had a really hard time with it (some type of recursion I assume). I still hold the lesson from that tutor session. Write code to be easily read by the average joe. Python, Ruby, etc are great because they are easier to read by more people. Languages are about people not machines. p.s. I am still writing code today, and loving it.


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

Search: