2,157 reputation
618
bio website
location
age
visits member for 2 years, 3 months
seen 6 hours ago

Senior Software Engineer and Software/Infrastructure Architect.

Linux/Unix fan and Schemer.


1d
comment Are there any benefits of using this extra variable in the for loop annotation?
Your example would be much better done using the Array map or foreach methods (assuming you know and handle the compatibility issues). Worst case for using a traditional for loop ever.
1d
comment How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
That's why I talked about hidden dependencies. You don't mean to creat them but they happen. It's similar to the Fragile Base Class problem.
1d
comment How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
I know that is not what you mean to do, Michel. But the fact is that by including a genuine mail class in your coordinator test code, you still risk becoming dependent on its implementation in ways you had not expected.
1d
comment Are long methods always bad?
In functional languages, though, long methods are much less common.
1d
revised Are there problems with using Reflection?
added 196 characters in body
1d
answered Are there problems with using Reflection?
1d
comment How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
@Michel if your language supports it, your coordinator class should be relying on interfaces for each of the four components, not classes. The first time the mail service is replaced by a communication service, it should be possible to add the appropriate interface to that, so that nothing at all is broken. (It's also quite difficult to build mocks without using interfaces rather than concrete classes...). That might be an interim step, until a broader redesign is done. Or not. Whatever works.
2d
revised How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
Added tl;dr summary.
2d
answered How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
Jan
27
reviewed No Action Needed Garbage collection & memory leaks on hash tables
Jan
27
reviewed No Action Needed What is the definition of user classes, with respect to software use?
Jan
27
reviewed Reviewed Is it safe to install TortoiseSVN on production servers?
Jan
27
comment Is partial application of functions the corresponding technique for state saving objects?
Creating one container to hold two different transformation methods is bad practice in both OO and FP. If they share some configuration state, better to put that into one FormattingContext container and feed that as input to the two different functions. In FP, this might be done with a reader monad. In OO, with dependency injection or passing the config object to the transformer's constructor.
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
@Fuhrmanator How often have you had the customer express their concerns in terms of Java generics or abstract base classes and interfaces? Dear God. Paul has given you a very good answer, explaining a practical and reliable method of modelling using techniques which are surely not too hard to visualise. And yet you insist that it be described in terms of one specific modelling technique for one particular paradigm, as if that were somehow the most natural way to represent design and anything else can be redrawn in its terms.
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
"the problems that are most suitable to solve using functional programming are essentially math problems." That simply is not true. The fact that the concept of Monads comes from category theory also does not mean that mathematical tasks are the most natural/fit domain for functional languages. All it means is that code written in strongly typed functional languages can be described, analysed and reasoned about using mathematics. This is a powerful extra feature, not something which stops you writing "Barbie Horse Adventures" in Haskell.
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
Types are used for more varied things in functional languages than imperative/OO ones (the type systems tend to be more powerful and consistent, for one thing). Types and their functions are used to shape code paths (which is why several functional languages simply do not have keywords for loops - not needed), for example.
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
You are making a false distinction. A list is no more an inert data structure than a stack or a queue or a tic-tac-toe simulator. A list can hold anything (in Haskell it might well be partially applied functions) and defines how those things can be interacted with. You could apply a list full of partially applied functions to another list of values and the result would be a new list containing every possible combination of functions from the first and input from the second. That's much more than a C struct.
Jan
26
revised Does functional programming increase the 'representational gap' between problems and solutions?
Removed spurious word
Jan
26
answered haskell - are tuples defined recursively?
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
Oh, definitely. As William Cook said, much OO code actually makes more frequent use of higher order functions than functional code does, even though the coder probably is not aware of it.