Getting Clojure into the workplace, how do you do it?

75 views
Skip to first unread message

Nick Mudge

unread,
Jul 6, 2010, 4:50:57 AM7/6/10
to Clojure
One of the things I like about Clojure is it is a way to get lisp and
functional programming into workaday programming work; into the many
places and businesses that use Java.

I'd be very interested to hear stories or experiences of getting
Clojure into the workplace and how it was done. That is, convincing
customers and business people and other programmers that it is okay
that you start doing your work in Clojure in your job. And similar
such experiences.

Tim Snyder

unread,
Jul 6, 2010, 11:46:51 AM7/6/10
to Clojure
I managed to use Clojure in a pure MS C++ shop. I started by writing
some Communicating Sequential Processes code at home on my own time.
The library allowed for analysis and simulation of code modelled in
CSP. Next I found an interesting problem (distributed, timing, buggy)
and modelled it using the CSP library. Since the analysis would have
been difficult to do in another language and I already had a good
start, I got some time to continue the work. Since we only use C++ I
imagine side projects and utilities are about as far as Clojure will
make in my company, but it was fun to spend some time on it.

Thomas Kjeldahl Nilsson

unread,
Jul 6, 2010, 11:48:01 AM7/6/10
to clo...@googlegroups.com
Nick,

I'm not doing proper paid work in Clojure yet, but I convinced my department manager that learning Clojure on company time was ok. So that's a start at least. :) 

I used the concurrency features of Clojure as a main selling point, as well as the value of getting started early on in promising young languages/platforms. ("high risk, high reward").

--
Med vennlig hilsen
Thomas Kjeldahl Nilsson


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Wilson MacGyver

unread,
Jul 6, 2010, 12:15:24 PM7/6/10
to clo...@googlegroups.com
my story isn't a very interesting one. I simply told everyone on the team to
learn it, because we are going to use it :)

--
Omnem crede diem tibi diluxisse supremum.

Edmund Jackson

unread,
Jul 6, 2010, 12:37:52 PM7/6/10
to clo...@googlegroups.com
An exercise in declarative programming...

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

Edmund

jonathan...@gmail.com

unread,
Jul 6, 2010, 12:56:40 PM7/6/10
to Clojure
Clojure has enormous leverage as a Perl replacement, and for many of
the same reasons. Easy to install wherever there is a JVM.
Comprehensive libraries that run cross-platform. Pure Java drivers for
major databases.

I reckon that if doing any kind of prototyping is in your job role,
then anywhere you used Perl, you can now use one of the 'next wave' of
languages such as Ruby, Clojure etc., where once you might have used
Perl. Sorry Perl folks!

Jonathan

Tim Robinson

unread,
Jul 6, 2010, 12:23:40 PM7/6/10
to Clojure
I don't plan to let it stop me....

(def typical-estimated-cost 50000)

(defn propose-cost-with [choice]
(if (= choice "Clojure")
( * typical-estimated-cost .7)
typical-estimated-cost))

> (propose-cost-with "Clojure")
...

> (propose-cost-with "Other")
...


In my opinion many large companies will chuck this out the door since
your cost does not represent the organizational cost, which depends
upon their ability to maintain your code [1] + no one ever gets fired
for picking Microsoft. For smaller companies not afraid of the dark,
or a start-up the above will work.

[1] "Object-oriented programming is popular in big companies, because
it suits the way they write software. At big companies, software tends
to be written by large (and frequently changing) teams of mediocre
programmers. Object-oriented programming imposes a discipline on these
programmers that prevents any one of them from doing too much damage.
The price is that the resulting code is bloated with protocols and
full of duplication. This is not too high a price for big companies,
because their software is probably going to be bloated and full of
duplication anyway." - Paul Graham http://www.paulgraham.com/noop.html

Tim


On Jul 6, 9:48 am, Thomas Kjeldahl Nilsson
<tho...@kjeldahlnilsson.net> wrote:
> Nick,
>
> I'm not doing proper paid work in Clojure yet, but I convinced my department
> manager that learning Clojure on company time was ok. So that's a start at
> least. :)
>
> I used the concurrency features of Clojure as a main selling point, as well
> as the value of getting started early on in promising young
> languages/platforms. ("high risk, high reward").
>
> --
> Med vennlig hilsen
> Thomas Kjeldahl Nilssonhttp://kjeldahlnilsson.net
>
> On Tue, Jul 6, 2010 at 10:50 AM, Nick Mudge <mud...@gmail.com> wrote:
> > One of the things I like about Clojure is it is a way to get lisp and
> > functional programming into workaday programming work; into the many
> > places and businesses that use Java.
>
> > I'd be very interested to hear stories or experiences of getting
> > Clojure into the workplace and how it was done. That is, convincing
> > customers and business people and other programmers that it is okay
> > that you start doing your work in Clojure in your job. And similar
> > such experiences.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clo...@googlegroups.com
> > Note that posts from new members are moderated - please be patient with
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+u...@googlegroups.com<clojure%2Bunsu...@googlegroups.com>

Meikel Brandmeyer

unread,
Jul 6, 2010, 1:36:55 PM7/6/10
to clo...@googlegroups.com
Hi,

I sneaked it in under the radar. I'm not a software developer in my day job and its pure self-defense to have clojure as a secret weapon. If I go to corporate IT to get something done, it takes years and costs millions. With Clojure it takes weeks and much less money. :)

Sincerely
Meikel

lprefo...@softaddicts.ca

unread,
Jul 6, 2010, 1:47:43 PM7/6/10
to clo...@googlegroups.com, clo...@googlegroups.com
Same story here...

Dictatorship has definitively some value :)))

Luc P.

Sedit qui timuit ne non succederet.

Wilson MacGyver <wmac...@gmail.com> wrote ..

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first
> post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com

Martin Jul

unread,
Jul 6, 2010, 4:24:44 PM7/6/10
to Clojure
Initially I taught myself Clojure because it is a lot of fun. That
lead me to using it for prototyping a currency trading application and
since it worked well we just kept using Clojure for that. Some
customers don't care about the technology as long as the app is
earning them money.

I also looked for some other ways to demonstrate its value:

I got Clojure into some other projects simply by building tools the
projects needed very quickly (part of this is now open-source in the
form of a spreadsheet library: http://github.com/ative/docjure).

One example of this was munging data into Excel sheets for editing by
customers and re-importing the edited data into the source format done
in very little code. Clojure is like LINQ on steroids: even skeptics
find it hard to argue against succinct code like

(->> (load-workbook "spreadsheet.xlsx")
(select-sheet "Price List")
(select-columns {:A :name, :B :price}))

; Output
> [{:name "Foo Widget", :price 100}, {:name "Bar Widget", :price 200}]

Step by step things like this build up Clojure's credibility.

We are a .NET shop so I am currently looking into using Clojure reader-
macros with gen-class as a DSL to generate some of the code that goes
into our Domain-Driven Design applications as DLLs so it can still be
used from the existing VB.NET/C# code and with IntelliSense support in
Visual Studio.

This has a clear immediate benefit (less code, less work) and provides
a long-term option for gradually expanding the use of Clojure in our
enterprise .NET applications. It is also an extremely safe way to do
it, since we can use the existing test suite on the new version with
class-gen'd code replacements so it does not impose any risk (which is
good in financial applications).


Some other advice:

* Ignore Everybody (hat tip to Hugh Maccleod) - remember that there
are still people who have not tried Rails yet even if it was already
very convincing 5-6 years ago. Don't waste your time on them. In 5-10
years time they will come around and try Clojure.
* Get some experience with it as support for the projects - for
example as tooling. You gain the experience, you can demonstrate that
it works and you avoid endless discussions about "untested" technology
going into the heart of enterprise apps until you have some good cases
on hand.
* Ease it in gradually by mixing Clojure components into existing
applications.
* Be patient - Clojure is still small so you will have a huge
advantage over the mainstream the next many years by starting now.
* Don't be too patient - if you are in one of these industrial-age
organisations that favour easily replaceable labour and prohibit
learning new things that are not yet known to every other programmer
on the planet maybe it's time to move on.

Finally, look for sweet spots for functional programming - using a
parser combinator such as FnParse makes it very easy to write a parser
or create an external DSL, or you could use macros to create an
internal DSL very easily that would be difficult to do in other
languages. This would provide a good show-case.

The best selling point, however, is probably that Clojure mixes well
with the existing languages you may already use in your company (.NET
or JVM) so you can adopt it gradually. You don't have to retrain
everybody for everything in one big-bang event.

Much as I love Emacs, if only we could have Visual Studio integration
and ReSharper support for Clojure refactorings we could really have a
breakthrough in acceptance :-)


Cheers,
Martin


www.ative.dk
github.com/ative
github.com/mjul





kerwin franks

unread,
Aug 20, 2010, 7:20:47 PM8/20/10
to Clojure
Hi Martin, i am actually on the first chapter of my Clojure book and i
am actually looking to use it for a currency trading algo that i have
in mind. I will be using traditional technical indicators such as MACD
and ATR. Do u have any pointers, such as opensource trading software
that u used in conjunction with Clojure, or what other tools did u
use? Your info will help a lot in guiding me.

Kind Regards
Kerwin
Reply all
Reply to author
Forward
0 new messages