What language should I learn to create command line scripts and GUIs? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 yea开发者_StackOverflow中文版rs ago.
Improve this questionI am a "self taught" PHP programmer. So I've never taken any Computer Science classes. I've been doing more things via the command line lately and I'd really like to automate this a little more.
The problem is, I don't even know where to start. I know PHP. I can create web applications. I know how to do stuff on the command line. But I don't know the first thing about creating desktop applications. I need to learn how to create scripts that I can execute from the command line. Also, I need to learn how to create a GUI so I don't have to use the command line to execute the script (or even use a GUI to change variables, etc). I'm only interested in Linux and Mac OS X.
What would you recommend?
For scripting, I'd recommend going through a good resource on bash scripting. Here's a super-quick introduction to the subject. http://www.linuxconfig.org/Bash_scripting_Tutorial
For GUI programming, I personally prefer Python with wxPython. A Python tutorial is here: http://www.diveintopython.net/ and a guide to GUI programming with wxPython is here: http://wiki.wxpython.org/AnotherTutorial#The_wxPython_Linux_Tutorial
If you want Mac-specific scripting AppleScript and Automator are useful in addition to shell scripting.
The Advanced Bash-Scripting Guide is, in contrast to its name, actually a perfectly good introduction to Bash scripting, especially if you already have a programming background.
wxPython is good for GUI work.
Python, and one of it's portable graphics GUI kits.
Have you considered using C# and Mono (the open-source implementation of the .NET Framework)?
With Mono, you can create console and GUI applications for Windows, Linux, and OS X.
Many popular (and some are base apps on Linux distributions) applications for Linux have been developed with Mono, including:
- Gnome Do launcher
- Beagle Desktop Search
- Banshee music player
- F-Spot image viewer
Also, if you learn C# and Mono, you can also use these same skills to write your own iPhone applications using Mono.
If you are a beginner and like to get started with Mono, start here.
As someone with no formal training, you might have an easier time getting started with Lua. The main advantages are that
Lua was originally designed in part for petroleum geologists, so the syntax is readily accessible to people without formal training in computer science.
The system is small enough and simple enough that you can understand everything. This will enable you to spend more time coming up to speed on new concepts and new ideas.
There is an excellent book: Roberto Ierusalimschy's Programming in Lua; you can get the previous edition free online.
I've compared Python and Lua elsewhere.
PHP has GUI frameworks. Stick with what you know.
Andrew --
You should look at the similar questions that have already been asked. The best answers have been brought to the following question:
What is the easiest language to start with?
You can find plenty of other suggestions if you search for programming-languages.
Good luck!
精彩评论