Hacker News Comments on
Hacker News Stories and CommentsAll the comments and stories posted to Hacker News that reference this book.
It may be a perfect time for a revision.
Knowing the dead ends and the history behind them is nice, but I spent a lot of brain power on the dead ends that Eloquent put towards better use.
But it doesn't really give a strong foundation on understanding the language. It's more like "I know mainstream C-inspired languages, and JS often burns me with its weird quirks like how the this keyword works, I just want to avoid getting burned". But it doesn't really embrace JS itself, just sort of acknowledges that you will be forced to use it in the web so you may as well at least learn the "good" parts.
It's still decent at that purpose, but for really strong competency in JS I can also vouch for the Eloquent JS book and the You Don't Know JS series (I've only read the first edition, a new edition is partially complete and available online).⬐ kqr> it doesn't really embrace JS itself, just sort of acknowledges that you will be forced to use it in the web so you may as well at least learn the "good" parts.
⬐ 101404And in between callbacks and asyncawait, it had Promises. I still often prefer those over asyncawait.⬐ pintxo⬐ threatofrainThe value is in knowing when to use which.⬐ eyelidlessnessAsync/await is semantically just sugar for promises (though implementations don't necessarily operate that way).⬐ fjpI never wrapped my mind around the Promises API, but I have always async/await is much easier to grasp in any language⬐ pintxoMaybe because it should have looked like this (personal opinion):But actually looks like this:
waitForPromise() .then(handleResolve) .fail(handleReject) .catch(handleException);
waitForPromise() .then(handleResolve, handleReject) .catch(handleException);⬐ csnoverwaitForPromise().catch(foo) is exactly the same thing as waitForPromise().then(undefined, foo). Your first example is essentially the same as:With the exception that if `handleResolve` also throws then that will be picked up by `handleReject`, whereas in `waitForPromise().then(handleResolve, handleReject).catch(handleException)` it won’t.
waitForPromise() .then(handleResolve) .catch(handleReject) .catch(handleException);⬐ pintxoAnd you last sentence is exactly describing the issue I have. This merging of exception handling and rejection handling into one function call feels like a bad idea.
As initially I thought catch() is only handling promise rejections. Then suddenly I ended up in the catch() although the Promise resolved fine, just to learn that my handleResolve code threw an exception. Unsurprisingly my handleReject code was not prepared for this.In my mind callbacks abstract events and it's better to toss events into a more composable async pipeline than it is to write a body of code to ad-hoc handle a problem right there.
JS is going to be so different in 2019 that I'm expecting a revised version of "The Good Parts"
⬐ eroppleThat book is of an era and hasn't been particularly relevant in quite awhile. The rise of classes as prototype sugar made a lot of the navel-gazing of object creation mostly moot. The rise of rigorous linting took care of the rest.
I mean, I don't like using it in Java either, but it isn't really optional there...⬐ stevula⬐ RoboprogNot optional for React devs. Well... maybe now with hooks.Some of us consider “class” a bad thing.
I would rather work in a language/style that draws its inspiration from Scheme than Simula 67.
ClojureScript didn't win, and never had a chance to win, because it's written for the small minority of Clojure people. It wasn't written for the overwhelming majority of developers. TypeScript was. So sorry that the existence of those day-to-day programmers puts a crimp in your utopia, but, enh. Personally, I'm glad we have tools to make it easier to write libraries to help that majority be more productive and to make their code safer and more correct!⬐ nine_kClasses are fine! Inheritance isn't. You can mostly avoid using it, though.
JS lacks homoiconicity and thus can't have a lot of nice things a Lisp dialect would, notably macros.
With what we've got, I have more hope on JS eventually migrating towards a (more) statically typed language with ML influence; typescript sort of leans towards it, slowly.⬐ sli⬐ sliYou're right about Lisp features, but CLJS macros are kind of bad at the moment. I have a fairly simple macro that works just fine in Clojure but does not compile in ClojureScript and I can't figure out why. It's probably a side-effect of how macros are handled in CLJS (they're part of a different compilation stage and must be written in CLJ or CLJC, hence :require-macros instead of just :require).
I would really love to move into PureScript as well, but I haven't quite wrapped my arms around Haskell as a whole, yet. So maybe I should tip my toes back into Elm for a bit.⬐ orangecatI would rather work in a language/style that draws its inspiration from Scheme than Simula 67.
(No (No (No (No (No)))))⬐ BigJonoOr we could've considered it an opportunity to move people away from classical inheritance and towards something that's conceptually much simpler? (which both prototypal inheritance and functional programming are)⬐ boomlindeJS is and always was prototype based. The class keyword is as far as I know just syntax sugar that creates a prototype chain and a new-able function that assigns the prototype to self.⬐ jwalton⬐ pjmlpThe '#privateVar' syntax means that classes are no longer simply syntax sugar, unfortunately.⬐ eropplePrivate variables could always be simulated with IIFEs. I'm pretty sure that's actually how TypeScript does it if you compile down low enough.Yet all successful functional programming languages do support doing OOP as well.
That's really all you need to get started.
⬐ gpayalthank you :)
I've heard people say good things about this book:
But I've never read it myself.
⬐ reesdreesdThat's encouraging. Thanks for the reference.
You may have to learn to put up with it. It's not the end of the world. It's just a scripting language, just suck it up and deal.
There are any number of js frameworks which will probably abstract away most of the headaches you might have, and depending on what you're actually trying to accomplish, you may not need a lot of js at all. If you don't want to use client-side templating, for instance, and there's no reason to, then just skip it. Push as much of it to the backend in the language of your choice as you can.
Yes. I believe such a book exists (or should at least) for every language as well.
Effective Java — http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp...
POODR (Ruby) — http://www.poodr.com/
There is of course also the gang of 4 language agnostic classic on design patterns http://www.amazon.com/Design-Patterns-Elements-Reusable-Obje...
Code Complete 2  was one of the first coding books I've read. As with anything else, it's good to look around (HN is a good place) for people who have problems with the book. I think I learn as much reading the commentary people make about books like that as I do from the book itself.
I think I've listened to every podcast on software engineering radio a few times . The older ones are especially nice because they usually pick a specific topic and cover the high points. I liked that I could listen to it while I was driving, or otherwise not in front of a computer.
I've also got Introduction to Algorithms, which I use as a reference, sometimes. I switched over to The Algorithm Design Manual  after I saw it referenced in an older Steve Yegge post . I read through the intro and it seemed like a book that would be more appropriate from an autodidactic standpoint. I really have no idea if that's going to pan out, since I'm not that far into it, but we'll see, for sure. Doesn't kill me to have an extra algorithms book laying about, though, and I've always got intro to algorithms for cross reference. I've found that I really need to have as many sources available as possible when I'm learning alone. Usually I don't get something until the fifth person describes it from the tenth different angle.
That's most of what I can think of off hand. I really enjoyed The Joy of Clojure , though haven't checked out the newer version. Programming Collective Intelligence  is a fun book, and is what made me want to go back down the maths route to get more into machine learning.
And of course habitually reading hacker news for an hour or three every night :)
So that's my totally inexpert list of random stuff that I enjoy
I would of course add "The good parts" by Crockford to the list.
But maybe that is just par for the language course, before one even starts to wants to master Engineering :)
Here's a few other good ones:
Here's a good one about Angular, my favorite framework:
Mastering Web Application Development with AngularJS - http://www.amazon.com/gp/product/1782161821/ref=as_li_ss_tl?...
I would of course also recommend the Egghead videos for any Angular aficionados: http://www.youtube.com/playlist?list=PLP6DbQBkn9ymGQh2qpk9Im...
PS. The Amazon links are affiliate links.
These two are a great start.
http://www.amazon.com/dp/0596517742 http://www.amazon.com/jQuery-Action-Second-Bear-Bibeault/dp/1935182323I would get to the point where you understand all that before tackling Angular, Ember, or Node.
⬐ thingificationHere is the context that makes these features not seem ad hoc:
While I think GWT is a pretty good project and has some way to go before it can be categorized as failing, some of your other remarks make me think that you have not given appropriate consideration to the alternatives to its approach.
It's possible that GWT and Java are the best fit for you, but don't pigeonhole yourself by thinking that they are the only good options out there.
> The scope of a parameter, local variable, or local function declared within a function declaration (including a constructor, member function, or member accessor declaration) or function expression is the body of that function declaration or function expression.
A suggestion to the authors. Purchase this book:
... then go through the book with a fine-tooth comb, and every time it describes something as a "bad part" or an "awful part", delete or fix that misfeature in TypeScript.
You should read it. It IS very short and can be read in one sitting. Then you wouldn't be left to trust the word of others.
I would repeat the exact same argument for using SASS or LESS instead of CSS. There is no good reason to torture yourself with CSS instead of these better languages. It's very clear that there is such thing as one language that is much better than another in every practical sense.
That's right! I love the discovery part of these visualizations. It helped me to find proper books many times - the graph drawing library is a result of such discovery.
3. Learn SQL (the language)
4. Pick an implementation
MySQL, PostgreSQL, SQL Server, Oracle
After that, most application development languages are just syntax. Pick what feels best.
Learn how to use Ajax to tie client-side requests to server-side requests and you're marketable.
⬐ charlieparkAgreed on points 1 and 2, but for front-end development, 3 and 4 are unnecessary and will pull you away from more relevant lessons, or (even more important), applying what you've learned to new problems.
Effective Java is the best book for general Java that I know - http://www.amazon.com/Effective-Java-Programming-Language-Gu... It's not a tutorial, but a collection of recommendations that could take you from just-learnt to competent.
For a C reference, Harbison & Steele is excellent - http://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp/...
"Steele" is Guy Steele, btw - http://en.wikipedia.org/wiki/Guy_L._Steele,_Jr. (author of "Common Lisp, The Language", developer of Fortress, etc etc).
besides by "doing it" I say bulletproof web design is a good book to start with. http://www.amazon.com/Bulletproof-Web-Design-flexibility-pro...
www.jquery.com smashingmagazine.com ajaxian.com
I hope the quality of programming books on the kindle will improve in the future, but now it's not too bad if you buy the mobi/pdf combo. You can always use the pdf on your computer if you need to check something quickly and your kindle is not nearby.
For me, the biggest advantage of having programming books on the kindle is that you can easily carry a few 1000+ pages books around and get some reading done when you have some unexpected down time.
I feel that programming books on the kindle are particularly good when you're learning something new and want to read sequentially. It's not so great for reference as you'd need to jump around and that's not kindle's forte. (although I do use the pdf as reference)
Edit: I forgot to mention that O'Reilly has a 7 day return policy on ebooks. I only wish they had a ebook sample like amazon has.
Thanks, I totally forgot about the Resig book since it was announced. Just bought.
Particularly because it's purely about style and code organization, and not about the best way to get consistent DOM access between Gecko, WebKit, and IE.
⬐ tyrmoredThat book is outstanding. Crockford's JSLint validator is also superb. Highly recommended for any script of more than a few lines in length.
See this timeless rant for a tiny example (countering all the bad advice you see on a trivially easy feature): http://youngpup.net/archived/popups.html
You may wish to do some JS dev without a framework just to get a taste for the terrible truth. Then get jquery or one of the other excellent tools.
JS quirks: http://www.quirksmode.org/
Also, some good tools: wget curl firebug wireshark (neé ethereal) yslow
⬐ jdunckAlso note that requests and responses are bits on the wire.
Do not assume you can trust client data. Do not put client data directly into SQL or back on the page. This includes headers. Nearly all aspects of a request can be forged.
After you get security and basic dev down, you can start to worry about scaling. It's important, but it's a nice problem to have. Deal with it later.