6 ms·
To use the article's terminology, I "flipped the table" about a year ago on build tools, when first learning React and ES6. Every tool in the JS world seems to
by bjt 11y ago
To use the article's terminology, I "flipped the table" about a year ago on build tools, when first learning React and ES6. Every tool in the JS world seems to want to be the center of its own ecosystem where all the other tools are just plugins to it. I was sad to see Babel go this way.
Like the author, I have something besides Javascript on the backend. In my case it's Python. Rather than use a Python-specific build system, however, I've had success using a Makefile as the top level build tool, which can directly call out to npm, pip, babel, uglify, sass, etc. There is no Gulp/Grunt/Broccoli/Webpack/Browserify in sight, and that makes me happy. I'm pretty sure Make will be around long after people have forgotten about Grunt.
- jjawssd 11y agoI also built a Makefile-centric web development build workflow. It was OK until a developer on my team complained because he only used Windows
- pkrumins 11y agoI don't want to be mean but he wasn't a good cultural fit if he complained about that and should've been let go. Successful companies and products are built by like-minded people. You can't have someone on your team who can't build software because he uses Windows and complains about it. He could've used mingw, or used cygwin, or setup a Linux VM. Make is god.
- TD-Linux 11y agoI can't tell if this is sarcasm or not, but I appreciate it either way.
- pkrumins 11y agoIt was not sarcasm.
- pekk 11y agoWhy not, if being too old or of the wrong race is a poor cultural fit. Using Windows for development of apps ultimately to be deployed on Linux isn't any more sensible than using Linux when you are ultimately building Windows apps. Visual Studio is there for a reason. So is make.
- RaleyField 11y ago> wasn't a good cultural fit And I'd fire you if you used barfy corporate speak like this. > should've been let go How positively stalinist. Just so we are clear - a guy complained and you'd fire him for that, not maybe first reason with him? Don't complain when the company is razed to the ground because nobody talks to anybody lest they be taken by the nkvd.
- pkrumins 11y agoOf course I'd fire him. These folks are building a Linux stack software and the guy complains he can't use make on Windows. It's not only he's not a cultural fit, he's also not a technical fit. He'll never understand the beauty of Unix tools. Fire early, fire often and build a team of like minded people around you. Nothing wrong with using corporate language either.
- RaleyField 11y ago> He'll never understand the beauty of Unix tools The beauty of unix tools was that the model fit well with memory constrained machines of the time. After that came a mountain of hacks that just happens to still work and are used because nobody bothered to come up with a statically typed equivalent. It's far from beautiful, it just sorta works when it's not aimed at you foot. > Fire early, fire often and build a team of like minded people around you. It poisons the whole thing. Respect people and people will respect you and maybe they won't screw you over because you haven't given them a good reason to. Egomaniacally firing people for opinions will create infighting, it will cause people to start scheming and collecting dirt on coworkers to be used as a deflection for when the boss has one of his outbursts again. Supposedly most botched products at Microsoft are result of infighting between teams caused by stack ranking, which is effectively the same thing as what you are proposing. > Nothing wrong with using corporate language either. It isn't when it's not doublespeak. Culture is a nicer word for circlejerk. Finally, unix circlejerking is fine as long as you aren't a jerk about it..
- skeeterbug 11y agoThey aren't building Linux stack software. Re-read what you replied to: > I also built a Makefile-centric web development build workflow.
- Silhouette 11y agoI don't want to be mean but he wasn't a good cultural fit if he complained about that and should've been let go. That seems a very rash assumption with so little information. Maybe the developer in question needs other software to do their job and some of that software only runs on a certain OS. Maybe the advantages of having the right person on the team and able to use their preferred dev tools are a big overall win for the project. Maybe running into portability issues with such a fundamental tool is a warning sign that the build process isn't as robust as it could be. Maybe the whole thing can be fixed with a ten minute discussion and two-line edit to the makefile, and then you have the option of bringing other developers who prefer the same platform onto the team later as well. Successful companies and products are built by like-minded people. If you'd said something like "compatible", I might have agreed with you, but I see little evidence that complete enforced uniformity is necessarily a win in a field like software development. This sounds a lot like the kinds of managers who want to reduce everyone on a development team to interchangeable commodities, ignoring the inevitable reality that everyone's background and ability to contribute will be different. It also sounds a lot like the kinds of development teams that can spend weeks going down a dead-end path because no-one had enough varied experience that they anticipated the problem and thought to question the direction the project was going.
- eropple 11y ago> Maybe the developer in question needs other software to do their job and some of that software only runs on a certain OS. This can't be understated. How about, say, accessibility software? There's a reason that, say, visually impaired developers very often use Windows: because the accessibility tools are really, really good. But, naturally, it's just not understanding the beauty of Unix. Ick.
- Silhouette 11y agoYes, if we're talking about web development here, there are loads of practical examples. Testing and debugging with browsers only available on certain platforms obviously requires that platform, and sometimes an emulation or VM version isn't close enough. Graphics software is frequently platform-specific, so if you have a front-end developer who also deals with logos, icons, animations, or any number of other graphical assets, they probably need a compatible system. Plenty of conference calling and desktop sharing tools are platform-specific, and you need to be using the same as whatever your clients or external collaborators use. The list goes on, but certainly for the three big areas I just mentioned Linux platforms are often far behind both Windows and OS X in what is available.
- DanielDent 11y agoDocker.
- gcr 11y agoDocker requires a Linux host to run.
- DanielDent 11y agohttps://docs.docker.com/engine/installation/windows/ https://docs.docker.com/engine/installation/windows/ The OS X equivalent is a pretty reasonable experience, and Windows is supposedly a similar experience now. The only significant issue is that mounting a volume from the host gets tricky. But for many development workflows, that won't matter.
- gcr 11y agoIf the developer needs Linux, why not just use a Linux VM? Keep in mind this hacky "docker-machine" solution is also just a linux VM, but even more complicated.
- javajosh 11y agoMake runs under Cygwin, I believe.
- tracker1 11y agoEven when you have make in windows, there are often unix-isms that tend to go into other scripts as part of a build process. My own process on windows, is usually to have a linux vm (autostart via hyper-v), that I SSH a few terminals into (conemu ftw), and work in linux... I share via smb/cifs from linux so I can use a gui editor... everything else is in the console, or browser. Once you get used to it, it works out much better... I've also got most of the nix tools in windows, so some stuff I can just do there. My laptop and work issued laptops are rMBP, I also have a few linux systems/servers at home... Frankly I don't care too much what OS I'm on... that said, it doesn't take that* much effort to ensure what you are doing can run across the big 3 platforms.
- voltagex_ 11y agoUse CMake, PSake, ninja or hell, even MSBuild on Windows, especially if you're going to be sharing stuff with other Windows developers. It's gotten easier with MSYS2, but it's still a real pain to get most stuff working under Windows.
- ronjouch 11y agoIn the Python world also, Alex Clark recently blogged about exactly this: http://blog.aclark.net/2016/02/21/updated-django-website/ http://blog.aclark.net/2016/02/21/updated-django-website/ He shared his makefile: https://github.com/aclark4life/python-project https://github.com/aclark4life/python-project
- spoiler 11y agoApart from Make, I actually like Rake too, too. It's very Make-like and works similarly to Make, but it's in Ruby, which isn't a bad thing.
- amelius 11y agoDo you manually invoke "make" every time you edit a file on the server? Nodejs has tools to automate this (and make it fast).
- rubiquity 11y agoMost UNIXes already have a command line tool for this. It's called entr: http://entrproject.org http://entrproject.org
- bjt 11y agoI have a make task that uses chokidar to watch changes to my JS and CSS. When one changes, chokidar then calls another make task to rebuild things.
- kccqzy 11y agoI'm surprised no one has mentioned editors yet. We are an emacs shop here so we all just use an after-save-hook embedded as a comment in the source to automatically trigger a rebuild, whenever you save the file. No need for a separate tool to watch files.
- pkrumins 11y agoYou did the right thing. Software should be built using fundamental tools and not frameworks and libraries that are here for the next two years. Make is never going away, it's so fundamental that we'll be using it in 20 years.
- Silhouette 11y agoMake is never going away, it's so fundamental that we'll be using it in 20 years. I really hope not. There is plenty to criticise about recent build tools for web projects. Many are absurdly over-engineered. Most have very short working lives. Almost all seem to have a crazy number of dependencies of their own drawn from a fragile ecosystem. But there is also plenty to criticise in traditional Make. The archaic and cumbersome syntax means makefiles are hard to read, analyse and maintain. The completely static nature of a makefile also means it is ill-suited to rapidly evolving codebases where new files come and go almost by the minute as we refactor. We can do much better than Make.
- voltagex_ 11y agoI've got to disagree. After dealing with npm and grunt in an enterprise environment, MSBuild, Make and CMake start to look very very attractive.
- Silhouette 11y agoActually I agree with you there. I just think that's a little like saying after watching your kid's new favourite cartoon for the sixth straight time on Christmas day, the evening family movie you first saw in 1987 starts to look very attractive.
- voltagex_ 11y agoWell yeah, but continuing to use npm might be Stockholm Syndrome at this point!
- 11y ago
- tracker1 11y agoUnfortunately, that won't give you the level of HMR integration that webpack with it's dev server instance will give you. Which is, to say the least very nice when working on the front end, especially gui changes several steps into a process... Just a couple months ago, I was working on the final screen in an 8 step process that has several seconds of delay (not react). Needless to say, it wasn't fun at all and probably took me several times as much effort. Yeah, getting an understanding of webpack, babel and the setup/configuration for a project can take a full week or more, but once you have it, it's more than made up for.
- LoSboccacc 11y agoIt's funny to watch the node.js community because it's like watching years 1998-2006 in fast forward, except when some framework reaches the maturity tipping point instead of consolidating it is ejected from the community I was trying to pull some dependencies a while ago and they were failing to build because at some point grunt decided to change the build file name. I'd be usually fine with that except the only way these tools work is to install them globally so they can't coexhist even with themselves Some of the tooling is so broken and awkward people got used to commit their /dist/ on github so at least I can skip bower grunt and all that and just get the minified file for many of libraries I need
- raziel2p 11y ago> I'd be usually fine with that except the only way these tools work is to install them globally so they can't coexhist even with themselves This is not true, the node community just doesn't advertise it for some reason. You can run npm install a specific version of grunt-cli and run it with ./node_modules/.bin/grunt
- mikekchar 11y agoFor some reason, a few years ago somebody got the bright idea that installing globally was a good idea. It became a "best practice" even though you can really run into problems with dependencies of dependencies. It really is important never to install globally if you want to keep control of your dependencies. It's also very important to always delete .node_modules every time you update your package.json file -- especially when deploying. This is the only way you will be able to control what versions of things you have and to track down problems. I like working with Node, but for things like this it still suffers from some immaturity. "It works for me" syndrome is very common.
- mateuszf 11y ago+10 for these advices - another is to always lock the dependencies - either using precise static version numbers or npm-shrinkwrap.
- ocean3 11y agoI just use npm scripts which calls Browserify. A very simple script which i used for many projects.
- voltagex_ 11y agoIs there anything you could share from this? My next project will probably use CMake or ninja as a build system, mainly because it needs to be able to work with Visual Studio. Premake also looks interesting.
- AgentME 11y ago>Every tool in the JS world seems to want to be the center of its own ecosystem where all the other tools are just plugins to it. I was sad to see Babel go this way. Having multiple tools in a build process that each operate on source code, (re)parse it themselves into an AST, support differing features (ES6, async/await, etc), and have their own sourcemap-handling strategy is wasteful and especially frustrating when half of them have subtle bugs in doing these redundant steps. Babel doesn't have plugin support just because of ego. > There is no Gulp/Grunt/Broccoli/Webpack/Browserify in sight, and that makes me happy. Webpack and Browserify aren't Make competitors. They're tools for adding a module system to javascript, so you don't have to write your code in one file (or among several files that are hard-coded to be concatenated in a specific order and all share the same variable scope).