Lurker News

Comments (270) 108 threads

Show all comments

Showing thread 2 of 108

jeena1 reply#
> 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.

lucisferre#
I'm going to guess that isn't intentional.
userbinator3 replies#
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.
beatgammit2 replies#
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 it with other tools). He couldn't figure out how it worked, so he rewrote it to use a ton of JS, using Angular and other stuff. And guess what? He took longer to rewrite it than I spent the first time and made no functional changes besides some CSS and a ton of JS.
With all these fancy new frameworks and browser features, it seems that many developers have forgotten (or never learned) how to do things simply. Frameworks and browser features have their place (I built an interactive HTML5 app as my first project at that company), but they're often completely unnecessary.

jb36891 reply#
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)

Continue this thread — 1 reply

kennybomber#
Yes one should assume most frameworks will be dead 2 years from now. Dependencies problems suck. And create security holes. When development starts going into the cloud get ready for a lot of pain the world has never seen before.
jianzong1 reply#
My brain hurts just imagining this.
croh#
Mine too
tracker1#
It depends on your needs... Are you building a complex application with several developers. You probably want a build system and module based JS. I prefer react + redux + material-ui. Some of the new stuff around hooks and context could displace redux for smaller apps easily.

If you need a one-off page that does a little dynamic stuff? Drop in jquery+bootstrap and a little wiring js and be done with it. Not a huge fan of the size of jquery + bootstrap, but it's a fast path to done depending on your one-off needs.

natecavanaugh1 reply#
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 :)
tmdroid1 reply#
He did the game in a week, not learn JS from what I understand from the title
natecavanaugh#
Ahh thanks for the clarification :)
11235813213455#
The mix between French and English variable names or comments is a bit irritating, even for as a French guy
HighSaysBob1 reply#
From the source, Shift = Brake
Imagenuity#
You would never know this unless you read the source. It's unlikely that you'd stumble across it.
finaliteration1 reply#
My only complaint is the global scope pollution with the top-level variables and lack of ‘var’ for those. But other than that, I agree.
etatoby1 reply#
That's a complaint about the JS language itself, that variables are global unless otherwise specified.
finaliteration5 replies#
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 memory allocation/freeing in a non-GC language. Sure, it’s a pain that I have to deal with it, but it’s still on me to make sure my application works in the language I’ve chosen and doesn’t leak memory all over the place.

Continue this thread — 5 replies

sbov3 replies#
But what if he wanted to turn it into a AAA FPS game with RTS elements in a persistent online world that supports millions of simultaneous users?
cududa1 reply#
If you're not joking and actually making that statement seriously you need to close your computer and go take a few hour walk.
MetalGuru#
He’s joking.
nurettin1 reply#
That was the next logical step during the early 2000s. Every bright-eyed college freshman on IRC was "recruiting" for his next awesome MMORPG idea.
skocznymroczny1 reply#
It's still a thing. On gamedev forums and subreddits you still have people assembling a team. Of course he can't do any programming, he's only an idea guy and needs 5 programmers, 3 writers, 7 artists etc.

Continue this thread — 1 reply

baud1472581 reply#
No, right now it's the RPG elements that are trendy, RTS is soooo 2000.

Continue this thread — 1 more reply

Continue this thread — 2 more replies