Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's always Python+X somehow, where X is a whole different thing you have to learn to get a fraction of the whole thing shipped in Python. Keep I.T. simple - teach the kids BASIC.


The basic issue is that Python do not have a UI lib of its own, so if you want to do anything beyond a CLI you need to introduce a third party.


https://docs.python.org/2/library/turtle.html

    Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win
    32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import turtle
    >>> turtle.forward(100)


Bingo. Teaching kids programming is exactly what turtle is meant for.


Now that's bringing back some memories.


Isn't TK usually part of the standard library? Of course, then you have to build your UI in code, which can be a lot for a beginner - which I why I stated QML or GTK Composite Templates, both allow you to design your UI in the relevant tool (QtCreator, Glade) and then just wire it up. Speaking from experience, the trial and error of creating UI's in code instead of through a markup language with an editor that can preview it is a pain.


Well, Java does have a UI lib of its own and it doesn't make shipping an executable simpler.


This is not about shipping executables. Its about kids being able to sit down and bang out a program, complete with a UI.


Most kids want to make games and have their friends and the world play them. Desktop software isn't dead either. Real artists ship.


I don't really think GTK is that difficult to get a grasp on with composite templates. It's a little less "magic" than VB6 since I'm not just dumping code into a partial form class where the rest of the accessors to the COM controls are generated for me, but it's pretty straightforward in Vala right now (I use glade to design a UI, much like the classic WinForms designer - annotate a class with a GtkTemplate attribute and then put GtkChild attributes on class members to have the widgets automatically assigned there).

In Python it'd look like

    @GtkTemplate("my_window.ui")
    class MyWindow:
        @GtkChild my_textbox
        
        @GtkCallback
        def button_clicked(self, btn):
            my_textbox.text = "Hello, World!"


GTK in FreeBASIC is simple as well - just translate the C function calls into BASIC. FreeBASIC is really C++ without the curly braces so it's really a good covert way to gradually turn userland programmers into system programmers




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: