0 users browsing Programming. | 1 guest  
Main » Programming » How to phone app?
Pages: 1
Posted on 20-01-22, 11:18
Full mod

Post: #383 of 425
Since: 10-30-18

Last post: 6 days
Last view: 1 day
Way back at the dawn of the microcomputing age, nerdy husbands bought little plastic boxes that could barely beep or display text, and justified the purchase-price to their wives with things like "I can use it to calculate the fuel efficiency of our car!" or "you can store your recipes on it!". Recently I encountered a problem of similar scope, and I wondered what the modern equivalent of those old BASIC programs is.

To be specific:

- I have a 700W microwave oven
- Most of the food I want to heat says something like "For a 1000W oven, heat on full power for 6 minutes"
- Therefore, I want a program that lets me type a number of minutes, multiplies it by 1.4, and renders the result as minutes and seconds
- For example, 6 * 1.4 = 8.3999999, or 8 minutes 24 seconds

So far as I can tell, my options are:

- Make a webpage that does the calculation in JS, host it on a server somewhere. This is fairly straightforward and very flexible, but I hate the idea of needing an internet connection to make my phone do a thing.

- Make a webpage that's a Progressive Web App with all the caching and push-notification stuff, so that the phone will cache it locally and I can run it offline. This is a lot of hoops to jump through to get the thing I want.

- Write a native Android app from scratch. No, just no.

- Install Python in Termux, and set up a home-screen shortcut that runs a Python script that prompts for a number then prints out the result. This is probably the best option so far, but I am disappointed if after forty years this is still the best we can do.

I feel like somebody must have made some kind of spread-sheet like app where I set up labelled inputs, write a function that calculates an output, and lets me create a home-screen shortcut that runs the thing. Has anybody heard of such a beast?

The ending of the words is ALMSIVI.
Posted on 20-01-22, 14:51

Post: #238 of 307
Since: 10-29-18

Last post: 3 days
Last view: 2 hours
- Make one or several diagrams and put them into an image or PDF file

My current setup: Super Famicom ("2/1/3" SNS-CPU-1CHIP-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Posted on 20-01-22, 16:00
Stirrer of Shit
Post: #708 of 717
Since: 01-26-19

Last post: 307 days
Last view: 305 days
You take a piece of paper, a ballpoint pen, and write a chart.
You could also take an old calculator, duct-tape it nearby the microwave, and store as a function 999940floor(10x/7) + 600x/7. I don't recommend this.

If you desperately want the phone to do it though, there's a trivial solution. Write a webpage, encode it all in one file using <script></script> tags, then encode it as a data URI and bookmark it. This works fine without Internet.

There was a certain photograph about which you had a hallucination. You believed that you had actually held it in your hands. It was a photograph something like this.
Posted on 20-01-22, 17:06 (revision 2)
Post: #124 of 181
Since: 11-01-18

Last post: 12 hours
Last view: 5 hours
*get a calculator app that converts decimal to Min/sec/degrees.
*get a new microwave.
Posted on 20-01-22, 19:14
Not from my cellphone

Post: #617 of 832
Since: 10-30-18

Last post: 17 hours
Last view: 3 hours
- Install a notepad "app" so you can store your formulas, then pick a good calculator "app". Bonus points if the calculator "app" do allow you to define your own formulas.

- Spreadsheets, that's why they're for, and you can run them on cellphones nowadays. Except that all spreadsheet "apps" I've tried are terrible (including the MS and Google offerings). But then, I guess that office apps don't belong to cellphones beyond "view-only" purposes.

- Do you own an expensive phone that can emulate older computers? Then figure out how to QEMU (or whatever) Windows 3.x/95, and use that to run some Visual Basic 3/6 app. Or something that actually allows you to not download half the Internet and install a bazillion frameworks just to write a "Babby's First Calculator for cellphones".

- A J2ME emulator? Oh wait, I forgot that J2ME was beyond terrible (I actually wrote a MIDlet over a decade ago, not fun at all), but then I'll take that any day of the week instead of modern smartdevice "apps".

- I actually did this once on an old Blackberry (a local Engineering code calculator was required, and all the native BB apps I could find were 404'd since forever): a standalone HTML+JS application that lives somewhere at your local filesystem (assuming you own an actual pocket computer that lets you store arbitrary files on its storage devices, instead of forcing you to interact with crippled proprietary junk that only lets you upload multimedia files). You DON'T have to use Every Hipster JS Framework™ under the sun - vanilla JS is good enough for that.

Licensed Pirate® since 2006, 100% Buttcoin™-free
Posted on 20-01-23, 08:55
Post: #119 of 155
Since: 11-24-18

Last post: 11 days
Last view: 11 days
The conversion is super simple to do actually with a clear and concise pattern, 1.4 * 1m = 1m 24s.

Since function is linear, we can rewrite it as thus: 1.4*x minutes = x minutes + 24*x seconds = (60 + 24)*x seconds = 84*x seconds

So, see the table below what that looks like. One interesting point to note is that for every five minutes you add 2 minutes and it repeats every five minutes - hence you only need to know the seconds for the first five minutes - which is pretty easy to keep track of. :)

This is the power of math, people!

 0.5m =  42s =  0m 42s 
1.0m = 84s = 1m 24s
1.5m = 126s = 2m 6s
2.0m = 168s = 2m 48s
2.5m = 210s = 3m 30s
3.0m = 252s = 4m 12s
3.5m = 294s = 4m 54s
4.0m = 336s = 5m 36s
4.5m = 378s = 6m 18s
5.0m = 420s = 7m 0s
5.5m = 462s = 7m 42s
6.0m = 504s = 8m 24s
6.5m = 546s = 9m 6s
7.0m = 588s = 9m 48s
7.5m = 630s = 10m 30s
8.0m = 672s = 11m 12s
8.5m = 714s = 11m 54s
9.0m = 756s = 12m 36s
9.5m = 798s = 13m 18s
10.0m = 840s = 14m 0s
Pages: 1
Main » Programming » How to phone app?
This does not actually go there and I regret nothing.