

Ask HN Computer Scientists: could my app make the world a better place? - chadkeck

http://wizbang.sourceforge.net<p>I've been building an app that started as a college project.  Its purpose is to let people build programs visually and learn programming without worrying about missing a semi-colon.<p>The program supports loops, conditional branches, number operations (add, subtract, etc.), input and output.  The programs can be run immediately from inside WizBang.<p>BUT, the #1 feature is that after a program is built and the user has verified that it behaves how they want, they can click one button and compile their program down to working and valid code in C++, Python, and Java.<p>This allows the user to learn programming in the opposite way that is usually taught in universities.  In WizBang, the user learns programming behavior before language syntax.  Which, I hope, will allow more students to get excited about programming, instead of being scared away by compiler errors.<p>Any feedback is appreciated!
======
Kaizyn
You're asking the wrong crowd. People who are quite familiar with text-based
programming tools just won't get it. You'll get stupid questions like "what
does this give me that X doesn't already?" rather than people seeing the
potential there for visual programming.

As I understand it, the visual programming in LabView and MatLab work quite
well. These, I believe, will be your primary points of comparison.

~~~
jules
As someone who is forced to do LabView programming to set up experiments in a
class, I disagree. LabView is the most unproductive way to code ever. Doing an
`if(x<y)` takes like 100 clicks. The reason LabView is acceptable is that it
has a lot of libraries for interfacing with hardware, and libraries for
displaying measurements (but if I right click on an array view then "copy
data" it copies the number as an image (!) instead of the underlying array,
WTF?).

~~~
physcab
I couldn't agree more. As a programmer, Labview is very frustrating. What
takes me an hour to "setup" I could probably code in less than 15 minutes. And
its damn slow. And its errors are impossible to troubleshoot.

The only reason why I would attempt to do something in Labview in the first
place is because all the hardware manufacturers ship with LabView modules.

------
mquander
A lot of people are pretty skeptical about visual programming, because it's
been tried often, and it seems like text is a natural way to express
complicated programs; easy to see a lot at once, easy to create quickly with
the keyboard, simple to share, simple to search, and easy to make changes in
multiple places with things like regular expressions.

What do you think your visual environment has to offer over a textual language
without a lot of cruft and with relatively "simple" syntax?

~~~
chadkeck
WizBang is designed to teach the most basic programming fundamentals: loops,
conditional branches, numeric operations, and how these blocks interact with
eachother.

I am in no way trying to get any current developer to switch over to building
programs in WizBang. This was never an intention. The goal is to present a
simple, minimal, visual environment in which to build simple programs.

After the beginner learns the basics, WizBang eases them into the next step of
learning a real language, such as C++, Java, or Python, by allowing them to
compile their WizBang programs into valid code in any language that's
supported.

To answer your final question: the only advantage WizBang has over a textual
language is that I _think_ there are more grade school (and even high school)
students that would experiment building programs with colorful shapes than
typing commands into a text editor, then running a compiler or interpreter to
see what they get.

------
mbrubeck
I like this approach (especially the idea that users can see the generated
code and start to understand how they might write it themselves). I think
you'll learn more by trying it out on non-programmers or beginning programmers
and watching how they use it. Most of us here on HN probably can't evaluate it
from the right point of view.

You might want to compare <http://scratch.mit.edu/> for some UI inspiration.

~~~
elblanco
Scratch is a neat system. But I found it to be slower than just typing code. I
know that's not the point, but my thinking is that doing something graphically
with lego blocks should be faster than typing out all the characters one at a
time.

I've worked a bit with graphical dataflow systems (like LabView) that can
actually realize a much quicker time to operation than hashing out equivalent
code by hand.

~~~
chadkeck
It is much slower for me to build a WizBang program than to fire up vim and
write some code. I'm not sure if visual programming could ever be faster than
a text editor, as a visual block (in WizBang anyway) usually corresponds to
one or two lines of actual code.

But speed is not the point at all in WizBang. The point is to present a clean
and simple environment in which beginners can build real programs without
having to type more than variable names. I feel it is a much easier way to
introduce programming than having someone install Visual Studio and writing a
hello world program.

~~~
elblanco
This is definitely a cool project. I think, introduced the right way it would
certainly work along your intended concept.

There have been a few attempts at pushing the complexity down so that non-
programmers can work with complex things. Like Data Flow programming systems
for example.

Showing somebody how to build a simple data processing app in one of these
systems is very rewarding as they realize they can coax the machine to do what
they are telling it. But I've mostly dealt with adults, not kids.

------
alttab
I think this is an interesting approach. You are visually modelling program
FLOW - something that is hard to visualize by just looking at text.

I went to Virginia Tech and since the CS department was sucked into the rest
of engineering - I ended up taking intro engineering courses (read: a complete
waste of time) and they wanted to teach programming to freshman engineers
through Alice.

Alice, although the early versions crashed, ran slow, and often saved the XML
'world' files incorrectly, corrupting your work and making you lose it - it
did a great job of teaching visual programming because you could easily create
a 3D scene or game without much effort, plus it highlighted the code as it
ran.

While Wizbang is visual as well (albeit in a different way), the program flow
diagrams kind of look like UML diagrams and could STILL scare away novice
programmers.

A main issue of teaching programming to new comers is you need to start with
the basics - but printing "hello world" to the screen doesn't seem applicable
so it feels like they are wasting their time. Besides, most of what they use
computers for is pretty and visual.

Wizbang doesn't seem to offer anything else that other learning tools don't do
in a better way - except maybe the export to a "real" language.

Now imagine if you could combine that exporting functionality on top of
something more visually interesting like Alice. Make a 'game' in Wizlice
(Wizbang-Alice), and then export that code (on top of your minimal graphics
libraries or functions to support what they write) to C++/Java and let them
tinker around with THAT... they'll be on HN in a couple of years tops.

Cool idea, polished effort, please expand visual component!

~~~
stcredzero
_You are visually modelling program FLOW - something that is hard to visualize
by just looking at text._

Visualizing the exchange of messages in object systems is just as hard. I
think that _that_ is a big impediment to teaching OO. Perhaps that's a bit
more advanced than what this project is after.

------
hernan7
I'm no computer scientist, hope I can comment anyway...

Maybe add some graphics capability a la Logo? That way, you can see the turtle
and the program going at the same time.

Also, some kind of labelling/commenting of the different "areas" of the
program -- that can then be translated to comments to the code.

~~~
chadkeck
Thanks for the suggestions. A comment system is on my list of features to work
on.

I think I have been fleshing out an idea like what you are suggesting from the
turtle cursor. I would like to add a step-by-step debugging to WizBang that
allows the user to watch variable values and step through each Wizzy (with it
being highlighted graphically). If I implemented that, I think it would be a
great way to visualize different sorting algorithms.

Edit: I'm also not quite a computer scientist! College drop out! :)

------
jerf
My feedback is metafeedback: This is not even remotely a new idea. If you
can't immediately rattle off the names of three similar systems, well...
consider that a sign of how successful this approach has proved in the past.

If you are serious about this, you should dig up those previous systems, and
see if you can come up with a reason why your system will fare better. I will
concede I am pessimistic that such a property can exist, but who knows if I am
correct? But if you really want this to succeed by any measure, you _really
really_ ought to do this.

Or decide you totally don't care about success, by any measure you choose, in
which case, have fun. But I can't in good conscience just blindly encourage
someone when taking on a visual programming language. It's like happily
encouraging someone to go ahead, leap off the diving board into the pit of
spikes, no problem, everything will be fine. We're taught by our culture to
blindly encourage everybody, no matter what, but such encouragement has
consequences. We shouldn't ignore those consequences.

If I had to pick the most likely angle of attack for such a system to stand
out from the crowd and potentially enable some sort of interaction that might
help you escape from what appears to be a total black hole of effort, it would
be the input device. The mouse and keyboard have been _explored_ on this
front. Perhaps a stylus-based system could do something different and new, or
something. (Touch will probably be too imprecise, it virtually drops your
resolution and you're going to need more precision, not less.)

------
kkshin
The introduction programming courses (for non majors) use Alice and I think
that without having a strong professor to tie the visual to real programming
together, the connection is lost on students.

For example, my girlfriend took the intro course and did pretty well but they
moved on to real Java and object oriented programming she felt like she had
wasted 1/4th of the semester on the visual programming aspect, and would have
much rather just learned the normal way.

I think a better way to approach this is to design labs that are both easy,
educational, and satisfying to the student. This isn't that hard to do with
the numerous graphical libraries that simplify programming for the student.

------
gord
I think this is a hard problem - a good tool for beginners would need to be
amazing to get any uptake.

The visual programming idioms that Ive noticed having some impact are things
like dragging connection points to wire up inputs/outputs or behavior/function
calls.

If you look at modern visual GUI design tools such as apple/xcode Interface
Builder, wiring components seems to be something that beginner users could
understand easily. [Have a look at recent demos from 280 Norths Atlas to see
this taken to the web]

Maybe you could work with a school computer hobbies class as an ongoing
project to see how they learn in practice - perhaps offer it as a visual logic
puzzle?

------
owinebarger
I can't seem to find my copy of the 2009 Scheme Workshop proceedings, but
Shriram Krishnamurthi's crew presented some work there that was pretty
impressive. They are oriented toward teaching programming to 7-8th graders,
before they learn algebra.

They use PLT scheme as the core of their system, but decided to implement it
in JS to eliminate difficulties young kids would have installing software, and
to simplify sharing of programs for bragging rights (for kids, of course - no
adult programmers care about such things).

------
jlees
I like the idea, definitely the sort of thing you want to get used by school-
age students not 'proper' computer scientists though. Recently was reminded of
just how damn easy it was to do the most basic of programming in the BBC Micro
era; no real syntax, no complexity, but in 10 seconds you could write
something that printed 'JOE ROCKS' infinitely on the page. If this has the
same level of just-do-it, and sufficient sample starting points, it could be
really cool.

~~~
chadkeck
I just wanted to know if any actual computer scientists had input on the
project's goals. I have looked into Alice, scratch, Popfly (discontinued), and
couldn't really find one that was very similar to WizBang, so I was also
thinking putting it on HN would dig out any project that was amazingly
similar.

Edit: scratch, not squeak

~~~
jlees
I'm an actual computer scientist FWIW ;)

------
gommm
Seems like an interesting project to teach complete beginners. I'll test it
out to see if it can help my girlfriend understand more about programing...

~~~
chadkeck
Great! There isn't much instruction on what to do once it's installed, so I
recommend opening up the examples (available from the sourceforge files page)
to get an idea how the blocks behave.

------
elblanco
Yes. Absolutely. For everything from education to autobuilding software tests.

------
edw519
_Which, I hope, will allow more students to get excited about programming,
instead of being scared away by compiler errors._

I applaud you for your concern and effort, but I wonder about the unintended
consequences of this. Do you really want to encourage someone who would be
"scared away by compiler errors"? Compiling is easy, deploying is much harder.

If someone is scared away by the easy stuff, how will they respond to the real
difficulties that await?

Maybe I'm a little old fashioned, but I think the battle scars earned
conquering the little things like syntax help build a better programmer for
everything else. I wouldn't want to take that building block away.

~~~
chadkeck
I don't think WizBang could ever take away the beginner running into compiler
errors, but I feel that the beginner programmer has so many problems to face
at once that this situation can be improved. By using WizBang, they can
interactively learn about looping and branches without worrying about syntax.

~~~
stcredzero
I taught Computer Science 101 in grad school. I think this has a lot of
potential.

I wonder if syntax errors could be made friendlier by animating them as visual
pieces that don't fit together or that do not stick? I can imagine an editor
that always keeps the text syntactically correct (by adding in closing
brackets, boilerplate text to be typed over, etc). A visual editor that
behaved in the same way would be _very useful_. Especially if the program code
would dynamically update in a parallel window!

I think that people can relate to some widget or puzzle piece fitting or not
fitting onto another widget or piece. Certainly, one can relate to this more
readily than cryptic messages like "syntax error."

~~~
Confusion
_I taught Computer Science 101 in grad school. I think this has a lot of
potential._

Well, that remark certainly devaluated my opinion of grad schools. I
understand not everyone is fit for SICP at 18 (I certainly wasn't), but this
is quite on the opposite end.

~~~
stcredzero
I was teaching _undergrads_ as a graduate student TA.

~~~
Confusion
Ah, of course. Sorry, somehow I misunderstood what you wrote.

------
jpwagner
since your comments in this thread indicate that you are insistent this is for
beginners, maybe you should go ask beginners.

get out of my building...<http://news.ycombinator.com/item?id=869827>

~~~
chadkeck
It is definitely intended for beginners, but I wanted to let HN know about it
since I've seen a lot of posts wondering "how I can teach my kid to program?"
and think that this is a good app for that.

