Active Topics

 


Reply
Thread Tools
Posts: 66 | Thanked: 6 times | Joined on May 2008
#1
I'm fairly new to the N800 scene, but have used Linux/Unix in my professional life for about 8 years now. One place where I've been weak is that I don't know ANY programming languages. I'm looking to overcome that shortfall now by learning something, however I feel overwelmed by the options that are out there.

Since I have a number of ideas for applications I'd like to see on the N8x0 and I presume any language that would work on the N8x0 would also work on the PC what is the best beginner language that the tablets support that people get a lot of use out of? And if you can please recommend resources for learning (web pages, books, etc.)
 
Posts: 48 | Thanked: 5 times | Joined on Feb 2008 @ Canada
#2
I'm not the as experienced as others here but I would recommend python to start. As for resources just Google it.
__________________
Thanks,
John Berube
 

The Following User Says Thank You to jchord For This Useful Post:
andrewfblack's Avatar
Posts: 1,656 | Thanked: 1,196 times | Joined on Apr 2008 @ Alabama, USA
#3
I would say python is the easyest but C isn't that hard to learn. The good thing is I have always found that for every new programming language you learn the next one always seems easyer.
__________________
Home Page - Preenv Wiki

**All Posts are made as a Community Member and not as a Super Moderator of this site.
 

The Following User Says Thank You to andrewfblack For This Useful Post:
Posts: 678 | Thanked: 197 times | Joined on Jul 2007 @ San Jose CA
#4
yup. like APL or smalltalk or ....
 
Posts: 66 | Thanked: 6 times | Joined on May 2008
#5
Python seems to be the winner, off I go to find some books
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#6
I'd recommend python too. I'm like you, brilliant with Linux, I can do some simple porting tricks etc and in the end, I made my first program in Python (headset-control, I've released it under gpl if you wish to take a look).

A lot of books are available for python programming
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Posts: 66 | Thanked: 6 times | Joined on May 2008
#7
hehe Qwerty12 I was just looking at your headset-control app thinking how cool it was...
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#8
Originally Posted by CyberCowboy View Post
I presume any language that would work on the N8x0 would also work on the PC
Well, programs written in ARM assembly require an emulator to run on a PC, not that I recommend it to anyone as the first language to learn...

Python is complete, very portable and easy to learn. It has pretty decent performance for most things and there are ways to speed up parts that need to be fast (Psyco, Pyrex/Cython to name a few). The tablets support Python very well, but you need to install it separately (or install a program that uses it, like Canola).

Graphical user interfaces are one of the less portable aspects of Python. If you want to run your software on the tablet and on PC, you'll probably need to implement separate UIs for both. The tablet specific UI (Hildon) is not available on the PC, and the standard Python UI called Tkinter is not included with the tablet version of Python. On the other hand, a custom full screen UI can be implemented with a module called PyGame, which is available both on the PC (separate install) and on the tablet (comes with the rest of the Python).

There's a free online book called Dive Into Python. Check it out and maybe you'll like what you see.
 

The Following 3 Users Say Thank You to For This Useful Post:
Posts: 43 | Thanked: 10 times | Joined on May 2008
#9
It really depends on the application you want to make and how much optimization you want to be able to do with it, and how close to the hardware you want to work with.

I would recommend to some one new to programming to start with a high level language and when or if limitations are met, try a lower level programming language. That is how I learned at least, when I went from Basic to C/C++.

I think Python is a good language to learn, and I recommend getting iPython for it and doing some REPL, so you can program in a special console/shell and your code is executed as you type it (instead of creating a text file and running the text file). You can do this with normal Python (if you have Python installed on your NIT you can use terminal to do the same thing by typing 'python') but iPython is nice in that it has tab completion (it will display a list of functions) and with the built in documentation you can learn about what you can do with certain objects, so it is a lot better for learning python then the default python shell.
http://ipython.scipy.org/moin/

There is even a cool ipython gtk console, that if you use it, you can create gtk windows in real time, and add and remove widgets using python code in a console, with out it you will be locked in a loop and will not be able to add and remove widgets while the your window is updating.
http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK

A simple PyGTK example (from http://live.gnome.org/PyGTK) :

import gtk
window = gtk.Window()
window.connect("delete-event", gtk.main_quit)
window.set_border_width(10)
button = gtk.Button("Hello World")
def on_button_clicked(button): print "Hello World"

button.connect("clicked", on_button_clicked)
window.add(button)
window.show_all()
gtk.main()

(note that you must press enter twice for the "def on_button_clicked" line, that is how python knows it is the end of the function)

And again if you have python and pygtk installed on your tablet, you can open up xterm, enter 'python' and start entering the lines of that program in the xterm and when you execute the line gtk.main() it will launch the hello world window.
 

The Following User Says Thank You to Lee For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 09:17.