Active Topics

 


Reply
Thread Tools
rm42's Avatar
Posts: 963 | Thanked: 626 times | Joined on Sep 2009 @ Connecticut, USA
#21
I would recommend you start here:

http://www.themaemo.com/python-for-newbies/
__________________
-- Worse than not knowing is not wanting to know! --

http://temporaryland.wordpress.com/
 

The Following 3 Users Say Thank You to rm42 For This Useful Post:
Posts: 127 | Thanked: 86 times | Joined on Sep 2009 @ Hannover, Germany
#22
c++ & Qt are a really nice combination. OTOH for a beginner I would not recomment a cross compiling setup. Start with Python. Learn the Qt-API with pyQt. With a little bit of expirience you can adept this and write native Qt apps in c++.

bye

Thorsten
 

The Following User Says Thank You to schnebeck For This Useful Post:
Posts: 279 | Thanked: 34 times | Joined on Jan 2010 @ Belgrade, Serbia
#23
Thank you all for replies. But do you know what language is more used by developers who make apps for N900? Is it Python or C++?
 
Fargus's Avatar
Posts: 1,217 | Thanked: 446 times | Joined on Oct 2009 @ Bedfordshire, UK
#24
Originally Posted by white_ranger View Post
Thank you all for replies. But do you know what language is more used by developers who make apps for N900? Is it Python or C++?
Python is a scripting language, hence why it is easier to bring the source script from another platform to the N900. The downside is that you have a huge virtual machine to install on the N900 the first time you load a Python app.

C/C++ compile down to smaller executable programmes which allow finer control of the resources but in return require more thought to write in the first place: Classic more control means more thought required.

Most of the time or resource critical applications seem to be written in C/C++ and tends to be used by the more serious developers. Whether this is technical snobbery or something else is another debate entirely.

I believe you will find things like liqbase are written in C++ but Canola was in Python unless someone else can correct me.

If you go the C++ route then I would suggest starting with C as it's a good skill to have in itself and simple enough procedural language to not short circuit your head. The syntax for C++ is based on the C language. Java and Python I believe have their roots in the original C language too.

Hope that helps some! Tried to loose my personal bias too.
 

The Following 2 Users Say Thank You to Fargus For This Useful Post:
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#25
Originally Posted by white_ranger View Post
Thank you all for replies. But do you know what language is more used by developers who make apps for N900? Is it Python or C++?
I would think.. sheer speculation.. that the most common apps is C++ right now. Like I said before, currently the pyqt4 libraries are non-optified. It makes it temporarily an unattractive solution because of all the rootfs full problems people already have.

I expect that in the future it will be the easier and more mobile way. Take my sig for example, I maintain pianobar and pyPianobar. Pianobar is a C++ CLI (command line) app, and my pyPianobar is, obviously, PyQt4. The pianobar requires I maintain two entire directories of the source code to re-compile i386 and ARMEL versions of the binary to run between the SDK and the N900. It also means you have to upload 2 packages to the extras-devel. (it may be possible to get the auto-builder to do this for you with a rules/make file of some kind: but pianobar has a weird cmake source, not a normal source.)

pyPianobar OTOH, allows me to just copy over my .py files wherever I need them, and just run it. From the N900, to the SDK to even a desktop computer it's just.. easier. Only need one package uploaded for both as well.

Don't get me wrong.. C++ is certainly a valid method. It's native, thus faster, has a lighter footprint, can run more intensive apps with less memory - and also gives you a greater control over the finer details of memory management and things of that sort. I just like scripting languages as a rule... Ruby, Perl, Python... they are more "fun" to me than C++ because they don't require as much work .
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!

Last edited by fatalsaint; 2010-01-29 at 00:07.
 

The Following 3 Users Say Thank You to fatalsaint For This Useful Post:
Fargus's Avatar
Posts: 1,217 | Thanked: 446 times | Joined on Oct 2009 @ Bedfordshire, UK
#26
Originally Posted by fatalsaint View Post
...
Don't get me wrong.. C++ is certainly a valid method. It's native, thus faster, has a lighter footprint, can run more intensive apps with less memory - and also gives you a greater control over the finer details of memory management and things of that sort. I just like scripting languages as a rule... Ruby, Perl, Python... they are more "fun" to me than C++ because they don't require as much work .
Nicely summed up I think.

C/C++ - Tighter more focused final programme that takes more effort.
Python - Quicker to develop but maybe less resource friendly.

Last edited by Fargus; 2010-01-29 at 00:13. Reason: Typos
 

The Following 4 Users Say Thank You to Fargus For This Useful Post:
Flandry's Avatar
Posts: 1,559 | Thanked: 1,786 times | Joined on Oct 2009 @ Boston
#27
I would actually guess that C is the most common language for N900 apps. GTK+ is C and most of the N900 apps are using GTK still.

However, as i said in my previous post, the future (for maemo and in general) is Qt, which means C++/object oriented programming or one of the application layers.

Still recommend you learn the principles of object oriented programming, start with python as a language, modify a simple existing program until you are familiar enough to make your own, and then worry about C++ when you want to optimise that program. Python easily binds to C++, making the transition or mixing of the two fairly straightforward.
__________________

Unofficial PR1.3/Meego 1.1 FAQ

***
Classic example of arbitrary Nokia decision making. Couldn't just fallback to the no brainer of tagging with lat/lon if network isn't accessible, could you Nokia?
MAME: an arcade in your pocket
Accelemymote: make your accelerometer more joy-ful
 

The Following 2 Users Say Thank You to Flandry For This Useful Post:
Posts: 38 | Thanked: 8 times | Joined on Jan 2008
#28
I agree with Flandry. Use python as a blueprint and concept to a starting application. This will get you the fundamentals and the actual workflow of the app. Then going back and writing it in C / C++ makes your life so much easier.
 
niqbal's Avatar
Posts: 474 | Thanked: 368 times | Joined on Jan 2010
#29
if you are serious abt programming, start learning c++. designing UI comes with little experience and tons of logic. Keep working hard!

Last edited by niqbal; 2010-01-29 at 15:51.
 

The Following User Says Thank You to niqbal For This Useful Post:
Posts: 3 | Thanked: 0 times | Joined on Mar 2010
#30
Originally Posted by white_ranger View Post
Thank you all for replies. But do you know what language is more used by developers who make apps for N900? Is it Python or C++?
The easiest answer to your question is: both are used.

A programming/scripting language is just a flavour to choose from, and they all have their pro's and con's. All can be used to write apps and they all are easier and harder to use for achieving some tasks.

C++ is however a language much more "richer" than python but also easier to make mistakes in and harder to learn I would think.

Being somewhat a "scripting" language, python hides away much of the underlaying things that C/C++ doesn't and lets you get to write the code you want to write for achieving some task, without as much hassle, specially if you are new to programming. But for more "advanced" tasks C/C++ could be much more preffered.

Also, C/C++ is more suitable if you want to optimize the code for performance, just because it does not hide away the underlaying stuff you have to deal with when writing in those. You have to deal with everything yourself, like memory allocation (and don't forget freeing up memory to not get leaks) etc.

That said, even if it can sound I preffer Python in most cases, I am new to Python. My work-experience lies in c/c++/java/erlang on daily-basis, and not Python. But I do preffer the easy and fast way to achieve simple app-writing for a phone that python provides, the more I learn/use it.

But again, its up to what you feel is the language you want to learn/use.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:43.