Best 'language' to write an algorithm for an app.....

Best 'language' to write an algorithm for an app.....

Author
Discussion

Oi_Oi_Savaloy

Original Poster:

2,314 posts

266 months

Thursday 14th September 2023
quotequote all
Hi everyone; wondering whether you can help me. I've come up with an idea (and some money to back it!) for an app (based around an ecology/sustainability angle). But I'm not fluent in how these are put together - do you write the algorithm first and then find an app language that can speak to the algorithm or do you write the algorithm in the app language?

The algorithm needs to be able to take it's initial information from multiple open sources (govt and company websites) and then give a weighting to each element, depending on what it is, where it was sourced in the world and where it's actually being sold.

I've done a bit of research (5 mins at this stage - it's all been about the initial idea so far) and python has come up...................but I leave it to you for your ideas.

Thanks, Oi_Oi.




eps

6,397 posts

275 months

Thursday 14th September 2023
quotequote all
When you say an App do you mean an App on Android or iOS?

If it is, then I would seriously look at Basic4Android - it's free to use and quite extensive and mature now.

https://www.b4x.com/b4a.html

You can potentially make the code portable and use Basic4iOS to target iOS as well, but that costs a bit and Apple's developer licensing model is different to Android.

Whilst you might want to put together an iOS App - do it on Android first, using the above. It's free to prove and cheap to put on to the Play Store (it was 25 USD flat fee as a developer way back).

Feel free to PM me if you want any more help. I've put together a few Apps over the years.

Edited by eps on Thursday 14th September 09:50


Edited by eps on Thursday 14th September 09:53

fat80b

2,432 posts

227 months

Thursday 14th September 2023
quotequote all
Oi_Oi_Savaloy said:
Hi everyone; wondering whether you can help me. I've come up with an idea (and some money to back it!) for an app (based around an ecology/sustainability angle). But I'm not fluent in how these are put together - do you write the algorithm first and then find an app language that can speak to the algorithm or do you write the algorithm in the app language?

The algorithm needs to be able to take it's initial information from multiple open sources (govt and company websites) and then give a weighting to each element, depending on what it is, where it was sourced in the world and where it's actually being sold.

I've done a bit of research (5 mins at this stage - it's all been about the initial idea so far) and python has come up...................but I leave it to you for your ideas.
I don't think there is enough information provided to provide a useful answer tbh.

If you want an iPhone and Android app that processes a bit of data locally, augments it with some web scraped data, and displays it, then you can probably do all of that inside one of the application frameworks (like the ones mentioned). It doesn't sound too hard

If you actually mean "Algorithm" as some fairly beefy number crunching on some big real time data etc, then it might be better to do this elsewhere (in the cloud) and just have the app connect to the service and display the data post crunched etc.

Both are right (and wrong) depending on what you are actually doing.

If the answer is on the mobile device - then write it in whatever language your SDK is in (probably not python).

If it is actually a database, server, etc doing all the number crunching, then write the simple display app in the framework, and the backend in whatever you want...

(or alternatively, it could actually be better as just a web app)

Edited by fat80b on Thursday 14th September 11:39

Oi_Oi_Savaloy

Original Poster:

2,314 posts

266 months

Thursday 14th September 2023
quotequote all
Thanks EPS and Fat80b - I'm very very reluctant to say more on a forum so I'll email you privately if that's ok.

Will be easier to explain in 30 seconds than write war and peace.

biggiles

1,817 posts

231 months

Thursday 14th September 2023
quotequote all
Any decent developer can take a description / process / flow-chart / "pseudocode" and turn it into the language of choice for an app.


Craikeybaby

10,633 posts

231 months

Friday 22nd September 2023
quotequote all
I would keep the app (frontend) and the algorithm separate. I would have the algorithm in the cloud, e.g. AWS Lambda, which gives you options of what language to write it in. Then you can connect to that from multiple front ends - e.g. separate apps for iOS/Andoid/Web etc. That way, if the algorithm changes, you only need to change it in one place/one language.

ATG

21,153 posts

278 months

Friday 22nd September 2023
quotequote all
Choosing a language is not important at this stage.

silentbrown

9,222 posts

122 months

Friday 22nd September 2023
quotequote all
Are you trying to make a demo to get investors, a saleable product, an online service or something else?

Where does this 'app' live? Cloud, your own server, customer phone, desktop, customer server or somewhere else?

Once you know this, the choice of language usually comes down to what the implementors are comfortable and familiar with. It's often the least important part.

Oi_Oi_Savaloy

Original Poster:

2,314 posts

266 months

Friday 22nd September 2023
quotequote all
Sorry for the silence on this; my real job, as it were, has been manic this week.

I've got some money to invest in this. I'm seriously reluctant to explain my idea on here but in short there will be a main element (a vast database of data, drawn from many sources) and then the resultant 'score' for a given product will either be displayed on the actual packaging or a consumer/general public will be able to look it up on their app as they browse (either on line or physically). Or thirdly, it'll be driven by the Govt.

It's a massive undertaking, the more i think about it. It's why I've decided to keep it simple initially and just target a single strata of products. If that proves viable then I'll look for more investment thereafter - but that is way, way down the line.

Everytime I think about what I'm trying to do it just gets bigger and bigger. The problem is that the weighting/influence I attach to different elements of my given idea, the more complexity is immediately attached to the project........but to give it the killer angle, the actual 'I'll use this again' angle, is that complexity and the elegance of the weighting and intereraction/nuance I hope to give this app.

I actually think it's something the Govt would embrace, which flips things again. BUT if the govt did dictate it's use, then the need for impartiality of the app's data becomes even greater.


ATG

21,153 posts

278 months

Saturday 23rd September 2023
quotequote all
Sounds interesting and reinforces the point that choosing the languages for development is a complete non-issue at this stage. If you're looking to monkey around with big datasets, for example, you usually pick a framework that gives you components for storing, querying and analysing data, and it's the framework that does most of the hard work, so your programming is really about telling the framework what to do rather than actually processing the data directly. That would them steer you towards using a high level language that is terse and easy to read, e.g. Python or some non-st language that runs on a JVM, or whatever. If you actually need to write the low-level data crunching code and you need it to go like stink, then something like Rust or Scala might be good choices if you've got developers who are competent in those languages. But you could just as well build something in C# or Java, if you have no soul, or plenty of other languages.

Sounds like your starting point might be mocking up a prototype of the data munging, maybe just in a spreadsheet, and then extrapolating from that to get an idea of the volumes and structure of data your might want to hold, the type of manipulation you need to perform and how dynamic that manipulation needs to be to support user interactions. That'll then start to give you an idea of the kind of platform you need, and that will eventually lead you towards picking languages.

Very generally speaking, building some sort of really simple, even profoundly simplistic, prototype helps you concentrate on the essence of the problem you're trying to solve and discourages endless speculation about what your could do. It's almost always the case that it makes sense to try to think of the simplest, smallest thing you could build that would be useful and built that first; a "minimum viable product". You usually learn a hell of a lot about the wider problem by just trying to solve one little slice through the problem.

Edited by ATG on Saturday 23 September 00:59

Baldchap

8,226 posts

98 months

Saturday 23rd September 2023
quotequote all
There isn't a fag packet answer to this. The answer is 'it depends'.

Typically, assuming your part is well specified (which it almost certainly isn't if you're new to the process), your first step is to find a decent BA who can storyboard/spec/whatever the solution properly. You may decide to do this yourself (I always liked Balsamiq for this), but before being passed to dev it wants some experienced eyes on it, or at the very least some *different* eyes on it to ask questions, do the 'what it's and generally pull it apart. A good question to ask in terms of any outputs is 'so what?'. Yes I can give a score showing how green a product is or whether there is palm oil in it or whatever, but so what? Where's the *real* value in the information? Again, an experienced set of eyes will help.

You'd then pass this to a designer/developer (depends on what you're doing and what they're coding) who'd make a decision on technology to use. However (big however), developers are a fking nightmare for choosing the latest thing they have read about that then has zero support twelve months later, so go with some caution.

To my mind you need experienced solutions people on this. If there's budget then there's no reason not to.

ETA: If you literally are starting from zero, ATG's suggestions are good. thumbup

Edited by Baldchap on Saturday 23 September 08:35