Clojure is a powerful, elegant, and dynamic programming language on the JVM. This presentation is an introduction to the language with code examples presented in a Fairy Tale format.
For all the attention given to design and UX in recent years, here’s the truth: Most companies are not set up to truly deliver an experience. Consider the rich, nuanced experiences we’ve come to expect from more mature mediums like film or game design. These experiences makes us feel, in deep and profound ways. But pulling this off requires a constant orchestration of things at the systems-level and a laser focus on incredibly fine emotional details. And speaking frankly, things like “feelings” “experiences” and “emotions” — these are intangible things. Businesses are trained to prioritize, quantify, and measure tangible things, that promise a clear payoff. We pit belief–about what will create a great customer experience— against data. Is there a reconciliation between these two mindsets?
In this session on design leadership, speaker Stephen P. Anderson will share his experiences, both as a consultant and as part of an executive team, trying to balance the needs of the business with needs of the customer. He’ll share a model — adapted from game design — that offers to balance theses kinds of “art and science” issues, promising to bring together cross-functional teams and reconcile competing interests. Taking cues from game design, this new model will give you a constructive way to think about everything from designing for emotional needs to tracking key metrics to discerning between “little e” experiences and the “Big E” experience. Walk away with a framework you can use to balance what’s right for the business with what’s right for the customer.
The document discusses learning programming through MOOCs and machine learning. It provides data on a MOOC with over 160,000 students from 209 countries. It analyzes student error messages, submissions, and interactions to improve programming instructions. However, programming languages can be ambiguous and students struggle with different concepts. The document advocates for mastery learning through one-on-one tutoring and continual course improvements using data and machine learning.
There are many things that make Ruby a great language, but above all else, the beautiful and friendly syntax. A perfect exemplar of this is the case statement: case enables a flexible method of dispatching on an object that is both natural and intuitive. But case can't do it alone. No, it requires the help of it's little-known and under-appreciated sidekick the === (threequals) operator.
In this talk we'll dive into this fascinating corner of the Ruby language and see what trouble we can cause with the humble threequals. We'll go over the basics of how it interacts with case, and then go into some tips and tricks for making the most of this useful bit of syntax, and ultimately create a little pattern matching mini-language as a demonstration.
Describes techniques for injecting "Semantic Intelligence" into search applications. Focuses on Apache Solr and Lucidworks Fusion, but these techniques are generally applicable to any search engine because all of them use the same basic mechanism - inverted token mapping at their 'core'.
This document introduces Swift syntax and basics. It begins by asking why readers are interested in Swift and what their programming experience is. It then provides brief descriptions of Swift and the instructor's background. The document goes on to cover Swift variables, constants, strings, collection types like arrays and dictionaries, control flow like loops, functions, classes and properties. It provides examples of each concept to demonstrate Swift syntax.
ORUG - Sept 2014 - Lesson When Learning Ruby/Railsdanielrsmith
This document summarizes 10 things the author learned when switching to Ruby on Rails. 1) Ruby is not the same as Rails, and many people don't understand the difference between the language and framework. 2) It's important to understand how ActiveRecord works and the relationships between models and the database. 3) In Ruby, classes and modules are objects themselves. 4) Code in Ruby should read like English using blocks and following conventions like the Rails way.
Why is Haskell so hard! (And how to deal with it?)Saurabh Nanda
Slides of my talk at Functional Conf 2019 where I draw upon my personal journey of learning Haskell and try to explain WHY learning Haskell is so hard. And even while it is hard, it is worth learning Haskell!
For all the attention given to design and UX in recent years, here’s the truth: Most companies are not set up to truly deliver an experience. Consider the rich, nuanced experiences we’ve come to expect from more mature mediums like film or game design. These experiences makes us feel, in deep and profound ways. But pulling this off requires a constant orchestration of things at the systems-level and a laser focus on incredibly fine emotional details. And speaking frankly, things like “feelings” “experiences” and “emotions” — these are intangible things. Businesses are trained to prioritize, quantify, and measure tangible things, that promise a clear payoff. We pit belief–about what will create a great customer experience— against data. Is there a reconciliation between these two mindsets?
In this session on design leadership, speaker Stephen P. Anderson will share his experiences, both as a consultant and as part of an executive team, trying to balance the needs of the business with needs of the customer. He’ll share a model — adapted from game design — that offers to balance theses kinds of “art and science” issues, promising to bring together cross-functional teams and reconcile competing interests. Taking cues from game design, this new model will give you a constructive way to think about everything from designing for emotional needs to tracking key metrics to discerning between “little e” experiences and the “Big E” experience. Walk away with a framework you can use to balance what’s right for the business with what’s right for the customer.
The document discusses learning programming through MOOCs and machine learning. It provides data on a MOOC with over 160,000 students from 209 countries. It analyzes student error messages, submissions, and interactions to improve programming instructions. However, programming languages can be ambiguous and students struggle with different concepts. The document advocates for mastery learning through one-on-one tutoring and continual course improvements using data and machine learning.
There are many things that make Ruby a great language, but above all else, the beautiful and friendly syntax. A perfect exemplar of this is the case statement: case enables a flexible method of dispatching on an object that is both natural and intuitive. But case can't do it alone. No, it requires the help of it's little-known and under-appreciated sidekick the === (threequals) operator.
In this talk we'll dive into this fascinating corner of the Ruby language and see what trouble we can cause with the humble threequals. We'll go over the basics of how it interacts with case, and then go into some tips and tricks for making the most of this useful bit of syntax, and ultimately create a little pattern matching mini-language as a demonstration.
Describes techniques for injecting "Semantic Intelligence" into search applications. Focuses on Apache Solr and Lucidworks Fusion, but these techniques are generally applicable to any search engine because all of them use the same basic mechanism - inverted token mapping at their 'core'.
This document introduces Swift syntax and basics. It begins by asking why readers are interested in Swift and what their programming experience is. It then provides brief descriptions of Swift and the instructor's background. The document goes on to cover Swift variables, constants, strings, collection types like arrays and dictionaries, control flow like loops, functions, classes and properties. It provides examples of each concept to demonstrate Swift syntax.
ORUG - Sept 2014 - Lesson When Learning Ruby/Railsdanielrsmith
This document summarizes 10 things the author learned when switching to Ruby on Rails. 1) Ruby is not the same as Rails, and many people don't understand the difference between the language and framework. 2) It's important to understand how ActiveRecord works and the relationships between models and the database. 3) In Ruby, classes and modules are objects themselves. 4) Code in Ruby should read like English using blocks and following conventions like the Rails way.
Why is Haskell so hard! (And how to deal with it?)Saurabh Nanda
Slides of my talk at Functional Conf 2019 where I draw upon my personal journey of learning Haskell and try to explain WHY learning Haskell is so hard. And even while it is hard, it is worth learning Haskell!
- Test-First Teaching involves writing tests before writing code to make the tests pass one by one. This helps students learn incrementally and receive immediate feedback.
- It encourages writing small, focused tests and code to address one problem at a time. Students learn by seeing their code pass each test.
- Research has found Test-First Teaching effective for learning programming languages like Ruby based on various studies and examples developed by independent instructors over time.
Douglas Crockford - Programming Style and Your BrainWeb Directions
Computer programs are the most complicated things that humans make. They must be perfect, which is hard for us because humans are not perfect. Programming is thought to be a “head” activity, but there is a lot of “gut” involved. Indeed, it may be the gut that gives us the insight necessary for solving hard problems. But gut messes us up when it come to matters of style. The systems in our brains that make us vulnerable to advertising and propaganda also influence our programming styles. This talk looks systematically at the development of a programming style that specifically improves the reliability of programs. The examples are given in JavaScript, a language with an uncommonly large number of bad parts, but the principles are applicable to all programming languages.
My talk from the pupet devops conference Berlin 2014 (http://code-your-config.com/). A low level tour of some terrible terrible puppet code, with advice on how to do it better (including showing off the awesome new each() construct you get in puppet 3.2)
The document discusses Scala, a programming language that runs on the Java Virtual Machine but incorporates features from object-oriented and functional programming. It provides examples of Scala's type system, object model using traits and mixins, built-in support for domain specific languages like XML and actors, and how the actor model implements concurrency by treating objects as isolated message-passing actors.
An introduction to Perl and what you can learn in an introductory course. An entire "eliza"-like program is written and the perl features explained in about twenty minutes.
CPAP.com Introduction to Coding: Part 1johnnygoodman
This document provides an introduction to coding concepts. It discusses storing values in variables and data types like strings and integers. Key coding concepts covered include comments, running code, comparisons, arrays, and if/else statements. The document outlines what future sessions will cover, including loops, classes, methods, connecting to databases, and using other people's code.
Javascript is actually called ECMAScript. The document provides an overview of JavaScript including how it interacts with the DOM in the browser, using JavaScript in web pages, syntax, control structures like loops and conditionals, objects as hashes, functions as first-class objects, loose typing, closures, prototypes, JSON, cross-domain AJAX, libraries like jQuery, and resources for learning more. The global scope in JavaScript is discussed and the importance of using var is emphasized to avoid polluting the global namespace.
The document provides an overview of using Markov chains and recurrent neural networks (RNNs) for text generation. It discusses:
- How Markov chains can model text by treating sequences of words as "states" and predicting the next word based on conditional probabilities.
- The limitations of Markov chains for complex text generation.
- How RNNs address some limitations by incorporating memory via feedback connections, allowing them to better capture sequential relationships.
- Long short-term memory (LSTM) networks, which help combat the "vanishing gradient problem" to better learn long-term dependencies in sequences.
- How LSTMs can be implemented in Python using Keras to generate text character-by-character based on
This document provides an introduction to Ruby and Rails. It discusses key differences between Ruby and Rails, with Ruby being an object-oriented scripting language and Rails being a web application framework built on Ruby. It also covers some basic Ruby concepts like variables, data types, methods and iteration. Resources for learning Ruby on Rails are provided, including free options like Codecademy as well as local meetup groups for support.
1) A message is a request sent from one object to another to execute a method.
2) The message receiver is the object that receives the message.
3) The method selector is the name of the method being called in the message.
Smalltalk uses only message passing between objects to perform operations.
Intro to programing with java-lecture 4Mohamed Essam
This document contains information about loops in programming. It explains that loops allow code to be repeated without having to manually write out repetitive statements. An example is given of using a while loop to print "Happy Birthday" 100 times without writing the print statement 100 individual times. The different types of loops in Java are also summarized, including while loops which execute code while a condition is true and do-while loops which first execute the code block and then check the condition.
Section 8 Programming Style and Your Brain: Douglas Crockfordjaxconf
Computer programs are the most complicated things that humans make. They must be perfect, which is hard for us because we are not perfect. Programming is thought to be a "head" activity, but there is a lot of "gut" involved. Indeed, it may be the gut that gives us the insight necessary for solving hard problems. But gut messes us up when it come to matters of style.
The systems in our brains that make us vulnerable to advertising and propaganda also influence our programming styles. This talk looks systematically at the development of a programming style that specifically improves the reliability of programs. The examples are given in JavaScript, a language with an uncommonly large number of bad parts, but the principles are applicable to all languages.
CoffeeScript - JavaScript in a simple wayLim Chanmann
This document summarizes CoffeeScript, a programming language that compiles to JavaScript. It provides a simpler syntax than JavaScript with features like less code, readability, easy understanding and maintenance. Some key CoffeeScript features highlighted include functions, objects, lexical scoping, variable safety, splats, OOP, and pattern matching. The document encourages learning how JavaScript concepts work even when using CoffeeScript. It ends by providing resources for learning more about CoffeeScript.
This document provides an overview of JavaScript concepts and best practices. It discusses objects as hashes, functions as first-class objects, loose typing, closures, prototypes, JSON, cross-domain AJAX, testing with Jasmine, CoffeeScript, libraries like jQuery, global scope issues, regular expressions, XSS, hoisting, and other JavaScript quirks. It also provides resources for further learning JavaScript.
Programming is hard, but we can magnify our efforts with excellent API design. Let’s explore how, as we consider compactness, orthogonality, consistency, safety, coupling, state handling, layering, and more, illustrated with practical examples (and gruesome mistakes!) from several popular Python libraries.
What I learned from Seven Languages in Seven Weeks (IPRUG)Kerry Buckley
This document discusses seven programming languages that the author learned over seven weeks: Ruby, Io, Prolog, Scala, Erlang, Clojure, and Haskell. For each language, it provides a brief description and comparison of the language's features, strengths, and weaknesses. It discusses concepts like variables, functions, objects, concurrency, and more for each programming paradigm. The document aims to compare and contrast the languages at a high level based on the author's experiences learning them.
Fun with Functional Programming in Clojure - John Stevenson - Codemotion Amst...Codemotion
Clojure is a simple, powerful and fun language. With a small syntax its quick to learn, meaning you can focus on functional design concepts and quickly build up confidence. There are also a wide range of Clojure libraries to build any kind of apps or services quickly. With a focus on Immutability, Persistent data structures & lazy evaluation, you will quickly feel confident about the Functional Programming (FP) approach to coding. Discover Clojure in action as we write & evaluate Clojure using the REPL (interactive run-time environment), giving instant feedback on what the code is doing.
- Test-First Teaching involves writing tests before writing code to make the tests pass one by one. This helps students learn incrementally and receive immediate feedback.
- It encourages writing small, focused tests and code to address one problem at a time. Students learn by seeing their code pass each test.
- Research has found Test-First Teaching effective for learning programming languages like Ruby based on various studies and examples developed by independent instructors over time.
Douglas Crockford - Programming Style and Your BrainWeb Directions
Computer programs are the most complicated things that humans make. They must be perfect, which is hard for us because humans are not perfect. Programming is thought to be a “head” activity, but there is a lot of “gut” involved. Indeed, it may be the gut that gives us the insight necessary for solving hard problems. But gut messes us up when it come to matters of style. The systems in our brains that make us vulnerable to advertising and propaganda also influence our programming styles. This talk looks systematically at the development of a programming style that specifically improves the reliability of programs. The examples are given in JavaScript, a language with an uncommonly large number of bad parts, but the principles are applicable to all programming languages.
My talk from the pupet devops conference Berlin 2014 (http://code-your-config.com/). A low level tour of some terrible terrible puppet code, with advice on how to do it better (including showing off the awesome new each() construct you get in puppet 3.2)
The document discusses Scala, a programming language that runs on the Java Virtual Machine but incorporates features from object-oriented and functional programming. It provides examples of Scala's type system, object model using traits and mixins, built-in support for domain specific languages like XML and actors, and how the actor model implements concurrency by treating objects as isolated message-passing actors.
An introduction to Perl and what you can learn in an introductory course. An entire "eliza"-like program is written and the perl features explained in about twenty minutes.
CPAP.com Introduction to Coding: Part 1johnnygoodman
This document provides an introduction to coding concepts. It discusses storing values in variables and data types like strings and integers. Key coding concepts covered include comments, running code, comparisons, arrays, and if/else statements. The document outlines what future sessions will cover, including loops, classes, methods, connecting to databases, and using other people's code.
Javascript is actually called ECMAScript. The document provides an overview of JavaScript including how it interacts with the DOM in the browser, using JavaScript in web pages, syntax, control structures like loops and conditionals, objects as hashes, functions as first-class objects, loose typing, closures, prototypes, JSON, cross-domain AJAX, libraries like jQuery, and resources for learning more. The global scope in JavaScript is discussed and the importance of using var is emphasized to avoid polluting the global namespace.
The document provides an overview of using Markov chains and recurrent neural networks (RNNs) for text generation. It discusses:
- How Markov chains can model text by treating sequences of words as "states" and predicting the next word based on conditional probabilities.
- The limitations of Markov chains for complex text generation.
- How RNNs address some limitations by incorporating memory via feedback connections, allowing them to better capture sequential relationships.
- Long short-term memory (LSTM) networks, which help combat the "vanishing gradient problem" to better learn long-term dependencies in sequences.
- How LSTMs can be implemented in Python using Keras to generate text character-by-character based on
This document provides an introduction to Ruby and Rails. It discusses key differences between Ruby and Rails, with Ruby being an object-oriented scripting language and Rails being a web application framework built on Ruby. It also covers some basic Ruby concepts like variables, data types, methods and iteration. Resources for learning Ruby on Rails are provided, including free options like Codecademy as well as local meetup groups for support.
1) A message is a request sent from one object to another to execute a method.
2) The message receiver is the object that receives the message.
3) The method selector is the name of the method being called in the message.
Smalltalk uses only message passing between objects to perform operations.
Intro to programing with java-lecture 4Mohamed Essam
This document contains information about loops in programming. It explains that loops allow code to be repeated without having to manually write out repetitive statements. An example is given of using a while loop to print "Happy Birthday" 100 times without writing the print statement 100 individual times. The different types of loops in Java are also summarized, including while loops which execute code while a condition is true and do-while loops which first execute the code block and then check the condition.
Section 8 Programming Style and Your Brain: Douglas Crockfordjaxconf
Computer programs are the most complicated things that humans make. They must be perfect, which is hard for us because we are not perfect. Programming is thought to be a "head" activity, but there is a lot of "gut" involved. Indeed, it may be the gut that gives us the insight necessary for solving hard problems. But gut messes us up when it come to matters of style.
The systems in our brains that make us vulnerable to advertising and propaganda also influence our programming styles. This talk looks systematically at the development of a programming style that specifically improves the reliability of programs. The examples are given in JavaScript, a language with an uncommonly large number of bad parts, but the principles are applicable to all languages.
CoffeeScript - JavaScript in a simple wayLim Chanmann
This document summarizes CoffeeScript, a programming language that compiles to JavaScript. It provides a simpler syntax than JavaScript with features like less code, readability, easy understanding and maintenance. Some key CoffeeScript features highlighted include functions, objects, lexical scoping, variable safety, splats, OOP, and pattern matching. The document encourages learning how JavaScript concepts work even when using CoffeeScript. It ends by providing resources for learning more about CoffeeScript.
This document provides an overview of JavaScript concepts and best practices. It discusses objects as hashes, functions as first-class objects, loose typing, closures, prototypes, JSON, cross-domain AJAX, testing with Jasmine, CoffeeScript, libraries like jQuery, global scope issues, regular expressions, XSS, hoisting, and other JavaScript quirks. It also provides resources for further learning JavaScript.
Programming is hard, but we can magnify our efforts with excellent API design. Let’s explore how, as we consider compactness, orthogonality, consistency, safety, coupling, state handling, layering, and more, illustrated with practical examples (and gruesome mistakes!) from several popular Python libraries.
What I learned from Seven Languages in Seven Weeks (IPRUG)Kerry Buckley
This document discusses seven programming languages that the author learned over seven weeks: Ruby, Io, Prolog, Scala, Erlang, Clojure, and Haskell. For each language, it provides a brief description and comparison of the language's features, strengths, and weaknesses. It discusses concepts like variables, functions, objects, concurrency, and more for each programming paradigm. The document aims to compare and contrast the languages at a high level based on the author's experiences learning them.
Fun with Functional Programming in Clojure - John Stevenson - Codemotion Amst...Codemotion
Clojure is a simple, powerful and fun language. With a small syntax its quick to learn, meaning you can focus on functional design concepts and quickly build up confidence. There are also a wide range of Clojure libraries to build any kind of apps or services quickly. With a focus on Immutability, Persistent data structures & lazy evaluation, you will quickly feel confident about the Functional Programming (FP) approach to coding. Discover Clojure in action as we write & evaluate Clojure using the REPL (interactive run-time environment), giving instant feedback on what the code is doing.
20. Cleaner Code with
Functional Style
Object Orientation is
Overrated
Born of simulation – now
used for everything, even
when inappropriate
- Rich Hickey
22. Mutable stateful objects are the new spaghetti code (Rich Hickey)
Hard to to understand, test → why we need mock
objects and all the unit tests
Concurrency is a disaster
23. Real life – you need state
Limit, identify and don't scatter it about your code.
33. What is
Clojure?
Dynamic
s
Functional
ro
ac
Concurrent
M
Java Interop
34. Clojure is a LISP
- Code as Data
- Macros allow you to extend the
language
- Macros are executed at compiler
pre-process time rather than run-
time
36. Once upon a time ...
Interactive!
http://www.try-clojure.org/
37. The Kingdom of Clojureland was ruled by
a very good king and queen. It was a very
special day. A baby had just been born!
The new princess!
user> "Chloe"
"Chloe"
39. She grew from a beautiful baby into a
cute toddler and said her first word.
user> (println "Mama")
Mama
nil Aww how cute! Her
first side effect!
40. She just loved to make lists
user=> '("mom" "dad" "milk" "juice")
("mom" "dad" "milk" "juice")
Look Mommy – No commas!
41. Vectors too.
user=> [1 2 "Buckle my shoe"]
[1 2 "Buckle my shoe"]
Look Mommy – No commas!
42. When she got older she started making
maps of all her favorite things
user=> {:drink "juice", :book "Fox in Socks", :toy "Purple Bear"}
{:drink "juice", :book "Fox in Socks", :toy "Purple Bear"}
43. She learned how to make her first Var
user=> (def my-name "Chloe")
#'user/my-name
user=> my-name
"Chloe"
44. She got a time-out for her first lie
user=> (if true "in trouble" "not me")
"in trouble"
user=> (if false "in trouble" "not me")
"not me"
user=> (if nil "in trouble" "not me")
"not me"
45. When she was old enough she got sent
to a boarding school for Princesses.
She had a hard time fitting in with the
other imperative princesses. They made
fun of her lisp and said she looked
funny with all those parens.
Ha! Ha!
((((((((((()))))))))))
46. Her teachers gave her a hard time for
being different
Alright Children …
lets count from 0 to 9
user=> (range 10)
(0 1 2 3 4 5 6 7 8 9)
47. Her teacher tried to punish her by
having her write “I will not be lazy”
100 times – but it only made it worse
when she did:
(take 100 (repeat "I will not be lazy"))
("I will not be lazy" "I will not be lazy" "I will not be lazy"
"I will not be lazy" "I will not be lazy" "I will not be lazy" "I
will not be lazy" "I will not be lazy" "I will not be lazy" "I
will not be lazy" "I will not be lazy" "I will not be lazy" "I
48. Her teachers gave her a hard time for
being different
Now children let's practice our for for
loops... Take a list and add up all the
values inside [1, 2, 3, 4]
user=> (reduce + [1 2 3 4])
10
49. She made it through these hard times
with the support and love of her
wonderful parents. And finally
graduated school and returned home.
user=> (defn graduated? [age]
(>= age 18))
#'user/graduated?
user=> (graduated? 18)
true
53. He would unleash his ultimate
monster – The infinite headed hydra
Muha ha!
user=> (def hydra (repeat "hydra-head"))
#'user/hydra
user=> (take 5 hydra)
("hydra-head" "hydra-head" "hydra-head" "hydra-
head" "hydra-head")
54. The kingdom's Beserker Teddy Bears put
up a valiant fight. But the finite
troops could not keep up. The
Kingdom would be destroyed.
The princess had to do something...
56. After a few rounds – The evil wizard
knew he had been beaten and he and the
hydra disappeared into the flower
scented mists.
Curses Chloe! You've won this
round.... but I'll be back!
59. Who's using Clojure?
FlightCaster
(Clojure Rails) – Clojure for statistical learning
BankSimple
(Jruby Clojure Scala)
TheDeadline
Clojure (Compojure, Ajax)
60. Want to Learn More?
TryClojure
https://github.com/functional-koans/clojure-koans
Programming Clojure by Stuart Halloway
Interested in hacking?
Twitter @carinmeier
Email cmeier@gigasquidsoftware.com
61. Rich Hickey's Ant Colony
Demonstration
• World populated with food and ants
• Ants find food, bring home, drop pheromones
• Sense pheromones, food, home
• Ants act independently, on multiple real threads
• Model pheromone evaporation
• Animated GUI
• < 250 lines of Clojure