10,226 reputation
23357
bio website
location
age
visits member for 2 years, 11 months
seen 10 hours ago

C# developer, pretty standard stuff. SOLID and other such principles drive everything I do for the most part. Other than that, polyglot lover of functional programming in Haskell, F#, Erlang, and javascript. Player of each, master of none.

  • Monads are like buckets, that's what they say anyway.
  • Monoids are easy! I guess?
  • Comonads are just objects... however that works O_o
  • Cartography has nothing to do with these things.

Cheers.


3h
awarded  c#
Jul
18
comment Confusion in my If Else ,Else If Condition. in C#
Simple this whole thing up: 1. Learn what a monoid is. 2. Learn that string concatenation is a natural monoid. 3. Implement the alternative function that utilizes the monoid's identity to decide whether something's concatenated or not. Your if/else if blocks anytime you're doing string concatenation now will be a thing of the past.
Jul
17
revised Print the next smallest from 2^i * 5^j where i,j >= 0
added 56 characters in body
Jul
16
comment Is it safe in Haskell to save a data structure to a file using “show”, and retrieve it using “read”?
show and read dictate in their type signatures what they do. If you can come up with the right input for either one of them, their behaviour is well defined. The part about the file has nothing to do with what show and read do, if you use a file to store and retrieve the necessary [Char], show and read will generate and operate on it just as their type signatures dictate.
Jul
15
awarded  Nice Answer
Jul
4
comment Is serialization better done in instance methods or static methods
@ratchetfreak yeah I noticed, I was speaking generally - that's the general rule of why to avoid such things. His particular implementation doesn't break that rule though good point. I suppose I should just mention it violates POLA but I consider getters changing state a much bigger problem so wanted to detail that.
Jul
4
revised Is serialization better done in instance methods or static methods
added 723 characters in body
Jul
4
answered Is serialization better done in instance methods or static methods
Jun
23
comment Why are data constructors with the same name disallowed in different type constructors?
@delnan I wasn't aware of that... sounds like an answer to me. I had always figured the inference was bottom up, though I could see ambiguity resolution using type information from the other side of the type graph as you describe as a deciding factor... my mental image for this is return types at the bottom of the graph and function calls at the top, the resolution is an aggregate formed by folding up from the bottom, but that's not quite the whole picture, is what you're saying? Not surprisingly, in a dependently typed language with perfect inferrence this is probably more accurate..
Jun
18
comment Mental Models or Real-World-Metaphors for Functional Programming
@GuidoAnselmi you have it completely backwards, people analyze the real world with mathematics, it has no basis on the real world. Mathematics is used for analyzing and defining relationships between all sorts of things, real and not. 9 planets is you applying a mathematical construct (the set of natural numbers) to a real world construct (planets) with a mathematical analysis function (count). The real world doesn't have 9 planets, it has what it has, math merely talks about symbolic representations of things wherein the symbols have relations between eachother.
Jun
18
revised Why was C# made with “new” and “virtual+override” keywords unlike Java?
edited title
Jun
18
revised Mental Models or Real-World-Metaphors for Functional Programming
Fixed wrong words, oops.
Jun
18
answered Mental Models or Real-World-Metaphors for Functional Programming
Jun
10
comment Why is a software development life-cycle so inefficient?
While it sounds like waterfall is plausibly working fine for your org, perhaps you really have difficulty with the general concept to the point that you don't enjoy your job, you may wish to look for a new job, just a thought. Alternatively you may want to look at things from the business perspective and come up with a way to not be bothered by the work your asked to do.
Jun
10
comment Why is a software development life-cycle so inefficient?
You're complaining about waterfall, go read about it and realize everybody else recognizes it's terrible inefficient too. That said it's still used because for all it's inefficiency, in a variety of cases given the correct set of constraints, it actually works to the point of getting well-functioning IT products and services to business users. While it's unarguably inefficient, sometimes the inefficiency is worth it for the decreased risk waterfall has in the right scenario. It sounds like it's working well at your place, even if frustratingly overbearing...
Jun
10
comment Why is programming sometimes viewed as a second-rate role?
+1 completely agree. And @SteveJessop I could be wrong, but I suspect tires are designed by some very smart engineers who are highly valued for their craft. Similarly, I've heard good developers are highly valued by car manufacturers - I would say that is one less than apt analogy here because the auto industry is among the most technologically advanced industries there is which values good engineering far more than most industries. That said, I agree with what Telastyn said completely. If you want to understand the perceptions and decisions businesses make, understand their revenue stream.
Jun
6
awarded  Good Answer
Jun
2
awarded  Announcer
May
29
revised How are the conceptual pairs Abstract/Concrete, Generic/Specific, and Complex/Simple related to one another in software architecture?
added 870 characters in body
May
29
answered How are the conceptual pairs Abstract/Concrete, Generic/Specific, and Complex/Simple related to one another in software architecture?