'Pragmatic Programmer' Author Andy Hunt Loves Arduino, Hates JavaScript (bestprogrammingbooks.com) 185
Andy Hunt is one of the 17 software developers who wrote the Agile Manifesto, and he co-authored The Pragmatic Programmer. Now Slashdot reader cerberusss writes:
In an interview with Best Programming Books, Andy Hunt mentions he "hates languages that introduce accidental complexity, such as JavaScript -- what a nightmare of pitfalls for newbies and even seasoned developers... My go-to languages are still Ruby for most things, or straight C for systems programming, Pi or Arduino projects." Furthermore, he mentions that "I tend to do more experimenting and engineering than pure code writing, so there's occasionally some soldering involved ;). Code is just one tool of many."
Andy writes that he also likes Elixir, talks about Agile, reveals how he survived his most challenging project, and says the biggest advancement in programming has been the open source movement. ("Imagine trying to study chemistry, but the first half of the elements were patent-protected by a major pharma company and you couldn't use them...") And he also answered an interesting follow-up question on Twitter: "Do you feel validated in an age of Node and GitHub? Some of your best chapters (scripting and source control) are SOP now!"
Andy's reply? "We've made some great progress, for sure. But there's much to be done still. E.g., You can't ship process."
Andy writes that he also likes Elixir, talks about Agile, reveals how he survived his most challenging project, and says the biggest advancement in programming has been the open source movement. ("Imagine trying to study chemistry, but the first half of the elements were patent-protected by a major pharma company and you couldn't use them...") And he also answered an interesting follow-up question on Twitter: "Do you feel validated in an age of Node and GitHub? Some of your best chapters (scripting and source control) are SOP now!"
Andy's reply? "We've made some great progress, for sure. But there's much to be done still. E.g., You can't ship process."
"Beware.. (Score:4, Insightful)
Re: (Score:2)
Re: (Score:2)
Wow, this one thing happened once 9 years ago, to a guy who was brand new at his job, cool story bro.
You missed my point, probably on purpose. Let me give you another example. When I was a lead video game tester, a new employee got assigned to my team. I showed him how to check out the console equipment from inventory, walked him over to his desk, and told him to connect the console to the TV. He told me he didn't know how. Like turning on a workstation, this was basic stuff that any person should know how to do. So I showed him how to connect everything together. When I complained to management, I discov
Well that makes sense (Score:5, Insightful)
Because of course one of the people involved in creating one of the worst management fads ever would also join the JavaScript hate train.
"The Pragmatic Programmer." Hardly. Real pragmatism is recognizing that popular languages are often the best tool for the job, no mater how aesthetically distasteful they are.
Ever notice how prolific JS users rarely defend the language? Of course it's badly designed. We use it because it's pragmatic to use the lingua franca of programming.
What isn't pragmatic is using languages with declining market share because they feel aesthetically "better," or imposing horrible management fads like Agile/Scrum on your team against their will.
So I'll pass on joining this guy's fan club.
Re: (Score:2, Insightful)
Javascript is a horrible piece of shit, as a language and as a library set. It's dominance exists because of a bit of a historical accident. Everyone knows it is an utter garbage language, which is why so much effort is put into languages like Go, as a means to achieve reasonable web functionality without having to put up with that steaming pile of shit.
Re: Well that makes sense (Score:2)
This. The only reason JS is a thing is because browsers run it natively.
I'm dying for something like WebAssembly to take over.
Re: (Score:2)
The official WebAssembly FAQ [webassembly.org] throws shade at that attitude.
It goes on to say that WebAssembly is meant to encourage hybrid stacks.
It's much more likely the end result will be an ecosystem similar to Node.js, where some stuff is in JS, and other stuff is in native node modules.
Re: (Score:2)
Don't buy it. If WA takes off and saner languages can be compiled to run on the web it will inevitably end up happening. Give it DOM access and wait a while.
Re: (Score:2)
That seems unlikely. I'm not aware of any efforts to get something other than JS writing directly to the DOM via wasm. That would be a loooooot of DOM APIs that would have to be replicated in Java or whatever.
Besides, by the time something other than JS has full DOM access, ES7, ES8, ESwhatever will be out and JS will have slowly evolved into a usable language, eroding the appeal of switching to something less popular because the aesthetic differences won't be so vast anymore.
Re: (Score:2)
You don't need to replicate anything. If an alternative appears, in time, it will just happen - the nature of the web is being constantly rewritten or abandoned altogether.
Re: Well that makes sense (Score:2)
Ugh. Too much "leveraging".
Re: (Score:2)
Me: "Nobody denies JavaScript is aesthetically distasteful. But you don't pick the best tool for the job based on aesthetics."
You: "But JavaScript is aesthetically distasteful!"
k.
Re: (Score:2)
We use it because it's pragmatic to use the lingua franca of programming.
Hardly a lingua franca - JavaScript is used because it's the only language web browsers understand.
I've used a lot of programming languages, and I've spent quite a bit of time trying to learn how to write clean JavaScript. It can be done, but the language really doesn't help. You have to fight it every step of the way - a better designed language would help you, not hinder you.
If a decent alternative to JS were suddenly to be supported by all the major browsers, the rush to get away from it would be immen
Javascript to become the next COBOL? (Score:2)
Reading this, I'm thinking back to the early '80s when COBOL could be described exactly the way you are talking about Javascript.
Now, we're 30+ years later and people who have experience with COBOL (and the systems/tools that work with it) are in hot demand because of applications that won't die.
In 30 years, will we see the same need for programmers that understand how Javascript is programmed and can support the applications that were written in it?
Re: Javascript to become the next COBOL? (Score:2)
Doubt it. COBOL was used for banking enterprise applications, the type that will run and be supported for years.
The main use of JS is web sites - they're either constantly being rewritten or abandoned after a few years.
Re: (Score:2)
I'm not so sure. COBOL was, and still is used heavily in a helluva of mission critical applications, particular in major financial systems. If there's a modern day equivalent to COBOL, it's Java, not Javascript. While Javascript is certainly going to be around for a while, if it is supplanted, I think it will be more like Flash.
Re: (Score:2)
It's the world's most popular programming language, so yeah, it's a lingua franca.
No doubt. But I'm not gonna wait around for that. Gonna use the lingua franca in the mean time.
Re: (Score:2)
It's the world's most popular programming language, so yeah, it's a lingua franca.
Not likely - Java and C++ would still contend that podium. It is one of the most popular languages in the world though but, again, only because there's no other choice when developing for the web.
Re: (Score:2)
Did you miss the numerous articles like this published over the past few years? https://arc.applause.com/2016/... [applause.com]
Seems pretty clear JS hit the popularity tipping point already. It's the world's most popular programming language. (For better or worse.)
Re: (Score:2)
Only if your one source is Stack Overflow. TIOBE [tiobe.com] and PYPL [github.io] still have other languages ranking higher.
Again: i don't want to underplay how popular JS is nowadays. But "world's most popular programming languages" is highly debatable.
Re: (Score:2)
Dunno man, this feels kinda like the climate change "debate" to me. Sure you can cherrypick data sets that show JS isn't quite there yet, but there seems to be a growing consensus that JS has already hit that tipping point. And if miraculously everyone is wrong about that, it won't be long before even the most stubborn surveys have to admit JS hit that tipping point. The momentum is rather obvious.
Re: (Score:2)
... highly debatable.
For web frontends?
Re: Well that makes sense (Score:2)
Well, for web frontends it is not "the most popular language". It is the only language available.
Re: (Score:3)
It's the world's most popular programming language
"Most widespread" or "most used" does not mean "most popular." Plenty of people who hate it still use it.
Re: Well that makes sense (Score:3, Interesting)
I think the issue is that "clean" is in the eye of the beholder. It looks very different in OOP than it does in FP, both of which are pretty well supported paradigms in JS. Seems like the real argument is that JS doesn't make these decisions for you, so you don't get much guidance. That's certainly a speedbump, but it's also a feature, in that it is eminently flexible in the face of new paradigms.
Re: (Score:2)
I think the issue is that "clean" is in the eye of the beholder.
Sounds good, but utterly untrue. There are plenty of objective criteria by which the clean-ness of code can be assessed. Yes, you get beginner programmers who take an attitude of "That's your way; this is my way - we're both entitled to our opinion." but unless they shed that view point they'll never become competent.
The fact is that to achieve even something as simple as an encapsulated module of code which won't clash with anyone else's code, if you're working in JavaScript you have to jump backwards th
Re: (Score:2)
I do not understand what is hard about encapsulating code. There are no hoops. Module encapsulation just works. What am I not understanding? // readval.js // other.js
module.exports = () => 42;
const readval = require("./readval");
const otherreadval = require("someone-elses-readval");
console.log(readval());
console.log(otherreadval());
Re: (Score:2)
I am terribly sorry about the formatting.
Re: (Score:2)
No it's not, OO has three pillars - encapsulation, inheritance, and polymorphism. JavaScript doesn't let you inherit and encapsulate at the same time - it's one or the other, as such JavaScript's OO is objectively broken in a fundamental way.
JavaScript does OO, but as the GP said, it does it badly, because it's broken.
In contradiction to what you say, the languages you list actually have it right, because they're true OO languages that implement OO properly and thoroughly.
It looks like the issue is that you
Lingua Franca (Score:2)
And French was the Lingua Franca for awhile because Francs was a dominant country, and English has been Lingua Franca for awhile because Great Britain and then the US became dominant counties...
The phrase "lingua franca" means it's in common, widespread use and it's easy to find someone who speaks it. It does not imply excellence of any sort. If you guys want to fight about something, maybe you could th
Re: (Score:2)
I've found that management fads are typically only as bad as the managers who impose them on their employees.
Re: Well that makes sense (Score:4, Insightful)
I will defend Javascript to pretty much anyone. All languages suck in various ways. Javascript at least has the sense to keep the language small, backwards compatible, and well defined. New language features are almost always targeted, useful improvements, with clear use cases. And it's fast as fuck (not really because of anything related to the language, of course, but still).
Re: (Score:2)
> I will defend Javascript to pretty much anyone.
Did you learrn nothing from BASIC in the 70's and 80's??? Only amateurs think misspelling a variable name without throwing an error is somehow "acceptable".
When you are forced to use hacks like this "magic number" ...
... where you can't disable strict mode, or worse, turn it off for only one function, you quickly see why it is shitty language.
Re: Well that makes sense (Score:2)
If you can't be bothered to use professional tools which glaringly highlight misspelled variables, then perhaps you should stick with something with more hand holding. I've never really felt compelled to "use strict", because I - as a developer - have discipline, and don't need it.
Re: (Score:2)
Its single threaded, despite what node.js developers will tell you.
Re: Well that makes sense (Score:2)
While the code you write is running single threaded, that's only the programming model; the program you create with that code is decidedly multi-threaded. The truth is it's easier to write properly multi-threaded code in Node.js for the vast majority of real world use cases, and for everything else, you can write multi-process code with good language support built right in.
Re: Well that makes sense (Score:5, Insightful)
> All languages suck in various ways.
Except JavaShit sucks worse. It was designed by a fucking moron in 10 days. [computer.org]
JavaShit likes to masquerade it has native arrays but we can quickly dispel that notion via these tests:
Which produces this output:
How does JavaShit define concatenation with arrays? I mean, that isn't too hard to fuck up, right?
Out of the the 4 possibilities for a return type ...
* The array [4,6] which is Vector or Matrix addition
* The array [1,2,3,4] which is concatenation like [1,2].concat( [3,4] );
* undefined -- Gee, one would think this would be expected, or
* Throw an exception -- maybe even this one.
--
Only a complete and fucking moron defends JavaShit.
Re: Well that makes sense (Score:2)
Idiosyncratic? Sure. But it takes literally an afternoon to learn the entire language. Unless you're a moron.
Re: Well that makes sense (Score:2)
Here's a quick study guide, if this is too hard to mentally map type checks:
* if it's a degenerate value, such as null or undefined, use ===
* if it's a scalar like a number or string, use typeof
* if it's an object (yes an array is an object), use instanceof for classically inherited types (which includes all buit-in types), and isPrototypeOf for prototypally inherited types.
Re: Well that makes sense (Score:4, Insightful)
It was designed by a fucking moron in 10 days. [computer.org]
So the "moron" designer was given 10 days to come up with a language that met marketing requirements, and he delivered, and beat Java (applets) at its own game. Not only that, he slipped [amazon.com] in some advanced programming features that still makes the language relevant today. From your link:
"Although the schedule and constraints might have been impossible for most programmers, Eich had a long history of building new programming languages, starting from his experience as a student at the University of Illinois, where he built languages just to experiment in syntax. At Silicon Graphics, he created languages that could be used to build extensions for network monitoring tools.
Clearly, building "yet another" language wasn't the hard part for Eich--the hard part was producing a rich and powerful language while being prohibited from using the object-oriented syntax reserved for Java. He wanted to embed advanced features in JavaScript without using language syntax so the language would initially appear simple and lightweight, yet sophisticated programmers would be able to exploit its underlying power.
Like many other languages, Java-Script took its basic syntax from the C language, including curly braces, semicolons, and reserved words. It was to be a light, friendly version of C with simpler semantics and better dynamic memory characteristics. Because a typical webpage's lifetime lasted from a few seconds to a few minutes, JavaScript could take a very simplified approach to concurrency and memory management.
Eich built a simplified object model that combined structs from the C language, patterns from SmallTalk, and the symmetry between data and code offered by LISP. The Hypercard event model inspired the pattern for adding events to the HTML document. Object-oriented patterns were possible but via runtime semantics with prototypes (as in Self) instead of compiler-supported class syntax (as in Java and C++."
Re: (Score:2, Flamebait)
> All languages suck in various ways.
Except JavaShit is brain dead.
Any JS programmer worth their salt uses the triple equality test, ===, because JavaShit fucked up the normal equality comparison test, ==, due to unwanted type conversions -- one ends up with this retarded operator comparison [github.io] table.
Which produces this
Re: Well that makes sense (Score:2)
So, if you have no use for a sloppy equality test, why would you use it? I personally can't remember the last time I've used it, but having an operator I never really have a use for has never once impeded my ability to get shit done. Do you have some sort of arthritis that makes that third "=" painful to type, or is the arthritis in your head?
Re: Well that makes sense (Score:2)
Fuck I almost never use bitwise or, either, but god damn, it doesn't bother me that it's available.
Re: (Score:2)
I'm disciplined enough to use triple equals. I'm the one responsible for introducing it to our internal Code Standards.
The problem is the rest of the people on my team. who aren't.
Re: (Score:2)
I agree. Working with shitty devs sucks. You can write Fortran in any language.
Re: Well that makes sense (Score:2)
If you don't know what types you're working with, why don't you just cast them?
String(a) + String(b) or Number(a) + Number(b) is pretty easy.
If you're arguing that JS exposes you to your own sloppy conventions, then I agree.
Re: Well that makes sense (Score:2)
Re: K&R, just pretend you're at a REPL. If what you're doing would confuse a REPL, then it's not going to work as expected in JS.
That said, very little JS uses K&R for anything because it is an absolute mess when you start using inline callbacks. If you want to be a special snowflake, then you can use whatever format you like by using a var/const instead of a literal, but perhaps you should get over yourself and just do it the "normal" way.
Re: (Score:2)
And it's fast as fuck...
Wrong [debian.org].
Re: (Score:2)
LOL, bless your heart.
You just go right on thinking that and having fun playing in your browser sandbox.
Pay no mind to all the C/C++ that implements that browser, and the server daemon on the other end, and the operating systems they both run on, and the libraries your code ends up calling to actually accomplish anything....
Re: (Score:2)
Nailed it.
Re:It amazing how IT can't learn from the past (Score:2)
That being said our industry never learns. We dealt with termcaps and incompatible ChUI terminals in the 80's, odd and/or incompatible desktop graphics capabilities thru the 90's followed by browser incompatibilities and now vastly different JS engines. You would think the industry would eventually figure out that taking decades to establish baseline standards for
Re: (Score:2)
Real pragmatism is recognizing that popular languages are often the best tool for the job, no mater how aesthetically distasteful they are.
The only reason Javascript is the "best tool for the job" is because it's the only tool available. If you only have a hammer, every problem looks like a nail, and that describes Javascript perfectly. MFC was the the best choice for windows UIs for a long time, so I used it, but it still sucked (and still does suck).
So I'll pass on joining this guy's fan club.
That's fine.
Re: (Score:3)
Agile, a fad since 2001.
Based on my experience, it is. I haven't seen a lot of truly agile project succeed. I've seen a lot of "fragile" and a lot of cargo cult agile ("we do stand-up meetings and we have a JIRA backlog so we're agile") and those are indicators of a fad.
I think the true value of agile has been to break the monoculture of MS-Project thinking and that's a good thing. But I don't think it has achieved much in organizations that have larger teams; those still consistently fail to deliver projects.
On top of that you also have the Agile Lawyer (Score:2)
Re: (Score:2)
One time I was on an Agile project where the Scrum Master was a PM and the Backlog was a MS-Project file (because he needed "actuals", not just burndown...). The Sprint Planning meeting was people telling him how long such or such task would take so he could adjust his Gantt chart but most of the time he would suggest a new number to make tasks fit his deadlines.
It was a big team and the daily Scrum meeting was done sitting down in a big conference room and people answering one by one the questions asked by
Re: (Score:2)
Re: (Score:3)
It's a lot of unnecessary process and meetings. Daily standups, biweekly planning meetings, retrospectives, endless backlog grooming sessions etc. I've been at companies that burn 10-20% of the team's time each "sprint" in unnecessary meetings to discuss work rather than actually doing work.
The meetings impose heavy burdens on anyone who doesn't want to be interrupted at that time. A typical 10am standup meeting is too early for night owls and too late for parents who drop their kids off to school at 7am, a
Re: (Score:2)
Perhaps you should invest the 200 bucks and make a scrum course?
All you wrote here about agile and Scrum is nonsense.
And yes, I preserve the right for me to say: 'that was Scrum done bad'.
Or as we scrummers say: either you do Scrum, or you don't. There is no mid way of being half assed agile and claiming you do Scrum if you don't do Scrum 100% :)
Your religion is...odd. (Score:2)
nt
Re: (Score:2)
I'll provide a non-condescending response [asyncmanifesto.org] to counter the AC. We agile critics are not all like him.
Re: (Score:2)
[...] where you can't get anything done because there's a meeting soon. [...]
WTF.
What kind of undisciplined clowns are you employing there?
It's no different at all than lunchtime coming up. You work until it's time to take a break. A meeting is a break from work. Are you not able to get anything done in the three hours before lunch?
Re: (Score:2)
It's way off topic, but why do you (seem) to hate Agile so much? We are a Scrum shop, and frankly it seems super great...
Are you truly Agile, or are you simply using Scrum techniques to manage a backlog of features?
Do you have business users as part of your sprint planning meetings? Do they perform acceptance tests at the end of each sprint? Etc.
Being Agile is more tedious than it sounds.
Re: (Score:2)
There is no agile method I'm aware of where business users are part of thr sprint planning.
What would be the point if that!?
Re: (Score:2)
There is no agile method I'm aware of where business users are part of thr sprint planning.
What would be the point if that!?
This is the role called "the Product Owner". That person is the link between the product and the users, and if you don't have one in your team, you're not doing Agile.
In my experience, when people ask why a Product Owner should attend sprint planning meetings, it's because they're not doing agile, they're pretending to.
Re: (Score:2)
The product owner is not needed for Sprint Planning. However in Scrum he is usually present.
The product owner is not a business user, not even in the remotest sense. Well. there might be exceptions. A business user evolving into a product owner or product manager.
In my experience, when people ask why a Product Owner should attend sprint planning meetings, it's because they're not doing agile, they're pretending to.
This 'question' has nothing to do with agile or not.
The question is: does the team need the PO
Re: Well that makes sense (Score:2)
They are better because I can use them on the OS of my choice and any changes are available immediately.
What nightmare of pitfalls? (Score:4, Insightful)
Over the years I've come to realize that programming languages aren't standalone beasts. When you pick one, you get a lot of other stuff along with it: common libraries and frameworks, runtime systems, problem domains, communities of programmers who do things a certain way, and the sources where most people learn them. That last bit is not to be overlooked, one of the best features of C is The C Programming Language.
As for pitfalls for newbies -- I think that's the browser, not Javascript. Javascript seems pretty straightforward in Node.
It's both because Javascript developed in 10 days (Score:5, Informative)
As someone else said, often Javascript is the right tool for the job, because the job is manipulating DOM elements in a web browser.
A major new future in Netscape 2.0 was that it had Scheme embedded, for scripting. Ten days before the public beta, it was decided that the Scheme effort couldn't be salvaged - it just wouldn't work. But Netscape's hype had promised embedded scripting. So in ten days Brendan Eich designed, coded, tested, and integrated Javascript. 10 days for all of that means he had about two days to design the language. It shows. Other languages have had years, or at least months, of design. Javascript had about two days. Eich did an amazingly good job, for weekend design project.
Obviously Javascript has matured a bit since then, but its origin as the mother of all all-nighters, the crashiest of all crash projects, still shows in its design, its inconsistent naming of functions, etc.
Re: (Score:2)
often Javascript is the right tool for the job
Eh... right tool, or only tool?
Re: (Score:2)
It's funny that you mention that, because I was going to say that Javascript is a lot better if you program in it as if it were Scheme than if you try to program in it as if it were Java.
The inconsistent naming of functions makes the same point I was making: that's not a language problem, it's an API problem. If you take Javascript out of the browser and put it into a freshly designed runtime environment (e.g., Node) that aspect of the language experience goes away.
Another language that "has" this problem
Re: (Score:2)
In the case of R, there's a sub-universe of it's own using the Hadley Wickham (and his cohorts) packages tidyr and so on. If you buy into the hadleyverse (he prefers the name tidyverse).
I'm particularly interested in the new packages for reading data readr and readxl, which are supposed to be much faster with saner defaults. The old read packages had a habit of treating all strings as though they're a database enumerated type, it would try to "tokenize" everything on the fly...
I think what you're tal
Accidental complexity (Score:4, Informative)
A number of newer languages are embracing the idea of protecting the programmer from doing the wrong thing by accident, and I welcome this trend.
Even though I enjoy my occasional work with Python, the other day I accidentally forgot to explicitly reference a specific variable from a returned tuple, the error code I wanted to check against. Python happily let me compare tuple_value != 0 without complaint. While it may be possible to conceive of a situation in which a programmer MIGHT want to compare a tuple against an integer, it seems like 99% of the time, it would be best to throw an error, and force the programmer to do such an operation explicitly, rather than assuming it was intentional. It would have saved me a lot of hassle had this operation not been permitted. So, just one example there.
JavaScript has a lot of similar issues, from what I understand, such as weak scoping rules, global by default, no namespaces, and overly-generous implicit type coersion. All these things seem to work against the programmer, even if they were originally designed as conveniences.
It's really a shame that "what we have" for the web is JavaScript, so it's sort of impossible to work in web and ignore it. In my particular industry, "what we have" is C++. I'm not sure whether I should feel fortunate or not compared to web programmers. C++ has it's own particular nightmare of complexity, but the good news is that with C++, you can protect yourself from stupid mistakes with enough self-discipline, and the language has improved remarkably in the last 6 years.
Re: Accidental complexity (Score:3)
Weak scoping rules? How do you differentiat between strong and weak scoping? Either an identifier is in scope or it's not.
Re: (Score:2)
I believe it is to do with web browser clients connecting to remote servers and making transactions:
http://knowledgebase.progress.... [progress.com]
Re: Accidental complexity (Score:5, Informative)
In JavaShit, variables can be used ANYWHERE in a function, even outside their _expected_ scoping.
For example, weak scoping:
In contradistinction to C++ which has strong scoping:
Scoping helps prevent name collision and bugs.
--
Only an amateur defends JavaShit; professionals are too busy trying to work around the brain dead language designed in 10 days.
Re: (Score:2)
Hoisting is just the formal name for retarded design.
Maybe one day you'll grow up and learn about Basic Blocks. [wikipedia.org]
Re: Accidental complexity (Score:2)
I'm typically targeting an older version of the language which doesn't support block scoping yet. Every once in a while, I kind of wish I could block scope a for loop counter. But 99 times out of 100, I'm using something like .forEach(), or .map(), or .reduce(), which give you a function scope, anyway, so it's not too bothersome. And block scoping IS available in the newer version of the language, so it's really an annoyance I push on myself. I certainly can't blame the language for not using a feature it a
Re: Accidental complexity (Score:2)
If you declare all your vars at the beginning of a scope, how is it different than outer-inner scoping?
Re: Accidental complexity (Score:3)
Also, I've never once felt any need for namespaces in JS. Whether you're using ES6, CommonJS, or require.js, you can name anything whatever you want, so there are no naming conflicts which require namespaces to address.
Also, this is one example of how JS deters you from globals, and pushes you into DI.
Re: (Score:2)
None of those things I listed are *essential* for writing high-quality software. Those are just things that make life easier for the programmer, and help them to avoid mistakes.
Also, the global namespace in JavaScript has certainly been the cause of many bugs, and more than a few security issues as well. Were you designing the language from scratch today, you'd certainly build in support to make it much easier to write code in protected "containers" of sorts, and make it much more difficult to breach thos
Re: Accidental complexity (Score:2)
Tough to say. Global-everything is a valid paradigm for tiny projects. If tasked with re-doing JS, I'd think long and hard about invalidating a legitimate paradigm, even if it's a paradigm I wouldn't use. That said, until using JS, the thought would not have occurred to me that you might want that.
Re: Accidental complexity (Score:2)
Says someone who doesn't write JS for a living. Any problem "namespaces" are intended to solve are addressed trivially with just module names, and the paths inside them. If you feel like you need a namespace in JS, it's probably because you made everything global.
Re: (Score:2)
Yeah I got caught by something similar. An int set to None is False. Changed that variable to be a list and a corner case where I passed an empty list was treated as False where I expected it to be True. I as in the habit of treating None as False and it bit when I changed the type of my data.
Original submitter here (Score:5, Interesting)
Original submitter here... I just came here to compliment the editor (EditorDavid). This is my first time submitting and thought my summary was pretty good. But EditorDavid just went above and beyond, extending it with stuff from Twitter, couple of sentences on Andy Hunt's work ethic cetera.
It's been tradition to hate at the editors here, but this time I have to hand it to them, compliments are in order.
Re: (Score:2)
Thanks for the article submission, and good to hear some positive feedback for a change when the editors do a proper job. Just ignore acerbic bitter-balls that can't find anything better to do with their time than to lash out at strangers on the internet. It's really sort of sad, when you think about it.
Re: (Score:2)
and good to hear some positive feedback for a change when the editors do a proper job
You'll always get positive feedback - or least, moderate surprise - when they do a proper job. The problem is that that is rarely ever.
Re: (Score:2)
It's been tradition to hate at the editors here, but this time I have to hand it to them, compliments are in order.
It's been tradition to hate at the editors more than to compliment them because they've done more inattentive work than exemplary. My own experience with submissions has been mixed. In one case I thought my submission was much improved, and in one case I thought my submission was much better than what was posted. I'd call it a wash. I still blame the users for most failures.
Re: (Score:2)
I still blame the users for most failures.
Well, if we're going to blame someone, I'd say it's that fucking asshole CowboyNeal, who's been ruining things since 1998. He should be quartered and flogged, or perhaps the other way around.
Re: (Score:2)
I suspect that if you ran "cerberusss" through the WebCryptoAPI (https://www.w3.org/TR/WebCryptoAPI/) the result would be Andy Hunt.
Re: (Score:2)
Who was that guy who was the infamous submitter after Roland? I forgot his name.
There was Bennett Haselton [wikipedia.org], who had a lot of good ideas but was just WAY too pedantic and long-winded for many here. Then there was another guy that like Roland just shotgunned out his stuff all over the web to sites like Slashdot and Soylentnews (and others), but when you went to his blog, the content was essentially the same short summary that was at Slashdot, with links to the real source and Google Ads. I forget his name, but there were copious pictures of his swanky accommodations and the occasional tr
Re: (Score:2)
As he says himself he doesn't code, he "experiment". So for useless fool never making anything useful an unpopular terribly designed and unremarkable scripting language with the shittiest syntax short of mocklangs would be perfect.
Re: (Score:2)
Python is the Java of the scripting world, verbose and full of inconsistencies.
That sounds like Python 2. Python 3 is much better.
Re: (Score:2)
Ruby is better at string manipulation and unix integration than any other language, including Perl.
No it's not. Just because *you* can't do string manipulation in other languages doesn't mean those languages are not as good as ruby. It just means you're a one-trick pony.
There are many languages I personally don't like, such as Go, Scala or C++. But I can see why someone would choose one of those for a specific project, because they each have specific advantages.
But there is no aspect of ruby that another language isn't better at. Even for the "casual programmer" niche Python is much better.
And don't get
Re: (Score:2)
the most widely deployed OS in the universe
You're really good at making unsupported claims.
^ that guy is stupid (Score:2)
Your ignorance is astounding and frightening.
Amusing, coming from someone who claims to know "the most widely deployed OS in the universe".
Prove it. (And then make sure to share your data with NASA).
Re: (Score:2)
Ruby is objectively superior to both Python and Groovy
You forgot to put a smiley at the end of your statement so people could tell you're joking and not being stupid.
Re: (Score:2)
AVR stuff is just looping around, reading and writing bits and bytes. Fair enough. Elsewhere In C I would use pointers for linked lists. Hard to get stuff done without dynamically allocated data structures.
Re: (Score:2)
Elsewhere In C I would use pointers for linked lists.
Don't use linked lists [youtube.com] if you care about performance. If writing a dynamic array is a pain in the ass in C then stop using C. Use C++ instead.
And don't give me that ignorant crap about C++ being bloated in comparison to C and thus unacceptable for embedded uses.
This guy wrote pong for the C64 in under 1KB of compiled code (including sprites!) with ZERO ram usage [youtube.com].
Re: Pointers Aren't Nesesary In Arduino (Score:2)
Depends on what you're writing. I wrote a fairly large Arduino library (Automaton) and to keep memory overhead to a minimum I really needed a linked list and pointers.
Re: (Score:2)
Anything which works at the OS level has threads because it can spawn processes. The JVM has threads because it can't (easily) spawn processes, but many implementations use processes for JVM threads. JS, with lambda expressions and even driven programming claims to be threaded but is not. Its just callbacks where you have no control over when the calls are going to be made (usually in a rush when your main call ends).
Like it or not, our applications require threading. Your indexer has to keep running while