Тёмный

Dmitry Baranovskiy: Zen of JavaScript | JSConf EU 2015 

JSConf
Подписаться 277 тыс.
Просмотров 8 тыс.
50% 1

Long time passed since JavaScript become mainstream. And despite multiple attempts, there is still no right single way to write code in this language. Everybody is using it in their own special way and most people still fill that they are failing to tame the language.
In this talk I will try to show you what language is trying to tell us for all these years, where is real path to enlightenment or at least we could have fun and look at things we know (or pretending to ;) from unorthodox point of view. ;)
Prepare to meet JavaScript… again.
Intro music by @halfbyte

Наука

Опубликовано:

 

9 ноя 2015

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@mallesbixie
@mallesbixie 8 лет назад
Excellent talk!
@edgeeffect
@edgeeffect 8 лет назад
Dmitry Baranovskiy is Buddha!
@hendrikw4104
@hendrikw4104 8 лет назад
Very interesting talk and I like his accent :D However there are some things I cannot quite agree with. Throwing an error on an unexpected parameter can be *very* useful for debugging. If you just accept anything and have a faulty result in the end it can be extremely hard to trace back where things went wrong. Same with NaN: For debugging you generally want to fail fast. If I just pass NaN through I have to go back and look where it went wrong. If I just return undefined/null and check for that I can instantly fail where the error occurred.
@arpanvaidya15
@arpanvaidya15 8 лет назад
+Hendrik W You do have a point that Javascript's more openness means it makes debugging hard. But Javascript was designed for browser and it can be disastrous user experience if we start throwing ugly exceptions on the screen. I think strong unit test coverage can amplify "fail fast" productivity
@kaheglar
@kaheglar 8 лет назад
I loved your talk, i would have called it "The Tao of JavaScript", but then again, I wasn't asked to speak.
@lancsFrogger
@lancsFrogger 7 лет назад
honestly can't see 99% of js programmers ever getting intimate enough with the language that they can even consider such philosophical aspects. but v funny & interesting talk all the same
@XboxPlayerPL
@XboxPlayerPL 8 лет назад
what is this worn font he uses?
@Xiel89
@Xiel89 8 лет назад
+FredJoidstersberg (Adobe) Source Code Pro i think?
@XboxPlayerPL
@XboxPlayerPL 8 лет назад
+Felix Leupold Do you know how to make this old vintage styled effect? This effect of font looking washed from its ink.
@syzer3921
@syzer3921 8 лет назад
so funny :)
@rishavrastogi835
@rishavrastogi835 8 лет назад
Is this like a Parody talk ? I get the point of using a language as its supposed to be used. The Javascript way or whatever. He makes a fair point there but doesn't follow it with examples of how is it useful to use this Javascript quirks favourably in code, without creating confusion. Javascript might be "careless", but we as developers can't be.
@arpanvaidya15
@arpanvaidya15 8 лет назад
+Rishav Rastogi You missed the whole point. As a javascript developer, your job is make the consumer of your api( or function or whatever you want to call it) 'care less'. Again look at the example of 'charAt' function. I don't care if I am going to run 'chartAt' function on String or NaN or Boolean or whatever. I trust that the function will not blow up on my face and will do the right thing in a given scenario. So on the contrary, to make the consumer 'care less', you have to be extra careful because now your function must handle every possible scenario. Throwing an ugly exception when input doesn't match your assumption is not acceptable anymore.
@rishavrastogi835
@rishavrastogi835 8 лет назад
Well, I said the same thing, I get the whole point of Javascript way and charAt is only one example, rest are pretty jumbled up. I am still thinking about the "ugly" exception based on input thing but its something I can reluctantly get behind, but thats pretty much it. My broader point is that the talk is the right vein but it doesn't tell you the benefits of the using the "Javascript way" or how it is more beneficial way except for the fact that it may be consistent but that itself is so very misunderstood or defined on project to project basis that its hard to see a "standard" here.
@spacedoohicky
@spacedoohicky 8 лет назад
+Rishav Rastogi John Resig had similar thoughts when working on jQuery. I can't remember where I heard/read it, but he said that he was trying to make things "just work" without errors as often as he possibly could. Nothing strange should appear in normal usage. If it's supposed to return a string no matter if the input is a number, or boolean it will convert into a string. You can see a similar thing in the jQuery constructor that accepts an array, dom element, html string, selector, or another jQuery object. It just works. So there in jQuery it might be a benefit, but the talk was about the Zen of it. You're supposed to contemplate it. :)
@rishavrastogi835
@rishavrastogi835 8 лет назад
+spacedoohicky I am still contemplating it. May be the deeper meaning will reveal itself surely.
@spacedoohicky
@spacedoohicky 8 лет назад
Rishav Rastogi Haha. Who knows. I do prefer trying to minimize errors. Sometimes it can't be done especially when calling out to some external thing like ajax, or data bases. Even those can work without errors, but that might cause some issues. Imagine if an ajax lib just returned an empty string when a resource isn't found. That would be preposterous.
@1DJLNR
@1DJLNR 8 лет назад
Great talk from Dmitry as per usual... Also many of you please calm down, you dnt have to agree with anything, show us to your video talking infront of many other programmers before you start saying you dnt agree with something, javascripts birth was hurried because of the browser and mainly that the browser would soon be the future money maker, besides that, javascript is more like tasker for android and dosshell / powershell for windows.. i love js but I feel as though people of this era are too *accepting*..
Далее
Gặp 2 thánh troll | CHANG DORY | ometv
00:42
Просмотров 24 млн
Me: Don't cross there's cars coming
00:16
Просмотров 13 млн
The Hardest Challenge!
00:37
Просмотров 6 млн
Crockford on JavaScript - Act III: Function the Ultimate
1:13:29
Lian Li: Machine Learning with Node.js - JSUnconf 2016
30:45
Asynchronous JavaScript Crash Course
1:28:03
Просмотров 193 тыс.
S-Pen в Samsung достоин Золота #Shorts
0:38
Так ли Хорош Founders Edition RTX 4080 ?
13:00