HackerTrans
热门最新趋势评论往期问答秀出招聘

ericHosick

no profile record

提交

Slop Cop

awnist.com
252 分·作者 ericHosick·3个月前·160 评论

评论

ericHosick
·10个月前·讨论
Yes! Hopefully a language that supports code as data (homoiconicity).
ericHosick
·10个月前·讨论
> Anyone who claims that FSD doesn't work is flat out lying.

i've had "fsd" for years and basically never use it now. i just don't trust it.

anytime there is a new version update, i do try to have it drive from the house to the market (about 3 miles: two rights at stop signs, two rights and 1 left at stop lights) and there has never been a single time where i didn't have to take over at least once.

and maybe the problem is that i have had "fsd" while it was going through development. the trust is low from the many times it has tried to kill me. so, whenever it is on, there is nothing but stress. and so i'm more apt than not to take over when i see anything even minutely out of the ordinary.
ericHosick
·11个月前·讨论
don't mean to push the goalpost (didn't mention the following in the above post)

these functions can also be exposed in admin ui's making it easier for the general admin users/support users.

another very useful use case is when row level security (RLS) is enabled.
ericHosick
·11个月前·讨论
To help understand why a complex query with many joins comes back empty, I like to provide helper debug functions that builds the query step by step. Each block checks one prerequisite and tells the user what’s missing:

```sql FUNCTION debug_user(user_id):

  IF NOT (SELECT FROM user WHERE user.user_id = user_id) THEN
    -- user doesn’t exist
  END IF;

  IF NOT (SELECT FROM user
           JOIN user_addr ON user_addr.user_id = user.user_id
           WHERE user.user_id = user_id) THEN
    -- user has no address
  END IF;

  -- keep adding joins until you find the break
```

because when you have a query that involves 6 relations, and you don't get results, it is nice to know why.
ericHosick
·9年前·讨论
I grew up on his sci-fi books. The Mote in God's Eye, to me, is the best science fiction I've ever read.

Lucifer's Hammer was way up there and hit close to home (being in California and all).