Better HN
topnewbestaskshowjobs
Log inSign up

rudi-c

863 karma · joined Jul 11, 2014 (12y ago) · 75 submissions

Submissions

comment 2mo ago · link · parent

While the U.S. capricious immigration policy gives an opportunity for Canada, it only gives it one particular opportunity: that of hiring educated, high-potential, but inexperienced immigrant workers.

The thing about potential is that it needs to right environment to be realized. Canada still has two hurdles to create that environment:

- Access to capital, either in the form of risk-tolerant VC funding or established companies willing to invest significantly in R&D. Those are not quick to move over the border.

- A critical mass of _experienced_ talent. Entrepreneurs and high-agency ICs who've seen what it looks like to build a successful startup and capable of replicating it. Those don't have much incentive to move over the border either.

The U.S. has hundreds of startups that later became unicorns. The employees of those startups are typically the key members that drive the success of new ones. For Canada, the only name that easily comes to mind is Shopify.

comment 2mo ago · link · parent

In a related but less public way, I've found myself less motivated to write internal documentation at work. It feels like in a lot of cases, it'd be better for the reader to throw Claude at the codebase to explain things.

A separate document explaining how a system works can go out of date. While I'm quite good at highlighting the most important insights and non-obvious traits of a system, I'd still be guessing what the reader needs from my doc at the end of the day. Claude can answer questions based on what the reader is curious about and wants to learn.

Some types of document are still useful, namely higher-level directional or philosophical topics about the intention of a codebase. e.g. "we would like to eventually move X system to Rust for Y reason", "we chose mutable data structures over immutable in this part of the system because Z". But fewer than before.

comment 2mo ago · link · parent

On one hand, Shin Jinseo is an outlier player of this generation. On the other hand, the newest generation of new pros will have exclusively learned by using the AI to tell them what the best move is, so there's reason to believe that peak human level has yet to be reached.

comment 2mo ago · link · parent

While AlphaGo originally only had win rate as a metric, modern Go AIs have more knobs, including an evaluation of "complexity".

Just stating this off the top of my head so I could be misremembering, but I heard that the KataGo settings used were tweaked to favor complexity. This was most apparent in Game 1 which Shin Jinseo lost, where the AI had an unusual opening. However, the last game was quite plain leading me to wonder whether that setting was present in the last game (or at all).

comment 6mo ago · link · parent

Yes, I don't mean that it affects the present. Only sad in a nostalgia sense.

comment 6mo ago · link · parent

This is a lazy statement based on extremely vague handwaving about desktop v.s. web. It's not the 2010s anymore. Time to drop these generalities.

Users were migrating to us _from_ desktop applications. Collaboration was the key differentiator, but a less well known reason was that improved performance, including but not limited to the support of large design systems, was also a commonly cited reason among paying customers for migrating to Figma.

comment 6mo ago · link · parent

That's sad but sensical. Fun fact, Figma originally started as a fully C++ codebase, and Asm.js was key in proving that it would be possible to run a design tool in the browser. The switch to WebAssembly didn't happen until after there were paying customers, and provided nice improvements to load time (Asm.js is still JS which the bundle size is bigger and requires the code to be parsed into an AST, unlike WASM).

comment 8mo ago · link · parent

> If you're working online (eg figma), you can just download history lazily.

You can download the history lazily, that's a special case of incrementally loading the document.

If the history is only history, then sure. But I was understanding that we were talking about something that may need to be referenced but can eventually be GCed (e.g. tombstones-style). Then lazy loading makes user operations that need to reference that data go from synchronous operations to asynchronous operations. This is a massive jump in complexity. Incrementally loading data is not the hard part. The hard part is how product features need to be built on the assumption that the data is incrementally loaded.

Something that not all collaborative apps will care about, but Figma certainly did, is the concept that the client may go offline with unsynced changes for an indefinite amount of time. So the tombstones may need to be referenced by new-looking old changes, which increases the likelihood of hitting "almost-never" edge cases by quite a bit.

comment 8mo ago · link · parent

re: git repositories

That's partly because repositories rarely need to be cloned in their entirety. As such, even when you need to do it and it's a couple hundreds mb taking a few minutes, it's tolerated.

In situations where a document needs to be cold loaded often, the size of the document is felt more acutely. Figma has a notion of GC-ing tombstones. But the tombstones in questions aren't even something that get created in regular editing, it happens in a much more narrow case having to do with local copies of shared components. Even that caused problems for a small portion of files -- but if a file got that large, it was also likely to be important.

comment 1y ago · link · parent

Electron does not belong in the same category as React & Vue. JavaScript frameworks are commonly understood to mean:

- Third-party libraries, almost always implemented in JS (technically it could be some language compiled to WASM but I'm not aware of any commonly used WASM framework)

- Dynamically loaded from a CDN or bundled with application code at build time

- Provide an high-level API for creating and updating UI

- Whose implementation edits the DOM (a browser's low-level UI representation)

In contrast, writing an app _without a UI framework_, therefore implies writing first-party JS code that interacts with DOM APIs directly, without that level of abstraction in-between. This is not a common choice these days, and could be considered an impressive accomplishment, hence this Ask HN.

To create that UI, you use the same low-level DOM APIs in Electron as you would in the browser because well, it is a Chromium browser engine.

Example of each combination:

- Framework-using apps running in the browser: Airbnb, Figma

- Frameworkless apps running in the browser: HN

- Framework-using apps running in Electron: Figma's desktop app

- Frameworkless apps running in Electron: Obsidian

I wouldn't consider Electron as an answer to the question. It would be best described as a framework for running web apps as a standalone desktop app, but not a framework for creating user interfaces. Just using Electron doesn't make any progress towards having a solution for managing the complexity of writing code that interacts with the DOM.

comment 1y ago · link · parent

Everyone else in this thread is talking about (React/Angular/Vue/JQuery/etc) v.s. (Plain JS/Direct DOM manipulation/etc). Running that code on top of Electron or not is entirely orthogonal. So I admit I'm confused why you're fixated on bringing Electron into the conversation. Op's question appears to me like it references the last part of the linked thread: "I’d like to know what JavaScript framework (e.g. Vue, React) Obsidian desktop application is using for creating the user interface?"

Since we seem to be talking past each other, what do you think the conversation is about?

comment 1y ago · link · parent

I mean, you're correct that Obsidian doesn't run on the browser. But it's built on web technologies. As a result, I would argue that the overlap between the skillset and work needed to build an app like Obsidian overlaps more with most web applications than most desktop and mobile applications.

You're also correct that Electron provides APIs beyond those available in the browser, such as access to the native filesystem. The way I see it, those are mostly some lower-level details it wouldn't be that hard to run Obsidian in the browser, it's just a product choice not to (specifically, it would imply creating a file hosting service). As the Obsidian mobile app demonstrates, Electron is swappable and not needed for Obsidian's core functionality. In contrast, had Obsidian been built on React, it would be rather difficult to simply "run without React" without rewriting the entire application.

How to build a large front-end app on non-web technologies (Swift, C++/QT, C#, etc) is also an interesting question but I didn't understand that as being the topic of this conversation.

comment 1y ago · link · parent

That you believe frameworks were invented to serve employers is a cynical point of view. I'm sorry for whatever bad experience you've had with the frameworks or people using them that caused you to develop this viewpoint.

A developer choosing to use a framework doesn't mean they are reliant on it, any more than choosing a particular language, library, text editor, tool, etc. It simply means they decided it was a helpful way to accomplish their goal, whether that's to save time, or establish consistency, eliminate categories of problems, avoid re-inventing the wheel, etc.

I don't know if you're aware of this, but you're coming off as incredibly arrogant with your strong claim that frameworks are used by those who don't know better. It's easy on the internet to vaguely gesture at "developers", but most of us are individual who've built software with real users among other demonstrated accomplishments. Strong claims require strong evidence, I hope you have the arguments to back it up.

comment 1y ago · link · parent

Framework is unfortunately a term that's both ill-defined and quite overloaded. Electron is a framework in a very different sense than the "JS frameworks" op is asking about. The latter is about libraries with APIs and mental models for producing the UI & UX of web applications.

Electron is just a way of running Chrome without the Chrome UI around it, + a few APIs for accessing native OS APIs. You wouldn't say that Chrome/Firefox/Safari are frameworks just because they execute JS code and has APIs. In the context of this discussion, it is fair to say that Obsidian was built without a framework.

comment 1y ago · link · parent

When you're writing only a "couple lines of code", you can do pretty much anything you want. There's no real tradeoffs to discuss except in a theoretical sense, because the stakes are so small.

If the app being built is "large" (which I understand to mean, has high essential complexity), then those tradeoffs matter a lot. If the app is built by a team instead of an individual, the people problems become significant. Those can very well be turned into a technology problem. The technology (framework in this discussion) can be used, among many other things, to establish a consistent way of solving the problems in the application, which alleviates many people problems.

comment 1y ago · link · parent

The important thing in any "large" application is to set consistent patterns for doing common tasks: creating UI components, re-using them, updating their content as a result of data changes (reactivity), etc. This can be done with or without a framework.

A framework establishes a large portion of those patterns upfront. If the framework is a popular one (e.g. React) rather than an in-house one, it makes it easier to quickly ramp up hires and have a lot of documentation/examples online. Popular frameworks also implicitly contain a lot of knowledge from years of feedback from thousands of devs exercising its APIs and providing feedback, so they're typically pretty good at solving common use cases.

Obsidian was initially built by a single developer. One of the best that I have the pleasure of knowing, but when you're one person, it's much easier to create your own pattern and have it work for yourself. They have since hired maybe 2 other devs, with minimal intention of hiring more, so ease of onboarding isn't a significant concern to them the way it would be for most companies (and "large" frontend apps more often than not require larger teams, by definition).

comment 1y ago · link · parent

The contents of this article are pretty old, but the static website's design has been revamped (I believe several times) since then. My guess it that the two may have just fallen out of sync in such a way that this particular oddity manifests.

comment 1y ago · link · parent

There's definitely others that shared your perspective. A commonly cited reason of early Figma adopters was that they felt it was faster than Sketch.

Of course, the reality was that performance is a super nuanced thing. It's always measured in relation to specific things, but ultimately summarized via a "feeling".

Aspects of performance include:

- Loading a (blank/medium/large) file from (scratch/cache/etc)

- Performance when editing (what?), panning, zooming (small or large doc?)

- Performance with a large number of simple objects, or complex objects (components? variables? nested components? drop shadows/background blurs?)

I haven't personally done some performance comparisons between the two apps since ~2018 but at the time there were definitely things where Figma was noticeably faster than sketch, a lot of things that were comparable, some things that were slower. My own very biased feeling was that Figma was faster more often than not but it's always up to the individual use case, how their file is setup, what they are doing within that file, and how they mentally weigh those different scenarios.

I definitely didn't feel like being on the web was a limiting factor. In some theoretical state, with infinite resources to optimize everything, native could be faster since you have access to lower-level APIs. In practice, that's the same argument as "it could be faster in hand-written assembly". Almost never did we get to the point where we'd use those abilities even if we had them, due to their cost on development and impact on the correctness/maintainability of the code.

comment 1y ago · link · parent

There's plenty of server-side components to Figma that are substantially more complex and expensive than that of the typical website.

Multiplayer means that every file that are user loads is loaded onto a compute server and retained in-memory on that server, processing every mutation to the document. Figma documents can get quite large -- they can contain the design system of an entire organization, dozens of variations of a product feature, etc. This means the server cost scales per active session at a given time, a higher "number" than active requests.

In addition to multiplayer, Figma attempts to keep most other parts of the application real-time. If another user adds a file to a project, you will see it without refreshing the page. That's a simple example, but certain types of queries/mutation can get much more complex.

Figma is an enterprise app, and the data models needed to support complex use cases (permissions, etc) means that DB load is a real challenge.

While the DAU count of Figma might not be as high as other consumer apps, the amount of time those users spend in Figma is often substantially higher.

Those are some of the things that contribute to a high bill. While Figma is most known for the frontend editor, the infra work is plenty interesting too.

comment 1y ago · link · parent

Font rendering is indeed complex, but the anecdote seems to be misleading readers into thinking Evan wrote obscure code.

I worked extensively in the parts of the Figma where Evan wrote a lot of foundational code, and have also worked directly with him on building the plugin API.

One of Evan's strong points as a CTO is that he was very pragmatic and that was reflected in his code. Things that could be simple were simple, things that needed complexity did not shy away from it.

While all codebases have early decisions that later get changed, I'd say that largely speaking, Figma's editor codebase was built upon foundations that stood the test of time. This includes choices such as the APIs used to build product code, interact with multiplayer, the balance between using OOP v.s. more functional or JS-like patterns, the balance between writing code in C++/WASM v.s. JS, etc. Many of these choices can be credited to Evan directly or his influence.

Subsequent engineers that joined were able to build upon the product without causing a spiraling mess of complexity thanks to those good decisions made early on. In my opinion, this is why Figma was able to ship complex new features without being bogged down by exploding tech debt, and a major contributing factor to the business's success as a whole.

comment 1y ago · link · parent

This looks like interesting technology! Congrats on the launch, it's great to have people exploring the space of realtime data storage & sync. Some thoughts, that I hope you can find constructive.

The landing page draws comparison to Figma, Linear and Notion. But they are vastly different use cases.

Figma is document-centric, which means that:

- All data is tied to a single document, limiting their size.

- Requires that single backend session holds a document in-memory and deals with split-brain issues.

- Operational complexity arises around deployment.

- User interactions are often continuous (one event / frame), imposing tighter latency requirements.

- Generally requires that the document stays loaded in a memory in a stateful backend session.

- Technologies like Jamsocket are targeting such use cases.

Notion & Linear, on the other hand, have collaborative editing but not to the same degree of realtimeness. - Data is not tied to a single document.

- Data can grow unbounded.

- Data is typically more relational.

Presenting both these uses cases adds confusion. By using SQLite (emphasis: database and "SQL"), it makes the technology appear at first glance more suited for the Linear/Notion use case. However, the opposite appears to be true after reading https://docs.livestore.dev/evaluation/when-livestore/.

- "All the client app data should fit into a in-memory SQLite database".

- "Reasons when not to use LiveStore" -> "Your app data is highly connected across users".

The Figma-like document use case does seem like something that LiveStore could support. When it comes to designing a data model for collaborative apps (CRDT or CRDT-like), the most simple and flexible solution is to store every object as a map of [Object ID] -> [Property Name] -> [Property Value]. Assuming that the properties names & values come from a fixed set and are typed (this will generally be true unless you allow for arbitrary user-defined fields), that looks like a database row! So why not just store it in a database, indeed.

However, among databases, there are object stores and relational databases. The latter is useful, as applications often want to represent relationships between different objects. But if we support multiplayer-like use cases which implies the absence of server-side transactions, how should conflicting events involving the creation/deletion/relationships between objects be handled? Is it entirely on the application to think about it? This is an interesting topic that I believe LiveStore seems well-positioned to innovate in.

I also find the "local-first" emphasis to be at odds with all of Figma/Notion/Linear. Local-first software tends to have a limited number of concurrent users accessing the data in-mind. SaaS applications that are truly targeted at collaboration tend to have a lot of different requirements. On the other hand, those applications do tend to have relatively limited offline support, which a local-first application tends to emphasize more.

The Figma-like use cases also has additional requirements. But I understand this is beta and look forward to seeing further development!

comment 5y ago · link · parent

There's a similar situation with Go where some positions utterly confuse bots trained on playing mostly normal games. There was this interesting research blog post on training a bot specifically to become good at solving one of these weird problems (Igo Hatsuyoron 120, the "hardest go problem ever")

https://blog.janestreet.com/deep-learning-the-hardest-go-pro...

comment 5y ago · link · parent

Almost always when I see a statement of the form "people in group X are doing two contradictory things", it's very likely that it's different people in group X that said those things. You're creating strawmen.

In this case, even if the same person criticized Brian Armstrong then later congratulated him, I don't see the issue. Humans sometimes achieve things, sometimes do controversial things, it's as mundane as it gets.

comment 5y ago · link · parent

Parent mentioned the lack of tooling, and that is indeed where most of the cost of using WebAssembly lies.

You don’t really need to learn the assembly language itself since you’ll probably just be calling emcc.

However, you may need to build code to marshall more than just ints and strings to the JS code. Even after you do, you’ll run into the classical issues of keeping track of object references across a GC & non-GC system.

You may need debugging and find that in-browser debuggers for WASM are primitive/non-existent. You may need to figure out how unmangle stack traces —- including mixed JS/WASM traces. Third-party tools like Sentry for error reporting may not have built support (they sort of recently have and is very under-documented).

All solvable problems, but it’s a lot of time spent not building the product. There are plenty of good uses cases but it’s usually not the ones based on the false premise that native is somehow always better than interpreted.

comment 5y ago · link · parent

It would be quite challenging to make such a business model work with collaboration-centric features. Features such as multiplayer editing, in addition to requiring some carefully designed technology, require the two clients to be running the same version of the code. As soon as you introduce a new feature -- e.g. a new type of object that you can insert into the document, you need all clients connected to the same file to be able to understand that object.

This is just one of many types of edge cases that can crop up. It's kind of like database migrations except a lot of work happens client-side too.

You could put the onus on the user to deal with making sure everyone you're sharing a file with has the same version (or whatever asset is involved in a particular tool, this is not design-tool specific). But the friction to sharing raises considerably. Even if your whole team is on the same version, what happens if you try to share a file with an external client, etc. You'll be making tons of tradeoffs in engineering time and feature design to deal with the fact that users don't get the latest version of your app just by loading the page. Your tool, though it might still be excellent in other regards, probably won't end up having collaboration as a central selling point.

comment 5y ago · link · parent

The idea of focusing diversity isn't at odds with focusing on competence. The premise is that certain groups of people who do not fit the stereotype of a male, nerdy, white or asian programmer are often assumed to be less technically competent because of their appearance. As an Asian male, I can't tell you how often people assume I'm smart just by appearance alone. This leads to a hiring process that does _worse_ at hiring component engineers. Even if they are hired, the company culture might not be inclusive enough to retain them - e.g. lots of women leave the industry for that reason. This also leads to a _loss_ of talent.

It's true that some companies might do diversity poorly and hire solely to hit diversity numbers. I don't personally feel good about that. However, in practice I've seen companies that focus on diversity adopt the practice of putting more effort into reaching out to diverse candidates, but have the exact same hiring process & hiring bar applied to them. Those reasonable companies don't make the news -- after all, the unreasonable stories tend to be the ones that get attention.

Again, it's not to say that your concern never happens. However, framing diversity as if it was fundamentally at odds with competence, especially in a completely unrelated thread about a programming language, does a disservice to both diversity _and_ competence.

comment 5y ago · link · parent

Good question! Looks like I might have slipped an internal term in there inadvertently. It just refers to type definition/interface declaration files for objects that are stored in the Redux store, we just happen to stick most of them in a folder that’s been called “models” for a long time.

comment 5y ago · link · parent

Strict null checks doesn't change the language. It doesn't make the `null` feature of JavaScript go away, it just makes it more explicit in the type annotation. So `null` isn't bad. Languages that don't have `null` have something similar like `Option`.

To me, that helps make the code more maintainable and that's the biggest benefit, even more than catching bugs. The process of maintaining code involves asking questions about the code. "What is this code for?" "Was this code written to handle <edge case>?" "Can this value, sent to me from another part of the system I'm not familiar with, ever be null?"

In a strict null check world, you can answer the last question with confidence just by looking at the type signature. Without strict null check, the types don't tell you anything about whether a variable can be null, so figuring that out can be anywhere between a distraction to a huge endeavor.

comment 5y ago · link · parent

> I'm a huge fan of strictNullChecks but it is remarkable how much language features contribute towards making non-nullable types ergonomic.

For sure, that was our experience as well. Without TypeScript's control flow analysis, it would be much less ergonomic to use and would probably lead to a lot of non-null `!` assertions everywhere. When writing correct code, you never notice that control flow analysis is there at all. A desirable feature, though as a result of operating in the background, few know how much TypeScript innovates in this area over other mainstream languages.

30.

A case study on strict null checks(figma.com ↗)

166 points · by rudi-c · 5y ago · 112 comments

123