Hello!

I've been trying to become friends with juju for the last month or so and
was asked in the #juju IRC channel on Freenode to share my experiences from
a "beginner perspective on juju charming".

Generally, I believe JuJu is a great concept. I makes alot of sense and the
architecture and "thought" gone into the tool is impressive.

BUT:

Having some 10+ years in programmer/sysadmin/linux - I think the high
learning curve of developing charms is a problem. Frankly, without the help
from the guys in the IRC-channel - I would have given up a long time ago.
Let me explain my problems and share my experiences.

1. The target developers are sysadmins - not programmers.

Most developers new to JuJu charms are likely sysadmins or devops. Likely
with -limited- amount of programming knowledge or even self taught
scripters. These professionals are not always deep in with advanced
development concepts like "interfaces", "stubs", "layers", "reactive",
"hooks" etc.
The need for a clear path in how to learn juju charming is critical

2. The documentation site really need some love and thought.
A) Where are the tutorials?
B) What is the "flow" of reading the documentation? What is the intended
purpose and audience? At the moment its a mix between references,
commercial, examples and feels just like some place you go to NOT really
find what you are looking for. Perhaps split the content into developer
sites, user sites, tutorial sites or something like that.

I'm better off reading blogs trying to figure out what goes on in juju.

3. There are no "best practice" available for common tasks.

Developing a simple useful charm today requires you to cover alot of ground
before you even can produce your first "hello-world" charm. Concepts like
"interfaces", "reactive programming", "layers" and juju-state-stuck
debugging needs to be understood well before you write a decent charm. This
would normally be OK if there was a extremely good, documented, examples -
using a set of "best practices" clearly available to developers. Offcourse
there are, but those are only known by the "elite developers" in the IRC
channels.

Beginners like me, have to learn these best-practices by either:

A) Dwell in the IRC for extensive periods of time and have the courage to
ask.
B) Fight with the juju documentation and figure out "my own best-practises".
C) Google and reading multiple of blogs with "others best practices" and
selecting what ever works for you.

In this process, I found myself getting confused over "old ways of doing
things" and whatever new concepts was king today. As a beginner - I can't
figure out if I was doing things wrong, or if juju was just volatile by
nature. I'm still partially there...

Quoting from #juju:

"We've refactored our charms couple times after we got something working..
First it was just bash that was run through Juju hooks And after getting
comfortable with reactive we rebuilt everything from scratch using reactive
only"

3. Reactive programming is great, but not intuitive.

As I understand from some blogs, reactive programming is the way juju is
transcending into (or already has?). It seems to make sense for most
experienced charmers, but how about beginners?

When I was starting to develop my first "hello-world" example charm. I used
only hooks, which quickly got me to a working example. Happy thinking I was
on the right track, I then discovered  I needed to "relearn/redo" all my
knowledge because "reactive" was "the real" way of doing charms. Bump.

So, taking on a new challenge on relearning that naturally got me into deep
holes mixing these concepts up (hooks vs reactive) and not using them
properly and leading up to new challenges and messy code. To make things
even worse, I learned just today that in certain cases, these concepts are
mixed up "deliberately"/"by design". Getting through all this is a hard
task.

Now, I want to be clear that I'm not criticising juju as such here. My
message  is that the success of juju is highly dependent on the
availability to clear paths through difficult terrain. A multitude of
tutorials showing "best practices" and covering common tasks would be a
great start. Deciding what those "common tasks" are is important too I
guess as this is the way you tutor developers and cultivate communities.
Like - why isn't there a super-clear-mega-awesome-tutorial around
demonstrating how to create  a database and an example client application,
that connects to each other with juju? That must be something of the most
common scenarios for juju and I'm just chocked that its no such "tutorial"
around via the official juju documentation site.  Comparing with the
Android community where there tutorials tied to each end every concept
available in the framework. Juju deserves this.

I'm going to continue struggle with juju regardless. Thanx again for all
the great help in the IRC channel from @kjackal , @stub, @lazyPower. Thanx
for taking your time explaining and helping me get through with charm
development. Its because of you I decided to take some time writing down my
thoughts here and that I still think its worth learning spending time on.
I'm happy to help out further down the road too as I forget how hard this
was.

Hope it helped.
/Erik Lönroth
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to