Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sgarland
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
541.
▲
by
sgarland
1y ago
You don’t need a DBA for any of those, you need someone who can read some docs. It’s not witchcraft.
542.
▲
by
sgarland
1y ago
Then you back off, and go back to first principles. Create the minimum example of the problem, and as a sibling comment mentioned, break it down to its constituent parts and observe what happens in each.
543.
▲
by
sgarland
1y ago
Considering that all implementations I’m aware of have evaluated that expression to NULL, this isn’t a very pragmatic example. NULL is unknown, and every type has it as a possibility. The SQL2003 changes were more about how constraints shou
544.
▲
by
sgarland
1y ago
Parent made it sound - to me - that you put an input in and hope for the best. If you understand the operators, you can quite confidently predict an output given an input.
545.
▲
by
sgarland
1y ago
Frankly, this is terrible advice. If you’re not designing your data model around the language it’s going to be queried in, how do you expect to get decent performance out of the database? Also, in no way does SQL hide anything - it’s a decl
546.
▲
by
sgarland
1y ago
GitLab’s CI is miles better than GitHub’s. I think it’s telling that every place I’ve been at that used GH also used some 3rd party CI tool (which also sucked, but that’s par for the course), whereas places with GL seemed to manage with its
547.
▲
by
sgarland
1y ago
Not necessarily. Sharp tools are often sharp because someone needs it. I’m not a frontend dev, and have next to zero experience with anything beyond jQuery, but an analogy is shell. Bash (and zsh, though I find some of its syntactic sugar n
548.
▲
by
sgarland
1y ago
You say that, until you’re one of the unlucky people who discover that cloud DBs are just cloud VMs in disguise, and those cloud VMs have network throughput limits. A fun part of a retro at my company last year was me explaining to a team,
549.
▲
by
sgarland
1y ago
Glad it’s not just me having faulty memory. I was reading a file - not a PR, just a file in our codebase - that was pretty large, like 15K lines, and it was dogshit slow. I was astonished, and thought I had remembered it being much snappier
550.
▲
by
sgarland
1y ago
You can do the same thing in MySQL, though its hash partition selection algorithm is far simpler: MOD(expr, N), where expr is your chosen expression on a given column, e.g. TO_DAYS(created_at), and N is the number of partitions you specifie
551.
▲
by
sgarland
1y ago
This varies wildly with the subject, and the degree of inaccuracy. If you say, “hash maps are generally O(1), and are a great default choice,” you’re not that wrong (subjectivity aside). If you say, “storing integers as strings guarantees
552.
▲
by
sgarland
1y ago
As a semi-toxic semi-expert, I think one of the main reasons there is precious little blog-sized content that goes deep is that it’s hard to do. Most subjects, in or out of tech, can go incredibly deep on many, many points. The more detail
553.
▲
by
sgarland
1y ago
I’d rather have the INSERT fail than to discover it later when I’m trying to do math with a string, but to each their own.
554.
▲
by
sgarland
1y ago
The stunning inefficiency of storing the key with every value, even without any GC-specific issues, should give one pause.
555.
▲
by
sgarland
1y ago
Yes, yes it does [0]. I fully understand the need for backwards-compatibility given the sheer number of SQLite installations, I find their attitude towards flexible types [1] appalling. At least they’ve added STRICT. Similarly, the fact tha
556.
▲
by
sgarland
1y ago
My memory must be faulty, then, because I was mostly building it on an Athlon XP 2000+, which is definitely a few generations newer than a Pentium Pro. I’m probably thinking of various other packages, since at the time I was all-in on Gento
557.
▲
by
sgarland
1y ago
Tangential: TIL you can compile the Linux kernel in < 1 minute (on top-spec hardware). Seems it’s been a while since I’ve done that, because I remember it being more like an hour or more.
558.
▲
by
sgarland
1y ago
mysqldump --nodata pg_dump --schema-only Read tool docs for other options, like restricting to a specific DB or table, but that’s the basic gist of it.
559.
▲
by
sgarland
1y ago
When I replied, the only thing the comment said was “yeah no.” I was agreeing that __del__ is fraught with peril. Reading: cyclic GC, yes, the section I linked explicitly discusses that problem, and how it’s solved.
560.
▲
by
sgarland
1y ago
I love Python, but the sheer number of caveats and warnings for __del__ makes me question if this person has ever read the docs [0]. My favorite WTF: > It is possible (though not recommended!) for the __del__() method to postpone destruc
561.
▲
by
sgarland
1y ago
Not over 50, but yes. People are deathly afraid of using RDBMS features, like triggers, events, etc.
562.
▲
by
sgarland
1y ago
So now you have to launch a special debug instance of your app that doesn't accept prod traffic, but can still connect to the prod DB, so you can shell into it and call the function? You can and should store SQL queries in VCS. Everyon
563.
▲
by
sgarland
1y ago
Tuple Variables and their Range? I don’t think I see what you see. From 3.3: RANGE PART P GET W (P.P#,P.PNAME,P.QOH):(P.QOH<25)
564.
▲
by
sgarland
1y ago
To clarify, I mean you can’t do this: SELECT id AS foo FROM MyTable WHERE foo = 1; Similarly, you can’t do this: SELECT id FROM MyTable WHERE id = MAX(id); Because in both cases, when the WHERE predicate is
565.
▲
by
sgarland
1y ago
Not liking auto-complete is a far cry from nano. I like syntax highlighting, I like on-the-fly type checking, I like linters, etc. I use Neovim and tmux because I value snappy performance, and never having to leave the keyboard. The reason
566.
▲
by
sgarland
1y ago
What section did you see this? I see GET (i.e. SELECT) first.
567.
▲
by
sgarland
1y ago
I use stdlib whenever possible specifically because it’s huge, well-tested, and eliminates dependencies. I don’t know all of its API, but I do read the docs periodically (not all of them, but I try to re-read modules I use a lot, and at lea
568.
▲
by
sgarland
1y ago
Unless I am grossly misunderstanding your notation, I have always seen RA written with the operator first. Some examples: https://cs186berkeley.net/notes/note6/ https://web.wlu.ca/science/phys
569.
▲
by
sgarland
1y ago
I was explaining why it is the way that it is. If you'd like your own version of a parser, here's Postgres' [0]. Personally, I really like SQL's syntax and find that it makes sense when reading it. [0]: https:/
570.
▲
by
sgarland
1y ago
How else do you read what they wrote?
More ›