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

151–160 of 285 posts

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

#151

Earlier quoted context omitted.

What would one feasibly do with this data? I guess an app could tell if someone is holding their phone in their had, and maybe put together a pedometer bases on gyroscope input. Maybe a concern if a app has access to gyro input over a period of days. But as long as it's only for actively open apps and web pages I don't really see much harm.

Facebook has a patent for using gyroscope data in conjunction with location to know who you are facing with other people around to enhance friend suggestions. You can also determine things like health and other physical characteristics, similar to gait detection.

...wait, how do you get orientation relative to things around you (rather than just your own previous orientation and gravity) from just gyro/accelerometer data + location?

If you do have some source of absolute orientation, like a compass, surely you just use that and don't need the gyro.

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

#152
post #148

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...

> There is not a single line of bullshit. Don't want to be the killjoy here but isn't line 77-79 the same as 85-87? With the rest I can agree.

I'm going to guess that isn't intentional.

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

#153

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...

Agreed. There are so many JS projects these days composed of a dozen abstraction layers and barely-used libraries all mixed together and spread out across multiple files with an insanely complex "build system" on top, that it's very refreshing to see simple, self-contained JS.

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

#155

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...

As far as logic goes, I totally agree, but personal preference nit pick, from a code writer and reader perspective, I think all subproperty access (`hero.acceleration.x`) could be cached to a variable, or just operate on plain variables and assign property access after mutations and only manipulate objects as needed. It makes the code easier to write and read, IMHO, and I believe older engines had infinitesimal changes in performance with updating objects, so it's more of a habit and code clarity thing for me. Of course, that's far less important than the fact that the logic is clear and concise, especially after learning JS in a week :)

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

#157

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
Post reply on HN