<<
 
>>
 
 
justin = {main feed , music , code , askjf , pubkey };
 
fun side project
March 8, 2025
I've spent some time the last couple of months working on a side project: a volunteer tracking/scheduling/etc system for the boathouse where I volunteer. It's been fun, I've been learning more SQL, and CSS. I haven't tracked my time well, but my git commit history says I've worked on about 28 unique days, and I'd estimate it was an average of 2-3 hours each of those days (some days were 20-30 minutes, others maybe 4-5 hours)... so maybe around 60-90 hours of work. Plus White Tie's time making the CSS pretty(ier). Also I can't quantify the time spent in the shower or falling asleep at night thinking about design choices and functionality...

It's almost done, putting the finishing touches on it now. Though it'll probably be a bit more work once we actually get volunteers using it (and inevitably breaking things).

Some other stats:
--------------------------------------------------------------------------------
 Language             Files        Lines        Blank      Comment         Code
--------------------------------------------------------------------------------
 PHP                     11         3129          288           18         2823
 CSS                      1          440           30            0          410
 JavaScript               1           43            2            0           41
--------------------------------------------------------------------------------
 Total                   13         3612          320           18         3274
--------------------------------------------------------------------------------
I tried to keep things as compact as possible, but also tried not to overdo the design. Started on PHP 5.5 on one of our dev boxes but now have fired up a VM that has PHP 8.x. Some crazy changes to inter-type comparisons in PHP 8. Eeep. But not so bad I guess once you start ditching some of the old bad habits.

Really appreciating how flexible SQL is. Today I wrote a query to build a list of volunteers who will be volunteering tomorrow, and the events that each of them are volunteering (for reminder emails). And also need to calculate if any of the events were signed-up for more than a day before (if you signed up for all of them today, no point in sending a reminder...):
SELECT users.email AS email,
        (signed_up_at < DATE_SUB(NOW(), INTERVAL 1 DAY)) AS old,
        events.*
	FROM eventsignups
        INNER JOIN events ON events.event_id = eventsignups.event_id
        INNER JOIN users ON users.id = eventsignups.user_id
        WHERE eventsignups.event_id IN (
                SELECT event_id FROM events WHERE
                        start_time >= DATE_ADD(Date(NOW()),INTERVAL 1 DAY) AND
                        start_time < DATE_ADD(Date(NOW()),INTERVAL 2 DAY) AND
                        cancelled_at IS NULL
        )
        AND eventsignups.cancelled_at IS NULL
        AND users.want_email_remind > 0
        ORDER BY users.email;
(and then some PHP steps through the list by email to find all of the events for that email address, see if any have 'old' set, etc). Oddly satisfying.
Add comment:
Name:
Human?: (no or yes, patented anti crap stuff here)
Comment:
search : rss : recent comments : Copyright © 2025 Justin Frankel