We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Programming language



  • This might be a dumb question but what would be the optimal programming language to learn to be able to do programming on the omega2? I would like to build a live weather app and pull the weather data from wunderground. Thanks!



  • On a PC or a single board computer with gigabytes of storage, I'd normally recommend JavaScript as my go to language through the Node.js runtime. That may be the way to go on Omega 2 but since the community don't have our hands on them yet, we can't really say. Generically, given that this is a Linux runtime, programming in C is about the most portable and efficient way to go ... however you will have more work to do (compared to Java) to achieve IoT functions list make network requests using HTTP protocols, working with JSON or XML and the like. These are first class components in languages like JavaScript.

    Now you ask two programmers to recommend a language, you'll get three answers ... so be aware that such a generic question usually results in a blue vs red communication storm šŸ™‚

    Commonly there are trade offs in language choices:

    • Current skills and familiarity
    • Leverage of pre-existing libraries and packages
    • Involvement with web protocols and browsers
    • How dependent is one on performance characteristics
    • Access to assistance from friends, colleagues and community after choosing a language
    • Choice of development environment and tools
    • and much, much more ...


  • @Alex-Jochym My suggestions would be one of:

    • Node.js
    • Python

    Depending upon the size of the code you want. you may also want to consider using a USB memory device to:



  • c ftw šŸ™‚
    node and python are for the wimps...
    even better get hardcore with assembly...



  • @youlian-troyanov said in Programming language:

    c ftw šŸ™‚
    node and python are for the wimps...
    even better get hardcore with assembly...

    There are several ways to get to Rome. By plane! By boat! Or even using a kayak! The simplest one is not necessarily the easiest one. One thing is for sure, you need programming courses. The learning phase is definitely not optional.

    My recommendation is C Language since it's the base language of OpenWRT (Linux).



  • @fossette absolutely.
    sometimes i think i am a dinosaur, now there are two majestic giant reptiles of us here šŸ™‚



  • @Alex-Jochym
    If I was to do this, I would start by investigating the available API from wunderground.
    Then I would look for similar projects in order to get inspiration.

    When it comes to language, it mainly depends on your level of skill.
    C is not that hard, but you need to understand what a pointer is and you might want to find some libraries to use in order to avoid doing everything from scratch.
    Python makes it easy to work with JSON, lists, sets, etc., but it will consume some extra space.
    If you select Python, you don't have to worry about cross compiling, so it might be easier to start with.

    So instead of asking which language is better (which basically can be compared to asking which religion is better, which of course depends on personal preferences), it is better to ask "In which language will it be easiest?".
    I write this because I assume you are new to programming, and writing in C might kill your motivation if the task is too complex.

    I hope this helps.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.