Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Visual Programming Languages vs. Ruby

156 views

Published on

Lightning talk from Fog City Ruby meetup https://www.meetup.com/fogcityruby/events/252239674 See https://gist.github.com/eanakashima/7d2d06811dfb9e00836428a9a55abf33 for references

Published in: Technology
  • Be the first to comment

Visual Programming Languages vs. Ruby

  1. 1. 🖼 !?!! Visual Programming Languages vs. Ruby
  2. 2. EMILY NAKASHIMA @eanakashima
  3. 3. BY DAY, ENG MANAGER @ HONEYCOMB.IO By night, design & viz nerd!
  4. 4. != EXPERT
  5. 5. VISUAL PROGRAMMING LANGUAGES! (VPLS)
  6. 6. SCRATCH via MIT Media Lab
  7. 7. - Amanda Wilson, David C. Moffat, 
 https://www.researchgate.net/figure/Screenshot-of-a-classic-Hello-World-program-in-Scratch_fig1_266490101
  8. 8. - mberry, wikipedia
 https://en.wikipedia.org/wiki/Scratch_(programming_language)#/media/File:Scratch_Hello_World.png
  9. 9. - max johnson
 https://blog.penjee.com/scratch-2-0-in-4-easy-steps-animated-gif
  10. 10. - @paulsinnett
 http://ludumdare.com/compo/2013/04/29/creating-a-physics-system-in-sratch event handler " variable " loop with condition "
  11. 11. “This type of support is highly useful but, computationally speaking, trivial compared to the challenges ahead attempting to support users to produce meaningful programs. The most daunting challenge will be to support pragmatics, that is the study of what code means in particular situation. - Alexander Repenning
 https://sgd.cs.colorado.edu/wiki/images/2/21/20YearsofBlockProgramingLessonsLearned_published.pdf
  12. 12. WHAT ARE THE HARD PARTS? ➤ Conditionals are hard to read ➤ Abstraction is hard & might require inventing new visual grammar ➤ Code reuse is hard ➤ Hard to diff & merge ➤ Resource-intensive ➤ Type checking may be hard to visualize ➤ Doesn’t fit on-screen well ➤ Code comments are hard ➤ Your face can only absorb so many shapes
  13. 13. WHAT ABOUT RUBY? What does its design optimize for?
  14. 14. SYNTAX! Simple & easy to learn
  15. 15. # Ruby’s syntax is relatively forgiving & easy to learn: Kernel.puts("potato") Kernel.puts('potato') Kernel.puts('potato',) Kernel .puts('potato') Kernel.puts 'potato' puts 'potato'
  16. 16. Visual programming for IoT
 From top left: Modkit, FlowHub, Node-RED
  17. 17. # Chef uses a ruby DSL %w(public logs).each do |dir| directory "#{node.app.web_dir}/#{dir}" do owner node.user.name mode "0755" recursive true end end
  18. 18. CLASSES & OBJECTS Ruby wants to make it *so* easy to make Classes & Objects
  19. 19. class Booplesnoot def hop puts "hoppity hop 🐰" end end Booplesnoot.new.hop # prints hoppity hop 🐰
  20. 20. CLASSES & OBJECTS (SKETCHPAD – 1963)
  21. 21. CODE REUSE Composition, inheritance, methods, and more
  22. 22. module mobility def hop puts "hoppity hop 🐻 | 🐰" end end class DangerFloof include mobility end class Booplesnoot include mobility end
  23. 23. CODE REUSE (CHIMERA) Chimera
  24. 24. SO WHAT’S HARD IN RUBY? ???
  25. 25. SHOW STATE What state is buried inside my app?
  26. 26. PYGMALION (1975)
  27. 27. SHOW THE WHOLE How do the pieces of a program fit together?
  28. 28. SHOW THE WHOLE (FUSION 9) Fusion 9
  29. 29. SHOW THE WHOLE (CUBE – 1995)
  30. 30. SO WHAT? What can we learn from VPLs?
  31. 31. THANK YOU! twitter.com/eanakashima for more hot takes ☄ https://bit.ly/2KVWfeA for references 📜

×