Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
branko_d
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
181.
▲
by
branko_d
3y ago
> the screen of your app is also a source of asynchrony Exactly! That’s why wrapping a “dialog” or “form” or “screen” into a Promise is such a powerful technique. When the user closes the dialog, the promise resolves with a result (e.g.
182.
▲
The Biggest Asset Bubble in History
(awealthofcommonsense.com)
2 points
by
branko_d
3y ago
|
0 comments
183.
▲
by
branko_d
3y ago
> memory is 10+ times slower than the CPU The difference is much greater than that - one uncached RAM access can take hundreds of CPU cycles.
184.
▲
by
branko_d
3y ago
I’m afraid htmlx might be repeating the same mistake that CORBA and DCOM made decades ago: pretending that latency doesn’t matter. Yes you could make a CORBA or DCOM object almost indistinguishable from a local object, except for the latenc
185.
▲
by
branko_d
3y ago
But... but... corporation are people! Aren’t they? Mitt Romney, have you lied to me??
186.
▲
by
branko_d
3y ago
https://use-the-index-luke.com/
187.
▲
by
branko_d
3y ago
For what it’s worth, we implement tests in the client language (C# in our case) and just call the stored procedures/views (in SQL Server) as any client would. Most tests are written so that they rollback after execution, and to tolerat
188.
▲
by
branko_d
3y ago
On the other hand, there are good reasons to put logic in the database, chiefly: - Performance - Consistency - Security Basically, you want to construct a public API in the form of stored procedures, functions and views, and then funnel all
189.
▲
by
branko_d
4y ago
> Consider a beefy AF bare metal SQL server, see how far that gets you. Quite far, possibly to millions of users. Case in point: StackOverflow runs on SQL Server.
190.
▲
by
branko_d
4y ago
The same way we do it with humans - by observing the end result.
191.
▲
by
branko_d
4y ago
> if our brains are so sophisticated that they make natural intelligence possible, then we should be so intelligent that we would have the means to understand them It may well be that building a brain is easier than understanding it.
192.
▲
by
branko_d
4y ago
I was skeptical about the whole “AI thing” for a long time, but have lately realized this was mostly due to my own ignorance. The following video has opened my mind. If this is not intelligence, then I don’t know what is… ChatGPT - Imagine
193.
▲
by
branko_d
4y ago
> route change, component "mounting", data fetching... This should really be: route change -> data fetching -> rendering After the data is fetched, it should just be assigned to a state somewhere, and the React should, we
194.
▲
by
branko_d
4y ago
MobX is fantastic! But you do have to change your philosophy quite a bit compared to what you would do in vanilla React - namely you need to displace most of your state management to the outside of the components. Once you do that, React be
195.
▲
by
branko_d
4y ago
> HOC's have a bunch of downsides, imo the most obvious one is the props; you need to pass the previous props, and merge in the new ones. Render props (aka. "function as children") are much more free form than HOCs - they
196.
▲
by
branko_d
4y ago
Most importantly: hooks make functions that look pure actually impure. Before hooks, if you wanted to call a functional React component, you could reasonably assume it's pure - it depends just on props and nothing else. Only when tryin
197.
▲
by
branko_d
4y ago
From https://en.wikipedia.org/wiki/Pure_function : "the function return values are identical for identical arguments" . The whole point of pure function is that the caller can understand its dependencies with
198.
▲
Singapore software vendor says own hardware in colo costs $400M less than cloud
(theregister.com)
205 points
by
branko_d
4y ago
|
197 comments
199.
▲
by
branko_d
4y ago
> hooks form part of the input to the hook/render function. They are input, but they are not input parameters. A function is pure if it returns same result for same input parameters. Hooks make it possible to return different result
200.
▲
by
branko_d
4y ago
I fully agree that impure views are a path to madness, but you don’t have to abandon React to have pure views. React components can, and I would argue in vast majority of cases should, be pure functions. You just need to displace state mana
201.
▲
by
branko_d
4y ago
Dunno… After spending many hours in Cities in Motion, and even more in Cities in Motion 2, Cities: Skylines just didn’t click for me somehow. It was kind of barren, with awkward road building (compared to CIM2), and just kind of restricting
202.
▲
by
branko_d
4y ago
There is a difference between "monitor speaker" and "speaker built-into the monitor". The parent might have had the former in mind. From https://en.wikipedia.org/wiki/Studio_monitor : Among audio en
203.
▲
by
branko_d
4y ago
You return a different result (i.e. the Promise resolves to a different result). The calling code can then decide what to do with it.
204.
▲
by
branko_d
4y ago
There is another use case for async in client-side JavaScript that often gets overlooked: modeling the flow of UI. So, let's say you need to show a "dialog" which, upon exit, should execute a piece of code (e.g. to show anoth
205.
▲
by
branko_d
4y ago
I always wondered why Apple can't implement something similar to Steam refunds. Quote from https://store.steampowered.com/steam_refunds : You can request a refund for nearly any purchase on Steam—for any reason. Maybe
206.
▲
Project Valhalla: A look inside Java’s epic refactor
(infoworld.com)
4 points
by
branko_d
4y ago
|
0 comments
207.
▲
by
branko_d
4y ago
Whatever the theoretical justification for Citizens United might have been, the practical effect is that it weakens the free speech.
208.
▲
by
branko_d
4y ago
I can second EVO 850 SATA. Mine has been rock-solid since 2015.
209.
▲
by
branko_d
4y ago
There are three kinds of debate: - Debate where the goal is to learn. - Debate where the goal is to persuade your opponent. - Debate where the goal is to persuade the audience. The first is good for your soul, the second for you ego and the
210.
▲
by
branko_d
4y ago
But careful! In the concurrent environment, separate queries may need a higher transaction isolation level to mean the same thing as one query.
More ›