SlideShare une entreprise Scribd logo
1  sur  110
Télécharger pour lire hors ligne
‘How a Clojure pet project turned into a
full-blown cloud computing web app.
Or: What are the differences between a
Clojure web app and one written in Java or
Common Lisp?’

Berlin, February 2, 2010



Presentation, Release 0.1
Hamburg Lispers @ Berlin Lispers Meetup
Thanks to Franz Lisp and the
     newthinking store here in
     Berlin for making this
     meetup possible!



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   2
Hi, I am Stefan Richter, CTO
     and founder of freiheit.com
     technologies.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   3
Why am I here?
     - We are working on a Clojure web-app
     - This app runs on Google App Engine
     - We use this app in our own organization
     - We want to provide the app as a software service
     - Why did we choose Clojure for such a mission
       critical project?
     - We want to share our experiences with you:
       - How Clojure made us more productive in
         developing web applications
         (and how much fun it is!)
       - What are the differences to Java and Common
         Lisp when we talk about web development?


                         Berlin Lispers Meetup
© freiheit.com           Presentation, Rel. 0.1       4
But first things first:
     What kind of app is this?




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   5
I have to tell a little story
     first ...




                  Berlin Lispers Meetup
© freiheit.com    Presentation, Rel. 0.1   6
My company freiheit.com has
     been developing large
     internet systems for more
     than 10 years.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   7
We are about 70 people.
     Only 7 are non-hackers.
     So 90% are hackers.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   8
We have no project managers.
     The programmers ‘manage’
     their projects themselves.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   9
We are very efficient.
     We are very well organized.
     How does this work?



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   10
We have strong principles
     on how to plan and deliver
     software. We do this in a
     way which is natural to
     hackers.
     All principles are supported
     by internal software
     systems.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   11
Note:
     The way we work is ‘agile.’
     But I would not call it that
     because I hate all this
     ‘agile’ hype.
     We have been working like
     this since 1999.
     We know what we are doing.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   12
So our principles have been
     forged not only into our
     culture, but also into our
     internal ‘project
     management’ systems.


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   13
Our main system is ‘Captain
     Feature,’ which provides
     task-management and
     measures for self- and team
     management.


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   14
The ‘Captain,’ as we fondly
     call him, is an intranet app,
     written in Java, over 8 years
     old.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   15
In 2008 I started a pet
     project to replace the
     old ‘Captain’ with new
     software written in
     Common Lisp.


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   16
I was the only programmer
     on this project.
     But I got very far.
     I built a nice web-app using
     sbcl, hunchentoot,
     cl-who, cl-sql, JavaScript
     and CSS.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   17
Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   18
We thought:
     Our tools are so useful to
     us, why don’t we share them
     with other programmers?



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   19
This would mean:
     Provide our internal
     systems as external
     services.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   20
We don‘t want to own
     hardware.
     And we don‘t want to
     operate our own server
     farm.
     Not even a virtual one.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   21
So we checked
     Google App Engine
     because it promised
     zero maintenance and a
     price model based on the
     resources you actually use.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   22
Problem: App Engine only
     runs Python and Java.

     But we wanted Lisp.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   23
Clojure is a Lisp and it runs
     on the JVM.
     If it runs on the JVM, it runs
     on App Engine, too!



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   24
First, we started to design
     and implement a ground-
     breaking to-do manager.
     The plan was to later build
     the new ‘Captain’on top of
     this to do manager
     infrastructure.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   25
We call this to-do manager
     ‘TheDeadline’.




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   26
‘TheDeadline’ is an
     intelligent to-do manager
     that behaves like a real,
     human personal assistant.
     It supports you. I doesn’t
     annoy you. It helps you
     achieve your goals.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   27
I showed a screenshot of an
     early version of
     ‘TheDeadline’ in a lightning
     talk at the European
     Common Lisp Meeting 2009:


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   28
Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   29
And this is how it looks
     today. (We release a new
     version every week. It is
     changing fast! Maybe I can
     give you a demo later):


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   30
Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   31
Our vision? The dream of
     every hacker on this planet!




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   32
‘We want to eliminate all
     human project management
     work on this planet.’



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   33
Don’t get me wrong:
     We want to eliminate the
     ‘project management work’
     not the ‘project managers.’
     ;)


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   34
‘Instead we provide AI-
     based systems that help
     people (especially hackers)
     to become more productive
     and help them to manage
     themselves!’

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   35
We use AI for Intelligence
     Amplification and not to
     replace humans.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   36
Sounds crazy?!




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   37
To say it in the
      words of Mike
      Muir of Suicidal
      Tendencies:
      ‘I’m not crazy.
      You’re the one
      that’s crazy.’
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   38
With so many projects still
     failing today, we urgently
     need intelligent software
     for project management ...



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   39
With an AI system doing 80%
     of the work that a human
     assistant would do for you,
     you can focus on the things
     that AI can’t do (today).
     And: ‘TheDeadline’ never
     sleeps and doesn’t need
     feeding.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   40
Here is why I don’t like the
     popular to do manager on
     the web: They are just list
     management apps with no
     intelligence at all. They
     don’t help you. They just
     store your to-dos.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   41
‘TheDeadline’ is currently
     in Closed Beta. Public Beta
     starts soon.
     (Sign-up link at the end of the presentation.)




                                     Berlin Lispers Meetup
© freiheit.com                       Presentation, Rel. 0.1   42
Now that you understand
     why we did what we did, we
     can start with the technical
     part ... :)



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   43
Most people praise Clojure
     because of the concurrency
     features. Lots of stuff has
     been written about it.
     So, I won’t talk about this.
     (You can’t start a thread in App Engine anyway ...)




                          Berlin Lispers Meetup
© freiheit.com            Presentation, Rel. 0.1           44
So how does Clojure
     improve your life as a
     programmer, especially in
     web development?!



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   45
Three things that make your
     life much easier:
     1. Structs vs. objects
     2. Lisp syntax (data = code)
     3. Macros (extending the language)




                    Berlin Lispers Meetup
© freiheit.com      Presentation, Rel. 0.1   46
Of course first-class/higher-
      order functions, everything
      being a sequence,
      immutability, the java
      virtual machine, etc., are
      all important factors.
      But let us take a closer look
      at the data structures and
      code generation features ...
                  Berlin Lispers Meetup
© freiheit.com    Presentation, Rel. 0.1   47
1. Structs vs. objects.




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   48
I used CLOS - which is cool,
     especially compared to
     Java’s OO system.
     But sooner or later you get
     the feeling that you don’t
     need much OO in a
     functional language.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   49
You don’t want that much
     state anyway. You want to
     fold, transform and
     destructure your data in
     your app all the time.
     And: Not everything is an
     object.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   50
BTW: Putting objects into a
     relational database was
     called ‘impedance mismatch’
     in the 1990’s. Today it is
     called ‘persistence
     mapping.’
     But this doesn’t fix the
     problems.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   51
Did you ever ask yourself
     why not all data structures
     are represented in the same
     style? Especially when you
     use maps in your code, send
     JSON to your client and
     store data in a key-value
     store?
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   52
This is what Clojure offers:




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   53
The following examples are taken from „Programming Clojure,“ Stuart Halloway, Pragmatic Programmers Series.
                                                 Cool book. Buy it! :)

                                                 Berlin Lispers Meetup
© freiheit.com                                   Presentation, Rel. 0.1                                      54
You define a struct. You
     instantiate structs.
     Same structs share their
     keys. They behave like hash
     tables (maps). They are
     immutable. They are human-
     readable.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   55
The Clojure structs
     combined with multimethods
     are a really smart idea. It’s
     like in CLOS: Classes and
     methods are separated. But
     I think structs are a more
     readable and more flexible
     concept.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   56
Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   57
You can even specialize a
     method on more than one
     class/type.
     (Which is unknown in the
     Java world).


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   58
Important: You don’t have to
     use multimethods. But
     sometimes they help to
     reduce the number of
     different function names in
     your namespace.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   59
2. Lisp syntax (data = code)




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   60
Most people say they are
     afraid of the parenthesis.
     Maybe that is why 31% of
     the JAX mag readers think
     that Scala has the most
     potential of the JVM
     languages. Only 15% bet on
     Clojure ...
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   61
Lisp syntax is easy to learn
     because there are almost no
     syntax rules. Your programs
     are essentially expression
     trees built from function
     calls.
     Code generation is an
     integral part of the
     language.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   62
This is a function call:
     (+ 3 2)
     This is data:
     ‘(+ 3 2)
     You can translate data into
     a function call at runtime
     and execute it!

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   63
So, functions generate
     functions. You generalize
     functions and parameterize
     them by passing other
     functions to them. There is
     no boilerplate code. Just
     small functional building
     blocks put together.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   64
3. Macros
     (extending the language)




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   65
Macros are Lisp programs
     that generate other Lisp
     programs.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   66
Note: This is not the same
     as self-modifying assembler
     code! ;)



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   67
The Lisp syntax is the
     precondition to make
     language extension very
     easy!
     (Yes, this parenthesis.)


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   68
BTW: Scala has ‘no
     parenthesis’, which is why
     it is so bloated with
     syntactic sugar ...



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   69
Why would I want to extend
     the language?




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   70
In other languages, you
     define an API to implement
     a subsystem for a specific
     domain, like database
     access or html templating.
     This API is then
     encapsulated in a library.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   71
To use such an API, you
     normally build an
     integration layer between
     your application code and
     the API. You need this
     abstraction, but it also
     requires extra work.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   72
Instead, by extending the
     language with some kind of
     domain-specific language
     constructs, you don’t need
     an integration layer
     anymore. This layer still
     exists, but it is generated
     by the macro system.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   73
Most of the time, you can
     change the code generation
     inside the macros without
     having to change the code
     that is using the macros.


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   74
First example: html
     templating. The current
     approach in other languages
     is broken. Putting your
     application code into the
     html code is wrong. And
     mixing html code with your
     app code is wrong.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   75
This is why there are so
     many complicated
     templating frameworks for
     Java: You have to mix two
     different languages - Java
     and html.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   76
But what if you could just
     extend your language to
     ‘know’ how to generate
     html?



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   77
If everything would ‘feel’
     like one language?




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   78
This example is taken from the TheDeadline’s printer-
    friendly tabular to do list.
    You build the html by using language constructs that
    ‘know’ how to generate html. You put function calls
    into the right spots to fill in the blanks. And you just call
    this as a function if you want to display a to do.

                             Berlin Lispers Meetup
© freiheit.com               Presentation, Rel. 0.1           79
Second example: Accessing
     the Google App Engine
     datastore. You can use a
     high-level Java interface
     providing Java objects or
     you can use a low-level
     interface to work directly
     on the key-value structures.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   80
The key-value structure of
     the Google datastore
     entities is almost an exact
     fit to our Clojure structs! So
     we decided to use the low-
     level API to the datastore.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   81
In addition to that, we
     wanted to have an
     abstraction layer to make
     the application itself
     independent from the
     underlying Google platform.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   82
This is how you would
      define a book entity in
      Python ...




            The following examples are taken from „Programming Google App Engine,“ Dan Sanderson, O‘Reilly
                                                  Cool book. Buy it! :)
                                                  Berlin Lispers Meetup
© freiheit.com                                    Presentation, Rel. 0.1                                     83
This is how it is done in
      Java...




                 Not enough space to show all the code that is needed for this example ...
                                             Berlin Lispers Meetup
© freiheit.com                               Presentation, Rel. 0.1                          84
And this is how we do it in
      Clojure:



  This automatically generates the code to generate, store and retrieve entities of the
  type book. It converts the types to and from Google App Engine types and you can also
  add your own functions to validate and to convert every single property to and from a
  custom type (not shown in this example).
  We will write a blog post about it and post the code:
  http://www.hackers-with-attitude.com)



                                      Berlin Lispers Meetup
© freiheit.com                        Presentation, Rel. 0.1                        85
Our Clojure data structure
      looks almost like the low-
      level key-value structure
      from Google’s datastore.
      We can work directly with it
      in our app. But the user of
      defentity doesn’t have to
      know how to use the
      datastore API at all.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   86
The difference to Python:
      We don’t declare types, but
      you can define functions
      for :pre-save and :after-
      read execution for every
      property and for the whole
      entity. We think, this is
      much more concise and much
      more powerful.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   87
One last example: We are
  using several AI techniques.


  We implemented a rule-
  based expert system that
  provides the functionality
  of systems like CLIPS, LISA
  or OPS5.
© freiheit.com
                 Berlin Lispers Meetup
                 Presentation, Rel. 0.1   88
A snippet from the famous
    Monkey & Banana problem:




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   89
We extended the language
     to be able to do expert
     system tasks.
     So, we are not just creating
     APIs. We create powerful
     abstractions that generate
     their own integration layers
     on the fly.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   90
So, what is our conclusion?
     What made Clojure more fun
     and more productive for us
     in comparison with Java (or
     Scala)?


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   91
This is where you spend lots
      of your time in Java web
      development. It’s all about
      moving data around:
                                     User Interface
                          Generating HTML, JSON from application objects
               Folding/   Translating HTTP-Requests to application objects
     Destructuring your
       data in your app                Application
                   code   Translating application objects to SQL statements
                          Translating SQL queries to application objects

                                 Database/Persistence


                                       Berlin Lispers Meetup
© freiheit.com                         Presentation, Rel. 0.1                 92
So you access a database,
     generate objects, iterate
     over objects, copy objects,
     convert objects to other
     objects, convert objects to
     JSON, to XML, etc., etc., etc.
     That is what you do in Java
     all the time...
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   93
There are lots of Java
     frameworks that help you to
     generate the needed code
     because it is almost
     impossible to do this by
     hand. (That is also why you
     need Eclipse at all ...)

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   94
But these frameworks add a
     lot of complexity. You need
     XML configuration and
     annotations.
     Java programming becomes
     more and more a
     configuration task.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   95
The edit-build-deploy-run
     cycle is very slow. All the
     code that is generated by
     the frameworks, the
     dependency injections, the
     start of the app server ...
     You go through this for
     every change you make.
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   96
Our experience is that it is
      much better to have a
      simple unified data
      structure (struct) that you
      can pass around in your
      system and build powerful
      abstractions/mini-languages
      (with macros) to work on
      these data structures ...
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   97
... and to use a real dynamic
      and interactive
      programming environment
      that lets you change and
      test your code in a running
      system.
                 Interactive programming even works with the Google App
                 Engine dev server. We posted an article in our blog explaning
                 how to setup your environment. After that, you need ‘ant’
                 only for the deployment on the App Engine production
                 servers.
                                        Berlin Lispers Meetup
© freiheit.com                          Presentation, Rel. 0.1                   98
One more thing: You don’t
     need Eclipse anymore. So
     you don’t have to reserve
     1.0 Gigs on your machine
     for your editor/compiler
     anymore.

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   99
But what about
     Common Lisp?




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   100
You can do the same in
     Common Lisp!
     You could implement the
     same features that Clojure
     has in Common Lisp and vice
     versa.
     That’s the power of the Lisp
     programming languages!
                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   101
But nobody is doing it.
     The Common Lisp Standard
     is hardly changing anymore.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   102
Cool people are writing
     world-class libraries for
     Common Lisp.
     But the platform itself is
     not changing anymore.


                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   103
Common Lisp is still cool,
     but Clojure is improving
     very fast. It’s a modern
     Lisp.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   104
For us, Clojure is the next
     evolutionary step of
     Common Lisp.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   105
That’s why we helped fund
     Rich Hickey’s development
     efforts on Clojure with a
     donation.



                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   106
So if you want to learn
     Clojure, you can learn lots
     of advanced stuff from
     Common Lisp books.
     Especially from Paul
     Graham’s ‘On Lisp.’

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   107
And it is much easier to
     sneak some Clojure code
     into the enterprise Java
     project your 40-person team
     is currently working on than
     to sneak in some Common
     Lisp code ... ;)

                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   108
Start tomorrow!




                 Berlin Lispers Meetup
© freiheit.com   Presentation, Rel. 0.1   109
Thank you.



TheDeadline Pre-Registration:
https://the-deadline.appspot.com

Our corporate Blog:
http://www.hackers-with-attitude.com

Looking for a job?
http://www.freiheit.com

Self:
http://www.smartrevolution.de
http://www.twitter.com/smartrevolution

Contenu connexe

Dernier

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

How a Clojure pet project turned into a full-blown cloud-computing web-app

  • 1. ‘How a Clojure pet project turned into a full-blown cloud computing web app. Or: What are the differences between a Clojure web app and one written in Java or Common Lisp?’ Berlin, February 2, 2010 Presentation, Release 0.1 Hamburg Lispers @ Berlin Lispers Meetup
  • 2. Thanks to Franz Lisp and the newthinking store here in Berlin for making this meetup possible! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 2
  • 3. Hi, I am Stefan Richter, CTO and founder of freiheit.com technologies. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 3
  • 4. Why am I here? - We are working on a Clojure web-app - This app runs on Google App Engine - We use this app in our own organization - We want to provide the app as a software service - Why did we choose Clojure for such a mission critical project? - We want to share our experiences with you: - How Clojure made us more productive in developing web applications (and how much fun it is!) - What are the differences to Java and Common Lisp when we talk about web development? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 4
  • 5. But first things first: What kind of app is this? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 5
  • 6. I have to tell a little story first ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 6
  • 7. My company freiheit.com has been developing large internet systems for more than 10 years. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 7
  • 8. We are about 70 people. Only 7 are non-hackers. So 90% are hackers. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 8
  • 9. We have no project managers. The programmers ‘manage’ their projects themselves. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 9
  • 10. We are very efficient. We are very well organized. How does this work? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 10
  • 11. We have strong principles on how to plan and deliver software. We do this in a way which is natural to hackers. All principles are supported by internal software systems. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 11
  • 12. Note: The way we work is ‘agile.’ But I would not call it that because I hate all this ‘agile’ hype. We have been working like this since 1999. We know what we are doing. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 12
  • 13. So our principles have been forged not only into our culture, but also into our internal ‘project management’ systems. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 13
  • 14. Our main system is ‘Captain Feature,’ which provides task-management and measures for self- and team management. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 14
  • 15. The ‘Captain,’ as we fondly call him, is an intranet app, written in Java, over 8 years old. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 15
  • 16. In 2008 I started a pet project to replace the old ‘Captain’ with new software written in Common Lisp. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 16
  • 17. I was the only programmer on this project. But I got very far. I built a nice web-app using sbcl, hunchentoot, cl-who, cl-sql, JavaScript and CSS. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 17
  • 18. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 18
  • 19. We thought: Our tools are so useful to us, why don’t we share them with other programmers? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 19
  • 20. This would mean: Provide our internal systems as external services. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 20
  • 21. We don‘t want to own hardware. And we don‘t want to operate our own server farm. Not even a virtual one. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 21
  • 22. So we checked Google App Engine because it promised zero maintenance and a price model based on the resources you actually use. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 22
  • 23. Problem: App Engine only runs Python and Java. But we wanted Lisp. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 23
  • 24. Clojure is a Lisp and it runs on the JVM. If it runs on the JVM, it runs on App Engine, too! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 24
  • 25. First, we started to design and implement a ground- breaking to-do manager. The plan was to later build the new ‘Captain’on top of this to do manager infrastructure. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 25
  • 26. We call this to-do manager ‘TheDeadline’. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 26
  • 27. ‘TheDeadline’ is an intelligent to-do manager that behaves like a real, human personal assistant. It supports you. I doesn’t annoy you. It helps you achieve your goals. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 27
  • 28. I showed a screenshot of an early version of ‘TheDeadline’ in a lightning talk at the European Common Lisp Meeting 2009: Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 28
  • 29. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 29
  • 30. And this is how it looks today. (We release a new version every week. It is changing fast! Maybe I can give you a demo later): Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 30
  • 31. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 31
  • 32. Our vision? The dream of every hacker on this planet! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 32
  • 33. ‘We want to eliminate all human project management work on this planet.’ Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 33
  • 34. Don’t get me wrong: We want to eliminate the ‘project management work’ not the ‘project managers.’ ;) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 34
  • 35. ‘Instead we provide AI- based systems that help people (especially hackers) to become more productive and help them to manage themselves!’ Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 35
  • 36. We use AI for Intelligence Amplification and not to replace humans. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 36
  • 37. Sounds crazy?! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 37
  • 38. To say it in the words of Mike Muir of Suicidal Tendencies: ‘I’m not crazy. You’re the one that’s crazy.’ Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 38
  • 39. With so many projects still failing today, we urgently need intelligent software for project management ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 39
  • 40. With an AI system doing 80% of the work that a human assistant would do for you, you can focus on the things that AI can’t do (today). And: ‘TheDeadline’ never sleeps and doesn’t need feeding. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 40
  • 41. Here is why I don’t like the popular to do manager on the web: They are just list management apps with no intelligence at all. They don’t help you. They just store your to-dos. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 41
  • 42. ‘TheDeadline’ is currently in Closed Beta. Public Beta starts soon. (Sign-up link at the end of the presentation.) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 42
  • 43. Now that you understand why we did what we did, we can start with the technical part ... :) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 43
  • 44. Most people praise Clojure because of the concurrency features. Lots of stuff has been written about it. So, I won’t talk about this. (You can’t start a thread in App Engine anyway ...) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 44
  • 45. So how does Clojure improve your life as a programmer, especially in web development?! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 45
  • 46. Three things that make your life much easier: 1. Structs vs. objects 2. Lisp syntax (data = code) 3. Macros (extending the language) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 46
  • 47. Of course first-class/higher- order functions, everything being a sequence, immutability, the java virtual machine, etc., are all important factors. But let us take a closer look at the data structures and code generation features ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 47
  • 48. 1. Structs vs. objects. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 48
  • 49. I used CLOS - which is cool, especially compared to Java’s OO system. But sooner or later you get the feeling that you don’t need much OO in a functional language. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 49
  • 50. You don’t want that much state anyway. You want to fold, transform and destructure your data in your app all the time. And: Not everything is an object. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 50
  • 51. BTW: Putting objects into a relational database was called ‘impedance mismatch’ in the 1990’s. Today it is called ‘persistence mapping.’ But this doesn’t fix the problems. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 51
  • 52. Did you ever ask yourself why not all data structures are represented in the same style? Especially when you use maps in your code, send JSON to your client and store data in a key-value store? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 52
  • 53. This is what Clojure offers: Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 53
  • 54. The following examples are taken from „Programming Clojure,“ Stuart Halloway, Pragmatic Programmers Series. Cool book. Buy it! :) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 54
  • 55. You define a struct. You instantiate structs. Same structs share their keys. They behave like hash tables (maps). They are immutable. They are human- readable. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 55
  • 56. The Clojure structs combined with multimethods are a really smart idea. It’s like in CLOS: Classes and methods are separated. But I think structs are a more readable and more flexible concept. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 56
  • 57. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 57
  • 58. You can even specialize a method on more than one class/type. (Which is unknown in the Java world). Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 58
  • 59. Important: You don’t have to use multimethods. But sometimes they help to reduce the number of different function names in your namespace. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 59
  • 60. 2. Lisp syntax (data = code) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 60
  • 61. Most people say they are afraid of the parenthesis. Maybe that is why 31% of the JAX mag readers think that Scala has the most potential of the JVM languages. Only 15% bet on Clojure ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 61
  • 62. Lisp syntax is easy to learn because there are almost no syntax rules. Your programs are essentially expression trees built from function calls. Code generation is an integral part of the language. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 62
  • 63. This is a function call: (+ 3 2) This is data: ‘(+ 3 2) You can translate data into a function call at runtime and execute it! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 63
  • 64. So, functions generate functions. You generalize functions and parameterize them by passing other functions to them. There is no boilerplate code. Just small functional building blocks put together. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 64
  • 65. 3. Macros (extending the language) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 65
  • 66. Macros are Lisp programs that generate other Lisp programs. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 66
  • 67. Note: This is not the same as self-modifying assembler code! ;) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 67
  • 68. The Lisp syntax is the precondition to make language extension very easy! (Yes, this parenthesis.) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 68
  • 69. BTW: Scala has ‘no parenthesis’, which is why it is so bloated with syntactic sugar ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 69
  • 70. Why would I want to extend the language? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 70
  • 71. In other languages, you define an API to implement a subsystem for a specific domain, like database access or html templating. This API is then encapsulated in a library. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 71
  • 72. To use such an API, you normally build an integration layer between your application code and the API. You need this abstraction, but it also requires extra work. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 72
  • 73. Instead, by extending the language with some kind of domain-specific language constructs, you don’t need an integration layer anymore. This layer still exists, but it is generated by the macro system. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 73
  • 74. Most of the time, you can change the code generation inside the macros without having to change the code that is using the macros. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 74
  • 75. First example: html templating. The current approach in other languages is broken. Putting your application code into the html code is wrong. And mixing html code with your app code is wrong. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 75
  • 76. This is why there are so many complicated templating frameworks for Java: You have to mix two different languages - Java and html. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 76
  • 77. But what if you could just extend your language to ‘know’ how to generate html? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 77
  • 78. If everything would ‘feel’ like one language? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 78
  • 79. This example is taken from the TheDeadline’s printer- friendly tabular to do list. You build the html by using language constructs that ‘know’ how to generate html. You put function calls into the right spots to fill in the blanks. And you just call this as a function if you want to display a to do. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 79
  • 80. Second example: Accessing the Google App Engine datastore. You can use a high-level Java interface providing Java objects or you can use a low-level interface to work directly on the key-value structures. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 80
  • 81. The key-value structure of the Google datastore entities is almost an exact fit to our Clojure structs! So we decided to use the low- level API to the datastore. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 81
  • 82. In addition to that, we wanted to have an abstraction layer to make the application itself independent from the underlying Google platform. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 82
  • 83. This is how you would define a book entity in Python ... The following examples are taken from „Programming Google App Engine,“ Dan Sanderson, O‘Reilly Cool book. Buy it! :) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 83
  • 84. This is how it is done in Java... Not enough space to show all the code that is needed for this example ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 84
  • 85. And this is how we do it in Clojure: This automatically generates the code to generate, store and retrieve entities of the type book. It converts the types to and from Google App Engine types and you can also add your own functions to validate and to convert every single property to and from a custom type (not shown in this example). We will write a blog post about it and post the code: http://www.hackers-with-attitude.com) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 85
  • 86. Our Clojure data structure looks almost like the low- level key-value structure from Google’s datastore. We can work directly with it in our app. But the user of defentity doesn’t have to know how to use the datastore API at all. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 86
  • 87. The difference to Python: We don’t declare types, but you can define functions for :pre-save and :after- read execution for every property and for the whole entity. We think, this is much more concise and much more powerful. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 87
  • 88. One last example: We are using several AI techniques. We implemented a rule- based expert system that provides the functionality of systems like CLIPS, LISA or OPS5. © freiheit.com Berlin Lispers Meetup Presentation, Rel. 0.1 88
  • 89. A snippet from the famous Monkey & Banana problem: Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 89
  • 90. We extended the language to be able to do expert system tasks. So, we are not just creating APIs. We create powerful abstractions that generate their own integration layers on the fly. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 90
  • 91. So, what is our conclusion? What made Clojure more fun and more productive for us in comparison with Java (or Scala)? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 91
  • 92. This is where you spend lots of your time in Java web development. It’s all about moving data around: User Interface Generating HTML, JSON from application objects Folding/ Translating HTTP-Requests to application objects Destructuring your data in your app Application code Translating application objects to SQL statements Translating SQL queries to application objects Database/Persistence Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 92
  • 93. So you access a database, generate objects, iterate over objects, copy objects, convert objects to other objects, convert objects to JSON, to XML, etc., etc., etc. That is what you do in Java all the time... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 93
  • 94. There are lots of Java frameworks that help you to generate the needed code because it is almost impossible to do this by hand. (That is also why you need Eclipse at all ...) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 94
  • 95. But these frameworks add a lot of complexity. You need XML configuration and annotations. Java programming becomes more and more a configuration task. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 95
  • 96. The edit-build-deploy-run cycle is very slow. All the code that is generated by the frameworks, the dependency injections, the start of the app server ... You go through this for every change you make. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 96
  • 97. Our experience is that it is much better to have a simple unified data structure (struct) that you can pass around in your system and build powerful abstractions/mini-languages (with macros) to work on these data structures ... Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 97
  • 98. ... and to use a real dynamic and interactive programming environment that lets you change and test your code in a running system. Interactive programming even works with the Google App Engine dev server. We posted an article in our blog explaning how to setup your environment. After that, you need ‘ant’ only for the deployment on the App Engine production servers. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 98
  • 99. One more thing: You don’t need Eclipse anymore. So you don’t have to reserve 1.0 Gigs on your machine for your editor/compiler anymore. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 99
  • 100. But what about Common Lisp? Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 100
  • 101. You can do the same in Common Lisp! You could implement the same features that Clojure has in Common Lisp and vice versa. That’s the power of the Lisp programming languages! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 101
  • 102. But nobody is doing it. The Common Lisp Standard is hardly changing anymore. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 102
  • 103. Cool people are writing world-class libraries for Common Lisp. But the platform itself is not changing anymore. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 103
  • 104. Common Lisp is still cool, but Clojure is improving very fast. It’s a modern Lisp. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 104
  • 105. For us, Clojure is the next evolutionary step of Common Lisp. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 105
  • 106. That’s why we helped fund Rich Hickey’s development efforts on Clojure with a donation. Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 106
  • 107. So if you want to learn Clojure, you can learn lots of advanced stuff from Common Lisp books. Especially from Paul Graham’s ‘On Lisp.’ Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 107
  • 108. And it is much easier to sneak some Clojure code into the enterprise Java project your 40-person team is currently working on than to sneak in some Common Lisp code ... ;) Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 108
  • 109. Start tomorrow! Berlin Lispers Meetup © freiheit.com Presentation, Rel. 0.1 109
  • 110. Thank you. TheDeadline Pre-Registration: https://the-deadline.appspot.com Our corporate Blog: http://www.hackers-with-attitude.com Looking for a job? http://www.freiheit.com Self: http://www.smartrevolution.de http://www.twitter.com/smartrevolution