HNHacker News
TopNewBestAskShowJobs

uhoh-itsmaciek

516 karma · joined April 27, 2016

submissionscomments
uhoh-itsmaciek··on Redis 6.0 GA
>So what changed between RC1 and today, other than stability?

>...

That's quite the list of changes after a release candidate...

uhoh-itsmaciek··on Things I wished more developers knew about databases
Which ORMs are bad for queries? Most popular ORMs these days expose most of sql in a language-specific DSL (and some allow you to splice in bits of raw sql in a semi-structured way as an escape hatch). Sure, you still need to learn to "think in sql", to use these effectively, but the ORM has not been the problem for a long time in most languages.
uhoh-itsmaciek··on Things I wished more developers knew about databases
Triggers are a great option in many situations.
uhoh-itsmaciek··on Restoring React reducer state across browser sessions
>1. Why marry the state stored in the database with any particular implementation of the front-end?

They seem to have only one front-end implementation to worry about for now, and the client state is most likely pretty generic (they don't really make this clear, but I can't think of anything react-specific you'd want to store in a reducer state).

uhoh-itsmaciek··on Ride down into JavaScript dependency hell
Yes, exactly. I used to think isolating dependencies like npm/yarn do, where each package has its own copy of its own dependency tree (ignoring deduping), was crazy, and potential conflicts should be a forcing function to encourage you to minimize dependencies in the first place. But then I started using these systems and it's by far the least time I've ever spent worrying about deps. There are downsides to this and how it encourages dependency proliferation, and I still believe in minimizing your dependencies, but it's the least bad system I've seen.
uhoh-itsmaciek··on Introduction to Hacking PostgreSQL (2007)
Right. Plus (which you sort of hint at under Maintenance), packaging of more elaborate extensions like PostGIS was a nightmare, especially with respect to upgrades (the situation is better now). And under Security, it's not just worrying about users trying to escape your sandbox: it's also making sure they don't leave themselves open to exploits from their users.
uhoh-itsmaciek··on PostgreSQL Schema Design
You can create databases via sql [1]. It's just that after you run the statement, you're still connected to the old database and you need to disconnect in order to connect to the new one.

[1]: https://www.postgresql.org/docs/current/sql-createdatabase.h...

uhoh-itsmaciek··on PostgreSQL Schema Design
You're right that it's probably not much harder, but the current Postgres role is tied to the session, so you'll either be limited in the number of concurrent users (Postgres does not do great with high connection counts) or juggling SET ROLE around your connection pooling (which sounds dicey plus is just a lot of extra statements).
uhoh-itsmaciek··on PostgreSQL Schema Design
>Warning: Be very careful with logging, while we encrypt our passwords here it may be possible that in a query or server log the password will be recorded in plain text!

I was glad to see this noted, but surprised this is the extent of the advice and that sending passwords to the database in plaintext is still recommended. Are there more fleshed out best practices around avoiding logging pitfalls of doing this?

uhoh-itsmaciek··on PostgreSQL Schema Design
You got some good answers already, but one thing to note is that a Postgres connection is always to a single database. So you can query across multiple schemas from the same connection, but not multiple databases.
uhoh-itsmaciek··on Ask HN: What projects are you working on now?
Cool, just added six-string dobro open D and open G (right now calling it "standard" because that's most common in bluegrass and I seem to have a bug that every instrument right now needs a tuning called "standard" but can't find it).
uhoh-itsmaciek··on Ask HN: What projects are you working on now?
Thanks! I'll look up those other guitar tunings and add them. It's pretty trivial to add new ones--like you guessed, I walk up each string and find the notes of the scale or chord. I forgot to mention this in the original post, but the project is actually open-source [1] (it's on the about page but probably should have noted it). Feel free to submit pull requests or file issues. The code is pretty much create-react-app + typescript.

>Also, the open G is not as I would expect, but I think the DGDGBD tuning is what people expect on guitar.

You mean it's not what you'd expect for dobro, right? I haven't really played guitar in years, but I think that's right for guitar. I'll add a dobro section now, I just need to find the actual octaves for the notes in the tunings you list. Adding new tunings is just a simple-change [2] (though I may need to adjust mobile layout for more than six strings). I can add pedal steel, too. I wanted to add banjo, as well, but need to figure out that fifth string.

[1]: https://github.com/uhoh-itsmaciek/fretboard.cool [2]: https://github.com/uhoh-itsmaciek/fretboard.cool/blob/master...

uhoh-itsmaciek··on Ask HN: What projects are you working on now?
Awesome, glad you're finding it useful!
uhoh-itsmaciek··on Ask HN: What projects are you working on now?
Nice! I was shooting for something that works better on a phone, but I really like how you tie chords to the scale. I'd like to do something like that, too, but in bluegrass, out-of-key chords like II and bVII are really important, too, and not sure how to make that work.

I also decided to show all the chord notes across the fretboard, rather than specific playable chord shapes. Both approaches are useful for different goals, but I wanted something that's more about leaning the fretboard than individual chords.

uhoh-itsmaciek··on Ask HN: What projects are you working on now?
I play bluegrass mandolin and I'm working on https://fretboard.cool to better understand scale and chords patterns across the neck. Guitar and ukulele are also supported. Very few chord and scale types are supported right now, but I plan to add more when I figure out how to integrate them without complicating the interface too much.
uhoh-itsmaciek··on Timeouts and cancellation for humans (2018)
Front-end code is a different beast, but this immediately reminded me of React's Context API: is you squint, it sort of looks like dynamic scope. It's also nestable, and since you can wrap the context provider in a custom component, you can have it consume the parent context (if any) and compose them however you like. Plus since accessing that context is explicit, you avoid the issue of dynamic scope being harder to reason about in program execution.

I wonder if there's a reasonable way to apply this approach to more general-purpose code.

uhoh-itsmaciek··on San Francisco bans public events holding more than 1,000 people
Not that I disagree, but how many stores, restaurants, and bars can afford to close for four weeks? And are they paying their employees during this time?
uhoh-itsmaciek··on Tips for the depressed
>It has been said that we are as far advanced in the understanding of depression at this moment as was the European conquest of the Americas when Columbus first set foot in the Bahamas in 1492.

Comparing the fight against mental illness to the genocide of native Americans is unfortunate.

uhoh-itsmaciek··on Handling Null Values in Postgres
Hey Jeff! Isn't it also incorrect because

  WHERE DATE_TRUNC('year', o.ts) = '2019-01-01'::timestamptz
will filter out customers without orders even before the HAVING (because DATE_TRUNC of NULL is NULL)? I mean, I guess you're still demonstrating the perils of NULL with that ;)
uhoh-itsmaciek··on Stop using Material Design text fields
Awkward but at least usable. The way the Material fields break with long or scaled label text is pretty bogus. That said, you're right: excessively long labels are a usability blemish worth avoiding, as long as the semantics of the field remain clear.
uhoh-itsmaciek··on I Want Off Mr. Golang's Wild Ride
Not to mention that sql.Result (the return value of Exec) has a LastInsertId() that's an int64, so if you're using uuids, you can't use that at all and have to call Query instead and manage generated IDs yourself.
uhoh-itsmaciek··on MIDI 2.0, first major overhaul to music interface standard from 1983
It's been kind of a headache in Firefox's WebMIDI support plans (since SysEx is sometimes used for firmware updates and it's hard to explain "this page may hack your keyboard" in a permission request dialog): https://github.com/mozilla/standards-positions/issues/58#iss...
uhoh-itsmaciek··on VVVVVV’s source code is now public, 10 year anniversary jam happening now
Same here. The only thing I can think of is variable hoisting, but I don't think that's annoying enough to prefer this other approach.
uhoh-itsmaciek··on Integrate PWAs into Native Sharing UIs with Workbox
Somewhat niche, but https://strummachine.com/app works great as a PWA.
uhoh-itsmaciek··on A Data Leak Exposed the Personal Information of over 3k Ring Users
If you hold sensitive customer data, you should idiot-proof your security, even if you can't help the better idiots. It's silly to even call these users idiots, when the service could implement several features to make them safer--whether or not they are idiots is totally beside the point. They're customers.
uhoh-itsmaciek··on The voice from our Nest camera threatened to steal our baby
I don't think the answer is to throw up our hands and say, "oh well, I guess security is fundamentally incompatible with usability in consumer electronics; caveat emptor is the best we can do." I concede there's a tension between security and usability (and that compromising on usability to achieve security makes your product less appealing), but we should demand that companies find better ways to design around that tension, instead of making the bare minimum concessions to security and adopting a "blame the user" mentality.
uhoh-itsmaciek··on The voice from our Nest camera threatened to steal our baby
Doesn't it? Compared to the nightmare described in the article?
uhoh-itsmaciek··on Four kinds of documentation
And how it's worse! It's extremely rare, but some projects do tell you, "If you need X, consider Project Y instead."
uhoh-itsmaciek··on New In Postgres 12: Generated Columns
Is that different from adding such columns in a view enriching the table?
uhoh-itsmaciek··on A Node.js log library that enables you to view logs in Chrome dev tools
Yep. I wrote a debug logger that could send messages to the browser console from the client, the backend's web process (via websocket), and the backend's background workers (via redis pubsub relayed to websocket). It was pretty tightly coupled to the architecture of the application, so it couldn't be used more generally like this library, but it was pretty simple and very handy for debugging some types of issues. It's worth investing a bit in dev ergonomics on your project: it can pay off in spades.
← PreviousPage 6 of 7Next →