The move to a less class-centric approach is a much needed and welcomed shift. It helps to illustrate the spirit of the pattern or technique without getting weighed down with the restrictiveness and arguably dogmatic nature of java.
Announcing the Second Edition of “Refactoring”
41–50 of 61 posts
Re: Announcing the Second Edition of “Refactoring”
#42Anyone know of any other good books about high-level design/architecture for javascript?
Actually, thinking about it, maybe what I'm really looking for is something for designing/architecting things in dynamic/weakly typed languages... (Been doing JS for a bit now, but I spent much longer in Java before).
Re: Announcing the Second Edition of “Refactoring”
#43The Refactoring book in Javascript looks like an early April, 1st joke :-) What I really miss is the integration with the automatic refactoring tools in our IDEs. How would I make a heavy refactoring if I already have a "extract method" in my interface? Would it be the same? Some of the refactorings are easier to automate so are more common in the IDEs. Would are better paths considering what is automated?
I'm asking this from a position of massive ignorance (I'm mostly a backend dev who does the occasional website), but is there any type hinting tooling in the Javascript ecosystem? Python has PEP484 where you annotate types in either comments or docstrings, Ruby has YARD tags used similarly, and smart IDEs can pick up on these and offer decent refactoring tools. But does anything similar exist in JS land?
The VSCode editor is able to leverage the TypeScript engine even with vanilla JS to automatically infer types and also supports JSDoc. Basically you write vanilla JS, add JSDoc comments here and there when the inference doesn't work as you want and it gives you most benefits of a typed language, without tying yourself to a specific ecosystem (your teammates could be using something else entirely). It works pretty well.
Re: Announcing the Second Edition of “Refactoring”
#44The Refactoring book in Javascript looks like an early April, 1st joke :-) What I really miss is the integration with the automatic refactoring tools in our IDEs. How would I make a heavy refactoring if I already have a "extract method" in my interface? Would it be the same? Some of the refactorings are easier to automate so are more common in the IDEs. Would are better paths considering what is automated?
Seems like JavaScript would make sense since there are so many young, inexperienced js developers that stand to potentially benefit from such a book.
Re: Announcing the Second Edition of “Refactoring”
#45In the introduction he drew comparisons with GoF design patterns book, saying he wrote it hoping people would refer back to it as they do to that book. Yes, sometimes I need to rename a function or split it in two, but do I really need to dig out a reference book to look up how to do that? And the comparison to design patterns is crazy, those are at a far higher level of abstraction and are correspondingly less obvious (and more interesting).
Re: Announcing the Second Edition of “Refactoring”
#46I realise this is an unpopular opinion, but I really didn't like the previous book. Don't get me wrong, I definitely think refactoring is a good thing (in moderation!). But Fowler presented a list of possible refactoring operations, including step by step instructions... for very trivial things. In the introduction he drew comparisons with GoF design patterns book, saying he wrote it hoping people would refer back to…
Re: Announcing the Second Edition of “Refactoring”
#47I realise this is an unpopular opinion, but I really didn't like the previous book. Don't get me wrong, I definitely think refactoring is a good thing (in moderation!). But Fowler presented a list of possible refactoring operations, including step by step instructions... for very trivial things. In the introduction he drew comparisons with GoF design patterns book, saying he wrote it hoping people would refer back to…
I'd rather do skim reading on stuff that I already know than for them to skip over it just in case there was a fundamental issue that was missed (or deemed trivial).
Re: Announcing the Second Edition of “Refactoring”
#48I'm hunting around these days for good books on general programming. I'm a fairly pragmatic programmer (not everything needs to be a class). Has anybody here read the first edition, and what was your impression of it?
Kind of like Effective C++, More effective C++, the old Win32 Charles Petzold book, GoF, etc.
To me, it was a classic, and much appreciated it as that was also when the whole TDD thing took off.
Re: Announcing the Second Edition of “Refactoring”
#49I'm hunting around these days for good books on general programming. I'm a fairly pragmatic programmer (not everything needs to be a class). Has anybody here read the first edition, and what was your impression of it?
One of my biggest lessons from the book is right in the introduction. To paraphrase: "If a change you want to make to the codebase is hard, refactor the codebase until that change is easy, then make the change". I always try to either be refactoring or changing behavior but not both at the same time. That has kept me out of a lot of trouble.
Re: Announcing the Second Edition of “Refactoring”
#50This is intriguing, though personally I never connected much with Fowler's writing in the past (though I have gotten into his ideas ). Anyone know of any other good books about high-level design/architecture for javascript? Actually, thinking about it, maybe what I'm really looking for is something for designing/architecting things in dynamic/weakly typed languages... (Been doing JS for a bit now, but I spent much lo…
[1] http://thinking-forth.sourceforge.net/ Although you can buy a copy on Amazon.