Live data from Hacker News

Show HN: I taught my little brother JS, and he made this videogame in a week

s-poony.github.io

221–230 of 285 posts

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#221

Earlier quoted context omitted.

That's a complaint about the JS language itself, that variables are global unless otherwise specified.

I do agree it’s a complaint about the language. However, I think it does ultimately fall on the developer to know how to work with the language including the bad/ugly/awful parts. I also think not polluting the global scope is a pretty foundational thing to know or be aware of. It’s really easy to shoot yourself in the foot or have naming collisions/overwrites happen if you aren’t careful. Another example would be me…

> However, I think it does ultimately fall on the developer to know...

This person has been programming for a week. I think we can let this slide

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#222

Earlier quoted context omitted.

I love when the red square comes close and the green one jukes in a tight spiral around it, just thinking "Whoa nope nope NOPE ah it's okay"

LOL yeah, it's like watching a sport. By about a score of 300 the enemy is just too fast for our hero. =/

Interesting, I just watched it and for me the limit is around ~130.

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#223

Snowcrash mode :) (In console): setInterval(function() { hero.x = powerUp.x; hero.y = powerUp.y; }, 50); setInterval(function() { hero.x = reward.x; hero.y = reward.y; }, 100);

I did the same, but played around a bit more and made an "AI" mode: maxScore = 0; setInterval( function() { if (score > maxScore) { maxScore = score; } if (distance(hero.y, hero.x, ennemi.y, ennemi.x) PowerUpspawnRate) { hero.y += (powerUp.y - hero.y) * speedLimit / distance(hero.y, hero.x, powerUp.y, powerUp.x); hero.x += (powerUp.x - hero.x) * speedLimit/ distance(hero.y, hero.x, powerUp.y, powerUp.x); } else { her…

Lower the timeout from 25 to 5 and it's like Neo fighting agent smith :D

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#224

Look at the code guys [1]. I love it. This is simple. There is not a single line of bullshit. I hope he gonna become a great programmer and continue to make beautiful code like that. [1] https://github.com/S-poony/Ultra-Square-Catcher-USC-/blob/ma...

Sure, with a duplicate distance function and one 100-line function? For me that in itself is horrible lol. But as a new programmer he should still be commended but bro, give credit only to where its due. And here its the fact that he's new, not that the code is "beautiful". (You're making me doubt what you think of beautiful code, but i guess since he's your brother you're definitely biased.)

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#225

Look at the code guys [1]. I love it. This is simple. There is not a single line of bullshit. I hope he gonna become a great programmer and continue to make beautiful code like that. [1] https://github.com/S-poony/Ultra-Square-Catcher-USC-/blob/ma...

The mix between French and English variable names or comments is a bit irritating, even for as a French guy

[deleted]

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#230
post #199

Earlier quoted context omitted.

You don't need complexity until you do. Our company needed an internal tool, and they wanted remote access to it, but it was basically just a tool to generate a file based on a few inputs. We already had a command line program for it, so I wrapped it up in a web server and had it take input as a form input without any JS. It worked great for years, and then someone got tasked with updating it (mostly just combining i…

To be fair, in my experience rewrites always take longer regardless of technology choices. You are often reverse engineering requirements which is really consuming both in time and energy. That said, I agree with the point you're trying to make though (I strongly prefer software with less dependencies/frameworks)

Also, he apparently had to update / upgrade the application, so it's kinda to be expected that he will take longer for this.
Post reply on HN