ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'll start with my objective. I intend to create simple gui apps for linux.
I know a little bash and can create a small gtkdialog app. What i want to do is expand and improve on this, thus I need to learn to program. But in what language?
Genie (http://live.gnome.org/Genie) appeals to me. Why? Small executables, the compiler converts code to C, it's new.
Where do I start? I know very little. Python? I've heard it has similar syntax. C? ... I'm asking!
My suggestion is learn a language you expect to get long term use out of. There are dozens of obscure little languages out there that while functional don't help a lot in the long run. Get a firm base in C/C++ and you can pickup almost any other language quickly.
There are a ton of good tutorials for almost any programming language, just google the language name and tutorial. You might have to narrow results if you're seeing a lot of something non-applicable, but thats relatively easy to do.
If you want to get a job as a programmer, then it's usually C/C++, Java or PHP these days (depending on the company profile).
You could fill a niche by going for some mature languages like Python or Ruby.
You could fill a niche by maintaining 'historical' code written in Cobol, Fortran, Modula, Oberon, Pascal and a few more.
No true benefit from Basic or Turtle, no real playground for HyperTalk and similar once-hailed stuff.
Only for academic research toy around with D, Dylan and all the other neat little code creating concepts.
For a founded choice of a programming language define a target project based on honest interest or an eventual business/job opportunity and make sure that you can get enough good documentation, tutorials and sample code for it. Quite often a target project already defines what language to use. When the briefing says 'apache - mysql - php' then you already know.
As you've already started with Gtk, you'll have to decide wether you want to write GUI apps with Gtk in C or if you prefer one of the Gtk bindings like C++, Python, Perl, Ruby or even PHP. Lua should also work.
Really looks like Python to me...
(I'm SO glad that we have yet another programming languages to write the same old Gtk stuff instead of actually introducing long awaited new Gtk features... )
For smaller apps I really wouldn't bother with C. (And I don't. )
I will add this. I do not intend to become a professional programmer, but you never know. I am in my mid 40's, with no IT education and just want to satisfy myself.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
I had always difficulties in designing GUI programs, it never seemed to happen that button events triggered the correct behaviour, or that fields got updated when I wanted that.
Until I discovered Tcl/Tk which made me produce application within two hours after I discovered Tk. That is called a smooth learing curve! The most difficult part is to get the widgets exactly where you want them, and even that is not terrible complicated.
Not everyone is apt to learn Tcl and some (many?) find it outdated and superseded by other langauges. As far as I know Perl/Tk exists as well as Python/Tk and Ruby/Tk, and maybe others.
As long as you don't do repetitive calculations, GUI scripting is not slower than compiled code. Building the actual GUI is still compiled code, the script part is only to tell what to do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.