HNHacker News
TopNewBestAskShowJobs

jlongster

7,555 karma · joined May 7, 2009

https://jlongster.com/ (contact me at longster gmail)
submissionscomments
jlongster··on Porting a 100% local app to the web
oh, thanks! just fixed it. yeah, I googled real quick and grabbed the first link. Thanks for all the work!
jlongster··on Porting a 100% local app to the web
Bad code can be anywhere. It's definitely the exception for web apps to store data locally in a way that works though. They might try to cache a bunch of stuff, but you always run into problems where 1. the cache is stale or 2. your working through something and it ends up having to hit the network anyway.

But yeah, I definitely agree that it's easier to profile the network activity of a web app. It's pretty cool that you can just open the browser devtools and see all the network requests, and there's no way for a page to "fake" it. I like the web for that reason, and it's also why I leave the devtools on in the electron version on desktop (users could open it and do the same, but it's not as trustworthy, i.e. I could hack electron and fake it)

jlongster··on Porting a 100% local app to the web
Looks awesome!
jlongster··on Porting a 100% local app to the web
I think you meant "For web:" instead of "For mobile:" (I'm talking about desktop for both web and native)

Yep, I think you're right. By default the web sandboxes you into a naive client. I'm hoping to change that with still doing everything locally.

jlongster··on Porting a 100% local app to the web
The only thing similar is how the budgeting system works, and even that is going to change soon. Soon you'll be able to choose between a zero-based budget or a simpler report-style budget that just shows income vs expense (and provide some features help track things).

There's also the big difference that the app is local and we provide end-to-end encryption.

An example of a feature that YNAB doesn't have at all is custom rules: https://actualbudget.com/docs/other/rules/

jlongster··on What if we had Local-First Software?
@avrionov @ignoramous Thank you!

The frontend for desktop/browser React, and Electron is used to create standalone apps. I don't love Electron, and if you don't want it a browser version is available too: https://app.actualbudget.com/

The mobile app uses React Native and has a custom UI just for mobile, but it shares styles and a few small components with web. I don't believe that you can build one UI that works well on both desktop and mobile.

All platforms share the backend code which runs in a separate process/thread. On mobile, I use https://github.com/JaneaSystems/nodejs-mobile to run the JS backend locally.

That's mostly it. No UI frameworks are used. I love UI/UX design so I built it from the ground up to be as usable and performant as possible.

jlongster··on What if we had Local-First Software?
I'm not exactly sure what you mean. Wouldn't that be a centralized thing that everybody has to go through?
jlongster··on What if we had Local-First Software?
Fun idea! Just looked it up, 3kb is the max data in a QR code, and data _definitely_ gets bigger than that. If you import 100 transactions it'll probably be bigger than that. Also the syncing mechanism requires a two-way connection: they will communicate changes back and forth until they are synced up.
jlongster··on What if we had Local-First Software?
@jpeeler @Marksort I wish the same. I've also given feedback to Plaid that they should implement an encryption scheme that allows data to be encrypted from Plaid to the user, so at least apps which sit in the middle couldn't read your data. Nobody is interested in that though.

There _sort of_ is a solution where your computer directly connects to the bank. The format is called OFX (https://github.com/libofx/libofx), and there is a directory of banks that provide these files directly online. This site (https://www.ofxhome.com/) lists the URLs to use for each bank.

I used that for a while many years ago. But it's terrible and requires massive maintenance. For an app that requires connections to arbitrary banks, there's no way developers can support these direct downloads. There's always different errors in data for different banks, etc. Unfortunately, Plaid is solving a real problem

jlongster··on What if we had Local-First Software?
Yep, that and public routers blocking types of protocols. There was a phase where I switched to using mDNS (https://en.wikipedia.org/wiki/Multicast_DNS) so you didn't need a QR code, which discovers other devices. Turns out most public wifis (coffee shops) flat out block it.
jlongster··on What if we had Local-First Software?
Yep, bank syncing is going to launch by the end of the year.

It's tough. I've wrestled with this for over a year. Bank syncing has to come from my server, which means by doing so you are giving us access to your transactions. No banking provider has any way for clients to contact them directly. I think this is possible with the right encryption, but nobody is working on it. I've given this feedback to Plaid but they don't care.

The majority of people need the convenience of syncing though. So I plan to launch it, and it'll go through my server, and I plan to communicate clearly the privacy that you are giving up by doing so.

jlongster··on What if we had Local-First Software?
yep! https://actualbudget.com/docs/developers/using-the-API/
jlongster··on What if we had Local-First Software?
Right now, the differences are all in the details (income categories, no weird credit card handling, etc), and there are many of them. But instead I'll focus on what is to come soon:

* A custom rules engine (to be released in a few weeks). You'll be able to write a list of conditions for matching transactions, and a list of actions to apply when matched. The system will automatically encode what it learns as rules (apply category X to payee Y) so you can see what it's doing and adjust.

* Multiple budget types. Zero-based budgeting is cool, but Actual is just a tool for you. If you want, you can use a simple report based that just shows income vs expense. You choose the type you want adapt it to your lifestyle.

* Custom reports. This is really where having all your data local is incredible. You'll be able to write queries into your data, process it, and render any kind of visualization.

jlongster··on What if we had Local-First Software?
Wow, that's really great to hear! There's so much more I'm excited to build into it, so it will only get better. Something I'm most excited about is custom reports. Having all your data local is going to make those super powerful.
jlongster··on What if we had Local-First Software?
Thanks! Sort of do but unfortunately you can only subscribe to it right now by subscribing to a trial. If you email help@actualbudget.com I'll subscribe your email manually.
jlongster··on What if we had Local-First Software?
I have a lot of experience with this having developed a personal finance app that is local-first: https://actualbudget.com/

Having all of the data local is a superpower. It changes how you build the app, and you just never have to worry about the network. Everything is fast _by default_. It's great.

The app uses CRDTs to sync and it's unlocked a lot of powerful stuff like a robust undo system. We also offer end-to-end encryption.

On the negative side, over time I've stepped back a little from being truly local-first. The mobile app used to connect to the desktop by pointing the phone's camera at a QR code on desktop, and it would literally sync peer-to-peer. Maintaining that was nightmare and users had endless networking problems. Our network infrastructure unfortunately is not built for truly peer-to-peer apps. Maybe ipv6 will help, I don't know. My app now has a "centralized" server but it's really just a backup that gives some convenience - the app is still totally local but syncs through a single server. You can work on it for weeks offline and then sync up. In the future when p2p is ready, I'll be ready for it.

jlongster··on Ask HN: Do you think you have an actual novel idea?
* Sometimes other things look similar but a small change you made to the idea is the novel part and makes a big difference

* Many, many ideas live in obscurity. If you can take one and learn how to execute it in a way that gets users, you've done something novel

* Creating is more frequently combining existing ideas into a new thing. There are infinite ways to weave together existing ideas into something new.

jlongster··on Twinkle Notes: Cross-platform encrypted notes app
Internally it just uses sqlite, and there's a syncing layer on top of it. I gave a talk about it here: https://www.dotconferences.com/2019/12/james-long-crdts-for-...
jlongster··on Twinkle Notes: Cross-platform encrypted notes app
That's awesome, there's definitely room for apps like that. I have nothing against them, but there are tradeoffs. Seems like that could work well for that kind of app.
jlongster··on Twinkle Notes: Cross-platform encrypted notes app
I disagree. I mean, it depends on the kind of app. The data requirements of some apps might do well in a simpler model that can work OK with existing syncing services.

But the majority of apps need more complex needs and you definitely should not go and build a new database. The user experience will end up being flaky (syncing problems) and/or slow (the database is not good). Not to mention that now in addition to setting up the app, the user now needs to go sign up for one of those services if they haven't already.

With integrated syncing, the user just fires up the app and syncing works and they never have to care about how it works.

There's a reason a whole field of research exists into things like CRDTs. Distributed apps are not trivial, and only ones with simple data needs could get by without a more rigorous approach.

jlongster··on Twinkle Notes: Cross-platform encrypted notes app
I develop an app like this (https://actualbudget.com/) and I'll give you my reasons.

Those kinds of syncing work will files, and treat each individual file as a blob. Apps don't work this way. Apps need databases and fine-grained change tracking. You absolutely don't want to make a change in two places on two separate devices and then have a sync conflict. If you throw the sqlite db file on dropbox, that's exactly what will happen.

You could try to build your app around files, but now you are rebuilding a database (and not a good one).

There are a few services that offer syncing more appropriate for apps, like Apple's CloudKit (I think that's the one?). These could work, but in Apple's case you can only run your your app on macOS/iOS.

There are a few generic syncing layers like PouchDB, and there are tradeoffs with all of those. Some of these tradeoffs are deal breakers. (there aren't a ton of good options yet)

But there are good reasons why you an app can't just eschew syncing onto the user, and assume they'll find a good syncing service. It needs to be tightly integrated with how the database works.

jlongster··on Analyzing churn rates, free trials, and other metrics
Thanks a lot!

I had a hunch that it was something like that. "loss" isn't really the right word, but I'm focusing on cash flow for the next year. You're right though - it's an investment, but I'd like to figure out the math so I can learn how much cash I need upfront to fuel a specific % of growth.

Checkout your spreadsheet now. don't quite understand it yet, but I'll follow-up with you on twitter (saw your tweets)

jlongster··on Analyzing churn rates, free trials, and other metrics
I did not, but I was only focusing on the next year anyway. It's just something to take into account losing customers. If I take a pessimistic churn rate and it goes down over time I'll be better off.

I haven't read the linked post, will do. I don't think I have nearly enough data to know customer lifetime though. I only have 4 months worth of data.

jlongster··on Analyzing churn rates, free trials, and other metrics
Yep, seeing the effect of $.50 instead of $1 for trials when there are are lot more users & trials was really enlightening. I'll most likely do that. I could even not provide bank syncing for trials, or require a credit card. Will do something like that.

Definitely going annual as well - tempted to go only annual, but we'll see.

jlongster··on Doing work locally minimizes problems with Electron apps
I haven't noticed an issue - the only alternative would be to block the renderer and do it in the same process. The IPC uses a local domain socket which is very high performance (better than a web socket) so any overhead is quickly made up for with UI responsiveness. There may be specialized cases where it is a problem and you'll have to figure something out.
jlongster··on Doing work locally minimizes problems with Electron apps
You can enable "node integration" with any renderer process and call node from their. But you definitely should not enable it in your primary renderer process if any untrusted code is running their (if you pull in any JS from anywhere else)
jlongster··on Doing work locally minimizes problems with Electron apps
The web's offline support sucks, and don't tell me to use service workers. Actual is a truly offline 100% local app. Most users love that they can simply launch a desktop app and it always runs no matter their network connection.
jlongster··on Doing work locally minimizes problems with Electron apps
Linux support was added in 0.0.99! See here (and download it): https://github.com/actualbudget/releases/releases/tag/0.0.99

Somehow that card didn't get moved to done, sorry! Let me know if it doesn't work.

jlongster··on Doing work locally minimizes problems with Electron apps
I just tried to get started with tclkit to try it out. The first result for "getting started tclkit" has links with 404. I was able to download a prebuilt binary for macOS which does run, but I can't find any clear tutorials for how to start building apps (the top result for "getting started" is from 2008).

I decided to try some example apps instead, so downloaded some .kit files and tried to run them:

% ./tclkit-8.6.3-macosx10.5-ix86+x86_64 fractal.kit 2019-06-25 12:14:12.541 tclkit-8.6.3-macosx10.5-ix86+x86_64[18970:1942703] -[TKWindow setCanCycle:]: unrecognized selector sent to instance 0x10023a910 2019-06-25 12:14:12.542 tclkit-8.6.3-macosx10.5-ix86+x86_64[18970:1942703] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TKWindow setCanCycle:]: unrecognized selector sent to instance 0x10023a910'

It crashes.

Hard to compare with the ecosystem and maturity of the web.

jlongster··on Doing work locally minimizes problems with Electron apps
? A local webview usually means that it reuses the user's already installed browser and uses that instead.
← PreviousPage 2 of 21Next →