6 ms·
Am I the only one around here who prefers starting from scratch in a blank vim session?
by whitehat2k9 12y ago
Am I the only one around here who prefers starting from scratch in a blank vim session?
- lukasm 12y agoWell that depends. HTML + JS need a lot of boilerplate by definition, so generators are OK.
- Silhouette 12y agoHTML + JS need a lot of boilerplate by definition If you accept that as axiomatic, I think you've already lost. Almost all of the boilerplate I see people assuming a new project needs is either not actually necessary at all or something widely used but needing specific customisation for each project, i.e., it's not really boilerplate in the sense that templates/generators/scaffolding tools reduce the overhead significantly.
- Bahamut 12y agoI do like generators for one reason - setting up a Gruntfile with all the details you want can be tedious (in addition to all the dependencies in your package.json), not to mention setting up stuff like Bower. That's a bunch of wasted time setting up boilerplate. Generators tend to not be perfect, since we as developers can get opinionated, but I'm fine with tweaking from the boilerplate to get the results I want, which takes less time than setting everything up from scratch.
- IBCNU 12y agoDude setting up an angular project can be a huge headache. We use a hand built generator just for our needs, but npm in so insanely unstable that we have to get in and end up doing a lot of configuring of the gulp / gruntfile and packages etc.
- Kiro 12y agoI don't recognize your problems at all. Do you mind elaborating on what headaches setting up an Angular project gives you?
- IBCNU 12y agoI guess I'm complaining about npm more than Angular per se. Most of our issues stem from the myriad package dependencies "in the wild" of npm itself. It's like tilling a field in the wind. Often one has to `npm install` >3 times to install all of your modules. I guess that's what happens when you have ten billion cooks in the kitchen.
- joevandyk 12y agoIs using npm worth it? Would it be simpler to download the dependencies yourself and put them into a vendor directory?
- IBCNU 12y agoYou know that's a good question. I've spent about half of my work day today working out npm dependency conflicts... The Einstein quote about insanity comes to mind.
- Silhouette 12y agoThe web development industry, and particularly the front-end side, currently seems to be obsessed with (or maybe plagued by) tools that sort of do half the job you sometimes want but feel like you have to always use anyway because everyone else is or appears to be or at least says you should on their TwitBookBlogFeed. I wanted to do exactly what you describe yesterday -- just download the latest stable version of a one-JS-file library to include on one page of a web app where its functionality is relevant. We used to do this by downloading example-1.0.8.min.js from the obvious Download link on www.example.com. As it turns out, the project from yesterday lives in a GitHub repository with a dozen files scattered across a root and four subdirectories. I honestly have no idea how to build it; it's written in a compiled-to-JS language, the build instructions are a one-liner that refer to a build tool I've heard of but never used, and there are at least half a dozen other files in the project that seem to be there only for some sort of compatibility with various other tools I've heard of but never used/don't use on this project/don't have installed on this workstation. I find myself reminded almost daily of this now-infamous XKCD: http://xkcd.com/927/ http://xkcd.com/927/ This is not progress. :-(
- andybak 12y agoIsn't a generator a code smell? - if you need one then your framework abstracting the right things.
- Kiro 12y agoI am the same. I don't want to delegate my stuff to a generator which adds a lot of bloat and where I have no control.
- pyre 12y agoOn the other hand, there are things like cookiecutter[1] that allow you to basically create generator 'templates' that are your own. This way you don't have to get upset about the generator making a choice that you didn't like. [1] https://github.com/audreyr/cookiecutter https://github.com/audreyr/cookiecutter
- fiatjaf 12y agoIf you're like that, then you probably shouldn't be using Angular. That thing is a mess.