HackerTrans
TopNewTrendsCommentsPastAskShowJobs

nathane280

no profile record

comments

nathane280
·hace 10 meses·discuss
This is a neat topic and love the format so far.

I’m curious to get your thoughts on the long-term future of the intercontinental submarine cables given advances in cheap high-bandwidth satellites, as proven out by SpaceX. In 100 years, are we still maintaining physical fiber across such distances? And is there a role and/or benefit of data centers in space?

I have a long drive coming up, will have to finish this and come back with more specific thoughts.
nathane280
·hace 11 meses·discuss
For the lazy:

### Reduce Cognitive Load By:

*1. Simplify Conditionals*

``` // High cognitive load if val > someConstant && (condition2 || condition3) && (condition4 && !condition5)

// Low cognitive load isValid = val > someConstant isAllowed = condition2 || condition3 isSecure = condition4 && !condition5 if isValid && isAllowed && isSecure ```

*2. Use Early Returns*

``` // Nested ifs if isValid { if isSecure { doStuff() } }

// Early returns if !isValid { return } if !isSecure { return } doStuff() // Happy path is clear ```

*3. Prefer Deep Modules*

- *Deep module*: Simple interface, complex implementation (e.g., UNIX I/O with 5 methods) - *Shallow module*: Complex interface for simple functionality - Few deep classes > Many shallow classes

*4. Use Self-Describing Values*

``` // Numeric codes requiring mental mapping 401 // expired token? 403 // insufficient access?

// Self-describing { "code": "jwt_has_expired" } ```

*5. Apply DRY Carefully*

- Don't create abstractions too early - Avoid tight coupling between unrelated components

### Avoid These Anti-Patterns:

*1. Inheritance Chains*

``` AdminController extends UserController extends GuestController extends BaseController Use composition instead ```

*2. Too Many Layers*

- Unnecessary abstraction layers add indirection, not simplicity - Only add abstractions when you need actual need to

*3. Framework Magic*

- Keep business logic framework-agnostic - Use frameworks as libraries, not containers for your logic - New developers shouldn't need months to learn framework "magic"
nathane280
·hace 11 meses·discuss
brb adding this to my CLAUDE.md
nathane280
·hace 3 años·discuss
I got deep into gardening during the pandemic, and wanted to live off the garden.... with succession sowing and varied season per locale, it's actually very hard to figure out how much to plant, when, and for how long. I actually built http://raddish.app/ to help me figure it all out.

I am in full agreement the thekevan -- I would take excepted yield and multiple by .75. Things just don't work out very well at least 25% of the time.