Tydlig – Calculator Reimagined for iPad and iPhone
tydligapp.com
tydligapp.com
I'm the author of Scalar (http://scalarapp.com), another calculator replacement for iPhone / iPad. Just tested both versions of Tydlig very heavily, looks like the author ran into lots of the similar math/UI problems as I did when I was working on my app. :) Some approaches he has chosen look similar, some are unique.
Great work, good luck!
1. When someone enters "1 / 3" how many decimal places you display in the result? My approach: use MAX(4, MAX(decimal_places(entered_values))). His approach: use 3 everywhere.
- Bonus 1: how many decimal places you display when someone enters "sin(3.14)"? What about "sin(1 / 3)"? My approach: use as much space you have on the screen.
- Bonus 2: how do decimal places propagate when you're using refs?
2. What to do when someone taps "=" on the expression where we already have a result? Chinese $2 hardware calculator approach: redo the last operation. My approach: do nothing. Tydlig's approach: insert last result as a ref.
3. What to do when someone enters huge numbers? My approach: trim them to the width of the screen, clearly displaying that, but keep the full figure when doing copy/paste or export to text. His approach: start using E-notation somewhere around 16th figure.
4. In an app like this there's a temptation to stop using cursor because calculators don't have it and you want to be backwards compatible with them. When you create a ref, how to make sure the destination of the ref is at the right position in the expression without introducing a cursor? I.e. how to make sure you're not getting "2 + 3 [ref] + 12" (you need an operator before "[ref]")? My approach: use a semi-rigid table, where operators are separated from operands. Tydlig's approach: use a little cursor, a part of the app I don't like, because your finger normally would block the cursor.
I can go on and on. Math-related stuff is hard.
The switching to scientific notation around x · 10¹⁶ hints at using IEEE 754 doubles underneath. I wonder what they are using underneath for the math functions (they make it sound like it's custom-built). I spent a while in uni porting math function implementations from C to Java for a simulations framework and noticed that they usually all have the same pattern of selecting many different ways of calculating the result based on the intervals of the operands (to more or less guarantee 15 digits of precision instead of 0–15 as would otherwise be the case).
I always imagined that if you were aiming for the mathematician market (huge market!!1 /s) you could have an app like that except on a tablet you'd use with a pen. Then you'd just write down calculations and OCR would figure out what you are trying to calculate and do the number crunching (where applicable), and intelligently recognise variables and a lot of different mathematical functions (I just don't like the whole process of going back and forth between my TI and my legal pad). That'd be a mathematician's (or just mine) wet dream.
http://www.youtube.com/watch?v=RZKjc4Rzm2Y
But it doesn't do any of the number crunching, mathematical work.
Scalar does not deal with plain text as math. At all. Plain text is good on Macs with keyboard as it allows very quick, familiar and intuitive copy/paste and document restructuring, but is terrible on touch screens. That was the main motivation for me to start the project, BTW.
Commenting system is different as well (Soulver simply ignores all non-parseable text).
Calculators are still an unsolved problem for me on glass devices to the point I still religiously carry around an HP50G even though its 6x the size of my phone. Also from some bad experiences, it appears that some "app" calculators are also seriously badly implemented. Even basic trig ops can return stupid values at extremes which makes them untrustworthy. Plus none are reasonably programmable.
My use cases are base conversions, simple CAS stuff, basic engineering calculations, unit conversions, financial (TVM etc) and generic math. I also canned a lot of knowledge in RPL programs over the years from fuel calculations to diagnostic tools and dice rollers etc.
Please can someone solve all these problems (without doing half arsed HP calc emulation).
It does return the correct value for sin(π) though (you gotta call __sinpi(x / M_PI) if you don't want to return -8.74e-8 or some ridiculous value).
This is ridiculous. Your calculator (most calculators) cannot apply sin to π, because π is not representable is their system (typically base-2 or base-10 floating-point).
What you have done here is make sine worse for all values, including the representable value closest to π, in order to obtain what you think is a cosmetically satisfying result for the latter. Note that seeing the closest representable value to π does not mean that the user intended π. Perhaps the user obtained this value as the result of a computation and it's a coincidence. Or perhaps the user really wants to know what the sine of 0x1.921fb54442d18p+1 (the double closest to π) is. Hint: it is not zero.
Casio scientific calculators do have an internal representation of π (it's treated differently from the closest possible typed value) and very nuanced representations of numbers in general.
As you say, this is where calculator apps almost inevitably fail - representing numbers properly is really crucial to the UX, and floating point numbers are not sufficient.
Casios are a mess. They are actually made my Kinpo which do a shitty job of pretty much everything. The notable exceptions being the FX991MS and Fx5800P which are very very close to my 50g (which was laboriously tested on paper before I trusted it)
50g is basically a 48GX emulator with 400MHz ARM core that emulates Saturn, MetaKernel and a CAS. Goes like lightning. Oh and a bigger screen so you get 7-9 stack lines. Also you can use SD cards as ports. Mine has 256Mb of Flash. Eats a set of batteries once a month but it's worth it for the power.
I can create a symbolic list with 50,000 entries in quite happily on the device then do all standard two-variable stats on it in 1-2 seconds.
I should clarify for other readers: __sinpi() is an Apple-created addition to Math.h, what it does is multiply the argument by M_PI before calculating. When you consider that my calculator has a key which inputs the constant pi (which is, of course, not actually pi, but M_PI), it all comes out in the wash (cosmetically speaking).
However, what would you do instead? Test before each trig function whether the argument is a multiple of M_PI and then choose which function to use? I would imagine this would fall apart at higher values...
Also consider that 'cosmetically satisfying' is not an unreasonable goal (in my mind) when the calculator really only has horizontal space for 12 digits in 36-point Helvetica, but you're right, as the user could arrive at arbitrary values by other means.
HP RPN can't be beaten for serious number crunching. It's not pretty, but by god, it is EFFECTIVE!
It's surprising: when smartphones came out I said calculators would be first against the wall.
Ie: https://sensortower.com/ios/us/incpt-dot-mobis/app/calculato... https://sensortower.com/ios/us/vicinno-soft-llc/app/12e-fina... https://sensortower.com/ios/us/tla-systems-ltd/app/pcalc-the...
I've been pleasantly surprised with the built in calculator that ships with OSX; it's got a decent RPN mode, good keyboard support, and a nice stack display. Not brilliant, but better than what I've found for Windows or Android. :-/
On my iPhone, I use HP-12C emulator from RLM Tools (I found most other emulators to be inferior). When I really need it, I use HP50G.
On the iPad, I use either m48+ or HP50G (it seems to be another fork of the emu48 code). Both work really well given the size of the iPad — very comfortable to use.
I went thru the same annoyance on my phone/tablet and although I have droid48, free42, and hc-16C on my android devices I mostly just ssh into a real machine.
I have toyed with the idea of graphical environments like mathematica/maple on a real machine via rdesktop/vnc on my tablet, but I don't do CAS so much as stats where I stick with R anyway. And those apps cost lots of money for something I don't do much of anyway.
Eventually with any problem, either you solve it or reach an event horizon where the UI is too horrific to use anymore. So when I can no longer handle the touch screen keyboard I just disconnect from the screen session (yeah, yeah, I know kids these days use tmux) and reconnect on a real computer complete with keyboard and big display.
For medium sized arithmetic problems (as opposed to math problems), just use google drive's spreadsheet and then I can access it anywhere in the world on any kind of machine I have access to. So that's where "total of this column vs total of that column" level of problems live.
An add on android keyboard built specifically for math, or more specifically for R or octave, would be interesting.
http://futureboy.us/frinkdocs/
(but not RPN and trig functions are floating point)
TI calcs
https://play.google.com/store/apps/details?id=net.supware.ti...
https://play.google.com/store/apps/details?id=com.Bisha.TI89...
https://play.google.com/store/apps/details?id=org.natygames....
HP calcs
https://play.google.com/store/apps/details?id=org.ab.x48
Casio
https://play.google.com/store/apps/details?id=com.developstu...
https://play.google.com/store/apps/details?id=o2s.emul.hp49g
I am glad to see this effort because we really need some innovation in the world of calculators. The science of making them has stagnated in the late 1990s. HP50G isn't really different from HP48, first introduced in 1990.
I think there is a widespread perception that calculators are no longer needed, because we have all those computers around us. But that simply isn't true. Many people still need to calculate things quickly, and that requires a good tool: a calculator with a well designed user interface. This is where most devices and programs fail. HP worked on this for more than 20 years and got really good at it, until the unfortunate reorganizations that got rid of the calculator division.
I can't think of any other tool that will let me equally easily multiply numbers, convert hex to decimal, work with complex numbers, and compute a Laplace transform.
And even if you are in front of a computer and have a powerful mathematical package available, there remains the problem of the user interface. For example: I use Mathematica for lots of things. But just try entering numbers using engineering/scientific notation: 4.7*^-6 and you'll see this isn't good at all for rapid calculations.
I hope that someone will start where HP left off and design a better calculator using the huge computational power that we now have at our disposal. Without throwing away all the experience we already have.
http://www8.hp.com/us/en/products/calculators/product-detail...
I've used the emulator, but it's less productive than the 50g. Also TI's nSpire offering is just horrid.
I don't use my calculator in education which means I'm completely forgotten.
(Now I feel bad; bitching and complaining is against the Open Source Spirit).
Edit: I do recall that OSX comes with something similar, except that not many people actually know of it (as far as I can tell, from my friends with OSX).
It's also missing Compass, Voice Memo and Passbook apps. Edit: Weather app too.
What's the reasoning behind the decision? Was it Steve Jobs who decided that?
And, of course, there are several great third-party apps to fill the void if you need them.
Friends in the French system are allowed the TI 89 though.
Anyone with an internet connection can easily find out, for example, how to add together two ints in Java. But if someone took an introductory Java course and couldn't do that at the end of it, then they don't deserve to pass because they've clearly not learned what they were supposed to. If they were actually trying to program something and had to look up basics like that every time they used them, they would be so slow as to be completely useless. Or consider someone with a more time-critical job like a surgeon - they can do specific research beforehand but some level of knowledge (surgical techniques, how to use their tools, anatomy, etc.) is simply going to have to be in their head at the moment they need it or their patient could die.
Also, phones and internet access don't just provide knowledge, they're a way to communicate with everyone else in the room. If you want to see if any particular person has actually learned the material, you obviously can't allow that.
Isn't that the point of timed tests? You can structure a test such that the person who needs to look up how to add two ints in Java will waste so much time that they wouldn't be able to finish the test. And if they can search for and apply this knowledge quickly enough, then maybe they've proven that they won't be slow if they have to do it in the real world.
My favourite exams were open book but still hard/long enough that if you didn't already know 95% of the material, you simply wouldn't have time to complete it.
As an aside, I hated open book exams - if you were talented and knew the material, you could typically blast through a closed-book examination in half the allotted time and get out of there, while the open-book exams were far longer and more tedious.
I would argue that this is also a valuable skill. Knowing who to hire, assessing the person's abilities, figuring out if they can actually get the job done in the time allotted. Sure it's not at the same level that a hiring manager at a tech company in the real world would have to make, but then again the normal CS test questions aren't at that level either.
Ideally tests should check the deeper understanding of the student and not just his memory skills. In that case Internet access is also not a problem.
I think there IS utility in assessing people with the constraint of "you can't talk to anybody else", but I'm not comfortable with that being the dominant, primary means of assessment. It should be consistent with the likelihood that you'll actually be forced to work stuff out on your own- maybe 10, 20% at most?
Your thoughts?
Internet access is a lot more complex though, you'd have to filter what they can access and monitor everything every student is accessing, and that doesn't seem worth it for most tests. Image a scenario where the students just throws any question on a random looking site and some hired expert on the other side writes appropriate answers on the fly. Your test won't have any meaning anymore.
Now test are flawed by definition, you'll always have to create some artifical restriction to control what aspect you are assessing. Idealy you never test someone by putting him/her in a room with a pncil and paper, you'd assess how good the students cleared real tasks in realistic conditions.
In school we had one larger test in German where the teacher left us alone for 4 hours. What I noticed was that we did collaborate to some extent – we shared and discussed ideas. But since we had to write an essay with our interpretation of some piece of literature there wasn't much possibility of "cheating" per se. Simply copying the text from another would not work and copying their ideas outright wouldn't either. And to get at least something of decent length there wasn't the option of fooling around for three hours either. Granted, this was in 11th grade, so we were a bit older already. It may well fail spectacularly in other environments. The teacher knew us for a few years and trusted us, and it worked out.
Anyway, I was pure math major and we could bring pretty much anything short of an actual desktop computer into exams -- it was pretty much useless. (Now, a few years later, and Mathematica running on a maxed out Mac would have been pretty darn useful.)
Having a computer in class opens the door for cheating, but in smaller classes it would be easy to tell if a student were browsing the Internet rather than finding a determinant.
However, many times the calculation is just a very small piece of a much larger puzzle. In such situations, being able to perform small computations rapidly in your head makes a qualitative difference that can really give you a competitive advantage.
I guess it might, given that Apple shipped Graphing Calculator with Mac OS before, and given Graphing Calculator's interesting early history (http://www.pacifict.com/Story/)
(I wonder how Apple negotiated that deal originally. I guess some lawyers spent quite some time arguing whose intellectual property it originally was. The programmers weren't paid by Apple, but worked at Infinite Loop)
It is surprisingly hard to get something that produces reliable plots. It starts with getting something as simple as sin(1/x) or x/(x^2 + 5x + 1) to plot reasonably well, and gets harder from there soon (edit: if you want to complicate things, pick a function that is only defined on some numbers, such as sqrt(x^2 * sin(x^3 - x). Adding a pair of || around subexpressions also complicates things)
For example, at https://www.desmos.com/calculator (one of the top results from a google search) zooming in on sin(1/x) shows a plot that sometimes doesn't go up to 1.0 for values of x close to zero. Its plot is decent, but deceiving.
And you will have to do those well, as the target audience of students encounters such functions every day.
And the Mac OS X one is Grapher (http://en.wikipedia.org/wiki/Grapher)
They don't have that sort of pickup-and-use feature my old calculators used to have. I think it's the presence of most of the buttons I'm ever going to be interested in on the keyboard rather than having to figure out how to type something that means the same as an integral or some such. The discoverability of those buttons beats most modern software hands down.
I also suspect that writing simple to use general purpose solvers and simplifiers for the things the TI calcs do (the CAS) is likely very hard. I remember putting even pretty complex physics equations with all sorts of trig functions and exponents and integrals and such in during college and it handled most of them without trouble and pretty printed the result.
Edit: looks like there are some good options for Android that actually emulate TI calculators, and apparently TI has Nspire for the iPad.
That said the graphing in this looks quite nice.
The common case for me is that I keep a very short-term personal ledger in it, just the stuff that hasn't hit the bank account yet, like this:
chequing = (1,000 # current balance
- 2 # coffee
- 15 # groceries
+ 2 # Joe paid me back
) => 985
But messing up the spacing in any way, for instance like this: chequing = (1,000 # current balance
- 2 # coffee
- 15 # groceries
+ 20 # Joe paid me back
) => 985
(note one fewer space before the closing paren) and now no changes to the values inside the parens take effect on the total after the => (which for non-Calca-using spectators should always auto-update based on changes). I copy-pasted this out of Calca just now and you can see the the total is incorrect.Sometimes this messes up the syntax highlighting so that it's obvious, but usually it doesn't, and I'm left wondering why it's not updating.
I like the linked numbers design. As it reminded me of Bret Victor's work, I was expecting scrubbing to work directly with numbers, which caused occasionally a bit of havoc, but I think you did a right choice of putting linking as the main action - touch design is hard.
The free-form infinite layout gives a mindmap vibe: it's potentially great when you are trying to understand pieces of a problem that you need. The downside is that the canvas becomes a bit of mess quickly.
The other alternative could be a Mathematica style, free-form document, with more restricted flow of equations (and text).
Because the organization becomes a bit of problem, undo is a must and solves a bunch of other problems. I'd implement area selection of equations (initiate with long tap?) to quickly move things around.
Y-axis could auto adjust by default or quick slider scrubbing should work directly for axis max-min values.
You probably want a simple document model as this is something between calculator and full featured computation software. Maybe just save every canvas when user clears/starts new one
All in all, great work!
Good job guys, I have high hope for this in the future!
"the App Store generated 2.3x more revenues than Google Play."
http://www.theguardian.com/technology/2013/aug/01/android-ap...
A calculator app is an outlier; it is not an average app. It's also an outlier with real utility --- so it's something people are more likely to pay for.
Tydlig at least means something in a real language ;)
SymCalc has pretty much all the functionality of a TI-89 including solving calculus and algebraic equations.
Tydlig looks like it has a nice ui but it doesn't even seem to support variables....
http://mvid.wolfram.com/mobile/dannewman_teachconceptsnotkey...
It's been a while since i did any ios development and this was never a requirement for me. Can someone explain why an external keyboard is something that had to be explicitly supported at an individual app level? Surely this should be an OS-level thing?
Here's a couple of situations that can get you when supporting an external Bluetooth keyboard:
- Input accessory view. If you use an input accessory view (bar that sits atop the regular software keyboard), then connecting an external keyboard will cause the software keyboard to hide but keep the accessory view on screen. This is great — but if you had any controls underneath the keyboard (especially on iPad) that required the user to dismiss the keyboard to get to them, then you have to build a way for them to 'dismiss' the keyboard when using an external keyboard.
- Custom keyboard. You might build a custom keyboard for your app. Connecting an external one will not show your custom keyboard. You'll need to ensure that functionality is still provided when an external keyboard is connected.
There are a few other things like making sure your keyboard view resizing code is robust enough to handle all the possible state transitions ("no input -> software input -> bluetooth input", or "no input -> bluetooth input -> software input", and so on).
If you're just using a standard text view you probably don't need to do anything special. But in this case Tydlig seems to do a lot of special stuff and probably required a bit of extra work to get Bluetooth keyboards running without issue.
Is it really a good idea to allow 96 + 15% though (at 0:45)? Might cause some problems for people learning maths, as it won't work on normal calculators and doesn't really make it obvious what percentages actually are.
[1] http://blogs.msdn.com/b/oldnewthing/archive/2008/01/10/70474...
It really is true that at any moment there is probably 4 other teams working on a similar idea as you are.
Well I will not give up. Good luck to you too!
see https://play.google.com/store/apps/details?id=com.Bisha.TI89...
or
http://www.androidpolice.com/2012/02/15/nostalgia-ti-89-calc...
additionally, I am baffled why do i have to press = to find end result, it should automatically calculate as i enter figure just like my $3 citizen calculator does.
Here are my thoughts as I use it (I will add to this comment. Hopefully the kids won't wake up soon.)
Wish there was an UNDO. I just moved a number and didn't want too. Shake to UNDO?
Pinch to zoom in and out. I'm using this on an iPhone.
Can I save a canvas? It doesn't look like, but maybe I'm missing it.
Of course 1/0 should be +Infinity, not ?...
(Disclaimer: I have a Mathematica console always open on my desktop, and regularly use it for all kinds of calculations.)