Check out a free preview of the full The Good Parts of JavaScript and the Web course
The "Audience Q&A" Lesson is part of the full, The Good Parts of JavaScript and the Web course featured in this preview video. Here's what you'd learn in this lesson:
Doug spends a few more minutes answering audience questions.
Transcript from the "Audience Q&A" Lesson
[00:00:00]
>> [MUSIC]
[00:00:04]
>> Speaker 1: There's a question about being able to freeze data objects.
>> Douglas Crockford: You can, I don't recommend it unless you have something that really wants to be immutable. Remember that once you freeze something you can't unfreeze it. So you're only going one way.
>> Speaker 1: And then let's see, Dates and JSON.
[00:00:28]
>> Douglas Crockford: Nope, JSON's done.
>> Speaker 1: Yeah. Well, no okay. So you just don't have a recommended format?
>> Douglas Crockford: JavaScript didn't have one so JSON didn't get one.
>> Speaker 3: Use timestamp?
>> Douglas Crockford: Yep, I'd recommend using ISO Strings. That seems to be the smartest thing. I know there are lot of people who don't like doing smartest things, so they're free to do whatever they want.
[00:00:51]
>> Speaker 4: What's your take on the JSON [INAUDIBLE] spec that's been going around recently?
>> Douglas Crockford: For Java?
>> Speaker 4: No, it's a [INAUDIBLE] and it's being kinda way to format JSON admins for [INAUDIBLE] server. Basic collection of how you organize data inside the algorithm.
>> Douglas Crockford: I'm not aware of it.
[00:01:11]
Anybody is free to do anything they want.
>> Speaker 3: Thread and bugs.
>> Douglas Crockford: No, unfortunately they're free to do that too.
>> Speaker 5: [LAUGH]
>> Speaker 6: Why don't you have an opinion on Swift? Have you just not looked at it enough, or-
>> Douglas Crockford: I've not looked at enough. I went to get the Swift report and it was hidden behind some Apple login thing and said hell with that.
[00:01:34]
So I didn't get it. So I'm not up to date on it.
>> Speaker 3: What's the reason you don't use camel case. [INAUDIBLE].
>> Douglas Crockford: So there's this big debate, what is the correct way to do multi-word identifiers in any language? Should you use camel case or should you use under bars and this is another one of those things that programmers can't agree on, that you know there's an endless argument.
[00:02:00]
And the reason there is an endless argument why it will never end, is because they are both wrong. That the correct thing should have been to use space, that our languages only have to get a tiny bit smarter and we could have spaces as valid characters inside of names and then they would read better and they'd be easier to, to, process and all of that stuff.
[00:02:22]
So one of the aspects I'm looking for in the next language besides getting numbers right, is that it'll also allow space as a component of names.
>> Speaker 7: That's in Angular or Angular 2?
>> Douglas Crockford: Lots of angular or angular two. That's two completely different question.
>> Speaker 7: Either or?
>> Douglas Crockford: I've looked at angular and I was kind of surprised at how hard it is to get to make something easy.
[00:02:53]
I don't get it. I hear from people who swear by it and I think that's great and maybe it solves the problem they have. I've not observed that solves a problem that I have.
>> Speaker 8: It's the Stockholm thing, I think with angular, once you get there.
>> Speaker 7: Yeah.
[00:03:09]
This is great.
>> Douglas Crockford: Well the problem with all these frameworks is that once you get committed you are stuck. You can't go, that was mistake and back off. You're fully committed and so, you can't find out if any of these things are good or not until you commit.
[00:03:25]
And so you have to be careful.
>> Speaker 3: So I went from Github to Douglas Crawford dot com and you clearly have no low CSS. [LAUGH] There's no CSS on there. [INAUDIBLE] What?
>> Douglas Crockford: What?
>> Speaker 3: What's your issue with C.S.S.?
>> Douglas Crockford: Are you going to bring up that old wound again?
[00:03:50]
>> Speaker 3: Sir I, Yeah
>> Douglas Crockford: So C.S.S. was designed for formatting technical documents that was its purpose in life. And that is not what we use it form, we use it for all kinds of stuff that is very badly suited for and we use it because it's the only option.
[00:04:09]
And it's better than it was before it came along because in the past there were no options used to see people doing typographic spacing by having tiny little that with a little bit of white space in them which was considered a best practice on the day but was always a terrible thing to do.
[00:04:28]
So, compared to that CSS is great but compared to what we deserve it's awful.
>> Speaker 3: You can still use some HTML, right, I mean-
>> Douglas Crockford: Yeah That too.
>> Speaker 3: [LAUGH]
>> Speaker 9: Any opinions on the rust language?
>> Douglas Crockford: No, I don't, I have read some of their material. It wasn't locked behind an Apple password so I have read some of that and some of it looks promising but I don't have any conclusions yet.
[00:04:59]
I've not worked with it.
>> Speaker 1: What about trends, pilers and, I mean, do you have any recommendations or-
>> Douglas Crockford: So let me say this about CoffeeScript, which started this craze. I like CoffeeScript a lot. CoffeeScript makes some of the good parts of JavaScript more visible. For some people it's easier to learn how to use JavaScript well if they learn CoffeeScript also.
[00:05:27]
I think the thing I like best about CoffeeScript is that it doesn't look like C, or Java, or any of those other languages. It's got its own look. It used to be said that no new programming language could succeed unless it looked like C. In CoffeeScript is showing that that's no longer true CoffeeScript succeeds because it doesn't look like C.
[00:05:46]
So, I like that a lot. Then the question is, should you use CoffeeScript in production? Absolutely not. No, you should not use CoffeeScript in production. It's still an experimental language it adds a lot of weirdness. It makes it harder to recruit people because who's gonna write the CoffeeScript stuff that some hipster left.
[00:06:04]
It's just not worth it. So, I always recommend learn the language. Pick up a new language and some of the transpiled languages are interesting, and are worth to study. But I don't recommend using any of them in production. I think, they don't add enough value to justify the weirdness.
[00:06:33]
>> Speaker 8: Lots of thank yous, and please extend their gratitude for the training. Do you find anymore-
>> Speaker 1: Yes, somebody asking is there a reason that you disabled bug reports on your get up projects.
>> Douglas Crockford: I didn't do that. What, I have complained to get up that there is no I'm trying to think of it the right way to say this, I tend to attract trolls.
[00:07:07]
I don't know why this is, but there are a lot of people who really want to come on to where I am and do trollish behavior, which is more than annoying, it's a waste of time. I have to deal with the patrols and I don't like having to do that.
[00:07:24]
So I've asked Git Hub for a no troll option. And so far they have not figured out how to implement that. So there are some things that I've turned things off but it's not completely off, you can still get messages to me. But if you have trolled me, I put you on the block list so that may be his concern.
[00:07:43]
He may have trolled me in the past but he can't troll me now. [LAUGH] So I'm not gonna apologize for that.
>> Speaker 1: Did you have any opinions on build systems? You mentioned practices of concatenating, and all that stuff. They're saying things like web pack or whatever.
>> Douglas Crockford: No, I don't care, whatever works.
[00:08:11]
>> Speaker 1: Yeah, that's what I figured. Not seeing any other questions. Anybody in the room? Your last chance to get an opinion [LAUGH] all right.
>> Douglas Crockford: I think we're adjurned.
>> Speaker 1: Concluded, right.
>> Douglas Crockford: Thank you.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops