kiliancs
Effect solves this elegantly.
> barely any time at all on solving the actual problem
This is how we should measure things TBH. For me, Effect solves very real problems. As a Principal engineer, I sleep so much better overseeing many teams and agents releasing to production because of Effect.
> Code that you can put a breakpoint on to debug.
This is a pain point for sure. For me, the tradeoff is clearly positive (because also the need for debugging that way decreases significantly with more declarative, type-safe, well-architected, telemetry-first code), but it is still very unfortunate.
Effect's type-safe DI simplifies application architecture (you now have a clear algebra that is interfaces + layer composition), promotes important architecture principles (e.g. it's a lot easier to compose within the application when components are not tangled because they have to pass "ambient" service props through), and as a result apps are a lot easier to maintain and evolve.
This is the sort of guardrail that really matters in the age of AI, because AI can still mess things up, but the blast radius of messing things up locally is very different than sloppifying architecture—and makes the problem of slop itself more treatable.
One issue with Effect is that it's hard to intro because it does many things. But it does them well, and it does all of them because only a coherent system can deliver the promise of allowing you to write production-ready TypeScript.
I'll list some things:
- Effects: how you describe programs. For some people it helps to think of them as promises on steroids. In addition to tracking the return type, they track the types of errors it could fail with, as well as its dependencies (see context/layers).
- Fibers: primitives for concurrency—but most of the time you don't have to think about them because the `Effect` methods handle most common scenarios
- Context/Layers: type-safe dependency injection. Have your cake and eat it too. You define context interfaces, use them within effects, and TypeScript forces you provide implementations of those interfaces via layers. Layers can provide more than one context, and can also depend on other layers. Very powerful.
- Schema: think Zod, but with the concept of codecs (to be fair Zod has this too), which means you define how things encode (e.g. what API takes and responds with) and decode (e.g. what my app works with). I love `Model`, which derives schemas for the API side and repo (db) side, so I can define a domain model declaratively with things like "account number should be replaced with * except the last 4 digits in the API; it should be Redacted (wrapped, can't leak to logs etc) within the app logic, and should be encrypted in the database".
- Standard library: lots of things that should standard in JS/TS and aren't, or exist but are not coherent or play well together. When I don't use Effect, I have to choose between doing things well or shipping (and suffering the consequences). And I don't mean just strings, dates, decimals. I mean also queues, cache, etc.
- SQL primitives to work with transactions, migrations, queries. There are interfaces on top of this for popular ORMs.
- HTTP server; and ways to define your API with types and schemas, then implement it.
- Telemetry, logging by default
...and I could go on. I am not looking back.
I applaud the efforts by Softcatalà, The Mozilla Common Voice Catalan Community, AINA, etc. but there is a long way to go, and the damage is being done now.
I left looking for low-friction answers to my need to organize tabs and content. I didn't love giving up control to some central organization to process my data, but I had promised myself I'd write one or two extensions to answer my needs "next week" for years.
After doing some research, most of what I wanted already exists. Sidebery, Tab Wrangler and the new Agents window (with some styling to eliminate the default tab list), together with my other old friends like uBlock Origin, Auto Tab Discard (suspend) and a number of container-related extensions, deliver the same functionality I found elsewhere, without taking control from me.
Plus, this is just me, but chromium-based browsers manage to get my m3 pro macbook with 36GB RAM hot pretty consistently with normal use. I noticed the moment I left Firefox. And I noticed the problem gone as soon as I went back to Firefox.
I have often criticized Mozilla, because I care that Firefox remains the best browser, not just an alternative worth keeping.
Code reviews are also an opportunity for learning, and provide real-life scenarios to inform decisions that are otherwise not grounded and mostly opinion. Of course, not all comments and discussions should block approval, but there is a balance. No one is going to die if this feature is delayed by a few days if you get a better result _and_ are investing in team growth.
I use Effect CLI https://github.com/Effect-TS/effect/tree/main/packages/cli for the same reasons. It has the advantage of fitting within the ecosystem. For example, I can reuse existing schemas.
My >10 yo macbooks also have bad batteries. One of them won't last one minute, and will also overheat with minor workloads. They were not immune to overheating when new, but unreasonable overhearing (for the time) definitely didn't become an issue at within 3 years of purchase.
And that's with Intel macbooks. My M1 from Dec 2020 works like new (I'm sure the battery life has shortened, but not in a way that I notice). It overheated a couple times running LLMs—that's it. That's how I know the fans work.
It's hard to find similarly mature and complete solutions. In the JS/TS world, I like where Drizzle is going, but there is an unavoidable baseline complexity level from the runtime and the type system (not to criticize type systems, but TS was not initially built with this level of sophistication in mind, and it shows in complexity, even if it is capable).
And the browser takes care of the rendering.
Good times.
In my case, I live in the United States, but Google is determined to serve me Spanish results even for Catalan-related queries. E.g. preferring the Spanish Wikipedia. The search engine's behavior has had ups and downs over the years, but it has never been great.
This is very much a problem for my children, who don't understand Spanish, as well as for the Catalan-speaking regions of the world that are not in Spain, including Andorra.
In my experience, Gemini easily flags any Catalan content as unsafe and prevents the conversation from continuing. Even for prompts like "summarize this article". This may have improved lately, but still.
Google used to be an example in sensitivity to the world's diversity, being a responsible major player. Way back. Now, although I applaud some efforts multiple teams continue making, it is obvious this is no longer a priority.
- require engineers to present and justify engineering investments (and understand that what you don't accept has real costs) - have engineers estimate the work in the roadmap, and provide clear risks and possible mitigations - note all of the above means the goals are clearly defined first - not everything you wanted to accomplish may fit; be prepared to distinguish essential from good to have, and to change the order of your priorities. - have teams commit to dates based on estimates, a healthy error margin, additional responsibilities, meetings... - plans change, things happen, life happens, engineering is hard. It's OK, it's expected! Make sure there are clear communication channels from engineers to the top, and from the top to the engineers, so that expectations are adjusted as soon as possible, and maybe make further adjustments. - Communication should happen often. Be always available to listen, don't micromanage. - managers should protect engineers and said communication channels - managers and PMs do not set deadlines - don't hire cheap; hire motivated team players. - the primary role of your >Senior engineers is to be force multipliers (how is a whole different conversation), not to do superhero work - communication, communication, communication; you'd be shocked how much time is wasted by engineers being unsure how to proceed and not sure who to ask of if the question will be well received; there are no bad questions.
I feel like I could go on and on and expand on many of these.
Yes: multitasking hurts; yes, procrastination is bad; but beyond looking at each "issue" individually, engineering leadership should provide processes and culture that protect, motivate and facilitate success.
My apologies if this is off-topic, but I have recently read and heard a couple cases of "ancestors" being used instead of "descendants", which has sparked my curiosity. Is this a common brain-lapse result?
The Pocket partnership and acquisition, the 250 layoffs with the 4x CEO pay increase, the Mullad partnership for a worse offering, are all concerning and they do destroy trust, but my primary concern is the apparent lack of focus. Can Mozilla sustain all these potentially positive initiatives (like this recent announcement or https://foundation.mozilla.org/en/privacynotincluded/)? I very much doubt it. And I hope this changes before Firefox usage drops even further.
I'm not a Mozilla hater. I have contributed Firefox translations in the past, built extensions, and I even collaborate actively with some of the projects that I think are distracting Mozilla.