HackerTrans
TopNewTrendsCommentsPastAskShowJobs

pjungwir

no profile record

Submissions

My Claude Code Setup

illuminatedcomputing.com
11 points·by pjungwir·le mois dernier·1 comments

comments

pjungwir
·le mois dernier·discuss
I think yes. You're saying that the invoice is generated from other data in separate tables, and it should be immutable even if that data changes. So today you are copying everything used by the invoice.

That's exactly why I started learning about temporal tables. I had a customer whose app used questionnaires to measure the effectiveness of government social services, and they let people change the questions (and multiple choice options) even after there were answers! Obviously the data was trashed.

I've seen this bug over & over again, where you have a foreign key relationship, and the referenced table changes, but the referencing table needs the old data. Another example is a sale that doesn't capture the product's current price.

Temporal tables mean that you can run your 2022 financial reports and get the same answer you got before.

My own time-tracking and invoicing app has to solve this problem. I also "copy everything" when something changes. I just gave a talk about migrating it to temporal tables: https://illuminatedcomputing.com/pages/pgdata2026-migrating-...

You'll have to decide if your use-case is more "system time" (history of the database) or "application time" (history of the entities). The features here are for application time. I want to make sure Postgres gets system time too, but it's not in v19.

If you want system time today, there are several widely-adopted Postgres extensions that can do that already. I cover them here: https://illuminatedcomputing.com/posts/2017/12/temporal-data...

And actually, application time is managed by you (while system time is managed automatically by the database), so really you can use it for whatever you want.
pjungwir
·le mois dernier·discuss
In the Postgres version, you can use a rangetype or multirangetype over any base type (integers, inets, frammishes, etc). This is a generalization of SQL:2011, where PERIODs have to be on date/timestamp/timestamptz columns. I have ambitions to support non-range/multirange types as well, even user defined types, but I'll need to add a way for them to communicate a few things to core Postgres, like how to do intersect/contains/overlaps. I talked about that in my "roadmap" talk linked here if you're interested in details.
pjungwir
·le mois dernier·discuss
For application time, everything lives in one table (although you could partition it). The biggest performance hit, I suspect, will come from GiST indexes instead of B-Trees. Some general GiST improvements are on my TODO list, and I learned at PGConf.dev that several other people already have patches for cool perf-related GiST enhancements.

For system time, a separate history table is a common implementation, sometimes also with partitioning. Here is what other vendors are doing: https://illuminatedcomputing.com/posts/2019/08/sql2011-surve...
pjungwir
·le mois dernier·discuss
Hey I worked on this!

Thank you to everyone here saying they are excited about it. I often hear doubts that anyone wants this. Perhaps that's why vendors have been so slow to add it. And thank you 'bonesmoses for writing about it!

We are still missing system time, but if no one else wants to work on it, I hope to tackle that soon.

I have a lot of other ideas for improvement beyond SQL:2011, too. Here is a talk I gave last month about my personal roadmap:

https://illuminatedcomputing.com/pages/pgconf2026-temporal-r...

I've also been vibecoding a lisp REPL to play with the algebra of temporal relational operators (important for the planner): https://github.com/pjungwir/relsim

That overlaps with my attempt to write implementations for temporal semi/anti/outer-join and other relops: https://github.com/pjungwir/temporal_ops

If anyone has comments about what you'd like to see, I'm happy for feedback!
pjungwir
·le mois dernier·discuss
Yes, I su to the user. Typically I have it run a tmux session for each "project". That makes it easy to get more windows without su'ing over and over. Also its tmux sessions all get a yellow status bar (in ~claude/.tmux.conf), so they are easy to recognize.

To me it is more convenient than a VM, since everything is on the host. And it can launch its own VMs without an extra layer.

I don't really know which is more secure. There are hypervisor escape vulns too. And shared folders seem like footguns. For instance in vagrant, guests get `/vagrant` to read/write the host's folder, so you have to be careful what you put where.

The biggest annoyance with an OS user so far is running docker containers. I don't want to add claude to the docker group or give it sudo privileges. I've read that you can set up rootless docker for a user, and even that you can run it side-by-side with a normal system-wide docker, but I haven't tried doing that yet.
pjungwir
·le mois dernier·discuss
I know there are VM solutions, but I've been happy with a separate OS user (named `claude`).

He has similar dotfiles to mine, but no secrets. My own home directory is 0700. He has his own ssh key that I added to my github profile, but it's password-protected, and I push/pull for him. He has his own Postgres (non-superuser!) {development,test} {users,databases}.

It's as if he were another developer on the project. If he needs something run with sudo, he asks me. Often we can both work on something in parallel. Unix was supposed to be a multi-user system after all.

A trick I use a lot is that many of his git repos have an extra remote, like this:

    paul  ssh://paul@localhost/~/src/example (fetch)
    paul  ssh://paul@localhost/~/src/example (push)
That makes it easy to collaborate on things I'm not ready to share.

I'm pretty comfortable with this setup.

I do worry about Linux privilege escalation bugs. I don't trust an AI to understand that exploiting vulns is not acceptable. (I can't help but recall that at my first job I may have misused vim's :! feature to broaden my sudo powers, which were officially limited to editing httpd.conf, when I needed something in a hurry. . . .) I find myself manually upgrading packages more often these days, despite automatic security updates. I don't think Opus would go to the trouble of looking up security vulns, but maybe Fable would, and there have been a lot lately. Maybe some future model will just take it upon itself to find new ones. Or install a keylogger to learn the ssh key password.

But a separate user is nearly the most paranoid setup I've heard of, excepting only a separate machine. So I also question whether I'm sacrificing too much speed/convenience. But really it's still very convenient. I think it's a good way of being efficient but responsible.

If other people see holes, I'd be happy to hear about them.
pjungwir
·il y a 2 ans·discuss
> I've personally also used identity theft protection services since as far back as the 90's now, simply to know when actions such as credit enquiries appear against my name.

I've always thought companies offer those for ulterior motives, e.g. maybe they get a fee for giving the protection service future customers. Do others use them? Maybe I've been wrong here.
pjungwir
·il y a 5 ans·discuss
I agree with this, mostly.

Besides the "meeting time" exception others have mentioned, you should be aware of timezones when grouping records into days/weeks/months/years/etc. The timezone affects where you "cut" the continuum into groups. Does Joe's sale count toward his January quota or February? This has all kinds of interesting questions: do you use the user's time zone? The local office timezone? The HQ timezone? UTC for everything? What if the user moves? Stack Overflow's "fanatic" badge just uses UTC: https://stackoverflow.com/help/badges/83/fanatic
pjungwir
·il y a 7 ans·discuss
SEEKING WORK - Portland, OR or Remote

I'm a full-stack developer with 18 years experience. My specialties are Rails, Postgres and Chef/AWS. I'm also very comfortable in Javascript, Python, C, Java, and a few other things. I've done a bit of paid work in Rust and Elixir and would be happy to do more.

I am reliable, easy to work with, quick to turn things around, and a good communicator. I can work solo or on a team, either as lead or a team member. I value client satisfaction as highly as technical excellence.

You can see some of my recent work here:

https://illuminatedcomputing.com/portfolio

https://github.com/pjungwir/aggs_for_arrays

https://github.com/pjungwir/active_model_serializers_pg

If you'd like to work together, I'd be happy to discuss your project!: [email protected]
pjungwir
·il y a 7 ans·discuss
SEEKING WORK - Portland, OR or Remote

I'm a full-stack developer with 18 years experience. My specialties are Rails, Postgres and Chef/AWS. I'm also very comfortable in Javascript, Python, and a few other things.

At the low level I've done paid work writing custom Postgres extensions with C and SIMD CPU instructions and implementing performance-critical network services with Rust. At the high level I can design and wireframe features, show their business value, talk to customers, lead other developers, mentor, consult on application architecture, and advise on scaling/performance. You don't want me to pick your color scheme though. :-)

I am reliable, easy to work with, quick to turn things around, and a good communicator. I can work solo or on a team, either as lead or a team member. I value client satisfaction as highly as technical excellence.

You can see some of my recent work here:

https://illuminatedcomputing.com/portfolio

https://github.com/pjungwir/aggs_for_arrays

https://github.com/pjungwir/active_model_serializers_pg

If you'd like to work together, I'd be happy to discuss your project!: [email protected]
pjungwir
·il y a 7 ans·discuss
SEEKING WORK - Portland, OR or Remote

I'm a full-stack developer with 18 years experience. My specialties are Rails, Postgres and Chef/AWS. I'm also very comfortable in Javascript, Python, and a few other things.

At the low level I've done paid work writing custom Postgres extensions with C and SIMD CPU instructions and implementing performance-critical network services with Rust. At the high level I can design and wireframe features, show their business value, talk to customers, lead other developers, mentor, consult on application architecture, and advise on scaling/performance. You don't want me to pick your color scheme though. :-)

I am reliable, easy to work with, quick to turn things around, and a good communicator. I can work solo or on a team, either as lead or a team member. I value client satisfaction as highly as technical excellence.

You can see some of my recent work here:

https://illuminatedcomputing.com/portfolio

https://github.com/pjungwir/aggs_for_arrays

https://github.com/pjungwir/db_leftovers

If you'd like to work together, I'd be happy to discuss your project!: [email protected]
pjungwir
·il y a 8 ans·discuss
SEEKING WORK - Portland, OR or Remote

I'm a full-stack developer with 18 years experience. My specialties are Rails, Postgres and Chef/AWS. I'm also very comfortable in Javascript, Python, and a few other things.

At the low level I've done paid work writing custom Postgres extensions with C and SIMD CPU instructions and implementing performance-critical network services with Rust. At the high level I can design and wireframe features, show their business value, talk to customers, lead other developers, mentor, consult on application architecture, and advise on scaling/performance. You don't want me to pick your color scheme though. :-)

I am reliable, easy to work with, quick to turn things around, and a good communicator. I can work solo or on a team, either as lead or a team member. I value client satisfaction as highly as technical excellence.

You can see some of my recent work here:

https://illuminatedcomputing.com/portfolio

https://github.com/pjungwir/aggs_for_arrays

https://github.com/pjungwir/db_leftovers

If you'd like to work together, I'd be happy to discuss your project!: [email protected]
pjungwir
·il y a 8 ans·discuss
https://illuminatedcomputing.com/