• (disco) in reply to dkf
    dkf:
    Some people, when confronted with a problem, think "I know, I'll use regular expressions."

    And your point is...?

  • (disco) in reply to Zainab58
    Zainab58:
    And your point is...?

    If I'm not mistaken, he has two points.

  • (disco) in reply to accalia
    accalia:
    (in roughly least to most WTF order)
    1. Filling gender field with a default value that user can override

    it's hard to say if it is the worst

    It is impossible to say it is the worst. In fact, it is not even a WTF in some scenarios resembling your case 3.

    If you already have a mindless 2-choice field, and you keep getting calls from people annoyed that it always assume they are one gender or the other, you can use a mindless regex to shut down the mindless calls.

    "I'm sorry, ma'am, we really are trying to make our site more attractive to everybody. We no longer assume everybody is male, and we try to make an intelligent guess. But as you well know, with a name like Leslie, there is no way to get the right answer in all cases."

  • (disco) in reply to kupfernigk
    kupfernigk:
    If you use a language every day, you probably prioritise meaning over spelling and grammar.

    Unless you're a lawyer...

  • (disco)

    Cold Fusion still exists??? Wow. Of course no real surprise as any programming language never seems to truly die... I remember using it back in 1998/1999 when it was Allaire Cold Fusion (still have a mousepad somewhere with the logo). Was great then but sure wouldn't want to still be using it.

  • (disco) in reply to ccjjharmon

    I used it earlier this year :imp: -- we use it for quick-and-dirty reporting or internal-plumbing webapps where I work. It's weird, but at least it beats the pants off of PHP for quick-and-dirty stuff.

  • (disco) in reply to tarunik

    Doesn't almost everything beat PHP ;) Except classic ASP... that's the worst. Did a tiny bit of PHP briefly right before learning CF. Work with some guys in the legislative branch that do all their web development in PHP, so maybe there's something I'm missing about it but I'm not sure what.

    Then again, I develop in ASP.NET (unfortunately VB.NET because of employer's preference but I prefer C#) and I can just hear the negative comments about .NET coming....

  • (disco) in reply to ccjjharmon
    ccjjharmon:
    Doesn't almost everything beat PHP ;) Except classic ASP... that's the worst. Did a tiny bit of PHP briefly right before learning CF. Work with some guys in the legislative branch that do all their web development in PHP, so maybe there's *something* I'm missing about it but I'm not sure what.

    Then again, I develop in ASP.NET (unfortunately VB.NET because of employer's preference but I prefer C#) and I can just hear the negative comments about .NET coming....

    Yeah, I've done some DoD work, and it's surprising how strong the preference for PHP is in government. Then again, it shouldn't be. Government choosing the most WTF language? Business as usual. :smirk:

    And you won't see too much .NET hate here outside of @cartman82's posts.

  • (disco) in reply to chubertdev
    chubertdev:
    And you won't see too much .NET hate here outside of @cartman82's posts.

    Whoa, whoa... when did I say that I hate NET? On the contrary.

  • (disco) in reply to cartman82
    cartman82:
    Whoa, whoa... when did I say that I hate NET? On the contrary.

    Maybe I'm thinking of someone else that got into it with blakey.

  • (disco) in reply to chubertdev
    chubertdev:
    Yeah, I've done some DoD work, and it's surprising how strong the preference for PHP is in government.

    You're right, I am surprised. Most of the stuff I've seen has been .NET.

  • (disco) in reply to ccjjharmon
    ccjjharmon:
    Then again, I develop in ASP.NET (unfortunately VB.NET because of employer's preference but I prefer C#) and I can just hear the negative comments about .NET coming....

    If everyone and their dog who writes .NET books didn't insist on trying to tie .NET to The Windows Way (TM) -- I wouldn't mind ASP.NET MVC paired with a good language (F#, anyone?)

  • (disco) in reply to tarunik
    tarunik:
    If everyone and their dog who writes .NET books didn't insist on trying to tie .NET to The Windows Way (TM) -- I wouldn't mind ASP.NET MVC paired with a good language (F#, anyone?)

    Because it's impossible to write a good API using a object oriented language! Tarunik has given literally... uh... zeros of examples of that in the past!

  • (disco) in reply to blakeyrat
    blakeyrat:
    Because it's ***impossible*** to write a good API using a object oriented language!

    Wasn't the whole point of this object oriented stuff to simplify doing reasonable interfaces that don't have the internals sticking from all sides?

  • (disco) in reply to Bulb

    Don't let any of that get in the way of @blakeyrat misunderstanding something @tarunik said.

  • (disco) in reply to boomzilla

    I can't misunderstand it because he hasn't said it yet.

  • (disco) in reply to cartman82

    Weren't you the one who said that the "innovative hipsters who make the world a better place" don't use "boring things like .NET"?

  • (disco) in reply to Bulb
    Bulb:
    Wasn't the whole point of this object oriented stuff to simplify doing reasonable interfaces that don't have the internals sticking from all sides?

    The problem is that many interpretations of OO impose constraints on your domain-language-to-computer-language mapping that often get in the way of making that mapping as natural as possible. However, FP languages have encapsulation mechanisms as well, because yes, leaving your guts hanging out in the breeze isn't a good idea.

  • (disco) in reply to tarunik
    tarunik:
    leaving your guts hanging out in the breeze isn't a good idea.
    [image]
  • (disco) in reply to aliceif
    aliceif:
    Weren't you the one who said that the "innovative hipsters who make the world a better place" don't use "boring things like .NET"?

    That's an observation about the current state of the IT industry. It has no correlation to the qualities of .NET itself.

  • (disco) in reply to tarunik

    Took a fabulous training course a few years back by a guy who taught using .NET truly from the ground up... didn't use it at all the way MS pushes. From an HttpHandler built a web app using just domain-driven design and OO principles, it was great. Yeah, I'm not much a fan at all of the MS way, especially all the certifications that certain places (especially consultant companies) want so very much.

  • (disco) in reply to tarunik
    tarunik:
    The problem is that many interpretations of OO impose constraints on your domain-language-to-computer-language mapping that often get in the way of making that mapping as natural as possible.

    Please be more specific here. Not that I'll necessarily disagree, but right now you've effectively made an unsupported assertion and I hate that sort of thing. At the least, I'd like to at least know whether I think you're right or wrong, even if I might not bother telling you which. :smiling_imp:

  • (disco) in reply to dkf
    dkf:
    Please be more specific here. Not that I'll necessarily disagree, but right now you've effectively made an unsupported assertion and I hate that sort of thing. At the least, I'd like to at least know whether I think you're right or wrong, even if I might not bother telling you which.

    The main limitations I have seen are as follows:

    1. You are forced to nominate a single subject for all verbs (most OO systems). Yes, I know about CLOS and Clojure multimethods (they are the exception that proves the rule), and I also know about the ugly hack that is Visitor.
    2. You are only given a limited range of verb names to work with (mainly a Java-ism, but I'm sure there are other object systems out there that don't allow operator overloading). This is highly constraining for objects and types that have a mathematical vocabulary associated with them.
    3. Some parts of speech are not easily expressible in some object-oriented paradigms (Java, again, leads the pack here -- C++ works around this awkwardly with function pointers and template trickery). Adverbs, in particular, are a nuisance, since you have to carry state in the object between the (prefix) adverb and the verb it's modifying the operation of, or use some mechanism for deferring the operation until all modifiers have been accumulated.
    4. Objects put semantic restrictions on the nouns you work with, as well (mainly a Java-ism, but Python also has this infelicity despite suffering much less from it). In particular, objects carry notions of reference and identity semantics around with them that are not appropriate for all problem domains -- some types really should have value semantics, even if OO purists think otherwise...
  • (disco) in reply to tarunik

    Do you have a specific example where OOP fails? Perhaps something that is not abstract?

  • (disco) in reply to tarunik

    Understand where you're coming from, but have some disagreements with you. [spoiler]Also, “Discouuuurrse!” for renumbering of list elements.[/spoiler]

    tarunik:
    1. You are forced to nominate a single subject for all verbs (most OO systems). Yes, I know about CLOS and Clojure multimethods (they are the exception that proves the rule), and I also know about the ugly hack that is Visitor.
    The same limitation is in natural languages as well; if one wishes to operate on a group of things, it is the _group_ that is the subject. Multimethods have yet to properly convince me that they're not a mistake, but then I'm not actually that keen on overloading either. (It's neat until you're trying to read the code and figure out what's really going on, when it becomes a complete headache. Smartassery. Feh…)
    tarunik:
    2. You are only given a limited range of verb names to work with (mainly a Java-ism, but I'm sure there are other object systems out there that don't allow operator overloading). This is highly constraining for objects and types that have a mathematical vocabulary associated with them.
    The limitation is merely in your head; the space of alphanumeric words is enormously large (beyond countably finite if we ignore length restrictions).

    Java actively rejects operator overloading; the only overloads at all are those in the language specification itself. The world doesn't crash and burn.

    If I was going to add operator overloading, I'd do it by requiring the objects concerned to implement algebraic structures — Group, Ring, Field, etc. — and I'd permit compilers to assume that those algebraic structures can be optimised in the ways that mathematicians would understand as valid. Which would rapidly put a stop to the shenanigans that mark out most operator overload abuse…

    tarunik:
    3. Some parts of speech are not easily expressible in some object-oriented paradigms (Java, again, leads the pack here -- C++ works around this awkwardly with function pointers and template trickery). Adverbs, in particular, are a nuisance, since you have to carry state in the object between the (prefix) adverb and the verb it's modifying the operation of, or use some mechanism for deferring the operation until all modifiers have been accumulated.
    The major limitation is actually that variadic operations are weakly supported in Java. Even though you can do it now, you're stuck with very little language support for them. Other languages do far better at this.

    The lack of strong support for variadic operations forces all sorts of nastiness. (Those C++ tricks? I believe you can see them in some libraries in Java too, though the way they're expressed in the type system is a little different.)

    tarunik:
    4. Objects put semantic restrictions on the nouns you work with, as well (mainly a Java-ism, but Python also has this infelicity despite suffering much less from it). In particular, objects carry notions of reference and identity semantics around with them that are not appropriate for all problem domains -- some types really *should* have value semantics, even if OO purists think otherwise...
    That's more to do with those languages being imperative, mutable reference, id-equivalence languages. OO is an independent axis; you could easily have it with a strict immutable, value-semantics system. OO is about data encapsulation and restriction of the set of operations that may be performed on a particular tuple of encapsulated data (which helps the programmer enforce the Law of Demeter).

    So… most of the things you complain about are not to do with OO as such, or are based on misunderstandings. The only really valid thing in there related to adverbs, and that's more related to other features of the language (complex type patterns for variadic operations) so I guess it's another “not really an OO problem” thing. As it stands, languages which reject static type checking can handle the adverb problem much more handily, though this causes problems for IDEs.

  • (disco) in reply to monkeyArms
    monkeyArms:
    Do you have a specific example where OOP fails? Perhaps something that is not abstract?

    I think that we've shown, through the course of like 3 of these threads quizzing him, that he does not.

    I'm not even sure he's capable of thinking about anything that's not at least 46 levels of abstraction removed from reality.

  • (disco) in reply to dkf

    Interesting deconstruction, thanks.

    blakeyrat:
    I'm not even sure he's capable of thinking about anything that's not at least 46 levels of abstraction removed from reality.
    Ever realized that programming is an abstraction exercise, full stop? My argument is that we need as many tools as possible for building good abstractions (not that we need to be piling them atop each other: *that* issue is a whole another can of worms) -- C# is getting closer these days, but the amount of "not learning from history" programming language designers have done is *amazing*, isn't it, Blakey?

    P.S. The system I deal with at work has a protocol handling system that is data-driven to the bit level. Yes, I said it right: it has tabling that specifies the meaning of individual bits in protocol messages.

  • (disco) in reply to tarunik
    tarunik:
    Interesting deconstruction, thanks.

    Seemed more like a demolition to me.

    tarunik:
    Ever realized that programming is an abstraction exercise, full stop?

    There's required abstraction, and there's "let's go get lost in the woods!" abstraction. Abstraction sucks. The further you get from the problem, the harder the problem is to solve. It's a necessary evil, not something we should be embracing.

    tarunik:
    My argument is that we need as many tools as possible for building good abstractions

    No; we need good, full, well-designed libraries for doing common tasks. Something C# and .NET excels at, compared to whatever open source bullshit language-of-the-week you're shilling.

    If I can, in one line of code, say, "grab an image from an HTTP server and save it on the local network/drive at this path", you've saved me a lot of time and effort. And now when I work-out the problem I'm solving, I can put that whole thing in a single box with an arrow and I don't have to worry about all the minute details.

    The solution isn't in the language; the solution is in the language's standard library. That's what made Mac Classic such a joy to code in. That's what makes .NET such a joy to code in.

    tarunik:
    (not that we need to be piling them atop each other: that issue is a whole another can of worms)

    Well we agree on that, at least.

    tarunik:
    C# is getting closer these days, but the amount of "not learning from history" programming language designers have done is amazing, isn't it, Blakey?

    History is full of examples where some empty-headed designer tried to abstract-away the world and ended up with a piece of shit. What do you think Lotus Notes is?

    Remember that "Mesh Operating Environment" bullshit that Microsoft was trying to sell as a universal solution to all problems:

    [image]

    Yeah, it was a piece of useless crap. Interestingly, it was spear-headed by the guy who designed Lotus Notes, Ray Ozzie... hmm! (Also the funny thing about that is it was pretty much 100% what Joel Spolsky predicted would happen when abstraction-lovers tried to figure out peer-to-peer.)

    tarunik:
    P.S. The system I deal with at work has a protocol handling system that is data-driven to the bit level. Yes, I said it right: it has tabling that specifies the meaning of individual bits in protocol messages.

    Does this have something to do with the debate? I'm confused.


    Of course the real issue here is more of a social/communication one. You're telling us we're doing it wrong. When we ask how we're doing it wrong, you respond with this abstract bullshit instead of actual addressable concrete examples. Now you might be God Of Programming, but when I see shit like that in a forum, my head thinks: "he's not giving any examples because there aren't any. There aren't any examples because he's spouting utter Grade A bullcrap."

  • (disco) in reply to blakeyrat
    blakeyrat:
    No; we need good, full, well-designed libraries for doing common tasks. Something [s]C# and[/s] .NET excels at, compared to whatever open source bullshit language-of-the-week you're shilling.

    If I can, in one line of code, say, "grab an image from an HTTP server and save it on the local network/drive at this path", you've saved me a lot of time and effort. And now when I work-out the problem I'm solving, I can put that whole thing in a single box with an arrow and I don't have to worry about all the minute details.

    The solution isn't in the language; the solution is in the language's standard library. That's what made Mac Classic such a joy to code in. That's what makes .NET such a joy to code in.

    FTFY. Libraries are a property of the platform, not the language -- I can call all the same libraries from SML.NET that I can from C#. So -- realize that better languages exist in the very platform you have embraced and all is well, alright?

  • (disco) in reply to tarunik
    tarunik:
    FTFY. Libraries are a property of the platform, not the language.

    Of all the words I typed, that's the only thing you found worth responding to?

    Jesus Christ.

  • (disco) in reply to blakeyrat
    blakeyrat:
    History is full of examples where some empty-headed designer tried to abstract-away the world and ended up with a piece of shit. What do you think Lotus Notes is?

    That's the same too many abstractions syndrome that I referred to earlier.

    Also -- I don't give concrete examples because you invariably toss them out as "this doesn't apply to <whatever-blakey-is-doing-at-the-moment>".

  • (disco) in reply to tarunik
    tarunik:
    Also -- I don't give concrete examples because you invariably toss them out as "this doesn't apply to <whatever-blakey-is-doing-at-the-moment>".

    How about you just toss-out one and try me?

  • (disco) in reply to blakeyrat

    So, you want an example of a good abstraction that doesn't mesh well with OO, so have with-db-transaction:

    with-db-transaction macro Usage: (with-db-transaction binding & body) Evaluates body in the context of a transaction on the specified database connection. The binding provides the database connection for the transaction and the name to which that is bound for evaluation of the body. The binding may also specify the isolation level for the transaction, via the :isolation option and/or set the transaction to readonly via the :read-only? option. (with-db-transaction [t-con db-spec :isolation level :read-only? true] ... t-con ...) See db-transaction* for more details.

    You might recognize this as akin to a using block -- you're right; my argument is that you shouldn't need to go in and modify the core language just to implement such a creature, unlike having to add a special-purpose feature such as using blocks to handle this type of construct.

  • (disco) in reply to tarunik
    tarunik:
    So, you want an example of a good abstraction that doesn't mesh well with OO,

    No, I'm still waiting for the "factors of good API design that simply cannot be captured or taught in an OO-centric model".

    tarunik:
    You might recognize this as akin to a using block -- you're right;

    Ok; so I do have that in my OO language.

    tarunik:
    my argument is that you shouldn't need to go in and modify the core language just to implement such a creature, unlike having to add a special-purpose feature such as using blocks to handle this type of construct.

    Who gives a shit how it's implemented as long as it is implemented?

    "The UK doesn't have fire trucks!" "Yes they do." "That doesn't count because theirs are painted yellow and not red!"

  • (disco) in reply to blakeyrat
    blakeyrat:
    Ok; so I do have that in my OO language.

    Because it added a special-purpose feature to do that -- my argument is that the language designers shouldn't have to add a special-purpose feature simply to facilitate resource management -- it's a sign they picked the wrong general-purpose building blocks to start with.

  • (disco) in reply to tarunik
    tarunik:
    my argument is that the language designers shouldn't have to add a special-purpose feature simply to facilitate resource management --

    Right; I get you're argument. What I'm asking, if anything, is why do I, a builder of applications, give a flying fuck how it's implemented as long as it is? What, practically, is the impact to me?

    tarunik:
    it's a sign they picked the wrong general-purpose building blocks to start with.

    Or maybe it's a sign that they (wisely) started from a relatively minimal core and waited to see what was and was not desired before adding to it.

    Or maybe it's a sign that they tried a "general purpose building block" which allowed that from day one, but had to can it because of performance or debugging reasons, and so it remained a special-case.

    You're making a few assumptions here.


    And just a reminder that the question that started this entire thing is:

    What are the factors of good API design that simply cannot be captured or taught in an OO-centric model? That's a claim you made I can't simply let lie.

  • (disco) in reply to blakeyrat
    blakeyrat:
    What I'm asking, if anything, is why do I, a builder of applications, give a flying fuck how it's implemented as long as it is? What, practically, is the impact to me?

    Have you ever written a library? That is why these things matter.

  • (disco) in reply to tarunik
    tarunik:
    Have you ever written a library?

    Dozens.

    tarunik:
    That is why these things matter.

    I guess I need another example because I ain't seeing it.

    Then again, I wrote them in a language that has using().

  • (disco) in reply to blakeyrat
    blakeyrat:
    What are the factors of good API design that simply cannot be captured or taught in an OO-centric model? That's a claim you made I can't simply let lie.

    The best statement I have found of this is a quote attributed to Carmack: "Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function."

    In other words: OO puts an upper bound on the elegance and simplicity of implementations. Think of Java having to create a utility class just to hold a bunch of mathematical functions that have no state and are conceptually independent from each other apart from being 'common math functions' (what do arctangent and the incomplete gamma function have in common?).

  • (disco) in reply to tarunik
    tarunik:
    The best statement I have found of this is a quote attributed to Carmack: "Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function."

    Wait a minute, ALL THIS TIME you were dodging the question... and the answer was, "I don't like that you can't have a function outside a class?" 12 words? You typed like 500 words to avoid typing 12 words?

    Jesus.

    The funny thing is I kind of agree with you. I wouldn't mind at all if you could put static functions directly inside a namespace with no class around them. Fuck the "language police". However, on principle, I must now call you an idiot. You're an idiot.

  • (disco) in reply to blakeyrat
    blakeyrat:
    How?

    The "no functions outside classes" is just one example of "OO puts an upper bound on the elegance and simplicity of implementations". Look at point-free style (if you can't find examples of this -- Unix shell pipelines are point-free style in disguise) for other examples of this -- while method chaining can be done in OO, it's much more limited due to the lack of facilities for currying methods in many OO languages (C++, oddly enough, can -- did they remember to add that to C#?)

    Homoiconicity (i.e. your programming language is represented in its own primitive data structures, and the syntax of the language mirrors its abstract syntax tree) is another thing that OO will never get to...

  • (disco) in reply to tarunik

    Yeah sorry I edited that question out. I get it entirely.

    Now I'm puzzling over the whole, "why didn't you just say that 2 days ago?" thing.

    Don't get me wrong: I still think you talk like an overedicated blowhard, and I doubt you've ever made a single genuinely useful or clever thing in your life.

    tarunik:
    Homoiconicity (i.e. your programming language is represented in its own primitive data structures, and the syntax of the language mirrors its abstract syntax tree) is another thing that OO will never get to...

    And that is desireable because...?

    Look, buddy. You know we're going to ask these follow-ups, why don't you just explain it the first time and save everybody the effort?

  • (disco) in reply to blakeyrat

    Because the scenic route is fun sometimes?

  • (disco) in reply to tarunik

    I think it's more likely that:

    1. You couldn't figure out how to phrase it using big words, because your ego can't stand the thought of someone reading your posts and being able to figure out what the fuck you're trying to say without hitting up a dictionary 4 times.

    Or...

    1. You were bluffing this whole time and didn't think of it until just now.

    Or both.

  • (disco) in reply to blakeyrat

    Or, someone's trying to lead you to water instead of just handing you a cup -- although I will admit that I didn't do a very good job of it, clearly!

  • (disco) in reply to dkf
    dkf:
    If I was going to add operator overloading, I'd do it by requiring the objects concerned to implement algebraic structures — Group, Ring, Field, etc. — and I'd permit compilers to assume that those algebraic structures can be optimised in the ways that mathematicians would understand as valid. Which would rapidly put a stop to the shenanigans that mark out most operator overload abuse…

    Even doubles don't technically meet that requirement.

  • (disco) in reply to tarunik
    tarunik:
    blakeyrat:
    No; we need good, full, well-designed libraries for doing common tasks. Something [s]C# and[/s] .NET excels at, compared to whatever open source bullshit language-of-the-week you're shilling

    ....

    FTFY. Libraries are a property of the platform, not the language -- I can call all the same libraries from SML.NET that I can from C#. So -- realize that *better languages exist in the very platform you have embraced* and all is well, alright?
    Grade **A** pedantry, would flag again.
  • (disco) in reply to EvanED
    EvanED:
    Even doubles don't technically meet that requirement.

    Yes, but we'll gloss over that. :smile:

  • (disco) in reply to tarunik
    tarunik:
    So, you want an example of a good abstraction that doesn't mesh well with OO, so have with-db-transaction:

    But it does mesh extremely well with Aspects. Just sayin'…

    http://en.wikipedia.org/wiki/Aspect-oriented_programming

  • meclizine price (unregistered)
    Comment held for moderation.

Leave a comment on “Genderize”

Log In or post as a guest

Replying to comment #:

« Return to Article