Reputation
351
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 9
Newest
 Commentator
Impact
~38k people reached

  • 0 posts edited
  • 0 helpful flags
  • 13 votes cast
Dec
19
awarded  Commentator
Dec
19
comment Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else?
@SandyGifford The various optimizations of modern JS engines should prevent the redeclaration and reassignment from happening if that's actually affecting performance bahmutov.calepin.co/detecting-function-optimizations-in-v8.html. (e.g. via a JIT.) Re memory usage, I'm not sure how breaking a bigger function into smaller ones changes this?
Nov
6
awarded  Autobiographer
Sep
9
awarded  Notable Question
Mar
12
awarded  Nice Answer
Feb
11
awarded  Popular Question
Oct
15
comment Are there any design patterns that are unnecessary in dynamic languages like Python?
@faif Norvig's paper was written in 1996, before Python had iterators. (It seems they arrived in version 2.1 python.org/dev/peps/pep-0234/.)
Apr
25
answered Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else?
Mar
6
awarded  Yearling
Mar
6
answered Using testing branches in Git
Mar
6
comment Using testing branches in Git
@cpa Not quite sure what you're after. You want some software that helps testers figure out what branches are available for testing, and switches branches for them? Or a process for testers for follow?
Mar
6
comment Should I test inherited methods?
Good point re Liskov's substitution principle, you're right that if this holds, the derived class will pass all the base class's tests. However, LSP is frequently violated, including by xUnit's setUp() method itself! And pretty much every web MVC framework that involves overriding an "index" method also breaks LSP, which is basically all of them.
Mar
5
awarded  Nice Question
Mar
5
revised Should I test inherited methods?
added 6 characters in body
Mar
5
comment Should I test inherited methods?
@CodesInChaos Yes, that could be a bad example. But the same problem applies whenever you have inheritance.
Mar
5
comment Should I test inherited methods?
I like the argument that behavioural testing is orthogonal to the way class happen to be constructed. It does seem a bit funny to completely ignore inheritance, though. (And how to you manage the shared tests, if you have a lot of inheritance?)
Mar
5
awarded  Editor
Mar
5
revised Should I test inherited methods?
Added equivalent formulation
Mar
5
awarded  Student
Mar
5
asked Should I test inherited methods?