Slashdot Mirror


Can Reactive Programming Handle Complexity?

Nerval's Lobster writes "A recent article on Reactive Programming, which suggested that five lines of Reactive could solve a problem that required 500 lines using Java or 200 lines using triggers, led many readers to question (passionately) whether Reactive enables you to address not just typical problems, but complex ones as well. In a follow-up column, Espresso Logic CTO Val Huber argues that, while it certainly can't solve all use cases, Reactive Programming is very capable of addressing many complex problems, and can address all other scenarios via a transparent integration with procedural languages. He shows how Reactive can handle complexity using two different scenarios: a classically complicated database application (a bill of materials price rollup) and procedural integration (to address external systems such as email and transactions not limited by a database update). Take a look at his work; do you agree?"

149 comments

  1. No by Anonymous Coward · · Score: 1

    I disagree.

    1. Re:No by Anonymous Coward · · Score: 0

      Hear, hear!

  2. Also by oldhack · · Score: 2, Insightful

    Can bullshit walk?

    --
    Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
    1. Re:Also by logjon · · Score: 3, Funny

      Don't know about walking, but it can clearly get posted to Slashdot.

      --
      The stories and info posted here are artistic works of fiction and falsehood.
      Only fools would take it as fact.
    2. Re:Also by ChunderDownunder · · Score: 1

      Yeah, this is the 2nd or 3rd 'Slashvertisement' publicizing someone's obscure product without adequately explaining what RP actually is.

      One would think from reading the tutorials of Val Kilmer (sic) that reactive is just some DSL built on top of PL/SQL...

  3. A few problems... by Ckwop · · Score: 5, Insightful

    A few problems:

    - What about circular reactions?
    - Is SQL really that right language for encoding business logic?
    - Triggers are kind of an anti-pattern.
    - What about atomicity? What if I need the whole reaction chain to work or none of it.

    I'm afraid there more questions than answers with this proposed pattern.

    1. Re:A few problems... by Anonymous Coward · · Score: 2, Interesting

      It's the third (at least) Slashvertisement for this useless new ... whatever it is they are trying to sell.

      It has potential to get management buy-in because it works exactly the same as Excel. However, it will not get acceptance in the IT departments because it works like Excel but with no explicit statement about the questions you have raised and likely more as well.

      There are situations where tables & triggers* are the best way to sort out a problem. There are places where dedicated matrix algebra would solve the problem most efficiently. You can either learn what tools are available and use the one that seems like the best fit, or you can master one tool and apply it to everything, both work because in the end you're still translating a vague idea into something that can become distinct instructions for the same computers.

      *I think I just started development on the 3rd worst D20 product.

    2. Re:A few problems... by Gestahl · · Score: 1

      I'm not sure exactly where he wants to use this... as a new constraint system for a database or something?

      Yeah, that's the ticket... stuff more business logic in the database. I have yet to see a system designed by DBAs around stored procedures as "the way all systems should integrate" that was remotely usable.

      Databases are not good development platforms.

    3. Re:A few problems... by LoRdTAW · · Score: 2

      Is SQL really that right language for encoding business logic?

      Probably not. And especially not if you would like your DB to be portable between various DB's.

    4. Re:A few problems... by lgw · · Score: 5, Insightful

      - Triggers are kind of an anti-pattern.

      Well, sort of the point of this style is to embrace triggers as a powerful and underused tool. I'm a big fan of powerful and underused tools, but generally there's a reason they're underused.

      Pick the right tool for the job. Reactive programming seems like it makes life wonderfully easier for this very narrow set of problems. That's neat. But both trying to us it for everything and insisting that it's useless because it doesn't work for everything are mistakes. Like a power screwdriver with a U-joint attachment, some tools go from pointlessly awkward to awesomely helpful when faced with a particularly-shaped niche.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    5. Re:A few problems... by geekoid · · Score: 0

      " Is SQL really that right language for encoding business logic? "

      Depends on use. Some business logic could be device independent. SO creating a trigger that can be used by any device makes life a little easier.

      "Triggers are kind of an anti-pattern."
      No they aren't. For the reason hosted above it's an easy way to handle the same problem with many devices.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    6. Re:A few problems... by Qzukk · · Score: 5, Funny

      I think I just started development on the 3rd worst D20 product

      *rolls a 1*

      Your fingers fumble over the keyboard, striking keys almost under their own accord.

      UPDATE customer SET lastname='Jones'

      *rolls save vs. WHERE clause... 3*

      ;

      With horror you look on as you strike a glancing blow to the enter key.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    7. Re:A few problems... by Ziggitz · · Score: 2

      It is taking away exactly the key features that languages like Java have that make them ideal for business logic. It takes away the generalist properties and ties each line of code into a database process, removing the separation of logic from implementation. It encapsulates functionality without giving access to it by tying procedural code to relationship statements rather than to actual calls, making it extremely vulnerable to the law of leaky algorithms, making it more difficult to both debug and optimize. There's no way this could actually produce scalable, stable codebase that you could use to provide a large scale solution to any business problem.

      --
      There is no memory shortage. yes I have heard of XFCE. Go away.
    8. Re:A few problems... by leandrod · · Score: 2

      Is SQL really that right language for encoding business logic?

      Yes, SQL is quite adequate, more so than most due to being declarative. The issue is not SQL per se, but poor support for it in everything but PostgreSQL and IBM DB2. The advantages of procedural languages (including OO and functional ones) are more in standardisation than in the language per se.

      --
      Leandro Guimarães Faria Corcete DUTRA
      DA, DBA, SysAdmin, Data Modeller
      GNU Project, Debian GNU/Lin
    9. Re: A few problems... by Anonymous Coward · · Score: 0

      I've never seen it embedded in the database. I've seen it embedded as small snippets among regular OOP/MVC code.

    10. Re:A few problems... by rjstanford · · Score: 1

      Databases are not good development platforms.

      Especially since, buzzword-compliance excepted, they are by far the least scalable part of your architecture.

      --
      You're special forces then? That's great! I just love your olympics!
    11. Re:A few problems... by ZahrGnosis · · Score: 3, Insightful

      I don't know about "anti-pattern", but they cause trouble because they cause other code to be non-deterministic and it's very difficult to create patterns around that sort of behavior. They're practically the logical equivalent of the "COME FROM" in Intercal, which was originally a joke for goodness sake. I was flabbergasted when I found out people are vaunting code that actually works this way. It's particularly painful in implementations where the "reactions" can override program flow with errors or silent rejection or just running off and doing whatever they want. It's nearly impossible to debug since reactions (triggers) are almost always coded in a language or paradigm separate from some procedural language used to provide the UI or whatever other layer is being reacted TO.

      I just don't like it! But that's just me.

    12. Re:A few problems... by Anonymous Coward · · Score: 0

      - What about circular reactions? - what about em? do they converge? - then determine when good enough is good enough. Do the diverge? -sounds like a programing of logical error.

      - What about atomicity? - Use the maybe monad

    13. Re:A few problems... by SQLGuru · · Score: 2

      Purely bogus argument. The counter is "put it in the database because it allows you to change out the front end". Both are stupid arguments because when you get around to rewriting anything, you're going to rewrite both layers. [Caveat for a company that sells their software -- having all of the code in one layer allows you to sell to more clients.]

      Put the code in the right place. For large / massive data processing updates or crunching reports, the database is much more performant than doing it in the front-end code. For CRUD actions, having the work be performed in the front end makes the app more responsive.

      I'm an application developer who has extensive experience as a database developer (not a DBA). I'm in favor of implementing keys and relationships to ensure that your data remains pure (bad data is one of the biggest reasons that analytics is "hard"). I'm also in favor of triggers and stored procedures if it makes sense in the context of the application. But I'm not opposed to reading a set of data into memory and looping over it when it makes sense as well.

    14. Re:A few problems... by gargleblast · · Score: 1

      "Triggers are kind of an anti-pattern."

      No they aren't.

      Oh yes they are. They weaken the client-server model.

      When a client makes a request to a server, the server should try and fulfill exactly that request, to the best of its ability. When a client says INSERT or UPDATE, the server should INSERT or UPDATE if possible. Maybe fail due to constraint violation (or disk full), but that's it. When a client says EXECUTE, the server should execute the named procedure. That's remote execution right there and it's a Good Thing. (Multi-tier might be better, but stored procedures aren't fundamentally wrong.) When a client doesn't say EXECUTE, the server should NOT go off and do a bunch of unrequested stuff and maybe fail to do what it was asked to do.

      Keep it simple: client makes requests, server fulfills requests.

    15. Re:A few problems... by ignavus · · Score: 1

      I think I just started development on the 3rd worst D20 product

      *rolls a 1*

      Your fingers fumble over the keyboard, striking keys almost under their own accord.

      UPDATE customer SET lastname='Jones'

      *rolls save vs. WHERE clause... 3*

      ;

      With horror you look on as you strike a glancing blow to the enter key.

      No problem if you live in the right part of Wales: http://en.wikipedia.org/wiki/File:Jones.png

      --
      I am anarch of all I survey.
    16. Re:A few problems... by Chrisq · · Score: 2

      A few problems: - What about circular reactions? - Is SQL really that right language for encoding business logic? - Triggers are kind of an anti-pattern. - What about atomicity? What if I need the whole reaction chain to work or none of it. I'm afraid there more questions than answers with this proposed pattern.

      Yes, TFA is a bit like saying "a hammer is better than a screwdriver because it was quicker at getting a nail in"

    17. Re:A few problems... by Chrisq · · Score: 1

      Databases are not good development platforms.

      Especially since, buzzword-compliance excepted, they are by far the least scalable part of your architecture.

      ... unless you're Google perhaps

    18. Re:A few problems... by rjstanford · · Score: 1

      Databases are not good development platforms.

      Especially since, buzzword-compliance excepted, they are by far the least scalable part of your architecture.

      ... unless you're Google perhaps

      Just because they've figured out how to scale it (for some jobs - anything needing reliable repeatable results tends to get surprisingly slow) doesn't mean it wasn't still a damn sight harder than scaling the rest of the stack :)

      --
      You're special forces then? That's great! I just love your olympics!
    19. Re:A few problems... by Chrisq · · Score: 1

      Databases are not good development platforms.

      Especially since, buzzword-compliance excepted, they are by far the least scalable part of your architecture.

      ... unless you're Google perhaps

      Just because they've figured out how to scale it (for some jobs - anything needing reliable repeatable results tends to get surprisingly slow) doesn't mean it wasn't still a damn sight harder than scaling the rest of the stack :)

      Yes that's probably true, but now they do have a scalable data layer that fits their purpose.

    20. Re:A few problems... by julesh · · Score: 1

      A few problems:

        - What about circular reactions?

        - Is SQL really that right language for encoding business logic?

        - Triggers are kind of an anti-pattern.

        - What about atomicity? What if I need the whole reaction chain to work or none of it.

      I'm afraid there more questions than answers with this proposed pattern.

      Yep. It's worth noting that in both of the articles linked the only reason the logic is complex is because their databases aren't correctly normalized. To be specific, their tables are not in 3NF.

    21. Re:A few problems... by Anonymous Coward · · Score: 0

      When a client doesn't say EXECUTE, the server should NOT go off and do a bunch of unrequested stuff and maybe fail to do what it was asked to do.

      That's more of an argument that triggers can be misused, or perhaps even that they are prone to misuse, and I've certainly seen some ugly things in that arena. However, prudent use of triggers solves important problems. Suppose there is a requirement (say, government regulations, or whatever else you like) that changes to some kinds of data must retain the change history and a record of who made the change. Without a trigger, you're left to trusting client-side implementations to comply, or to writing a plethora of sprocs to handle the entire array of potential CRUD operations. With a fairly simple trigger (and an ACID compliant RDBMS), changes go into the appropriate history table(s) without complicating the server-side or trusting (and also complicating) the client-side. I'd say triggers are also appropriate for enforcing straightforward data integrity requirements which cannot be expressed in standard SQL DDL.

      - T

  4. Drive-by disagreements by Anonymous Coward · · Score: 1

    You must be British.

    1. Re:Drive-by disagreements by TechyImmigrant · · Score: 2

      No. He's an Anonymous Coward.

      I'm British.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    2. Re:Drive-by disagreements by Anonymous Coward · · Score: 0

      No, he's Sir Basilington Ulysis Rawthorneburton Preston-Wang-Upon-Themes

    3. Re:Drive-by disagreements by Anonymous Coward · · Score: 0

      No. He's an Anonymous Coward.

      I'm British.

      No. He's an AC (American Colonialist); not a British Subject (BS).

    4. Re:Drive-by disagreements by Anonymous Coward · · Score: 0

      http://en.wikipedia.org/wiki/American_Revolution
      America:1
      British:0

    5. Re:Drive-by disagreements by ChunderDownunder · · Score: 1

      http://en.wikipedia.org/wiki/W...
      America:0
      British:0

      never start a war you can't win.

      Oh and, don't fuck with Canada.

    6. Re:Drive-by disagreements by Anonymous Coward · · Score: 1

      http://en.wikipedia.org/wiki/American_Revolution
      France:1
      Great Britain:0

      (America was also present).

    7. Re:Drive-by disagreements by Anonymous Coward · · Score: 0

      http://en.wikipedia.org/wiki/W... America:0 British:0

      never start a war you can't win.

      Oh and, don't fuck with Canada.

      An interesting read; but what's up with the part about the President asking Congress permission to go to war, that can't be right. Madison was the Commander-in-Chief; yet he's acting like some politely quaint Victorian pussy.

  5. Apples and Oranges by Anonymous Coward · · Score: 0

    You can program reactively in Java?

    1. Re:Apples and Oranges by Anonymous Coward · · Score: 0

      You can program reactively in Java?

      Yes, assuming you've worked at the Fukushima Daiichi Nuclear Power Plant since March 11, 2011.

  6. Re:I'm so reactive... by Anonymous Coward · · Score: 0

    I'm first.

    ... at sloppy seconds.

  7. reactive programming? by Anonymous Coward · · Score: 0

    is that sorta like web 2.0?

  8. Abandon Ship by Anonymous Coward · · Score: 0

    active programming
    re-active programming
    quantum programming
    recursive programming
    state dependent programming
    mindful programming
    VR programming
    genetic programming
    dna programming

    yep, the universe is a simulation
    It's actively trying to find out how many ways it can screw itself over, and over, and over again.
    Jerking off,
    Masturbating,
    you can't get past the fact that you're a seed of the universe, stuck in itself.

  9. No silver bullet by Rumagent · · Score: 4, Insightful

    It is a tool. Like any other tool you apply it when your skill and experience tells you to. I belive the term commonly associated with this is "professional".

    1. Re:No silver bullet by jythie · · Score: 2

      Yeah, but there is money to be made in claiming your tool is appropriate far beyond its domain.

    2. Re:No silver bullet by Mister+Liberty · · Score: 1

      Wish I had mod points of the UP kind.

  10. Problem as I see it... by Anonymous Coward · · Score: 2, Interesting

    It appears that reactive programming would require an incredibly bloated and powerful backend. In effect, it moves most of the logic to the framework and allows the programmer to just hook a few pieces together. I can't imagine it scaling well with all the extra event notifications one would introduce. It looks like it would change from one event causing the execution of a chunk of code to multiple chained events triggering a conditional series of smaller chunks of code.

    The problem lies in the overhead of notifications.

    It might be "fewer lines of code" to write, but there's just no way in hell it could be as run-time efficient.

    1. Re:Problem as I see it... by serviscope_minor · · Score: 2

      It appears that reactive programming would require an incredibly bloated and powerful backend. In effect, it moves most of the logic to the framework and allows the programmer to just hook a few pieces together.

      In the last thread on this, some slashdotter answered my question and pointed out that VHDL is a reactive language, since x=y means x is connected to y, so y will propagate to x on the next clock pulse and so on throughout the entire circuit.

      This fits the model for FPGAs pretty well.

      It's fair to say that it does move most of the logic to the FPGA iteslf :)

      So, it can scale well and do all the things well, if it has dedicated hardware to run it on. Fortunately, such things exist, are quite common and are showing no sign of dieing out.

      --
      SJW n. One who posts facts.
    2. Re:Problem as I see it... by TechyImmigrant · · Score: 2

      >VHDL is a reactive language, since x=y means x is connected to y, so y will propagate to x on the next clock pulse and so on throughout the entire circuit.

      And VHDL, as typically used, is completely static. that's because hardware is completely static. You can't just instantiate a new flop in your CPU. They're stuck there where you built them.

      In it's various forms, this is known as CSP, Actors, Dataflow Programming, SISAL (Remember that?) and Excel. There are many others. Any producer-consumer message-as-event passing system.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    3. Re:Problem as I see it... by Megol · · Score: 1

      >VHDL is a reactive language, since x=y means x is connected to y, so y will propagate to x on the next clock pulse and so on throughout the entire circuit.

      And VHDL, as typically used, is completely static. that's because hardware is completely static. You can't just instantiate a new flop in your CPU. They're stuck there where you built them.

      That depends on a lot. You are assuming ASICs where everything is static however FPGAs can do dynamic changes in some cases. But most standard programming languages doesn't support runtime patching either.

      In it's various forms, this is known as CSP, Actors, Dataflow Programming, SISAL (Remember that?) and Excel. There are many others. Any producer-consumer message-as-event passing system.

      Your brush is quite wide here. If one squint enough to see SISAL as a reactive programming model even assembly language looks reactive IMHO.

    4. Re:Problem as I see it... by TechyImmigrant · · Score: 1

      >You are assuming ASICs where everything is static however FPGAs can do dynamic changes in some cases.
      Correct. But the synthesizable subset of VHDL doesn't support that well at all.

      >if one squint enough to see SISAL as a reactive programming model even assembly language looks reactive IMHO.
      SISAL (single assignment language) was a language targeted at dataflow computers, which are trigger computations by variable updates. Hence it fits that parts of the reactive model, but predates it by a long time. Of course you can implement any programming style in assembly, but you have to build a lot of the infrastructure yourself.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  11. Proactive by Anonymous Coward · · Score: 0

    You are absolutely correct. What is needed is proactive programming.

    1. Re:Proactive by sexconker · · Score: 1

      You are absolutely correct. What is needed is proactive programming.

      Fuck that.
      Counteractive Programming, or better yet, Deactive Programming.

    2. Re:Proactive by maxwell+demon · · Score: 1

      Th ultimate programming model: Inactive programming. You do nothing, but still get a working program.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:Proactive by Hognoxious · · Score: 1

      Prostate programming? You know where you can shove that...

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    4. Re:Proactive by Yakasha · · Score: 1

      Th ultimate programming model: Inactive programming. You do nothing, but still get a working program.

      Already have that.

      Its called "Management".

  12. of course it can by istartedi · · Score: 5, Insightful

    x = new WonderfulObject();
    x.Invoke("5000 lines of C that somebody wrote");

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    1. Re:of course it can by PRMan · · Score: 1

      But if developers are constantly writing slight variations on the same 500 lines of C, why not encapsulate it?

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    2. Re:of course it can by istartedi · · Score: 5, Insightful

      But if developers are constantly writing slight variations on the same 500 lines of C, why not encapsulate it?

      Sure, no problem with that. After all I just typed that into a text area in a web browser and hit send. There were probably *millions* of lines of encapsulated code in that one instant. The difference is that I'm not pretending that hitting "Submit" is the same as writing a web browser, a network stack, router firmware, etc. I didn't solve any problems. Those guys did.

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    3. Re:of course it can by phantomfive · · Score: 4, Informative
      Your comment made me laugh, but then I read the article, and that's exactly what the author said. From the article:

      "Reactive Programming is very capable of addressing many complex problems, and can address all other scenarios via a transparent integration with procedural languages."

      --
      "First they came for the slanderers and i said nothing."
    4. Re:of course it can by jythie · · Score: 1

      People often do, it is called a library. What the OP seems to be doing is throwing a scripting language on a library and calling it 'reactive'.

    5. Re:of course it can by maxwell+demon · · Score: 2

      That way I also can easily write a very powerful build environment:

      #include <stdlib.h>
       
      int main()
      {
        return system("make");
      }

      I leave obvious improvements to the reader. ;-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    6. Re:of course it can by eulernet · · Score: 1

      x = new WonderfulBusinessObject();
      x.Invoke("5000 lines of C that some cheap outsourced programmer wrote");

      FTFY.

    7. Re:of course it can by Anonymous Coward · · Score: 0

      x = new WonderfulObject();
      x.Invoke("5000 lines of C that somebody wrote");
      }
      catch(Exception e)
      {
              System.out.print("Oh shit, that somebody just changed their 5000 lines of code with unintended side effects")l;
      } // that's all I need to say about this

    8. Re:of course it can by phantomfive · · Score: 1

      Your skills of awesomeness are overwhelming

      --
      "First they came for the slanderers and i said nothing."
  13. Yes by i+kan+reed · · Score: 2

    I concur.

  14. 5 lines and i don't know what they do by shadowrat · · Score: 4, Insightful

    I don't know what the 500 lines of java code are, but i guess they are grabbing input and cleaning it and opening database connections and whatnot. assuming that he's counting import statements and puts curly brackets on their own lines. sure 500 lines.

    I don't know much about this Reactive stuff, but i don't see anything in this sample code that tells me where the input is coming from or where it is going to or if it's being cleaned in the process. Somehow Reactive also creates an environment in which nothing unexpected ever gets entered?

    1. Re:5 lines and i don't know what they do by rjstanford · · Score: 1

      Also, you can just assume that you have a reasonable number of connections to an adequately powerful database running in whichever replica is currently correct.

      Most of those lines of Java are actually there for a reason, don't'cha'know.

      --
      You're special forces then? That's great! I just love your olympics!
    2. Re:5 lines and i don't know what they do by Hognoxious · · Score: 1

      i don't see anything in this sample code that tells me where the input is coming from or where it is going to or if it's being cleaned in the process.

      That's because it's like agile or something.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    3. Re:5 lines and i don't know what they do by Rich0 · · Score: 1

      We've outsourced data cleanup to Bobby Tables. His rates are low, and we haven't had a problem yet...

  15. The usual consulting snake oil by engineerErrant · · Score: 5, Insightful

    As background, I am the director of engineering in a small Java/Postgres-based shop. We run a cloud backend for our mobile apps.

    This "methodology" reads from the first sentence like an extended infomercial for a consulting shop, or a company trying to create the aura of "thought leadership" to get more investment cash. The formula is simple and time-honored: (1) arbitrarily single out a well-worn software practice to receive a snappy marketing name and be held above all other practices, (2) claim it's new, and (3) offer to implement this bleeding-edge buzzword to clueless executives. For a small fee, of course. It's the same formula that gave us Agile.

    In my opinion, what they've described here is a large step *backward.* Not only is this a relatively trivial use of the GoF Observer pattern, but bizarrely, it's done in SQL using triggers, causing immediate database vendor lock-in and creating a maintainability nightmare. It's how software was made back in the 90s when Enterprise SQL database vendors ruled the land. Sprinkling business logic around in the SQL instead of centralizing it in a much more suitable language for logic like Java is a completely terrible idea, unless you're an Oracle sales rep.

    This one is safely ignored.

    1. Re:The usual consulting snake oil by geekoid · · Score: 0

      ", it's done in SQL using triggers, causing immediate database vendor lock-in and creating a maintainability nightmare."
      Only if you don't know what you are doing. I've create many cross platform triggers.
      Properly organized code is the key to maintainability, regardless of language.

      "Sprinkling business logic around in the SQL instead of centralizing it in a much more suitable language for logic like Java is a completely terrible idea, unless you're an Oracle sales rep"
      you need to step away from the Java for a while. Centralizing the business rules can also be bad.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    2. Re:The usual consulting snake oil by Anonymous Coward · · Score: 0

      I don't know if this article is BS or not, but reactive programming isn't new. However, it is getting increased attention in research papers as more and more programming languages and libraries support reactive-style programming.

    3. Re:The usual consulting snake oil by engineerErrant · · Score: 3, Insightful

      That's certainly valid that proper organization is far more the key to good code than the use of any language - my comments should not be taken as an ad for Java or any other specific technology.

      That said, certain language features lend themselves to good organization much better than others. Where SQL faces challenges is that (1) it's mostly a declarative language using set calculus, which (again, in my opinion) makes it ill-suited for non-trivial business logic, (2) because of the aforementioned, it can't be hooked up to a debugger in any normal sense, making maintenance and troubleshooting that much harder, (3) it's a separate "codebase" and technical competency than the "main" codebase (whether it's in Java, C#, Ruby or whatever), thus creating a competency barrier that must be crossed every time work needs to be done on that code, (4) it's not stored with the main codebase, but as a form of data, raising the issue of out-of-sync deployments with the app servers, and (5) far fewer developers know it well enough for complex uses than typical app-server languages, making staffing difficult.

      Finally, I have personally always found large codebases much more manageable when written in a statically typed language (which SQL is obviously not). Not wanting to spark a flame war with Ruby or PHP fans, though, I will caveat my statement that those languages are also much better suited for business logic than SQL's declarative style is.

    4. Re:The usual consulting snake oil by munch117 · · Score: 2

      All the links point to slashdot.org/topic/bi/...
      That counts as definite proof that the article is BS.

    5. Re:The usual consulting snake oil by St.Creed · · Score: 4, Interesting

      Two points here I think:
      1) Yes it is possible to build maintainable triggers - I'm doing it right now, as a matter of fact. However, it's certainly not my first choice since it's (a) hard to debug when they cascade and b) performance is hard to keep under control as they proliferate. Just look at Oracle's older products (or heck, look at Apex) and the huge amounts of triggers firing for even the most simple of tasks. It's a weed that you have to control rigourously or it will grow out and suffocate your software. It is NOT a best practice to use triggers if you can avoid them, they're a last resort if all other options are off the table.

      2) Centralizing the business rules has a lot of repercussions beyond the technical side of things. Look at BeInformed's products for that. With proper definition of business rules, a good business rule engine can generate most CRUD-code from scratch, dynamically populating the screens with the required fields. BeInformed's latest product even generated the workflow at runtime, all business rule based. It was much more advanced than reactive. Unfortunately they invested too much and they're now up for grabs as they went under. As I understand it, SAP and Microsoft are fighting over the remains. Which is a much better buy than Reactive.

      I'm sure you can find an edge case where some platform can't access the centralized business rule repository, or needs an exception. Or it becomes inflexible and unwieldy. Those are generally signs of failing organizational processes, not technical issues.

      That said, there's another point: why can't databases integrate with business rule engines? We're still stuck with constraints from the 60's, even Domain-Key constraints have to be programmed instead of declared. Databases could leap forward if they would deal properly with time, versioning, and business rules. Instead, we get slightly higher marks on the TP benchmarks. That's useless.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    6. Re:The usual consulting snake oil by Anonymous Coward · · Score: 0

      Agile came out because Extreme Programming sounded unprofessional and a lot of companies were ignoring it. That term came out when Extreme Sports were big. Whoever thought it was a good idea to call Agile Extreme Programming at the outset was a fool. Thankfully someone fixed this and you can now tell brain dead execs that you are "Agile"

    7. Re:The usual consulting snake oil by tomhath · · Score: 1

      Sprinkling database updates around in Java (which for most Java programmers means Hibernate) is almost always a terrible idea. Use the appropriate tool to implement your business logic; often that tool is SQL.

    8. Re:The usual consulting snake oil by Pino+Grigio · · Score: 1

      In 15 years as a developer I have never used a trigger and I don't intend to in the next 15 years either. If you need to use triggers, you're either (a) lazy or (b) haven't thought the problem through adequately.

    9. Re:The usual consulting snake oil by engineerErrant · · Score: 1

      Clearly, one-time structural updates during system upgrades are a different ballgame. The pattern described is for ongoing use in deployed production code, and my assertion is limited to that context.

      For upgrading Hibernate-based systems (or any other O/R-based system), I'd totally agree that short SQL scripts are in many cases the only reasonably performant solution.

      As an aside, I don't really like "classical" O/R (meaning, every field is a column and object relations are explicitly embodied in the DB layer) either because it is so brittle. It lacks any ability to "soft-upgrade" the data because the code is so rigidly tied to the DDL that you're forced to write tons of SQL or other migration scripts for every system upgrade. This, in turn, drags the deployment process into an hours-long affair and sharply discourages frequent upgrades. Despite being no fan of Agile overall, I have found that frequent, granular upgrades are usually better than months-long waterfall cycles, which I feel that classical O/R tends to promote.

    10. Re:The usual consulting snake oil by ADRA · · Score: 2

      Rule Engines are one very tenuous issue. Here are some thoughts on them as I see them:
      1. It requires businesses significant overhead to bring in expertise to allow developers / architects / solutions providers for new products, but
      2. most products are legacy, so when moving into a business rules eninge model, you need to essentially re-implement everything you've ever done, because
      3. Integration with a system of this sort becomes very difficult, and somewhat unmanagable, especially when these outside systems share much of the same behaviour

      I have a customer who's debating 'replacing the crown jewels' with a rules engine, and every time I hear them talk about it, it makes me cringe. This mind you is replacing the implementation of 10's of millions of lines of code and hundreds or even thousands of inter-dependent data elements with multiple workflow stages increasing the complexity factor. The higher ups just don't realize how complicated their system really is and someone was like 'fuck it, its the new buzz word!'.

      --
      Bye!
    11. Re:The usual consulting snake oil by engineerErrant · · Score: 1

      Amen to that. Their (remotely reasonable) use is probably limited to maintaining legacy systems from back when people thought the database should rule the application stack, and an "app server" meant Perl scripts in the cgi-bin folder.

    12. Re:The usual consulting snake oil by Anonymous Coward · · Score: 0

      Rubbish.

    13. Re:The usual consulting snake oil by Anonymous Coward · · Score: 0

      Hmm... one of the business requirements for database apps has always included reporting. Funny how the external app business logic is never accessible to reporting tools. But it is if it is. Stored in the database in views, constraints, stored procs, etc. Even triggers can be metahelpful.

    14. Re:The usual consulting snake oil by Anonymous Coward · · Score: 0

      You almost got it...

      Most people their first reaction to a database is to write *everything* in stored procs. Bad idea. You end up with a vendor locked in mess that is hard to maintain and performs slowly. In this case all that if/else logic that belonged in some sort of upper layer is slow in sql and crushes your query plans.

      Then they usually overreact and then do everything in the 'business logic' layer. Again bad idea. You end up with a language locked in mess that is hard to maintain and performs slowly. In this case network lag overwhelms your per second transaction ability.

      My rule of thumb is keep the data as close to where it will be processed. Both of the methodologies together can create good applications. Being one way or the other is the path to slow and unmaintainable.

      Agile is good for small to medium projects. It is also good for environments where the requirements change frequently. Large businesses usually do not work that way. A small consulting group may work that way. For example the company I work at now agile is a dead duck. The one I worked at before it was seriously awesome as everyone knew what to do. Agile has to fit the organization. If you try to put Agile into a top down command and control style group it will sink and stink. If you put it into a 'flat' organization where everyone has input it will naturally fit the group.

      Use the right tool for the right job.

      As an aside, I don't really like "classical" O/R (meaning, every field is a column and object relations are explicitly embodied in the DB layer) either because it is so brittle. It lacks any ability to "soft-upgrade" the data because the code is so rigidly tied to the DDL that you're forced to write tons of SQL or other migration scripts for every system upgrade.
      You sound like a hibernate/nosql sort of shop. Where your 'data' is not in a classic table format. However, it sounds like you skipped a step early on and it is hurting you. You started with the code and then 'naturally' created the data structures to hold your data. Flip that around and you will find your tables rarely change. I have some structures in my systems I have not touched in 5 years as they fit the model the model was derived from the data. Dont feel bad many people make this mistake. Almost every project where I start with the data structures and design in 'growth' (not code it in right away) they go very well. The ones where I start with the code and 'grow' the data structures look like a nightmare with tons of 'migration scripts'.

      Coding when you get down to it is about moving data. Start with your data. Then how will you hold it. Then some simple prototypes to prove out the containers. By version 3 you will be just adding in features and not worrying about how you data is stored as it just works. If you add in more data you extended it using the methods you designed in step 2.

      My group is also re-learning some of these lessons as our per transaction rate has gone from 10-20 a second to 10k-20k a second (they will have to move to a more relaxed data model soon like nosql). Network speed is now 'in the way'. They even managed to do both the bad things from the two ways. At least there are no triggers. They seemed a bit surprised when I would say 'this stored procedure is slow isnt it?'. As they were doing validation in the stored proc instead of one layer up. One dba I knew put it best 'if there was one way to write a bad stored procedure this is it'. Keep it short, Keep it simple do anything else and you will be slow when the data grows.

  16. Looks more like a formula by Anonymous Coward · · Score: 3, Insightful

    Having read TFA, it looks to me like all they have done is compared a schema which was not properly normalised, with something which was; for example the 'reactive' code calculates total cost as quantity x price, where as the author is conjecting that the SQL version would have a total-price field, and therefore have to have '500' lines of code to keep this field updated.

    Smells like snake oil to me.

    You have to ask, "Why would the SQL schema need a totalprice field?"
    If your business logic says that the totalprice is always Q x price, then ditch the field and ditch all the code which enforces the relationship. But ... then you have to recalculate the totalprice every time you look at it.

    There are other examples of denormalised data in the sample provided, and in all cases the 'reactive' code simply calculates the value on the fly - and as other commenters have mentioned, this blows up as soon as the business rule is no longer valid, such as "when a product's price is changed, DONT change the price on quoted or shipped orders, DO change the price on scheduled or reoccuring orders"

    1. Re:Looks more like a formula by rjstanford · · Score: 2

      And "this customer gets a 3% discount except on orders in the first month of the quarter when its 5% because they're massive and we want to encourage them to book early..."

      --
      You're special forces then? That's great! I just love your olympics!
    2. Re:Looks more like a formula by Anonymous Coward · · Score: 0

      And they only get it on certain product lines if they don't get this other discount...

    3. Re:Looks more like a formula by Anonymous Coward · · Score: 0

      Exactly - Your reply to my post may sound sarcastic but you've quoted almost exactly what one of my requirements on a project was.

    4. Re:Looks more like a formula by julesh · · Score: 1

      Indeed. Their entire product seems to be "we've got this wonderful solution to problems caused by databases that aren't in 3NF: you put your database in 3NF and then calculate the dependent value on the fly" which is of course exactly the same thing we've been doing since 1971 when Codd first described 3NF, but hey, they've got a funky new buzzword for it so it's obviously cool again.

  17. however ... by znrt · · Score: 1

    it might be a good way of prototyping and get an early set of working, testable specs. i don't like the approach, though, seems awkward, but that's maybe just me ...

  18. What about reactive Fuzzy Logic? by Anonymous Coward · · Score: 0

    What ever happend to Fuzzy Logic?

  19. Why would I couple my hosting with my framework? by Scotland · · Score: 1

    Sure, it may work exactly as hyped. But that doesn't matter.

    Why would I want my hosting coupled to the framework I'm using, and to a particular database as well? If their hosting sucks, or if they raise their rates, I'm stuck.

    No thanks!

  20. Marketing Hype... by mrthoughtful · · Score: 3, Informative

    This is just marketing hype dressed up as a question. Having said that, anything that gets anyone enthused about programming is good, I guess.

    What I really don't like is when Val Huber refers to a previous article he submitted as if it were written by a third party.
    Now, I love SQL (and triggers are ok) - and so does Val Huber - I'm sure we would get along fine.
    Val, you've been doing SQL for 20 years! woot. So that means you started back 'round '94.
    (Aw. I started back in '85. I was doing websites in '94 - remember Lycos?)

    But it's just using SQL Triggers, Val - why give it some sort of fancy name? Ohh everyone else does that, like "Web2"? or "The Cloud", etc?
    Still stinks - but hopefully someone may actually pick up how to use some of the cool features of SQL.

    --
    This comment was written with the intention to opt out of advertising.
    1. Re:Marketing Hype... by julesh · · Score: 1

      Val, you've been doing SQL for 20 years! woot. So that means you started back 'round '94.

      And it also means that the correct solution to this problem, third normal form, has been around for over twice as long as he has.

  21. Ditto by goombah99 · · Score: 5, Insightful

    I've done reactive programs. They make fun little interface gizmhos. But holy shit, try debugging something that does something complex. You can't assure when, where and how variables might be changing in some outer reaches of your program while another part of the program is assuming they are momentarily fixed. It's going to be unpossible to seriously optimize a reactive program.
    So yeah for silly data base queries of simple mathematical calcs go for it. Complex programs. run away

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:Ditto by Anonymous Coward · · Score: 0

      One word ... monads.

      That other part of the program shouldn't assume the variable is fixed. You should wrap your function in a contination so that you're not relying on the variable directly, or you should be able to tell the function/object that you pull the variable from to update you if it changes.

    2. Re:Ditto by Chalnoth · · Score: 1

      Yup. I'm sure there are lots of neat shortcuts you can make with reactive programming. But once the complexity grows beyond a certain level, it's going to be hell to debug.

      So it's like pretty much everything else software-related: it depends upon the situation. For situations where reactive programming permits a simple implementation, it's pretty great. Otherwise, not so much.

    3. Re:Ditto by geminidomino · · Score: 1

      Brian Kernighan's famous quote comes to mind. I wonder what the multiplier becomes for something like this...

    4. Re: Ditto by Anonymous Coward · · Score: 0

      I love it for complex problems like double entry database, manufactured cost catalog etc. without the budget or time. Double entry is when two operators have to enter the same data independently, with a history and rollback option. The manufactured cost let the customer choose finish and size of furniture , the cost is given based on wages and parts catalog price in real time with the option of recursive furniture.

    5. Re:Ditto by cduffy · · Score: 1

      You can't assure when, where and how variables might be changing in some outer reaches of your program while another part of the program is assuming they are momentarily fixed.

      Huh? All the reactive programming frameworks I've used (Python's Trellis, various cell-model approaches in Clojure) have transactional memory, so things never appear to be happening in parallel.

      Reactive programming without transactional memory is Doing It Wrong.

    6. Re:Ditto by goombah99 · · Score: 1

      RIght. but now you are deleting most of the appeal of reactive programming by having to go back to explicitly managing dependencies.

      --
      Some drink at the fountain of knowledge. Others just gargle.
    7. Re:Ditto by cduffy · · Score: 1

      RIght. but now you are deleting most of the appeal of reactive programming by having to go back to explicitly managing dependencies.

      I do? I didn't notice myself explicitly managing dependencies when using Trellis or Hoplon.

    8. Re:Ditto by Anonymous Coward · · Score: 0

      even worse then. you must be paying for the automation with speed.

    9. Re:Ditto by cduffy · · Score: 1

      even worse then. you must be paying for the automation with speed.

      "Must"?

      If you pay attention, you might notice that the languages in question have strong metaprogramming support (and one of them has native immutable data structures with structural-sharing updates and typical log32n performance, and transactional memory baked in deep).

      The metaprogramming support means that there's lots of room to do compile-time analysis and optimization, and the native transactional memory support means that the cell abstractions aren't doing much that the language's designers haven't already put a lot of effort into making fast.

      Sure, there's performance overhead -- but it's overhead that's built to parallelize well. Whereas traditional locking can deadlock, Clojure ensures that there's always useful work going on somewhere -- the worst case you get into is that other threads' work needs to be thrown away on conflict. That's a model that scales a lot better to the highly parallel hardware of a decade from now than the conventional approaches today.

  22. VR Programming by Anonymous Coward · · Score: 0

    Actually, I think VR programming would be useful. Imagine this: instead of needing to purchase 2 or 3 monitors to see all the information you need (and still sometimes needing to change what takes up a whole screen), you could wear something like the Oculus Rift, and have as many virtual monitors around you as you need.

  23. Labview by goombah99 · · Score: 2

    By the way, I thought I'd add, the only reactive style language that I've really found could get modestly complex and still not be incomprehensible is Lab view. It's event driven, and the you can literally see where and how a variable is being modified with the wires it draws (unless you like using globals. The problem with labview is feeding a wire through a lot of graphical levels is so annoying that you end up resorting to globals more than you should.). Labview takes a really different mind set to do well but anyone can be crappy at it and get the job done. It's the only program I've felt comfortable modifying in the middle of an experimental run. It's just really robust in that the errors one makes tend not to be fatal. Maybe it's because visually you can see the logic and know the scope of any side effects. But major application complexity? nope. Get complex interfaces hacked together fast? yes.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  24. lazy and memoized by goombah99 · · Score: 2

    It is a tool. Like any other tool you apply it when your skill and experience tells you to. I belive the term commonly associated with this is "professional".

    My experience is that nearly anytime you see a problem reactive programming could address you would be better off designing a program in which evaluation is lazy, and every calculation is memoized. Spend a little time designing for laziness and memoization and there's no need to lock everything into being based on a reactive language.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  25. Performance nightmare in practice by Mostly+a+lurker · · Score: 1

    A lot of what is in the example reminds me of a 4GL I worked with in the 1980s that had a feature called "computed fields". The idea is extremely nice conceptually, and seems to nest nicely, as well as be easily integrated with other functionality. The main problem is performance. Some pretty smart people worked on the tools, but (with the complexity of real life systems) you tend to end up with the same values being continually recalculated. It turns out that (because of the generality of the functionality, and the inability to predict when values will be updated or queried) it is extremely difficult to suppress these duplicate calculations. A typical application developer will create code that results in values being recalculated thousands of times in a single transaction. The problem is both worse and more intractable than is experienced with computed columns in spreadsheets.

  26. I am so sick of slashdot. by Anonymous Coward · · Score: 1

    This is stupid. Posting back to Slashdot BI. I'm really really close to leaving. Thanks for killing slash dot dice.

  27. cherry picked scenerio by trybywrench · · Score: 1

    I'm a fan of reactive programming, it's pretty neat. However, the article cherry picked the scenario that perfectly fits reactive programming. Furthermore, calculating a couple formulas is hardly complex, show me geographically distributed caches kept in sync with a few lines of code and I would be more impressed.

    --
    I came to the datacenter drunk with a fake ID, don't you want to be just like me?
  28. Results speak better than hype by ZombieBraintrust · · Score: 1

    Show me a dozen enterprise apps written in this style that work well. I don't care about sample methods. There are plenty of developers who have rewritten Excel documents into Java applications with proven benifits. Where are the testimonials for doing the opposite? Is Amazon using this for its shopping cart? Did NASA use it? Are big open source project being made with it?

  29. Dataflow Book by mattcarkci · · Score: 1

    If you want to learn how to do it yourself I am writing a whole book on the topic, "Dataflow and Reactive Programming Systems" http://dataflowbook.com/

    1. Re:Dataflow Book by jbolden · · Score: 1

      Short comment, nothing to respond to other than yes people should. But nice to have you here when these sorts of topics arise.

  30. Logic Programming? by ionrock · · Score: 1

    This seems like a magic version of logic programming. Rather than defining precedural instructions, you provide a set of rule that a logic engine then uses when accepting input. My understanding is this is how Prolog and Datalog work, an example being Cascalog in Clojure where you define a query and the logic engine will infer the necessary joins and such to make it happen.

    Generally this model of thinking appeals to me, but in practice it is difficult to get right unless your language has explicit support for it. Functional languages with tools like pattern matching and multimethods are a great example of supporting this kind of workflow.

    In some ways I can see the model handling extremely complex problems. With that said, the reactive programming model seems like it misses the advantage by simply reacting to changes in input. As others have mentioned, what happens with circular reactions or highly inefficient operations? A logical programming model allows for an engine of sorts that analyzes the "reactions" in order to find where it can be optimized as well as decide whether it is flawed.

    Obviously a logical programming model is not a panacea, and I'm not an expert, but it seems a more genuine attempt at handling the sort of complexity that reactive programming aims to solve.

    1. Re:Logic Programming? by Ziggitz · · Score: 1

      If a more declarative/rule based model appeals to you, you should check out Drools.

      --
      There is no memory shortage. yes I have heard of XFCE. Go away.
  31. If number of lines of code really counted... by Anonymous Coward · · Score: 1

    We would all be programming in Perl, or better yet, how about APL?

    1. Re:If number of lines of code really counted... by tomhath · · Score: 1

      or better yet, how about APL?

      One of my favorite exchanges of all time:

      Programmer: We wrote our entire application in one line of APL!

      Tester: But it doesn't work!

      Programmer: That's okay, I know exactly which line of code is broken!

    2. Re:If number of lines of code really counted... by ccanucs · · Score: 1

      I prefer one line of Perl over one line of APL any day :-) Having said that - this seems more like it's a solution that Prolog would be better suited to address. I work in all three when needed - choosing the best language (those among others as well) to suit that task. Oh - except Java - I try and avoid that... :-)

  32. Hardware description languages by Anonymous Coward · · Score: 0

    Reactive programming as a concept is pervasive in hardware description languages, such as Verilog and VHDL. These languages are largely event based, support concurrent function evaluation, deferred assignment, etc.

  33. Apologies to Douglas Adams by Hognoxious · · Score: 4, Funny

    The Americans considered themselves the winners because afterwards America became an entirely separate country. The British considered themselves the winners for exactly the same reason.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:Apologies to Douglas Adams by weilawei · · Score: 1
      That's just revisionism (they tried awfully hard not to let go); the correct parallel is Aesop's The Fox and the Grapes.

      One hot summer's day a Fox was strolling through an orchard till he came to a bunch of Grapes just ripening on a vine which had been trained over a lofty branch. "Just the thing to quench my thirst," quoth he. Drawing back a few paces, he took a run and a jump, and just missed the bunch. Turning round again with a One, Two, Three, he jumped up, but with no greater success. Again and again he tried after the tempting morsel, but at last had to give it up, and walked away with his nose in the air, saying: "I am sure they are sour."

    2. Re:Apologies to Douglas Adams by geminidomino · · Score: 1

      No, that's just humor (or humour, considering the source).

    3. Re:Apologies to Douglas Adams by Anonymous Coward · · Score: 0

      He probably thinks Douglas (in the subject) is Sam's uncle and John's cousin. The dumb fat cunt.

  34. This is just tasks in ada by Anonymous Coward · · Score: 0

    This seems extremely similar to tasks in ada. The variables are in the sensitivity list.

  35. For unrolling component kits, by Anonymous Coward · · Score: 0

    brandish elegantly terse accessors!

  36. Non-trivial by Livius · · Score: 2

    address not just typical problems, but complex ones as well

    If they find that complex problems are not typical, that tells us a lot about the scope of their experience.

  37. are we finally back to client-server? by Anonymous Coward · · Score: 0

    Are we in the great circle of IT change where the business logic is being taken back to the data-level where it was originally before the joys of middleware. Used properly database triggers are the perfect place to enforce business data rules - because you cannot enforce them at a lower level.

  38. Are there good uses? by turp182 · · Score: 1

    Are there specific use cases or patterns where reactive programming may excel, and be integrated into a more traditionally developed system (to minimize reactive complexity through human written code complexity - no way around the complexity...)?

    I have no reactive application experience, just wondering if it is possible and if it could be beneficial.

    --
    BlameBillCosby.com
    1. Re:Are there good uses? by ChunderDownunder · · Score: 1
      Martin Odersky, Scala inventor, recently held a course on Coursera.

      From a functional perspective the basic idea is to handle asynch callbacks with a Future monad.

    2. Re:Are there good uses? by Anonymous Coward · · Score: 0

      Are there specific use cases or patterns where reactive programming may excel, and be integrated into a more traditionally developed system (to minimize reactive complexity through human written code complexity - no way around the complexity...)?

      Yes, in Basic style languages from 20-30 years ago the syntax was "ON var = n DO" followed by the reactive code.
      In "modern" languages (C++, Java, VB.net) it is implemented with properties
      Usually it is a bad idea to let other parts of the program change the way a property works since it causes a non-obvious behavior but writing an Integer class with support for compare on write and a callback hook is trivial in all languages. Some of them may even support writing the condition code and the code to run in the clause setting up the reaction.
      It is very easy to get code that is impossible to maintain with reactive programming but it could be interesting while writing emulators. I do however suspect that it leads to a situation where you have to resort to procedural code to get proper timing emulation between the CPU and peripheral emulation.

  39. Please tell me I'm dreaming! by wdhowellsr · · Score: 1

    Please tell me the browser cache is screwing with me. Please tell me that my wife wants to have sex more often ( ok that isn't going to happen, I have a 12 and 15 year old) Do we really have Slashdot.org back?

  40. 20 GOTO 10 by JayJay.br · · Score: 1

    It is basically the same deal over and over. We need to reduce complexity in programming, so we build yet another abstraction layer. We hide the complexity from the programmer and deal with it in the infrastructure, thus creating more bugs and worse performance. The bugs get (very) slowly fixed and the performance issues are compensated by evolving hardware, which takes a few years. Such is life. If it were not for some initiatives like this one, SAP would be written in machine code.

    That is not to say that this is the solution to all problems, neither that this is even the best alternative for anything, but it's just the way that software evolves, and as such, time will tell.

    1. Re:20 GOTO 10 by Anonymous Coward · · Score: 0

      Why use GOTO when COME FROM is so much more powerful? http://en.wikipedia.org/wiki/COMEFROM

  41. I hate to be negative but... by sgt+scrub · · Score: 1

    If you specify the same memory area in an application for your variables you open up the application for some serious illegitimate usage. It looks to me like using database triggers is pretty much the same thing. However, if someone has sufficient access to your database they could just make their own "triggers". It is a cool concept though.

    --
    Having to work for a living is the root of all evil.
  42. Why Run This Crap a 3rd time? by scorp1us · · Score: 1

    This is the 3rd Reactive article in the past year. Whose dick at Slashdot is Val Huber sucking?

    Each time it's this PR-ish piece on how his Reactive Progamming model isn't such a bad idea. How the hell does he get these articles to run when so many other good articles get shot down?

    STOP IT SLASHDOT. No one wants your Reactive Programming marketing articles.

    --
    Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
  43. Constraints networks by chthon · · Score: 1

    Aren't these called constraints or propagation networks?

    Structure and Interpretation of Computer Programs and Higher-order Perl have got something to say about these.

  44. Yes. by Paradigma11 · · Score: 1

    Reactive Programming (RP) is just flow based programming (FBP) which has been used successfully for 40+ years. Modern RP adds some nice syntactic sugar that makes it more feasable. I have been using RX https://rx.codeplex.com/ some time ago and am pretty happy with it. It combines very well with f# and functional programming. Always try to isolate small autonomous components and test them seperately with http://blogs.msdn.com/b/rxteam... and http://visualrx.codeplex.com/ . Here is a free book about FBP http://www.jpaulmorrison.com/f... You get comparable easy message based concurrency but you have to take care to stay synchron as much as possible because it can get complex pretty easily.

  45. Reactive is too much active... by lfourrier · · Score: 1

    all /. articles on the subject load, then reload, then reload, then I close the tab.
    So, I have no idea what all this is about.

  46. here comes my rant about this crap by Anonymous Coward · · Score: 0

    If reactive programming is so great, why didn't he show us the sendMail function as a reactive method instead of an, "external procedural function." Also, these guys seem to have their heads in the clouds, as if requirements would be as simple as, "send an email." I had a boss who asked me to do something similar and he ended up later adding the following requirements all of a sudden. Note: This was a custom exe that I wrote that ran when our cruise control built a project (not ccnet or jenkins which would have had better email support, and also they didn't have time for me to set something new up or learn a management system so they just wanted me to code a solution so they could ship their product on time):

    1) send the email to a set of groups of email addresses on a case-by-case basis, the groups were stored in an xml file (manually designed by another team, no schema)
    2) customize the subject with a unicode checkmark on success or failure
    3) oh and my client wanted the subject colored differently, but settled on me skipping that
    4) send the email via gmail programmatically using tls on a specific port (couldn't use 443, 25, 465, etc. however 587 worked, but this was subject to change in the future as needed) because our network admins had blocked smtp delivery ports
    5) must check the ssl certificate for validity when negotiating delivery of the email, drop it if auth failed and just write a log statement
    6) flag failure messages as important in outlook, i.e. request outlook show a red flag on the email so outlook can filter / sort by importance
    7) the content of the message must be rewritten from plaintext in custom generated html at the time of delivery based on a template
    8) compress the contents of a directory in an archive and attach to the email
    9) also save the attachments to a network drive along with a copy of the content of the message as a text file, creating paths as necessary each path representing the project & build #.
    10 The network drive has been known to lose connectivity from time to time which can cause your data to fail to write, so be sure when copying the data to the drive to guarantee the save over a network. I'm giving you a heads up on that one, because it was something I encountered not something we prepared for or that anyone was aware of.

    Oh, and they had this weird requirement that it all be written in perl, which I didn't know at the time. Which was ironic considering they didn't want me learning new software at the time. The reason was that another team had in a sister company had already written a big nasty perl script for maintaining the CC and they didn't want to have to reinvent that work.

    Anyways, apply reactive programming to the above without using external procedural methods and enjoy. Don't forget you have a standard working day to get it working because this is blocking everyone on the team from properly testing their code. Oh, and it has to be practical if you do attempt this, no monkey business e.g., "call to some method that will be defined elsewhere that you should assume works in theory." That's magic not science.

    Methinks reactive programming is a nice academic study, but when it meets the real world you're going to have to roll up your sleeves and call in the real engineers to make anything actually happen. Customers and feature owners have unrealistic expectations, short deadlines, strange requirements, sudden added features that don't fit into your perfect scribbles on the napkins, oddball software requirements, and oh btw they need it yesterday.

    1. Re:here comes my rant about this crap by Anonymous Coward · · Score: 0

      Oh, and worth noting I recommended writing code to connect to the exchange server directly, but they required I use gmail because the server admins were twats and wouldn't allow us to connect to the exchange servers via a 3rd party program.

    2. Re:here comes my rant about this crap by Anonymous Coward · · Score: 0

      i forgot to mention:
      in addition, lose 2 hours because they required 2 hour scrum meetings 2 - 3 days of the week, no joke
      subtract say 45 to 60 mins for lunch
      subtract another 1 hour for "design" meetings where they describe what they wanted done and fail to actually design anything at all
      subtract another 1 hour being interrupted for an important crisis unrelated to the task you're on
      overtime not allowed because.. tight budget
      so you don't actually have a full working day in which to get the above accomplished
      not joking

    3. Re:here comes my rant about this crap by Anonymous Coward · · Score: 0

      And, some days there were required town hall meetings, fire safety preparation, osha awareness, training seminars, a talk given by the ceo, etc. where you would lose an additional 2 hours. Though, luckily for this particular day that wasn't the case.

  47. Already done to an extent by Anonymous Coward · · Score: 0

    In several cases involving UI design, the programming paradigm is event driven. Too many times, events get out of control.
    The Mediator Pattern handles some of the pifalls.
    Using this pattern, events can be used in several layers:
    UI Event -> business tasks -> model changes -> UI change to reflect model.
    Just make sure you define a clear flow of events and that there are no loops.

  48. Product pitched as technique by Anonymous Coward · · Score: 0

    At first glance, this looks like an article about a new programming technique. I was immediately sceptical, but took a peek because the example (a bill of materials) is something I've actually worked on in the past (for the building industry). It quickly became apparent that the article is:

    1) Written by someone who either doesn't understand the problem domain, or is plain dishonest
    2) Presents a product, not a technique/methodology/process.

    Adopting the same approach, I could tell you that our solution solved the problem with a single line of C++ - but let's call it Abracadabra Programming for effect:
            activeSnapshotTree.calculateQuantities(activeSnapshotFilter);

    This is genuinely the single line of code that rebuilds a snapshot of the current bill of quantities (filtered according to the project timeline, classifications, tags, recipes, etc). Clearly Abracadabra Programming outperforms Reactive Programming. Instructive? Not really - unless you were looking to license our development framework.

    I've always enjoyed reading Slashdot over the years. It's covered a lot of material and hosted innumerable discussions that would alternately baffle or bore almost everyone I know, but it's been beneficial and instructive for me. That all seems to be slowly and gently sliding off a cliff. There's a steady influx of brainless novice articles and poorly disguised advertisements (like this one). Am I alone in finding Slashdot of decreasing interest and value? Is there another site to fill the gap?

  49. Betteridge's Law of Headlines by allo · · Score: 1

    finally proven wrong?

    1. Re:Betteridge's Law of Headlines by julesh · · Score: 1

      finally proven wrong?

      I think headlines to which the answer is "of course, duh" are a known class of exceptions.

  50. And Why? by Greyfox · · Score: 1
    I've been watching developers a lot lately. The ones I've been watching will do anything in their power to not have to think about the data they're dealing with. Rather than code an SQL query, they'll harp at their manager that they need a object persistence framework. Rather than deal with hardware, they'll build everything as web services, until even a time query takes several seconds and 14 layers of abstraction. Rather than consider a data structure, they'll stuff everything into a map whether the application fits or not. Rather than take advantage of the speed of local storage, they'll mount everything on NFS. Every time the choice is between applying brute force and ignorance and actually thinking about what they're doing, they'll choose brute force and ignorance.

    So really, what is reactive programming trying to accomplish here? Can I write tight, fast code that is sustainable over the long term, or is it just another stupid fucking thing bad developers insist they need so they can browse the web while the company struggles under the weight of their shoddy software?

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    1. Re:And Why? by jbolden · · Score: 1

      You sound like you would consider it wasteful. Reactive programming is a paradigm for when views dominate and uses an more sophisticated variant of lazy evaluation to allow for mutable variables that are only fully evaluated when needed, rather than when defined. Lazy is really useful for being able to manipulate indefinite or even infinite data structures without introducing elements of implementation into algorithms. So it makes your code vastly more maintainable but often at the cost of quadratic memory usage.

  51. Unit testing? by CmdrTamale · · Score: 1

    TFA - TL;DR
    Can you write a test suite in the time this tool saved in coding?
    I didn't think so either.

  52. complexity is a relative thing by Anonymous Coward · · Score: 0

    programs like

    1)Spew shit
    2)take creditcard number
    3)stickit on a list

    Is that the kind of task they think is 'complex' ?

    building block langauges are only as good as their building blocks and if one you need doesnt exist then 'too bad'

    Is this the system they built the obamacare websites with?

    Who needs this new thing when BASIC did all the 'Simple' things already 25 years ago??