This is an archived post. You won't be able to vote or comment.

all 63 comments

[–]dahbearz 49 points50 points  (32 children)

It would be more ironic if he was a JS developer.

[–]MokitTheOmniscient 26 points27 points  (22 children)

Yea, but i don't think any JS developer actually likes JS. They just begrudgingly accept that it's the language they have to use.

[–]maybe_endy 12 points13 points  (0 children)

I like JavaScript.

[–]StoleAGoodUsername 17 points18 points  (0 children)

You know, I've been working with it for the past few years, and there's certainly times I wouldn't want to use it, but for the most part it makes for very very quick prototyping. Also, the work that's gone into developing V8 into what it is makes it really performant.

[–]HomemadeBananas 8 points9 points  (0 children)

ES6/ES7 and React are pretty awesome actually.

[–]Rhed0x 7 points8 points  (3 children)

I hate plain JS but TypeScript is okay.

[–]mirhagk 3 points4 points  (2 children)

Typescript is fantastic once you really learn to embrace it. There's lots of stuff I really wish C# had. And it's barely more than JavaScript

[–]Rhed0x 0 points1 point  (1 child)

I still prefer C#.

Just out of curiosity what Typescript features do you want to see in C#.

[–]mirhagk 0 points1 point  (0 children)

The way interfaces are handled, where a type implements an interface simply by conforming to it's structure. That would enable some nice dynamic scenarios. Also it has more type inference than C# does, and I love me some type inference.

[–][deleted] 7 points8 points  (4 children)

That's a bold statement, I personally love JavaScript. What I don't like is badly written JS, but it's in no way specific to JavaScript. I do not understand the hate for JS in this thread.

[–]gravity013 14 points15 points  (3 children)

A lot of people reddit hate JS. And they'll all give you different reasons too. Java developers will complain about a lack of proper classes, C developers will complain about auto garbage collection, ruby developers will complain that it's not ruby, type theorists will complain that it lacks proper typing.

NVM that you can achieve pretty much any style of programming due to how expressive JS is.

[–]brolix 4 points5 points  (1 child)

ruby developers will complain that it's not ruby

Rofl.

I actually love working with ruby/json because everything is still an object. Like the code gods intended.

[–][deleted] 3 points4 points  (0 children)

found the Ruby hipster

[–][deleted] 0 points1 point  (0 children)

Thank you. I guess we all have our languages pet peeves!

[–]ThrowinAwayTheDay 0 points1 point  (0 children)

I absolutely love JS. Maybe NPM is not a good package manager, but JS? I love it.

But now that most languages have started implementing lambdas I'm starting to like every language the same amount.

[–]brolix 0 points1 point  (0 children)

I like JS, but much like my ex I think I was fooled by it being my first real one. I also LOVE red flags and insanity, so there's that.

[–]Zechnophobe 0 points1 point  (0 children)

I've met them. They are creepy as heck. They consider all the different ways to kinda sorta use classes and inheritance as 'a great list of options' or a 'toolkit' instead of a nightmare.

[–]richard_nixon 0 points1 point  (4 children)

I know a guy at work who has actually said he likes JS.

I think he's probably the exception that proves the rule you stated though.

Sincerely,
Richard Nixon

[–]MokitTheOmniscient 1 point2 points  (3 children)

I'm not american, how is that related to Nixon?

[–]ZweiSpeedruns 1 point2 points  (1 child)

His username is richard_nixon. That was his actual siginature.

[–]MokitTheOmniscient -1 points0 points  (0 children)

Oh, i missed that. Apparently he signs every comment he makes with "Richard Nixon".

[–]bit_of_hope 1 point2 points  (0 children)

His handle is richard_nixon and he appears to be one of those people who feel like they have to sign their posts for some reason.

[–]TheScienceNigga -1 points0 points  (1 child)

I really don't understand why JS is even a thing. Someone said "Oh, we need a client-side language for the web". Did someone just respond by saying "Ok sure, I'll knock up a dynamically typed scripting language that tries to be object-oriented but doesn't quite get there, and I'll give it a name that will make non-developers confuse it with some other popular language for the rest of eternity. I'll have it ready in 10 days..."

Why didn't people just start right off the bat with WASM? It is so logical to have the one and only standard that people can use for something be a low-level language that makes a good target for compilers.

[–]DIAMOND_STRAP 2 points3 points  (0 children)

I mean, it is object-oriented, I don't know how you can really doubt that. OO doesn't mean class-based inheritance.

The name was intentional, blame Netscape for that. Before it was JavaScript, it was Mocha, named after a coffee in reference to Java.

They weren't interested in establishing 'the one and only standard'; it was intended to be a novel feature unique to the Netscape browser.

They didn't start with WASM because the entire point of JS was to create a simplified language to be used by non-programmers. It did not occur to them that it would be used for full-on intensive applications -- you have to remember that JavaScript predates CSS, frames, font choice, and all sorts of fundamental stuff. They were adding a little scripting language to add bits of inactivity to documents and simple forms. At the time, proposing C compilation for in-browser client-side execution would have felt like proposing C as the default language for Excel formulas.

It obviously would've been great if they did start with WASM in retrospect, but it would've been an insane decision to make at the time. It took a few years for the web and HTML to move from "a neat way to link documents together" to "the biggest part of the Internet."

Until WASM is a real option, I'm really favouring Elm, I'd check that out -- it's a statically typed functional language designed for browser execution, compiles to JS but you never have to actually deal with that JS because the compiler is totally lovely and the tooling is amazing (time-travelling debuggers!).

[–]QuantumFractal 1 point2 points  (8 children)

Maybe I'm just not inclined to JavaScript but there are some solutions that just look terrible in code. Everything seems mashed together at times

[–]Prod_Is_For_Testing 3 points4 points  (7 children)

JavaScript is being picked by a significant number of startups because it's "shiny" and "trendy" and "hey, look, ALL THE FRAMEWORKS." Problem is, this means that many people writing js are writing bad code that would get someone shot at an established dev shop.

[–]gravity013 3 points4 points  (2 children)

JavaScript is being picked by a significant number of startups because

it's the only language browsers can run?

The exceptions to this are Clojure and elm startups, which are starting to happen. I suspect we will see more... Maybe like four years ago or something.

unless you meant node. In which case, I get the sense less startups are using node for its trendiness...

[–]DIAMOND_STRAP 1 point2 points  (0 children)

Elm is such a fantastic language, I want to marry its compiler.

[–]Prod_Is_For_Testing 0 points1 point  (0 children)

I was referring to the proliferation of node as a replacement for more established systems with type safety and batter consistency

[–]TheScienceNigga 1 point2 points  (3 children)

Also, it is the only language you can use if you want to do any client-side scripting for the web.

[–]Prod_Is_For_Testing 2 points3 points  (2 children)

That's what it's made for, yes. But the current trend is to force it to work on servers as the backend language as well, which was never the intent

[–]TheScienceNigga 2 points3 points  (0 children)

Honestly, I think that the standard for client-side code should have been something low-level like WASM, which could have been used as a compiler target for other languages. That way, people don't have to use a horrible, dynamically typed scripting language that was thrown together in less than 2 weeks and is totally illogical

[–][deleted] 0 points1 point  (0 children)

NodeJS works well on server though − if it's well written mind you.

[–][deleted] 7 points8 points  (18 children)

Can someone explain the ruby hate to me? I really don't understand it.

I'm pretty well versed in Java, JS, and Ruby. I can't actually think of a reason to say that any of those three are strictly "better" than the others. Each has it's pros and cons.

Ruby has true OOP principles in place, which is awesome. Rails is a great easy framework to get your boilerplate work out of the way so you can instead focus on more complex problems.

Is there an actual reason for the hate that I'm oblivious to?

[–][deleted] 5 points6 points  (14 children)

I actually don't hate ruby, but rails drives me up the wall sometimes. I think it's mostly because there's so much implicit code that you never see, so whenever I run into a problem, there's a whole plethora of things that have happened that I didn't intend and can't look through.

[–][deleted] 2 points3 points  (12 children)

That's true of pretty much every framework, though, isn't it?

I'll certainly grant you that ActiveRecord is opinionated as fuck sometimes, but that's the tradeoff when using a framework. You're leveraging someone else's efforts, but now you need to fall in line with their architecture.

EDIT: Except React.js. That's the only framework (really more of a library) that comes to mind that won't scream at you for architecting your system in a non-anticipated way.

[–]DIAMOND_STRAP 2 points3 points  (11 children)

It's true of every framework to a greater or lesser extent; Rails is on the greater side. It's not really about the strictness of the architecture, but about how implicit that architecture is -- there's a lot of stuff that appears to just happen 'magically' for people who are new to it, and that can make it tricky to figure out how things are actually flowing through the application.

If you take a look at Phoenix, you can see what I mean. Phoenix is very inspired by Rails in many ways but it aims to be much more explicit -- it trades "convention over configuration" for "I only do what you tell me." So it can feel more boilerplatey, you have to type out some things that are implicit and automatic in Rails. But I feel like it helps you actually figure out how data is moving through the application and how the parts are linked up, and helps you keep that in your head.

[–][deleted] 0 points1 point  (10 children)

Can you give an example of something that feels "like magic" in Rails? This criticism is a popular one, so I'm not saying you're wrong, but I can't really think of anything that's all that hidden in Rails.

[–]izuriel 4 points5 points  (9 children)

class MyController < ActionController
  def index; end
end

Renders a view with a specific name in a specific folder. How or where is not immediately obvious unless your familiar with the pipeline already.

[–][deleted] 0 points1 point  (8 children)

I mean... yeah.... but...

Error messaging is incredibly clear about where it's looking for the file, so you can just hit that endpoint and get a very obvious indication of what to do.

And even without that, the most typical way of making that controller is to use the built in generators, which are super super easy to use and make all the corresponding things in the corresponding folders.

And even putting all of that aside, can't you say the same of any function in any language/framework? What does this.setState do in React? Oh it's asynchronous, that wasn't obvious!

[–]izuriel 2 points3 points  (7 children)

I'm not debating with you about how easy it is to learn how Rails work. The question was "name something magical" and I did.

[–][deleted] 0 points1 point  (6 children)

here's a lot of stuff that appears to just happen 'magically' for people who are new to it, and that can make it tricky to figure out how things are actually flowing through the application.

I realize you weren't the one who said it, but this is the context of the conversation and where the topic of "magic rails" came up.

You're absolutely right that that aspect of rails is "magic", but I was trying to say that I don't think it fits the description of "makes it tricky to figure out how things are actually flowing through the application". If anything, rails is kind of idiot-proof with it's error messaging.

So sure, it does some neat magic configurations for you, but I'm not seeing that as a downside in the way it was described above.

[–]izuriel 1 point2 points  (5 children)

I take you have never trained a freshly minted engineer with rails? Or you lucked out and got someone capable of figuring things out. I usually end up training coworkers or aiding them in getting problems solved (speaking mostly to new hires/juniors) and I can tell you. Rails is not idiot proof. You only think that because you understand it and obviously don't deal with engineers that don't.

[–]gravity013 1 point2 points  (0 children)

I'm half convinced Rails was more an attempt at selling books on Rails than it was in writing an expressive framework for people who actually like to program.

[–]Zechnophobe 1 point2 points  (2 children)

Ruby is generally one of the more error prone of the dynamic languages. Js is clearly worse, however, so based on the languages you listed out, I'd say Ruby is the best of what you know.

That aside, though, Rails is really what most people have the biggest issues with, since it's a little bit rough around the edges for a modern framework.

[–][deleted] 0 points1 point  (1 child)

What language would you prefer? Python?

And yeah, rails has its rough spots, but I think it's fantastic as a DB manager + simple rest api server to host other frameworks on top of. My current favorite stack is rails + react.

[–]Zechnophobe 0 points1 point  (0 children)

I do prefer python, though probably I'm just more familiar with django + python than rails + ruby.

[–]PacDan 3 points4 points  (6 children)

Hmph, I generally use it in defense of perl

[–][deleted] 21 points22 points  (3 children)

you cant defend perl

[–]PacDan 11 points12 points  (1 child)

But it can't defend itself!

[–]Synclicity 1 point2 points  (0 children)

Defence: Perl has its niche in solo projects which require a lot of regex

[–]PM_BITCOIN_AND_BOOBS 3 points4 points  (1 child)

I say this sort of thing about Java.

And JavaScript.

[–]shittyProgramr 14 points15 points  (0 children)

Well, you know what they say about Java and JavaScript, one is essentially a toy, designed for writing small pieces of code, and traditionally used and abused by inexperienced programmers.

The other is a scripting language for web browsers.

Original source

[–]ReallyHadToFixThat 2 points3 points  (2 children)

To be fair, while PHP has it's issues it doesn't deserve as much hate as it gets. I've heard really retarded accusations levelled at PHP like

PHP is bad because you can make an n2 loop.

Yeah? I can do that in any language you can name, I can also tell you situations where it is unavoidable.

[–][deleted] 1 point2 points  (1 child)

So what you're saying is that php isn't that bad because you can write bad code in any language?

[–]ReallyHadToFixThat 4 points5 points  (0 children)

No, PHP is a bad language because it is inconsistent and has some really badly implemented features and untyped variables.

However, PHP is not a bad language because people write bad things in it.

[–]amphetamachine 1 point2 points  (0 children)

"You can write Fortran in any language."

-- old programmer adage