neoweb4u|Web site Developer I Advertising I Social Media Advertising I Content material Creators I Branding Creators I Administration I System Answer|Practical Programming in 40 Minutes • Russ Olsen • GOTO 2018

neoweb4u|Web site Developer I Advertising I Social Media Advertising I Content material Creators I Branding Creators I Administration I System Answer|Practical Programming in 40 Minutes • Russ Olsen • GOTO 2018


Neoweb4u|This presentation was recorded at GOTO Berlin 2018. #gotocon #gotober http://gotober.com Russ Olsen – Writer of Getting Clojure and Eloquent Ruby, VP at …


41 thoughts on “neoweb4u|Web site Developer I Advertising I Social Media Advertising I Content material Creators I Branding Creators I Administration I System Answer|Practical Programming in 40 Minutes • Russ Olsen • GOTO 2018

  1. One of the most sensible and clear explanation about Functional Programming.

  2. So basically its the same but baclwards

  3. It seems he likes talking

  4. I learned two things from this talk: function and atom. Function responsible for what change to make. Atom responsible for making change according to the function. Atom takes care of the complexity of multiple threads, ideally implemented by the language. Developer writes simple functions with no concerns of multi thread. If this is the essence of the FP, this is the first time I get the idea of FP. Either way, I found this talk amusing.

  5. So Functional Programming is just super-defensive programming. Like…where someone once hurt you so bad you decide you're never going to have a relationship with anyone ever again. But you can't not have any relationships at all. So you pretend that the relationships you have aren't really relationships.

  6. Well description sounds familiar. Its called labview.
    Its multithreaded by default.
    Copy data always(memory hog).
    Regular text programming has to be thrown out of window.
    But once you have mindset, you can create things that would take text based coders 10x more time. Specially on big things and Ux. Its not optimal for hardware close things.

  7. it is very interesting how a programmer thinks about a function (I am physical chemist), I tend to write functionally because I see programming functions as mathematical functions

  8. "Strings" are now "binaries" in #FNP (functional programming).

  9. #OOP was "pushed" upon the coding community because of the fact humans interpolate their worlds with objects (So, 20th century … 'cause of cars!).

  10. Hmm – so let's imagine a simple 3D graphic video game. We're rendering a picture 60 times a second and it's a 2k resolution monitor – 4 million pixels – 16 million red/green/blue/alpha numbers. So each frame, we create an empty screen "array" – 16 million numbers – all set to zero. Then, we pre-loaded about a million triangles (each one, three vertices and a color, let's say). To draw those million triangles, we…what?…call a function that takes in the screen array and modifies somewhere between a few dozen and a few million numbers in that array. Gives us back a copy of that array (which isn't really a copy – it's a tree structure with a big blank screen and a set of locations that were changed by the triangle. We repeat this – we take the new screen array (which is a tree structure) and we update it with more changes – some of these will be changes to the previous changes – others will change areas that were previously unchanged. We do this for all million triangles – each of which hits (say) 1,000 array elements. The result is a totally freaking ENORMOUS tree structure with something of the order of 100 billion nodes. It doesn't fit in main memory. Even if it did, the next thing we have to do is to hand it to an atom – who's job is to copy all of that crap into a nice clean empty array so we can send it off to the hardware video adapter. Collapsing a tree with a 100 billion elements will take a while – but we only have 16 milliseconds – garbage collecting all of that memory…yikes! Next frame, the virtual camera rotates 1 degree to the right in the virtual world – and we have to do the entire operation all over again…in 16 milliseconds.

    That is literally impossible…there is simply no chance that an immutable data structure that's implemented as a tree structure can do it. The reason being that it's essentially storing a VAST history of all of the incremental changes we made to every single pixel of the screen – none of which we actually give a damn about! Truly all of that stored modification history is garbage.

    So instead, we have to use atoms to do 100% of the work – but now you've lost all of your functional programming goodies. Worse still, if I'm rendering from multiple threads, it's going to do a bazillion re-tries whenever there's a collision.

    This is why functional programming is only useful – actually only usable in any way at all – in some narrow kinds of applications. Sure, updating databases – where all of this messing around is acceptable because of slow network and disk accessing – no problem.

    But what you've ended up with is a programming language that's only useful for a small fraction of my application. My programmers have to be fluent in both languages – and maintaining consistency between the parts becomes a new nightmare. Honestly, it's easy to enforce side effects where needed with "const" class functions and call-by-value parameters. WHERE NEEDED. So the compiler enforces immutability selectively where needed – and we simply discipline our programmers to use those features everywhere they can to LIMIT side effects to places where they are desirable.

    This isn't limited to graphics. Think of a text editor – do we want the system to store every single change to every single character of the document as it's being edited? Maybe it would give you a kick-ass "undo" system – but if you don't have access to all of that stored history, it doesn't help you.

    Fundamentally, you're building a system that keeps a record of every single change made to every single property of absolutely everything…and that's untenable in an awful lot of applications.

  11. No one starts building something from ground up BUT Microsoft. They have done it again again and again with later versions of Windows… which is similar to quitting smoking: one may do it 5 times a year.

    Also computer functions are not pure – they generate HEAT.

  12. Reading these comments it is as if nobody watched the video. He doesn't explain anything about how functional programming works beyond that data is immutable and claims there are no side effects, but his only example is explained by "magic" and a function running again. What happens if you are updating a bank balance and making a purchase the first function approves a purchase but the other one was updating the balance. You would have to either hold the approval of the purchase for a certain time or rerun BOTH functions every time the atom has been updated. If you need "atoms" you are just adding another fancy new nondescriptive term to sound cool but doing the same thing as variables with an extra layer of confusion added. If you have to explain something by saying things like "unfortunate name they chose" and define every phrase then it is not good it is stupid. Variable, Container, a Bucket even all convey meaning (holding something) ATOM does NOT. Pretty much anything would have been a better name for it because it is as descriptive as calling it a flower or dog.

  13. After this talk I think that I understand the effect hook in react better 😂

  14. TL/DR: functional programming has much more to offer than is covered in this talk.

    The problem with a Clojure programmer explaining f

  15. Finally, a Functional Programming explanation that makes sense. Mr. Olsen is a great speaker.

  16. Ok I think I got the idea but one question remains: why would you do that? Is there only the advantage of having code that's easier to understand? Or are there cases in which functional programming would offer a better solution than traditional programming?

  17. Starting a new role using F# as the primary language. Pretty excited and completely terrified.

  18. Wow, his passionate presentation style is a brease.

  19. Is it just me or is this very reminiscent of how quantum reality and quantum physics work?

  20. Russ get to 25 mins in before revealing that it solves the problem of mutable datastructures by making themimutable then mutable again!

  21. the cameraman is so sensitive to movement. turn him down

  22. After watching 40 minutes video I haven't learned how to write "Hello World" in FP. How do I start? Can I refactor my code to FP? Should I? Is FP something I can introduce step by step in my work? Can I write FP code within OO framework?

  23. So you start with a clean sheet of paper, great. Then you put a bunch of old code on it without interfaces; at first. Should one ask what are the requirements and what are all the interfaces; human, other systems, internal, environmental (remember the comment about it works different on Tuesday)? One can write code or a software engineer that engineers a product. Engineering a product means one has definite objectives and a plan to get there before one has lines of code. This may be harsh and I am sure the speaker knows a deign is not code. One should never forget what comes first.

  24. very clear and helpful, thank you

  25. Well, that Q reference didn't age well.

  26. No OOP
    Mathematical Functions
    Data Structure Inmutable
    Side Effects -> Bridges to the stateful world

  27. idk about functional being easier to understand… reading well written procedural/OOP code makes sense, well designed OOP is a treat to work with
    yet functional "easy to read" code requires me to jump around all over the place, since well… everything is functions… Maybe if you work with both for a while its easier to read functional in total, but, "easier to understand" is not a side effect free assumption

  28. I found this really missing the point. The lecture did not show the problem that functional programming is trying to solve, rather it showed a way to solve "it". It shows the immutability case, and claims that immutable data is easier to reason over, but showed no such example. I do not understand still why having mutable data (aka objects) is not understandable *when done right*, meaning using encapsulation, defining clear APIS.
    This is a way of programming, but why choose this over another way is not in this lecture.

  29. Do not see any benefits compare to OOP. OOP rules.

  30. Lost me at 18:05 . Is 'a' a function or first value of the array x?

  31. While I enjoyed the video, and found it useful and interesting, It didn’t answer any questions I would have unless I already knew what functional programming was.

  32. Superlatives deployed. Gratitude expressed. Curious aspiration ignited.

  33. That was super interesting!

  34. Looks like closures in js

  35. Now I feel hyped about it.

  36. It works but …… haha :):)

  37. This is a great conference for someone who wants to say they learned about functional programming but don't actually want to learn; maybe someone who's being paid by the hour to learn about functional programming and nobody is going to check in on how much they learned at the end

Leave a Reply