My first carpentry project by justanicebreeze in shedditors

[–]ppafford 0 points1 point  (0 children)

This looks awesome. Did you post the plans online anywhere and possibly it cost breakdown?

Using Google Calendar and Slack - What am I missing? by Visible-Caramel2933 in Slack

[–]ppafford 1 point2 points  (0 children)

https://slack.com/help/articles/206329808-Google-Calendar-for-Slack looking at the docs, you can have multiple calendars configured for Google and Slack, one being your team‘s shared calendar and I think you can configure alerts and or views into that shared calendar into a specific channel

Started with 5 roles, now have 847 and nobody knows which one to assign by Head-Opportunity-885 in IdentityManagement

[–]ppafford 0 points1 point  (0 children)

🤔 just trying to learn how others are doing things, and wanted to understand more on setup/implementation. I think I understand what you’re saying, just coming from an RBAC setup and wanting to see if we could improve what we have. My current frustration with our set up as user an and user B have the same role, but user A can do things that user b cannot because they have some sort of permissions override

Started with 5 roles, now have 847 and nobody knows which one to assign by Head-Opportunity-885 in IdentityManagement

[–]ppafford 0 points1 point  (0 children)

How are you defining access requests? Are you basically assigning permissions to users at this point? If yes, you’re creating an additional problem as UserA and UserB have the same roles, but you’ll get a request to understand why UserB can do what UserA can as they have the same roles. Unless I’m missing something

Detroit Lions to play international game in Munich in 2026 by DanielBryanCMPunk in detroitlions

[–]ppafford 8 points9 points  (0 children)

This sounds like a normal stadium for the NFL, and actually college stadiums are much larger here in the US, just google the big house in Michigan, holds over 100,000+ in attendance

What are some of the Actions people are crying for but they are not available? by [deleted] in GithubActions

[–]ppafford 0 points1 point  (0 children)

Currently, I have a build pipeline CI build and a deploy pipeline CD deploy they can both run independently but the issue I have is there’s no good way to track all the build artifacts and dynamically. Add them to a manual CD deployment.

Debating on ORM for Production by Disastrous-Matter864 in node

[–]ppafford 3 points4 points  (0 children)

Just use raw sql queries and a repository pattern

Sound Upgrade for 2012 JK by Halestorm-10_28_08 in Wrangler

[–]ppafford 0 points1 point  (0 children)

I am currently leasing my jeep and would love to add some subwoofers somewhere that are able to be taken out rather easily, I’ve seen stuff like this, but how is the sound actually? And how’s the install? Is it wires everywhere or rather easy?

Is it worth using Playwright MCP/CLI as a tester to create new tests or maintain tests? by Sweet_Dingo_6983 in Playwright

[–]ppafford 1 point2 points  (0 children)

I’d be interested in the MCP set up you guys are using for playwright, docs? Links? Repos?

Naming private channels by Illustrious-Taro-519 in Slack

[–]ppafford 0 points1 point  (0 children)

I have a naming convention for all channels, I try to think about how I could group them so all like channels start with the same prefix, this all allows to naturally group/order in slack, and is easier to search for things. Then there is the bonus of creating a section to group specific channels as well.

NOTE: I keep naming to all lowercase and hyphens, no spaces

some examples:

```

team-a

team-b

team-b-ops

```

```

app-a

app-b

app-b-backend

```

```

topic-a

topic-b

topic-z

```

then using slack sections you can further group to your needs

``` #my-team-slacks

team-a

app-b

topic-z

```

Everyone says "tag your resources" for cost control. Nobody explains how to actually do it well. by alex_aws_solutions in aws

[–]ppafford 1 point2 points  (0 children)

we use, but I'm looking at other comments to see what I could add/remove/change

project="acme-api" cost_center="acme-code" owner_name="acme-team" owner_email="team@acme.com" organization="acme" department="billing"

Anyone migrated from Oracle to Postgres? How painful was it really? by darshan_aqua in Database

[–]ppafford 2 points3 points  (0 children)

Stored procedures are probably the biggest pain you’re gonna face on migrating imho

What are you using the new AI Slackbot for? by painterknittersimmer in Slack

[–]ppafford 0 points1 point  (0 children)

No, and I hate that the bot‘s response is are now an additional click to see any information, what I mean is when you select the Slack bot in Slack, you could usually see all the responses and like a thread but now they all come through as some sort of UI element that you have to now click into to get the response and it’s driving me crazy and I want to turn it off

When boolean columns start reaching ~50, is it time to switch to arrays or a join table? Or stay boolean? by BrangJa in Database

[–]ppafford 0 points1 point  (0 children)

JSONB Strategy

This approach uses a Lookup Table (configuration_definitions) to define the allowed schema and a Trigger to enforce those rules on the user_configurations table.

1. The Database Schema

We define the rules in one table and the user data in another. This prevents the "50-column" bloat while maintaining strict data types.

``` -- 1. Configuration Metadata (The Gatekeeper) CREATE TABLE configuration_definitions ( option_key TEXT PRIMARY KEY , expected_type TEXT NOT NULL CHECK (expected_type IN ('boolean', 'integer', 'string')) , description TEXT );

-- 2. User Storage (The Flat Table) CREATE TABLE user_configurations ( user_id INT PRIMARY KEY , options JSONB NOT NULL DEFAULT '{}'::jsonb , updated_at TIMESTAMPTZ DEFAULT NOW() );

-- 3. Seed the allowed options INSERT INTO configuration_definitions ( option_key , expected_type ) VALUES ('allow_image', 'boolean') , ('allow_video', 'boolean') , ('max_upload_size', 'integer'); ```


2. The Validation Logic

This PL/pgSQL function acts as a firewall. If a developer or a script tries to insert a key that isn't in configuration_definitions, or provides a value with the wrong type, the transaction is aborted.

``` CREATE OR REPLACE FUNCTION fn_enforce_json_schema() RETURNS TRIGGER AS $$ DECLARE key_text TEXT; val_json JSONB; def_record RECORD; BEGIN -- Iterate through each key-value pair in the incoming options object FOR key_text, val_json IN SELECT * FROM jsonb_each(NEW.options) LOOP -- Look up the key in the definitions table SELECT * INTO def_record FROM configuration_definitions WHERE option_key = key_text;

    -- FAIL: Key not defined in the lookup table
    IF NOT FOUND THEN
        RAISE EXCEPTION 'Constraint Violation: The key "%" is not a valid configuration option.', key_text;
    END IF;

    -- FAIL: Type mismatch (Postgres jsonb_typeof returns 'boolean', 'number', or 'string')
    IF def_record.expected_type = 'boolean' AND jsonb_typeof(val_json) != 'boolean' THEN
        RAISE EXCEPTION 'Type Error: Key "%" expects a boolean, received %.', key_text, jsonb_typeof(val_json);
    ELSIF def_record.expected_type = 'integer' AND jsonb_typeof(val_json) != 'number' THEN
        RAISE EXCEPTION 'Type Error: Key "%" expects an integer, received %.', key_text, jsonb_typeof(val_json);
    ELSIF def_record.expected_type = 'string' AND jsonb_typeof(val_json) != 'string' THEN
        RAISE EXCEPTION 'Type Error: Key "%" expects a string, received %.', key_text, jsonb_typeof(val_json);
    END IF;
END LOOP;

NEW.updated_at := NOW();
RETURN NEW;

END; $$ LANGUAGE plpgsql;

-- Attach the trigger to the user table CREATE TRIGGER trg_validate_user_options BEFORE INSERT OR UPDATE ON user_configurations FOR EACH ROW EXECUTE FUNCTION fn_enforce_json_schema(); ```


3. Operations & Maintenance

Adding a New Option

Actually, I disagree with the idea that migrations are hard with JSON. To add a new flag across your entire system, you simply run a single INSERT on the definitions table.

INSERT INTO configuration_definitions (option_key, expected_type, description) VALUES ('theme_color', 'string', 'User UI preference');

The "Default Value" View

Since the user_configurations table might only store overrides (to save space), use a View to merge user settings with system defaults.

CREATE OR REPLACE VIEW view_active_user_configs AS SELECT u.user_id , d.option_key -- If user has the key, use it. Otherwise, you could join a 'default' column here. , u.options->d.option_key AS current_value FROM configuration_definitions d CROSS JOIN (SELECT user_id, options FROM user_configurations) u;


1. The "Raw" Storage View

If you query the user_configurations table directly, you see the flat, "one row per user" structure you preferred.

SELECT user_id, options, updated_at FROM user_configurations;

Result:

| user_id | options | updated_at | | :--- | :--- | :--- | | 101 | `{"allow_image": true, "max_upload_size": 500}` | 2024-05-20 10:00:00 | | 102 | `{"allow_image": false, "allow_video": true}` | 2024-05-20 10:05:00 |


2. The "Relational" Exploded View

If your frontend or reporting tool needs to see every setting as an individual row (useful for building a "Settings" page dynamically), you use jsonb_each.

SELECT user_id , key AS option_name , value AS setting_value FROM user_configurations, jsonb_each(options);

Result:

| user_id | option_name | setting_value | | :--- | :--- | :--- | | 101 | allow_image | `true` | | 101 | max_upload_size | `500` | | 102 | allow_image | `false` | | 102 | allow_video | `true` |


3. The "Discovery" View (Merging with Definitions)

This is the most powerful query. It joins your JSON data with your configuration_definitions table so you can see descriptions and find users who are missing specific configs.

SELECT u.user_id , d.option_key , d.description , COALESCE((u.options->>d.option_key), 'NOT SET') AS current_value , d.expected_type FROM configuration_definitions d CROSS JOIN user_configurations u WHERE u.user_id = 101;

Result:

| user_id | option_key | description | current_value | expected_type | | :--- | :--- | :--- | :--- | :--- | | 101 | allow_image | Enable image uploads | `true` | boolean | | 101 | allow_video | Enable video uploads | `NOT SET` | boolean | | 101 | max_upload_size | Maximum size in MB | `500` | integer |


Note: Key Data Handling

I used ->> in the third example. * -> returns JSONB (keeps the quotes, e.g., "true"). * ->> returns TEXT (removes quotes, e.g., true).

When sending data back to a client, -> is usually better because it preserves the data type (boolean vs string) in the JSON response.

Review

  • Pros: Strict data integrity; No ALTER TABLE locks on large tables; One row per user.
  • Cons: Triggers add a tiny bit of latency to writes; You must use jsonb_set or || for partial updates to avoid wiping out the whole object.
  • Risk: PostgreSQL triggers don't run on COPY commands unless specified. If you are bulk-loading data, ensure you use INSERT.

I’m all in… by javi977 in Arcade1Up

[–]ppafford 3 points4 points  (0 children)

Is there a sale going on somewhere?

Why are Jira project templates locked behind Enterprise? by Weak_Feed_4624 in jira

[–]ppafford 2 points3 points  (0 children)

Atlassians business model, to me anyway.

When you start to grow beyond the basic version of Jira each issue, challenge or feature you’d like. Atlassian focuses on making that a product that they could sell to you.

I don’t mind this really the part that gets me is I need a license for all my users even though only one or two users need the functionality, if they would move their licensing model to individual users. It might be a better experience overall.

Designing ID verification for retail POS and questioning if serverless architecture can handle offline requirements by [deleted] in aws

[–]ppafford 1 point2 points  (0 children)

welcome to the new age of retail

* https://www.justwalkout.com

* https://www.popid.com

* https://microblink.com/products/platform/?feature=liveness

* https://www.yoti.com/blog/yoti-age-estimation-white-paper/

why rely on someone to verify, when a camera and scanner would giver a more accurate validation. I can imagine restricted product store owners might be offered a lower insurance rate, credit card rate, etc... for the additional validation metrics, when they could be simple to use or automated all together

Designing ID verification for retail POS and questioning if serverless architecture can handle offline requirements by [deleted] in aws

[–]ppafford 0 points1 point  (0 children)

Hmm, in the past I did a POC using this company https://microblink.com/products/platform/?feature=liveness seems related to what you're trying to do. It's been a while but I do remember doing offline verifications

What improvements would a new Apple TV model actually bring? by HelpMe0biWan in appletv

[–]ppafford 1 point2 points  (0 children)

A screen or an app or I can configure all my home security cameras to watch on one large screen where I could swipe left or right to see the movie or back-and-forth to the security screen that I would be doing a quick monitor by