News for hackers. Stuff that matters.
Re:How it feels to learn JavaScript in 2016 by voidfunc on Monday October 03, 2016 @07:01PM (#12632070)
Just a couple days I got into a conversation with my coworker about UI stuff. I had to test something against our dev UI. Last time I did UI work was back when having index.html, img/, css/ and js/ directories with maybe a script or two was the norm. I had to fucking run make and I still have no fucking idea what was going on when I ran make which compiled a bunch of shit. There was all this NPM shit going on (isn't NPM part of Node.js which is a server-side framework? WTF?). I got it working and promptly noped the fuck out that horror show.

The web is a giant fucking pile of dog shit in 2016.

Re:How it feels to learn JavaScript in 2016 by Fuzzwah on Monday October 03, 2016 @08:46PM (#12632562)
I'm a content guy who knows enough web dev to be dangerous.

I made 3 manual edits to a css file to fix a couple of incorrect background colours in our web content the other day. I was a good boy and made a pull request for those same changes in the git repo.

Our developer explained that he doesn't actually edit the css file. He would have to work out the change in the hue (as a percent of the base colour) and update that in the sass file, then use gulp to compile a fresh version of the output css.

He said that this was a simple build process to get set up on my machine so I could do it myself in the future.

He uses a mac. I use windows.

4 hours later after hitting so many hurdles I finally got it working. I can't even recall all the issues, but do recall that I side stepped them all by moving to a particular version of npm which actually used a sane system for storing the dependencies.

With out that version of npm this simple build process required 15,000 files in my node_modules subdirectory in a structure so deep and convoluted Windows couldn't create them....

Of course now that I'm armed with the toolset to make these changes I've reverted to testing changes in chrome dev tools and emailing him requests.

Re:How it feels to learn JavaScript in 2016 by bhrgunatha on Tuesday October 04, 2016 @03:49AM (#12633943)
> this simple build process required 15,000 files in my node_modules subdirectory

You would think people learned a lesson about packaging every tiny item as a dependency with left pad, but apparently yesterday it was downloaded 16104 times.

[1] https://www.npmjs.com/package/left-pad

Re:How it feels to learn JavaScript in 2016 by Ajedi32 on Tuesday October 04, 2016 @09:34AM (#12635341)
> He uses a mac. I use windows.

Aaah, good luck. For me it's basically gotten to the point where if the build doesn't immediately work on Windows, I just fire up a Linux VM and work off of that.

And that's not just for front-end projects, but for open-source projects in general. Windows support is often really lacking in an environment where devs seem to use Linux and Mac almost exclusively.

Re:How it feels to learn JavaScript in 2016 by Fuzzwah on Tuesday October 04, 2016 @04:12PM (#12639014)
That was actually my first response too... I set up the build process on my linux test server while I continued to battle to get it working on my daily drive win10 machine.
Re:How it feels to learn JavaScript in 2016 by akhilcacharya on Wednesday October 05, 2016 @07:44PM (#12648956)
At least now we have WSL to work with.
Re:How it feels to learn JavaScript in 2016 by thecotne on Tuesday October 04, 2016 @07:02AM (#12634628)
actually it's bad when build artifacts are included in git repository

so when you clone repo or edit it directly in github you don't have option to edit wrong file (compiled css file for example)

but i agree that js community has everything very complicated for learning but it's not that bad for everyone that already knows how tings work here

Re:How it feels to learn JavaScript in 2016 by LaxisB on Tuesday October 04, 2016 @06:09AM (#12634424)
a big problem with npm is, that a lot of package authors don't use the .npmignore [0] which leads to EVERYONE downloading your source/, test/ and docs/ folder even if only that one file in build/ is needed. That, combined with the micromodule mindset, leads to insanity

[0]: https://docs.npmjs.com/misc/developers#keeping-files-out-of-...

Re:How it feels to learn JavaScript in 2016 by pdimitar on Tuesday October 04, 2016 @01:29PM (#12637353)
That's a very bad way of handling it. When will people learn that you can't rely on everyone being a good citizen? Is it really so hard to realize that you need to make your technology sane from the very beginning?
Re:How it feels to learn JavaScript in 2016 by pdonorio on Wednesday October 05, 2016 @06:32AM (#12642774)
Fear not. We have a tool for that in bower https://github.com/blittle/bower-installer, so I guess there will be one very similar in npm too. :)
Re:How it feels to learn JavaScript in 2016 by jrochkind1 on Tuesday October 04, 2016 @10:32AM (#12635808)
Sass is awesome, and one of the few pieces of the 'compilation toolchain hell' I _don't_ hate.

But you ideally shouldn't have your CSS build product in the repo if you're using SASS. That would avoid the confusion of editing the wrong file (the compiled output artifact, which ought not to be in the repo).

Re:How it feels to learn JavaScript in 2016 by sopooneo on Tuesday October 04, 2016 @04:56PM (#12639404)
I read this as the CSS was live edited on a production server.
Re:How it feels to learn JavaScript in 2016 by extra88 on Tuesday October 04, 2016 @06:18PM (#12640041)
If there are other things to build for production, sure, throw SASS in too but if not, it's not worth it just to keep your repo "pure."
Re:How it feels to learn JavaScript in 2016 by mikeschmatz on Tuesday October 04, 2016 @10:51AM (#12635963)
> He uses a mac. I use windows.

That's when I knew things were about to get interesting :-)

Re:How it feels to learn JavaScript in 2016 by arctangent on Monday October 03, 2016 @08:20PM (#12632458)
It doesn't have to be this way. Unfortunately, we live in a world where younger developers "show their skill" by making things overcomplicated in order to create unnecessary barriers to entry to our proto-profession. My usual response is to refuse to work on such a project if I don't have the authority to change how things are done to make them more sane.
Re:How it feels to learn JavaScript in 2016 by minitech on Wednesday October 05, 2016 @02:41AM (#12641949)
“make and npm” doesn’t sound overcomplicated. It sounds like someone didn’t take the time to find out what they were working with, didn’t really need to because it’s not their area, and decided to have an opinion about it anyway.
Re:How it feels to learn JavaScript in 2016 by rbanffy on Thursday October 06, 2016 @01:19AM (#12650404)
> in order to create unnecessary barriers to entry to our proto-profession.

I wouldn't say it's malice. I think they simply don't know better.

Re:How it feels to learn JavaScript in 2016 by meddlepal on Thursday October 06, 2016 @07:06PM (#12656870)
Agreed. Possibly a consequence of the ageism in our industry too.