Lowering the programming barrier

I love quickly and quidgets just for the simple reason they lower the barrier for potential programmers to join in and start easily. But it makes me think that gtk is getting old and its showing its oldness by not being too friendly to write using. This is a major problem because lets say you want to do hello world in java its two lines of code (I cant remember it off hand but ill dig it out if anyone cares). Here is the pygtk example I found for hello world http://www.pygtk.org/pygtk2tutorial/ch-GettingStarted.html#sec-HelloWorld. Maybe im a little lazy when it comes to the boring stuff in programming but I really think we should have a nice group of one liners to…
A. print a message
B. ask a yes or no question
The main reason im saying all this is the same reason Microsoft created VB (and VB is very very simple). VB is the perfect example of lowering the barrier. We have glade and its ok but there are some problems and we have pygtk if you dont like using point and click ui drawing. The problems with glade are very simple, it needs grids to layout everything and the UI of the designer sucks. The problem with pygtk and gtk in any language is that its a big hassle.
What VB does right is its a very simple language and a very simple interface. Ok your not going to do any great programs written in it because it would drive you mental and if you are an experienced programmer you will be annoyed by how rigid it is. The main thing is it lowers the barrier, anyone can use it.
What java does right is that it has UI designers and it has one liner code to handle small stuff.
I think the problem stems from how, when and who developed gtk and glade. They were both made by very smart people and it works perfect for them and most other people but it isnt made to be easy, its made to be functional. Im not saying scrap everything im saying look again and see what can be simplified and what can be nicer. The when is simple it was designed back in 1998-2000 so its at least 9 years out of date in terms of style. How is also simple it gtk was made as a big functional tool kit that works because thats all they wanted and needed at the time. They more than likely didnt think of a wider audience using it.
And all projects from time to time need to have a long hard look at themselves and see what needs changing. Firefox is changing itself open office is doing it too why not gtk? why not every old project in gnome? I think what is needed is competition to drive the need for change otherwise we just put up with the good and the bad.
Oh and sorry to all the kde folks I dont have a clue about the state of your GUI programming but it looks nice :)

This entry was posted in Free Software, Gnome, Open Source, Technology, Ubuntu and tagged , , , , , , . Bookmark the permalink.

20 Responses to Lowering the programming barrier

  1. Firefox 3.6b5GNU/Linux

    You are completely right. I’ve been feeling this unnecessary complication in gtk for a while. I never got past writing hello world like GUI software in gtk because of the sense of complication I get from it. I don’t like Java, but I’d choose it without a second’s thought instead of GTK.

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      Im not talking up java and I would hate if we used it instead but still its always good to look at the competition.

  2. Flavio says:
    Firefox 3.5.6GNU/Linux

    I guess the real “competition” here is Qt. Especially with their new IDE, Nokia has widened their audience quite a bit. C++ sounds hard, but Qt with its extensive library, clear documentation and a brilliant IDE makes it easier. Still not easy as VB, though.

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      Is there any plans for a python version?

  3. Firefox 3.5.6GNU/Linux

    I hate to admit it, but even simple programs in VB make me mental :P

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      But still its simple

  4. michael says:
    Firefox 3.5.6GNU/Linux

    ruby has this thing called shoes that is in the ubuntu repositories
    sudo apt-get install shoes
    and i have the feeling you would like it.

    there used to be excellent documentation, but the docu got lost sometime in the past. google will get you started, though.

    combine the code you have to write using shoes with the gui-builder you get with mono-develop/c# and you would get something really great.

  5. RainCT says:
    Firefox 3.5.6Debian3.5.61GNU/Linux

    I agree there’s some space for improvement (for example Qt is simpler in some regards), but it’s not as big a problem as you paint it.

    Also I don’t think that Hello World is a good example at all; I see no problem with it and most of the lines are comments so it isn’t as scary as it looks at a first look. And it isn’t a traditional “Hello World” with just a label, it shows how to use buttons with callbacks, connect to signals, etc. However on one thing I’ll agree with you, PyGTK+ seriously needs better tutorials – I also found it pretty hard to write my first application, because most of the stuff out there is overcomplicated, outdated or directly sucks.

    >> when it comes to the boring stuff in programming but I really think
    >> we should have a nice group of one liners to…
    I can’t really say without seeing examples, but I believe if you’re trying to do something that generic, then in most of those cases the real problem is the GUI design not being good enough (eg. to give you a crappy example: you could ask for a function “showmsgbox(‘foo?’)” to show a message box asking “foo?” and giving “yes” and “no” buttons, but giving “yes” and “no” buttons in the first place is already wrong, and further showing a message box is also wrong in many cases: popups suck).

    >> if you are an experienced programmer you will be annoyed by how rigid it is. The
    >> main thing is it lowers the barrier, anyone can use it.
    I once heard a sentence which went something like this: “write a program which even an idiot can use, and only idiots will want to use it”. The same pretty much applies here. VB is really a bad example and I’ve never seen a good program come out of it (all such apps I’ve ever seen were unpolished crap I’d never touch). Oh, by the way, there’s a VB for GNU/Linux, it’s called “Gambas” and if I remember correctly it uses GTK+/Qt internally; maybe some of the people reading this may want to give it a try.

    I think the real problem is that there are two different concepts here: toolkits for real world usage and toolkits for those new to programming who aren’t really interested in it but just want to hack something together for personal usage, but want it a little bit fancier than just a Shell script.

    If you’re saying GTK+ should become the later, I disagree. Feel free to create wrappers and graphical interfaces for the occasional coder’s benefit, in fact I’d encourage this, but whatever you do do not degrade the core, raw GTK+. Actually, this is the direction which projects like Quickly are taking: adding a layer of sugar to make everything more pleasing, but without hiding the real power to those daring enough to use it.

    Again, this doesn’t mean GTK+ couldn’t be simplified in some aspects, but not to the degree you are suggesting. But maybe this was your whole idea and I just understood your post wrong?

    Just my 5¢.

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      No no im just saying that in many other places there are a few ways to do the same thing. I dont want to change gtk I just want to add a few simpler ways to use it. VB is a good example of a language and a gui tool kit that appeals to a very wide audience. The biggest program I can think of that used it was Microsoft office before it got ported to C#. Here is an example of the code id like to just make a gtk hello world thingy
      msgbox=gtk.messagebox(“window name”, “label content”(,optional label))
      msgbox.show
      That would be similar to how they have it in java. I just want something similar to swing. In VB its a little different you pant the window and write the code (even if it doesnt do much) then just do a .show() and it shows it.
      Oh and im not saying I want something like VB, I hate VB :)
      I tried GAMBAs and I thought it was really bad for the designer (even worse than glade)

      • JanC says:
        Firefox 3.5.6GNU/Linux

        Microsoft Office never used VB (it supported VBA as an extension language though, which is more related to VBscript than to VB, but still a different thing–don’t you love confusing people with naming different things so much alike?) and I suppose they support C# & VB.NET as extension languages now…

      • RainCT says:
        Firefox 3.5.6Debian3.5.61GNU/Linux

        >> Here is an example of the code id like to just make a gtk hello world thingy

        import gtk
        gtk.MessageDialog(message_format=’This is already possible’).show()

        That’s it :) .
        http://www.pygtk.org/docs/pygtk/class-gtkmessagedialog.html#constructor-gtkmessagedialog

  6. Ray says:
    Chromium 4.0.249.43GNU/Linux

    GTK+ is a powerful library, that aims to give its users a maximal amount of control over their own interface, and sadly, that control makes its interface a little complicated. I agree that there should be more utilities to help encourage RAD, but I don’t believe that GTK+ should adopt those RAD utilities, simply because GTK+ is intended to run on embedded platforms as well, and it can’t afford having too many ways to do the exact same thing. (GtkBuilder is a notable exception, but only because xml interface design is so friggin’ awesome. :) )

    I kind-of agree that there should be a Visual Basic-like utility for GTK/Python. But to anyone who makes this: please, Please, PLEASE don’t adopt that VB thing where you are forced to handle window resizing entirely through code. That was horrible! A small change in the interface forces you calculate new ratios, and go back through your Form’s resize() code. UGHH!!!

    I know in Xfce, they have a common library for simple dialogs and such.
    http://www.xfce.org/documentation/4.6/api/libxfcegui4/libxfcegui4-dialogs.html
    Maybe similar functionality could be added to that Quidgets library? Just a thought….

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      Well someone should do it im very busy at the moment but im sure Rick Spencer wouldnt mind some devs helping out with Quidgets. I wouldnt imagine that it would be hard.
      On the window resizing thing I thought gtk handles window resizing well already :)

  7. Unknown Unknown

    Shane Fagan: Lowering the programming barrier http://bit.ly/5BCbQO #postrank #linux

  8. rickspencer3 says:
    Firefox 3.5.6GNU/Linux

    I kind-of agree that there should be a Visual Basic-like utility for GTK/Python. But to anyone who makes this: please, Please, PLEASE don’t adopt that VB thing where you are forced to handle window resizing entirely through code. That was horrible! A small change in the interface forces you calculate new ratios, and go back through your Form’s resize() code. UGHH!!!

    That is old old old school VB, up to VB 6.0. VB .NET uses Winforms, which has “docking” and other crazy things for managing window and control sizing. However, note that after VB 6.0, VB got a lot harder to use, a language, an IDE, and an API. When the VB team strove for “Enterpriseyness” of VB, they quite lost their way, and I believe you will not many developers turning to web development at that point.

    In general, I find that in PyGtk everything is possible, but few things are easy. I want everything to be possible, and the things that *can* be easy, to be, in fact, easy.

    BTW, for anyone who wants to collaborate, here’s the project for Quidgets:
    http://launchpad.net/quidgets

    Cheers, Rick

  9. Botond Szasz says:
    Firefox 3.5.1GNU/Linux

    I think what really would lower the barrier of entry for new programmers is a real IDE. Sadly there is no such thing in Gnome. I know there is Anjuta, but it’s not there yet, and there is gEdit which is an awsome editor, but not really an IDE. I am thinking of an IDE which you do not have to leave at all while developing your little program. It should have the GUI designer integrated, and it should have the concept of a project, it also should do the building of your project with a click of a button, debugger integrated and so on. Something like MonoDevelop, but for python and pyGTK. A program that you install and have all that is needed right in it for application development.
    GTK maybe isn’t the easiest toolkit you can find, but it’s mostly fine (I don’t say there is no room for improvement, but it’s fine).

  10. Chromium 4.0.249.30GNU/Linux

    Shane, what do you think of as a way to more easily make apps?

    I think it’s a shortcut for knowledgeable developers, but still too hard for the average Joe Linux.

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      I love quickly and I think its a major step into the right direction. Its a shortcut to most developers and its a good start for people who dont have a clue but its not made to appeal to people who have no interest in programming. Its just a great tool to get things done easily. You still need to program the project so some skill is required. So it simplifies the really hard stuff so packaging and version control as well as formatting the project in a way that adheres to standards, its lowering the barrier for potential skilled(semi skilled too) developers who dont know where to start.

  11. Milan Bouchet-Valat says:
    Firefox 3.5.6GNU/Linux

    If you really want something as easy to use as Visual Basic, then there’s Gambas [1], which uses a syntax à la basic, supporting GTK+ and Qt. Seems to work quite well.

    1: http://gambas.sourceforge.net

    • Shane says:
      Chromium 4.0.249.43GNU/Linux

      I dont like the VB syntax I just want an easier gtk. Python is my favorite language.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>