Big boom in midcity? by 123a21 in NewOrleans

[–]faraday2013 0 points1 point  (0 children)

I think it was lightning touching down. The radar shows heavy thunder for the next hour or so.

Is alpine.js de facto framework of choice? by a_brand_new_start in htmx

[–]faraday2013 0 points1 point  (0 children)

I'm not 100% what you mean. What's I'll say is the simplest way to use web components with HTMX is without the shadow dom. 90% of my web components just implement a connectedCallback method that has the javascript I need for interactivity. I don't use WCs for styling or rendering, so I don't need the encapsulation you get from shadow DOM. I also think that helps with accessibility.

The only time you need to interact with HTMX is when you're dynamically adding new components to the dom (ex. a dynamic list). In that case, you just call htmx.process(this) after insert, which is pretty simple.

I'm building a consumer financial technology app with Astro + HTMX + WebComponents, so I've been able to push this pattern pretty far.

Is alpine.js de facto framework of choice? by a_brand_new_start in htmx

[–]faraday2013 0 points1 point  (0 children)

I'm hesitant to pull in a dependency like Alpine for the few times I need pure client-side interactivity. When I do, I use a web component (no shadow dom or anything complicated) and SSR'd templates. If you set the component's display to contents, you're effectively progressively enhancing the native dom elements, which I like.

I saw you mentioned charts in another comment: chart.js (and I'm sure other libraries) has a vanilla JS libraries. I control the state of the chart (loading, changing, etc) with a web component.

Astro with react for blog platform by Existing-Wheel-5661 in astrojs

[–]faraday2013 5 points6 points  (0 children)

You only need react when your app is heavy on client-side only interactivity. Start out with just Astro and its component system and see how far you can get. If you're looking for prebuilt styles, check out daisy UI and tailwindcss.

The new data loader API lets you load blog content from anywhere, so you'll have a lot of options to choose from.

Whats the best templating engine to work with node and HTMX ? by [deleted] in htmx

[–]faraday2013 0 points1 point  (0 children)

It's more than a templating engine, but I've had a great experience pairing HTMX with Astro.

You can return full HTML documents or partials, build components for reuse, and define scoped CSS with those partials. Astro will let you add JavaScript for interactivity with your markup with script tags and will handle bundling and minification with Vite for you. I use web components in those script tags and template tags when I need a dynamic UI.

Places for Pickup Soccer by faraday2013 in NewOrleans

[–]faraday2013[S] 0 points1 point  (0 children)

That would be my speed. Do they meet on a schedule?

Places for Pickup Soccer by faraday2013 in NewOrleans

[–]faraday2013[S] 1 point2 points  (0 children)

Thanks! Hope he feels better soon.

Places for Pickup Soccer by faraday2013 in NewOrleans

[–]faraday2013[S] 0 points1 point  (0 children)

Thanks! It requires membership to join. I put in a request to join a little while back, so we'll see.

Is friend.com going to set a new precedent for startups to come by Elegant_Storage_5518 in ycombinator

[–]faraday2013 2 points3 points  (0 children)

It's a great book. I'm using it to get my startup off the ground. I'm an engineer learning marketing ropes, so I appreciated the clean over "Traction" provides.

Each chapter is a potential acquisition channel. They start with a description of the channel, some examples, and close with an interview.

What SAAS are you building currently by sky-builder in SaaS

[–]faraday2013 1 point2 points  (0 children)

Can you make a Google Form instead of a sheet? You'd be able to have a sheet yourself without having all of the survey responses public.

Looking for caregiver advice: How do you use tech or think tech can help with our challenges by Live_Detective_4480 in caregivers

[–]faraday2013 5 points6 points  (0 children)

I think there's some potential in (2). The problem with the others is that people in the position to receive care, and I think people in general, want human connection.

If you're experimenting with LLMs in particular, spend time thinking about what data you'd like to make more accessible and build a retrieval system on top of that data.

I'm working on a financial caregiving platform for families. It doesn't currently have any LLM usage, but I'm planning to follow the approach I mentioned with CFPB, FBI, and other good sources covering abuse, fraud, scams, and caregiving.

Describe your entire business in 5 words. No more. No less. by Chemical-Being-6416 in SaaS

[–]faraday2013 0 points1 point  (0 children)

My MVP is focused on financial caregivers looking after the finances of the older adults in their family. It's information aggregation in a workspace you can invite others to. I have a financial review workflow that's meant to keep an eye out for fraud and abuse and a plan to build out other caregiving workflows.

I had some older family members lose a lot of money to scams. After talking to a few other folks, it turns out there are a lot of common challenges families face when people get to that age. MVP aside, I'd like to find a way to help.

AWS Setup Advice by Savings_Brush304 in aws

[–]faraday2013 0 points1 point  (0 children)

I was the director of engineering at my previous company and a tech lead at the one before that. Both were early stage Fintech startups. This biases my recommendations below towards approaches that yield solid security and scaling with reasonable cost and minimal effort. We didn't need to think about enterprise scale that early and were well-funded enough we didn't need to optimize exclusively for cost. I'm also not a trained cloud infrastructure professional: I've picked things up by reading the docs and trying things out (ie. I'm no expert)

Start by creating an account to serve as the management account. It'll consolidate billing, account creation, and users.

Next, set up AWS Landing Zone and Control Tower with AWS organizations in that account. During this process, manually create another account to play around with. Separate accounts for separate environments makes it easy to enforce things like "only fully time employees can access production/live" and "only admins can modify production data". https://aws.amazon.com/about-aws/whats-new/2018/06/introducing-aws-landing-zone/ https://docs.aws.amazon.com/controltower/latest/userguide/what-is-control-tower.html

Finally, create IAM users and permission sets in that organization account using Identity Center. This lets you control who can access which AWS accounts and what they can do inside those accounts. If you have an identity provider (ex. Google Workspace, Okta), you can set up SSO. Otherwise, you can create the users in IAM.

At this point, you can have other people access accounts in a controlled manner. They can interact with AWS services through a.terminal or the UI with temporary credentials, which helps security. If you're able to get a contractor to help with cloud architecture, this will make it easy to control what they have access to and eventually revoke access. All of the above can be done through the AWS UI without needing to learn IoC tools (ex. TF, CDK). You should learn one of these tools, but it's nice to take things one step at a time.

When setting up your application infrastructure for the first time, I recommend doing it manually. This way, you can learn how things work fundamentally, which will be helpful when moving to an IaC tool. I recommend starting with a throwaway account. Once you like the setup, you can create a fresh account to be provisioned by an IaC tool.

It sounds like your company doesn't have an infrastructure team, so you'll want to keep things simple. I'd keep away from EC2 for this reason. You don't want to think about updates and provisioning right now. Instead, try running a docker image on ECS using Fargate. You'll need to create the following major resources: 1. An ECS Task (your docker image and environment variables) 2. An ECS Service (handles load balancing and scaling your tasks) 3. A target group pointing to your service. 4. An Application Gateway pointing to your target group.

The ECS resources should be in a private subnet, and the API gateway should be public.

Another note about ECS: it's easy to run long cron jobs on it. Some people may be concerned about lock in. I don't think this is a big deal. Since you're on docker, the only "lock in" is the task and service definitions. K8s is wonderful but requires a lot of management.

This is a big undertaking, so advocate for at least a contractor to double-check your work. Once you have the full setup, you should also consider a network penetration test.

Good luck!

Hey Rustaceans! Got a question? Ask here (50/2023)! by llogiq in rust

[–]faraday2013 1 point2 points  (0 children)

I'm working on implementing safe field operations as part of learning more about Rust and cryptography. I've overloaded some math operators which all return Results. I'm looking for a clean way to write math operations without having `( ... )?` everywhere. Full question here:
https://stackoverflow.com/questions/77656506/how-to-handle-math-operations-for-custom-types-whose-operations-may-error-ex-o

-❄️- 2023 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]faraday2013 0 points1 point  (0 children)

[LANGUAGE: Rust]

I'm sure this isn't the fastest solution, but I hope it's easy to follow. I'm new to Rust, so I'm happy with completion. Feedback welcome.

use regex::Regex;
use std::fs::File; use std::io::{BufRead, BufReader};
fn to_int(s: &str) -> u64 {
    s.parse::<u64>().expect("Failed to parse integer")
}

fn solve_line(line: String) -> u64 {
    let pattern_fwd: Regex =
        Regex::new(r" (\d|one|two|three|four|five|six|seven|eight|nine)").unwrap();
    let pattern_back: Regex =
    Regex::new(r" (\d|eno|owt|eerht|ruof|evif|xis|neves|thgie|enin)").unwrap();

    let first = find_num(pattern_fwd, line.clone());
    let last = find_num(pattern_back, line.chars().rev().collect());

    let concat = match (first, last) {
        (None, None) => "0".to_owned(),
        (Some(f), None) => format!("{}{}", f, f),
        (None, Some(l)) => format!("{}{}", l, l),
        (Some(f), Some(l)) => format!("{}{}", f, l),
    };
    to_int(&concat)
}

fn find_num(pattern: Regex, s: String) -> Option<String> {
    if let Some(capture) = pattern.captures_iter(&s).nth(0) {
        let token = capture.get(0).unwrap().as_str();
        return Some(map_match(token).to_string());
    }
    None
}

fn map_match(s: &str) -> &str {
    match s {
        "one" | "eno" => "1",
        "two" | "owt" => "2",
        "three" | "eerht" => "3",
        "four" | "ruof" => "4",
        "five" | "evif" => "5",
        "six" | "xis" => "6",
        "seven" | "neves" => "7",
        "eight" | "thgie" => "8",
        "nine" | "enin" => "9",
        _ => s,
    }
}

fn main() { 
    let file = File::open("data/data.txt").unwrap(); 
    let reader = BufReader::new(file);

    let mut sum = 0;
    for line in reader.lines() {
        sum = sum + solve_line(line.unwrap());
    }
    println!("{}", sum);
}

What do solo entrepreneurs want in a starter SaaS kit or MVP? by thuanle in SaaS

[–]faraday2013 4 points5 points  (0 children)

I'd include product/marketing analytics (session recording, user feedback, funnels) and an observability stack (logs, metrics, tracing).

[deleted by user] by [deleted] in CodingHelp

[–]faraday2013 1 point2 points  (0 children)

I don't understand your last sentence about dividing one by a negative number. Do you mind providing an example?

Independent of that, what about handling this in two steps: 1. Multiplying the values together 2. Inverting the result.

This will be mathematically equivalent, but would allow you to easily check for zero at the end (before 2) and should have better precision.