8 ms·
It seems like a lot of JavaScript developers are repeating things like "more people know JavaScript so you don't have to learn a new language, which saves you t
by klodolph 10y ago
It seems like a lot of JavaScript developers are repeating things like "more people know JavaScript so you don't have to learn a new language, which saves you time". I don't get it. In my experience, if you find a good developer, they can pick up C#, Swift, or Go pretty quickly, and if you can't find a good developer, the fact that they already know JavaScript is not much of an advantage. Even if the developer you hire already knows your language, they're going to be spending time learning your code base and how your organization works (shared repo? PRs? Feature branches? Code review? Coding standards?)
That, and nose.js developers seem to repeat the claim that node.js makes delivery faster… but is it really any faster than ASP.NET, Rails, Django, or Go stdlib? Those frameworks are so fast for prototyping and delivering bread-and-butter apps as it is (and some of them let you do multithreading to boot).
I'm also really not interested in how things work for "typical CRUD apps" because those are so trivial to write in any decent environment.
I'm worried that node.js articles are the same kind of echo chamber that Rails articles were 10 ago.
- zMiller 10y agoDepends who you ask really. If you are a developer then you should invest your time and be able to learn and use the best tool for the job. If however you are something like a Product manager then learning JS is much more valuable time investment. It is the one language that will, currently, run anywhere ... Backend, Frontend, Side end, whatever. You can quickly get good at JS to the point of being able to prototype the full app stack and come up with something that works, goto market and fail. Should you find your self in the unlikely position that your product meets its success, then you can go ahead and hire a Go/Elxir/WebASM whatever guy to optimize this and needs larger throughput. You have 24 hours in day, 6 to sleep, 3 to breath, 1 to eat. How do you want to spend the remaining 14 ? You get good at what you practice :)
- rb808 10y agoI've worked on projects in which both the front and end back end were written in the same language & those that are different. The former were more productive imho with developers working on both and with shared libraries & shared test platforms. The latter often end up getting silo'd with stuff passed over the fence. Yes many developers can do both, but its difficult to do both at the same time & even harder to hire for.
- mgkimsal 10y ago> I'm worried that node.js articles are the same kind of echo chamber that Rails articles were 10 ago. I tend to agree. > That, and nose.js developers seem to repeat the claim that node.js makes delivery faster… The qualification was "if your team already knows JavaScript". OK... If the team already knows Java... building something like this in Java would be faster to deliver, and wouldn't hit some of those issues the author brought up (4 vs 1, single vs threaded, etc). And the whole "oh, you know language X" - means almost nothing when the project is more than trivial hello world. Every project I've been brought in on, the qualifier was "must know tech X". And almost always (there were exceptions) I knew more about tech X and software dev in general than the original developers, and the crunch was not "how do I do XYZ in this tech?" it was "how do I get the other developers to actually use version control?" or "use version control sanely?" or "document anything?" or "write tests" or "have test data" or "have a repeatable build process"? Knowing ASP or PHP or Ruby or whatever, but going in to a project without repeatable build process, tests, documentation, requirements or version control, is a recipe for disaster. Stressing the "deliver quickly" aspect of any language, if you're actually trying to deliver for a business or with a team of people, is extremely destructive short term thinking. And yes, sometimes, in rare cases, it may be a necessary evil, but I think it's become the norm with words like "agile" being thrown around as synonyms for "don't have to write anything down".
- astinit 10y agoAs someone still studying and not in the workforce yet, are there really teams out there that don't use version control?
- Jackim 10y agoYes. I have a friend who does QA for a major university and that department doesn't use source control at all.
- noir_lord 10y agoYes, I used to do a fair amount of consulting (aka nothing works properly, fix it, have this bag of cash) and I frequently ran into 'projects' that had no source control or had <projectname>/1 <projectname>/2 <projectname>/2a_1_fix_foobar :|. One of the things you'll learn if you hang around Hacker News/online programming communities is that a lot of the people in those communities are at the top end of the spectrum (there is a degree of self-selection that means a higher proportion I think). It's pockets of relative sanity in a sea of disaster.
- ReverseCold 10y agoNode.js let's you require() packages from npm. There, all the code you for ever need. Instead of writing "a quick Python script" for personal use, I now write "a quick node script" because there's almost no thinking required on my part. Just require the packages and throw them together. Not even Python has this package-completeness.
- DCoder 10y agoThe term for this is "Magpie-driven development".
- imagist 10y agoIntegrating a library requires a lot of thinking, or you'll integrate libraries that are immature and break, or don't exactly fit what you wanted and have to be hacked around. I've had to work in projects that used your methodology long-term and I would rather turn down a job than suffer through that again.
- RUG3Y 10y agoWhat do you mean by "package-completeness"? While npm has a lot of packages, Python has a lot of fully matured, well-tested and well-documented packages. It's apparent to me that there are a lot of low quality, duplicate and otherwise unstable npm packages. Don't get me wrong, I actually like npm too but I don't think the Python comparison is even in the same ballpark.
- jeswin 10y agoThe language doesn't matter, but the ecosystem does. It is when it comes to "non-CRUD apps" that an ecosystem will really start to matter. One is probably not better than the other but getting started is hard. Take the case of Node and JavaScript itself. The ecosystem is huge. The tooling is complex. A newbie starting out will not even be able to get many examples to run without a mesh of transpilers and build tools. There are roadblocks everywhere; what's the type annotation there? What's with the strange JSX syntax? What's a transpiler? Add to that, EcmaScript itself is a moving target, more so than any other language. Similar issues exist in other languages. C# is a simple language to master, .Net is a huge ecosystem. There's not going to be a lot of resistance moving from C# to F#. But for the newbie, the challenges are daunting. Should you use Microsoft's preferred ORM which ships with .Net or write your own SQL? Which UI tooling should I use? There is plenty of advice on the web, yet it needs an experienced developer to make those decisions. Consider this. if you chose SilverLight a few years back, your product is soup today. Picking an ecosystem is not easy. Has never been.
- TAForObvReasons 10y ago> Consider this. if you chose SilverLight a few years back, your product is soup today. The amazing part about JS is that most of the code written for browsers a decade ago still works today. It is extremely unlikely that we will see a company outright ban JS in their web browsers in the same way that iDevices don't support flash.
- Silhouette 10y agoThe amazing part about JS is that most of the code written for browsers a decade ago still works today. Yes, that is mostly true, but it glosses over two big problems with the JS ecosystem. The first is that longevity seems to be a dirty word. I have seen professional JS developers say, without a hint of irony, that their code only needs to last a year, maybe two, so it doesn't need to be designed for long-term maintenance or ongoing development. That same attitude exists in much of the library and tool development, which means while your code might still run in 2 or 5 or 10 years, the dependencies for your code might not have kept up. Even if they still run, they're stuck at whatever level of features and security and flexibility they had when they were abandoned, which might well have been only six months or a year after you added them to your project. Now you have a perma-brake applied to everything you do. The other big problem with the JS ecosystem is that JS itself is a moving target. Thanks to evergreen browsers, Node, and those controlling them, standardisation and stability also seem to be dirty words now. Your code from 10 years ago, using only basic JS language features, might still run. Unfortunately, your code from 2 years ago, using whatever alpha/beta quality JS features supported promises or observers or local storage at that time, might not. And the same goes for code in dependencies you introduced 2 years ago that are already abandonware. Multiply those two factors and you have a recipe for instability and frequent unexpected failures unlike anything I have ever seen on any other platform.
- imagist 10y agoI know Javascript well enough to avoid it when possible.
- matthewaveryusa 10y agoECMAScript6 is a wonderful language that approaches the syntactic readability of python. If you're stuck with ECMAScript5 sure, go ahead and say javascript is terrible because it is. But ECMAScript6? No way. They fixed so many annoying things. the fat arrow that captures "this", proper classes and inheritance, maps and sets and string template literals are the biggest ones that jump to mind. es6 is to javascript like what c++11 is to c++ -- it made it so you don't have to use the warts. ECMAScript6 snippet: class Shape { constructor (id, x, y) { this.id = id this.move(x, y) } move (x, y) { this.x = x this.y = y } fixed_offset(off_x,off_y) { return () => { console.log(`offsets x: ${off_x} y: ${off_y}`) return [this.x + off_x, this.y + off_y] }; } } And yes ECMAScript5 is gross: var Shape = function (id, x, y) { this.id = id; this.move(x, y); }; Shape.prototype.move = function (x, y) { this.x = x; this.y = y; }; Shape.prototype.fixed_offset(off_x,off_y) { var self = this; return function() { console.log("offsets x: " + off_x + " y: " + off_y`) return [self.x + off_x, self.y + off_y] } }
- arrakeen 10y agoand yet it also gives us this mess: import defaultMember from "module-name"; import * as name from "module-name"; import { member } from "module-name"; import { member as alias } from "module-name"; import { member1 , member2 } from "module-name"; import { member1 , member2 as alias2 , [...] } from "module-name"; import defaultMember, { member [ , [...] ] } from "module-name"; import defaultMember, * as name from "module-name"; import "module-name"; don't get me wrong, i think ES6 is much better than what we had before, but it still has a lot of warts
- imagist 10y agoI do not care about the rearrangement of deck chairs on the Titanic that is ES6. I wouldn't care if JS were uglier than Erlang, if it worked as well. The only people who care about ES6 classes are the ones who couldn't be bothered to learn how to use duck typed prototypes and were always trying to shoehorn in polymorphism. Prototypes were one of the few things Javascript had going for it, but adding classes means now there are two OO systems that don't interoperate. This is a new problem, not an improvement. There's a similar problem with callbacks and promises. Other problems added in ES6: imports don't give an error when the thing I'm importing, continuing the JS tradition of handling errors by pretending everything is okay. And this is in addition to the rotten core of JavaScript. There remains no integer type. Basic operators still take arguments of all types and return something regardless of whether it makes any sense. "this" still has little to do with this. In any other language I'd complain about the lack of threading, but given JS can't handle easy stuff like implementing a sane comparison operator, it's probably better that they don't try anything legitimately difficult like threading.
- smokeyj 10y ago> I'm also really not interested in how things work for "typical CRUD apps" You mean you're not interested in what a huge part of the industry is doing? Well then that explains why you don't see the benefit. There's tons of work creating user interfaces, transform some business logic and shove it back in a DB. No one said it was going to be a life-fulfilling experience. It's just work. Now many of these shops want a native ui, mobile ui, responsive design and a back-end developer all in one. Many times they hire for specific frameworks so that you're ready to be productive day 1. If I were staffing up a team to do a CRUD app, or even more complex, I'd staff up with JS developers.
- noir_lord 10y agoI like doing CRUD apps, beyond the trivial you run into a terrific amount of business logic and thats an opportunity to really have an impact, one of my proudest moments as a programmer was taking a process that was largely manual and took 3 staff 2 days and making it something the boss could do in half an hour on a Friday afternoon by redefining the underlying assumptions about how their business worked - it's amazing how many businesses do <involved complex manual process> because that's how we've always done <involved complex manual process>. It's 2017, We've had desktop computers for 35 years and most of the people I know working in various industries still manage a huge chunk of their work in email and excel because it's hard for their management to understand the benefits of automation or why they'd make an investment in the longer term with good software, I know of one company thats in the FTSE250 that manages it's entire pallet and tray inventory by using excel spreadsheets on a shared drive and sending people from the office to sites to look whats there (they order 100K+ Trays at a time).
- overcast 10y agoHere's my experience as a solo developer for all of my projects. When I have to do everything from marketing, SEO, domain/dns, server setup, to database design, interface design, and whatever else. Doing most of the actual programming in one language, rather than many, helps considerably in my workflow. The NPM ecosystem is also awesome.
- Pr3fix 10y agoBingo. Having one language for your front end, back end, build tools, database schema... It simplifies life a lot. You can reuse code / modules. You Don't suffer from context switching inherent with jumping between languages. Also, people act like JavaScript is a bad language purely because it is not strictly typed. It's an incredibly fast and robust language with a vibrant ecosystem -- something I'd argue is more important than pure technical bullet points.
- TAForObvReasons 10y ago> It's an incredibly fast and robust language with a vibrant ecosystem You will find support for the most random and amazing things in JS. It is truly mindblowing. I recently had a client request to run a process involving extracting data from an Excel file. Originally wrote it in python using openpyxl http://openpyxl.readthedocs.io/en/default/ http://openpyxl.readthedocs.io/en/default/, then it turned out the client also needed XLSB support. openpyxl and xlrd don't support XLSB, but the only thing that did work was a JS library http://oss.sheetjs.com/js-xlsx/ http://oss.sheetjs.com/js-xlsx/ and node module
- overcast 10y agoYes, it's pretty much bananas. There is SO MUCH work being put into the ecosystem, that there really isn't much you can't do at this point. There is a node module for EVERYTHING. For all of JS's warts, it's fantastic to deal with.
- WorldMaker 10y agoFor those that want to get more strict typing there are two great options in Typescript and Flow.
- dominotw 10y ago>"more people know JavaScript so you don't have to learn a new language, which saves you time". This is also an excuse for NIH ( never invent here ) where people try to shoehorn an OSS product even if it doesn't fit their needs .
- vkjv 10y agoIMHO, the core piece is that supporting a language is very, very expensive: tooling, CI, linting--especially standards. Many of things that ensure quality are not language agnostic. It's not about learning a language, it's about maintaining one. If you are a web shop you have javascript. Using node.js allows you to eliminate one extra language. Is it perfect? Definitely not. Is it best for everything? Probably not the best for anything. But, it's good enough for most stuff. It doesn't make sense to incur the burden of another language for a one off task.
- deleted 10y ago[deleted]