603 karma · joined Sep 13, 2017 (9y ago) · 435 submissions
comment 8y ago · link · parent
Not sure about the vowel sounds, I found those all reasonably trivial to distinguish.
https://mkdict.net/results?query=te%CC%82&page=1&q_type=tw&r...
If you click on the "+" button, there's a voice recording of how to pronounce it. It's from the Taiwanese Ministry of Education. To me it sounds much more like "day" than "tea".
comment 8y ago · link · parent
It doesn't feel like a microsoft product at all. Nothing like Visual Studio.
comment 8y ago · link · parent
I'd love to hear if others have tried using a state machine.
comment 8y ago · link · parent
comment 8y ago · link · parent
I don't find myself scribbling down mathematical equations when doing things like chaining promises in javascript or transforming sequences with LINQ or marking fields as const. I realise functional programming can go in very different directions to things less mundane, but the general principle of avoiding side effects has been a huge win for me when programming in any language, even C++. It's just easier to debug or write something when you can fix some constraints, ie "this method is referentially transparent".
Those are pretty low hanging fruit, but they help a lot.
comment 8y ago · link · parent
CouchDB actually solves that problem really well IMO. You upload a validation function in javascript to the database that will validate every document that comes in. I wonder if the same thing can't be done with trigger functions in postgres.
comment 8y ago · link · parent
In any real world system I've worked there are always entities that are purely self contained, but are represented by many different database tables. When they're saved, the entity is decomposed into its constituent parts and written to those tables. When they're retrieved, those tables are joined together to re-create the entity we care about. And that's all that ever happens, it's just serialised and de-serialised.
Isn't it premature optimisation to normalise that entity right out of the gate? Why not stuff it in a JSONB column. When - and only when - you find yourself needing to dig inside of it for queries in other parts of the system, then you normalize it.
comment 8y ago · link · parent
We can dislike it, but we need to reconcile it.
comment 9y ago · link · parent
It's interesting to me how Ada takes the approach of blending types and run time contracts. In most languages it would be two different things - a function that takes int, then a contract or assert that handles the value.
comment 9y ago · link · parent
The idea seems promising. If I'm not mistaken it would let you statically declare that an integer had to be between values X and Y, for example.