HNHacker News
TopNewBestAskShowJobs

ricg

691 karma · joined June 25, 2011

solo-dev. iOS/Mac and the occasional Windows app.
submissionscomments
ricg··on Show HN: Bi-directional sync between Postgres and SQLite
How do you handle primary keys? Wouldn't auto-incrementing integers lead to duplicate keys since clients are not aware of each other?

For the To Do app example, let's say two clients start with an empty database and each creates a new todo:

Client A creates [id:1, todo:"Buy milk"]

Client B creates [id:1, todo:"Buy cheese"]

ricg··on Tell HN: I used the same computer since 2007 (with minor upgrades)
About your MacBook fans squealing: I had the same problem with my 2012 MacBook Pro. It turned out that the grilles through which the fans blow out the hot air were completely clogged up with dust and the Macbook would overheat.

I cleaned both and now the fans rarely spin up to full speed, because the hot air can actually leave the case again.

See this guide (the guide does not show cleaning the grille, but that is the important part).

https://www.ifixit.com/Guide/How+to+clean+your+MacBooks+fan+...

ricg··on Ask HN: Have you used SQLite as a primary database?
A potential downside here could be running out of file descriptors if you use one database file per client. Linux has a limit of 1024 open files per process.

Did you ever run into this problem?

ricg··on Ask HN: Have you used SQLite as a primary database?
Did you ever run into the problem of the system running out of file descriptors? If each client gets its own database file, each connection will require a file descriptor.

For example, Linux limits the number of file descriptors to 1024 per process to each process can open up to 1024 files at any point in time.

I ran into this problem in the past in another project (the system ran out of file descriptors for another reason).

ricg··on Ask HN: Have you created programs for only your personal use?
Quite a few. Some I use regularly:

- Text snippet app to reply to support request emails. Use this to reply to about a dozen emails each day. I have over 300 snippets.

- App to got through a folder with my bank statement PDFs and produce a number of transaction and investment reports (calculates IRR and other metrics).

- An app to simulate all possible portfolio combinations for a given set of assets (this was before https://portfoliocharts.com)

- An egg timer that you can start before you set the time right after you put the eggs into the water. Those seconds are precious. Wrote this as a gift for somebody.

- App to generate monthly invoices for my app sales.

- A nice frontend to manipulate csv files.

While I was looking for an apartment, an app to look for new listings and notify me right away (often the nice apartments would already be gone by the time the daily email reached my inbox).

A workout timer. Simple app that tells me the time every 15 seconds. Throws in the occasional Tony Horton quote for motivation.

Oh, and a personal notes app, of course!

ricg··on An Ode to Apple’s Hide My Email
Thanks a lot! I'll give it a try.
ricg··on An Ode to Apple’s Hide My Email
Which mail providers support this? I'd like to set up something like this. Thanks!
ricg··on Write plain text files
That's what I do today in my own app. I have a "table of contents" file in each folder. Ideally the file system would support that out of the box, but maybe a first step could be to standardize such a TOC file...?
ricg··on Write plain text files
In the system's file explorer (Finder/Windows File Explorer).

This would give me a visual outline and the ability to open any file with its corresponding app.

Imagine writing a book and using folders as chapters. You could then write individual pages with different apps, say some plain text, some Word documents, a few spreadsheets, images, videos, etc.

ricg··on Write plain text files
> NEED HIERARCHY? Use directories — also known as folders.

I really wish I could define a custom order for files in a directory. A folder hierarchy is almost an outline, but not quite.

Yes I could prefix with "01", "02", and sort alphabetically, but those are cumbersome workarounds and reordering is a pain.

Are there file systems that allow for a custom order of files/folders?

ricg··on Ask HN: How do you manage your personal documents?
Well, the alternative would be to either not scan the documents at all and keep them in the basement as hardcopies or to scan them and protect them somehow (for example by keeping them on a device that is not connected to the Internet).
ricg··on Ask HN: How do you manage your personal documents?
> what an attacker could get by just having access to my computer

That's what I was referring to. Let's assume you store your scanned PDFs on your personal laptop and that gets compromised. Now the attacker has your medical history, tax and bank statements, contracts, ... your whole life to pick and choose the ransom amount.

I'm getting more and more to the conclusion that if you do not want something to be published on the Internet, do not put it on an Internet-connected device, smartphone or laptop -- or put the other way around: "expect anything that you keep on an Internet connected device (or cloud) to be potentially stolen from you". Too paranoid?

ricg··on Ask HN: How do you manage your personal documents?
For those who scan and file digitally:

Are you worried about data security/malware at all? How do you protect your data?

Maybe I listened to too many Darknet Diaries episodes, but recently I've been thinking more about how to protect my personal digital documents. All it takes is one bad link or fishing email. Once a virus/trojan/ransomware is on the system, the attacker has a lot of leverage with everything scanned and neatly filed.

My idea is to use a separate laptop for archiving digital documents that is never connected to the Internet. Still a thought experiment at this point so I can't speak to the practicality (backups, etc.) of this yet.

ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
One
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Yes, I thought about both scenarios and actually added support for both to my app.

If you rename a note through the app it will go though all other notes and update them to use the new name.

The app also adds datestamps, YYYY-DD-MM, to the file name of each note exactly for the reason you mentioned. File metadata might get lost when copying a file around. The added benefit is that if you sort files alphabetically in Finder, they show up in the order you created them.

ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Great, thanks for sharing some details about your setup. I do something similar with my email messages. I never delete anything. Should I later need to recall a conversation I use Mail.app's full text search. Success varies depending on how much context I can recall.

With the app I tried to provide additional access points into the data. Page links are an additional way if you use them like "@ mentions". Let's say you have a person or topic that a note is related to (for an email this would be the sender). I created a folder "Contacts" and added a note for each person. Now if I write something down I mention the page for that person on the note. Later on I can go to that person's page and see all notes connected to that person (the power of backlinks) or simply search for "@james", for example.

Zettelkasten: I'm still trying to wrap my head around this one. What is great about it is that Niklas Luhmann figured out a way to have page links and backlinks between notes in a setup in the physical world on actual paper. With digital notes, I think GUIDs and timestamps to identify notes are not necessary anymore, because the file path (or URL if you will) uniquely identifies a note.

Org mode: yes, same here with the added difficulty that I have a vi background :)

ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Thanks again for your input! Yes, the app remains fully functional forever, with the limitation being that you cannot add new notes. Sounds like I need to make this more clear in the docs.
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
1. Thank you :)

2. iOS with iCloud support is planned.

ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Thanks for your feedback!

1. If you cancel your subscription you cannot add new notes, but you can still access, edit, move, etc. your existing notes. All features remain active (and you get updates, important for OS upgrades).

2. iOS and iCloud Drive support are planned

3. It changes between light and dark mode automatically with the setting of macOS.

ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Not yet, but that's on my list. Same for headings. I'm still debating if I implement this as a separate "rename" feature or instead implement a project-wide search and replace.
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Curious about your workflow since you've been keeping notes for a long time. How often do you refer to old notes and how old are those? What methods do you use to find them (e.g. search, navigate a folder structure, etc.)?
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Writing your own notes app is a rite of passage ;)
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Thanks!
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
No SwiftUI, just plain Swift and AppKit/Cocoa. I considered SwiftUI, but at the time it was not ready and was missing a few core things I needed, like an outline view (this was 3 years ago).

Sometimes I wonder if I should have gone for a Catalyst app like Craft, for example, but again, at the time when I started Catalyst was in a very early stage. Today I'd probably give it another try. I also considered a Swift wrapper around an HTML/JS core (kind of my own slim Electron version) but decided to go for a native Mac app.

ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Let me know what you think once you get a chance to try it!
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Thank you very much for your kind words!
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Yes, you've got to start somewhere, especially as solo-dev.
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Thanks for the kind words! Re: attention to detail: nobody has discovered the easter eggs yet!
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
I can confirm the first part from my own experience. I ported one of my other apps to Windows (native, had to learn C# and UWP). The Windows revenue unfortunately is way, way less than Mac/iOS.
ricg··on Show HN: I wrote a local-first notes app for Mac, with data longevity in mind
Well, I did a thorough marked analysis, weighted pros and cons and...

...no, I really just wanted a good notes app that had all the features I wished for. So I went ahead and got started (not done yet :). That was 3 years ago. 2 years ago I wrote an importer and transferred all my notes over from the app I was using at the time and have been using my own app ever since. And I plan to use this for the rest of my life to save the things I learn(ed) along the way. That's why the focus on data-longevity.

Page 1 of 5Next →