« first day (5524 days earlier)   

08:36
Unfortunately, my question in the lobby didn't snag the attention of the DB expert that is a mod and RO there, so I'll try one more shot here as I'm actively tearing my system apart once again for this and I hope I get the foundations right this time :)
in Stack Overflow Lobby, 21 hours ago, by roganjosh
Opinion poll time: I have a DB table tracking orders and their status codes (let's say there could be 10 different status codes). Some of those codes could be considered "complete". Do I have a single table tracking orders and have an "is_complete" Bool column that is indexed, or do I move those orders out of the main table into a different "historical" orders table?
in Stack Overflow Lobby, 21 hours ago, by roganjosh
My feeling is that it should be a single table since my "is_complete" criteria could change at any time if I add more status codes, but that's not how I've seen it set up in other places in the past. Now I'm confused about why they decided to move "complete" orders out of the main table. Perhaps indexing on a bool column isn't very efficient so it's better just to not have them in a table scan at all?
 
1 hour later…
09:59
@roganjosh I'd say this depends on how you proceed to handle completed orders.
The backend solver only cares about anything "is_complete = False". The frontend will always want an uninterrupted history of all orders
I can see stuff like this that says cardinality is shot on indexing a bool value but, at the same time, it's a massive differentiator in a search tree; it'd be the biggest predicate condition I could imagine
I'm wondering whether I'm conflating two different things. Perhaps it is better to keep it all in a single table, but just get rid of the actual index on the bool state
If you still need the data regularly I would probably keep it in the regular table.
The comments on that answer definitely should be taken into account.
Depending on how far back the frontend queries the history, you might also want to keep the option of a two-stage soft-delete.
So, an archive, basically. I think you've helped me to a solution - keep the last 12 months in the active table and then just push to archive. It makes a neat delineation where I don't have to bother with JOIN etc. in every query
Around here we track meta data of compute tasks for monthly aggregates. So the current month stuff is always needed and in the DB. But older stuff might still be needed for recalculations or reprocessing; so we have 2-3 months worth of data in the DB in case someone down the line finds an error in reports. Everything older is unlikely to be needed, so it gets dumped to archive files regularly.
 
8 hours later…
18:22
@roganjosh I have reclaimed the conjecscore throne! When/if you get less busy with work, i've got a lot of cool ideas about conway's 99 conjecture. I also have another open conjecture that can be gamified I think.
When I'm less busy with work... aha. ahahaha. ahahahaha. I've literally staked everything I've got against my project now; I have a meeting with the accountant tomorrow to keep me afloat for the next year. I'm sink or swim at this point, mate :) I'm still curious about your new approach, though. I think you have 2 githubs and I only had a link to one?
@roganjosh Oh I haven't pushed to github yet. The idea is that if you only flip one edge, you don't have to check the score of every pair of vertices. The loop goes down from 4851 iterations to 99.
Sorry to hear about work. I hope it gets better soon!
I will push up to ga99 github soon!
Sorry?
oh just the fact that it is sink or swim. sounds dire
maybe i misinterpreted it.
I've chosen this! I have one recruiter vaguely looking around but I've gone all-in on my project
18:27
ah ok. I hope your endeavors are successful!
I don't think I'll get another opportunity to do something like it again. Because I was a contractor, most of my money is actually in a business account. I can release some as a divident to keep me going for at least a year, but that's cash burn so I better be making money before that dries up!
I hope this one opportunity works out then!
also, i might be able to incorporate some stuff from this question: math.stackexchange.com/q/5108418/15140 to make the conway program even better, but I have yet to do so...
I'm just lacking a boss yelling at me about timelines :P
dividend*
speaking of jobs I recently took a break from programming and got a retail job haha.
it's been fun. very different from programming work.
anyway, i'll come on later and tell you when I pushed the updated code to ga99. I'm just very tired right now.
You'll need to re-link it because I couldn't find it when you messaged me a few days ago
18:33
github.com/thyrgle/ga99 i'll push to gpu branch (even though it doesn't use gpu)
i have code in place for another open problem called Magic Square of Squares too. I just need to do some database migrations but idk what I'm doing with database migrations lol.
Are you trying to retrofit something like alembic?
@roganjosh I have not heard of alembic. I was just going to use pghero or something to change stuff manually.
Ah, I've never used it so I dont have any piggyback setup for you, sorry
dang. oh well, I think it shouldn't be hard for a pro to do. it's just difficult because I am not a pro at it.
18:56
My alembic setup took a lot of work. I guess im not a pro either :P
I'm not sure I can use alembic with render.com (which is what i use for hosting)
the good thing i just need to change the type of one of the columns I think
@roganjosh I'm gonna go now. Keep me posted on how your work project is going! Happy holidays!
We're talking about the same alembic?
 
1 hour later…
20:12
Yup

« first day (5524 days earlier)