1,958 karma · joined June 26, 2011
" Do not complain about something you think is missing, wrong, or stupid. You are ignorant and new to the language, no matter how much of an expert you are on programming in general."
Its particularly important for me when I'm a pedestrian because taxis/cyclists/delivery vans running red lights or taking corners too quickly are a relatively regular hazard that I'd be glad to be rid of.
Pity as it seemed like an excellent course.
Yeah I think this is a reasonable approach, especially as if you do end up completing this, and get to a design you are happy with, it will probably be very different (and hopefully infinitely superior) to your original high level design.
You've probably already heard of it but the mikado method can also be useful in some of these situations.
I guess my core problem is TDD only drives your design if you write quite granular tests but they then become barriers to further refactoring/redesign. However my current preferred approach (for anything non-trivial) is different to the authors. As he does I start out with outer-level acceptance-y tests, however those integration tests are then combined with extensive refactoring to drive the design, so I don't do the dreaming up of collaborators he does in step 4.
My reason for not thinking of collaborators early is although I think that approach has legs I found it didn't necessarily always the simplest/most elegant design you could come up with. I ended up encoding my first understanding of how to solve the problem into the interactions, even though I knew that my understanding of the problem at that point was much less than it would be once I dug a bit deeper.
Anyway with my current approach if I extract additional classes/whatever I might then test them directly, or use further tests to drive their design further (incl test doubles as appropriate). So I'll have one or a few tests of the extracted behavior at the outer level, and maybe more thorough testing at the lower level because quite often testing all the combinations and edge cases is easier at this level.
Not sure on the whole this as argument, I prefer it to the current approach of this being decided at framework/library level because I get bored of having to bind each function to get lexical scoping back. That Nim code is indeed beautiful though, maybe need to give ti a look ta.
items .filter(isOk) .map(toOtherType) ::flatten()
In C# that sort of case is primarily handled by extension methods. They have their issues not least in terms of collisions, but to me they are a beautiful solution. The equivalent in JS would seem to be the always unpopular choice of adding these methods to the prototype, and as with extension methods you'd want the user to opt-in to their addition (possibly at object level here?).
Not sure though, maybe I've missed something.
Anyone able to provide a quick description of what this means?
"And at the other end of the bar the world is full of the other type of person, who has a broken glass, or a glass that has been carelessly knocked over (usually by one of the people calling for a larger glass) or who had no glass at all, because he was at the back of the crowd and had failed to catch the barman's eye"
Very strange that Google let the situation get so bad. Mind you I find the Chrome developer tools far more powerful and intuitive than those in Firefox which stops me moving entirely.
[1] http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-...
I'd also worry that the TS community itself would risk marginalization, end up as a small niche ghetto, with most of the interesting stuff going on in ES7+.
Hard to be sure but I wouldn't write off JS just yet, people have been doing it for years as new/better (flash/silverlight/compile to JS) technologies have promised to make it seem soooo 90s.
Having said that the flexibility JS gives you is huge, I've played with Scala and its at the opposite end of the scale. I don't mind that but I am more interested in things like gradual typing being added JS, even if that just ended up being checked at run-time, because it gives you some of the big advantages of static typing without sacrificing all the of the dynamic goodness.
My interpretation of what Retozi is saying is that CS just means that in addition to understanding JS, including ES6, you need to be familiar with all the different ways things can be done in CS.
I tend to agree, especially as JS is becoming an improving with each release.
What I'd like to see going forward is JS continuing to add selective sugar as is in CS, but also add functionality that makes going into a new fresh JS codebase and making sense of it easier. That side of things is less about CS, and more about the sorts of ideas you see in Dart and TypeScript.
Anyway totally agree on the typing angle, navigation/refactoring/discover-ability aspects are useful and I loved the implicit interface approach in Dart. However I wonder whether some of those features won't be added to JS over time (where possible in such a dynamic language). Ta for link to flow, will give it a look thanks.