424 reputation
210
bio website
location
age
visits member for 3 years
seen Apr 10 at 20:42

Jan
26
revised Does functional programming increase the 'representational gap' between problems and solutions?
added 827 characters in body
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
Business concerns (from the customer) aren't expressed very often in higher-order functions. But a customer can write a one-line user story and provide you with business rules (or you can get them out of the customer). I'm interested in the (top-down?) domain modeling (from those artefacts) that allows us to arrive at abstractions of the problem that map to first-class functions, etc. Can you cite some references? Can you use a concrete example of a domain, the abstractions, etc.?
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
if you know what input a function takes and what output it produces, why should it matter which data structure it belongs too? That sounds a lot like cohesion, which for any modular system is important. I'd argue that not knowing where to find a function would make it harder to understand a solution, which is due to higher representational gap. Lots of OO systems have this problem, but it's because of bad design (low cohesion). Again, the namespace issue is out of my expertise in FP, so maybe it's not as bad as it sounds.
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
I like your answer because it has concrete examples, but the abstractions are data structures, which have been around since C. What about writing software for a business domain, such as microbiology or a judicial system? How does a FP solution look when you need to model business entities in the solution, e.g., proteins and molecules, or trials and defendants?
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
@AndresF. perhaps it's all about modularity and organization, but in OO designs it's common to have a domain layer, where objects in the solution map to objects int the problem. Not all of an OO design is low-level details. I'm claiming the representational gap is lower when solution abstractions map to problem abstractions. I think I'm getting the gist that the naturally functional aspects of a problem domain, which relate to data flow, map easily to FP. So again, I'm curious about the problem modeling step in FP that sets up the natural low-gap mapping.
Jan
26
awarded  Nice Question
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
Because of encapsulation and data hiding, which are not OO principles per se, I don't entirely agree with OO being data structures + algorithms (that's the internal view only). The beauty of any good abstraction is that there's some service it provides to solve part of the problem, without one needing to understand too many of the details. I think you're talking encapsulation when you separate functions and data in FP, but I'm too green to know for sure. Also, I edited my question to refer to tracing from the solution back to the problem (to clarify the meaning of representational gap).
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
@Giorgio To me, traversing directory structures or filtering files is a low-level problem (classical computer science which is closer to math than the rest of software engineering), at least within a system that has to provide online ordering and delivery of goods. Of course, OO systems have the same lower-level problems, and I'm not saying they do a better job at solving it. But a class called FileUtilities might make more sense to me what its role is (I'd understand its purpose in the scheme of the solution space and problem space).
Jan
26
comment Does functional programming increase the 'representational gap' between problems and solutions?
I edited my question to speak about traceability from solution to problem as being a benefit of decreased representational gap. Can you explain in FP how its abstractions are easily traced back to the problem space?
Jan
26
revised Does functional programming increase the 'representational gap' between problems and solutions?
added 438 characters in body
Jan
25
comment Does functional programming increase the 'representational gap' between problems and solutions?
OK - you said it clearly - the problems that are most suitable to solve using functional programming are essentially math problems.
Jan
25
revised Does functional programming increase the 'representational gap' between problems and solutions?
added 582 characters in body
Jan
25
awarded  Student
Jan
25
asked Does functional programming increase the 'representational gap' between problems and solutions?
Jan
10
comment Software Design: Generating Documents Of Different Formats and Different Layouts
HR-XSL is an example (from 2002) of a similar approach that uses Java to read from XML and produce different formats of a CV via DocBook and XSLT. I managed to use it and was happy with the results (albeit the lack of support for multiple languages). Design-wise, there is surely a cleaner way; but the main thing a design has to do is solve the problem.
Jan
8
comment Does key-value observing between model and view violate MVC?
Views are NOT supposed to be dumb about the model. It's an assumption that Models are dumb about Views, mainly because Views tend to be less stable than Models. That is, it's an architecture that allows View code to be changed easily without breaking the Model code. If you change the Model code, you will most definitely break the Views. It's often a point that is misunderstood in MVC.
Dec
30
comment where should put showSchedule method in school system
Pure Fabrication (see the link and the reference by Craig Larman) is the reason for the decision.
Dec
29
comment where should put showSchedule method in school system
Don't duplicate code. ScheduleManager can have the responsibility to do that for students and parents.
Dec
28
answered where should put showSchedule method in school system
Dec
28
comment where should put showSchedule method in school system
Your associations don't have verbs to explain the relationships (for OO analysis). What is the class StudentCourse exactly? Is it the same as an offering of a course? I don't understand CourseClass at all.