Hacker Newsnew | past | comments | ask | show | jobs | submit | stevoski's commentslogin

Well-written article, manages not to sound rant-y while describing the problem well.

I feel like part of the blame for the situation is that JavaScript has always lacked a standard library which contains the "atomic architecture" style packages. (A standard library wouldn't solve everything, of course.)


What functionality is still missing from the JS standard library? The JS standard library seems massive these days.

Edit: Removed a reference to node and bun.


Some utility stuff I copy paste between projects:

  - range, clamp, inIvl, enumerate, topK
  - groupBy (array to record), numeric / lexical array sorts
  - seeded rng
  - throttling
  - attachDragListener (like d3's mousedown -> mousemove -> mouseup)
  - Maps / Sets that accept non-primitive keys (ie custom hash)
So basically functions that every *dash variant includes.


Also, all the functions that are already in the standard library but are made in a way that don't use more modern features:

- Functions that use map-like and set-like objects instead of maps and sets.

- Functions that should be async that aren't

- Async functions that should be cancellable, but aren't

- Functions that should use the disposable and async disposable stack (e.g. the `using` keyword)

- Functions that should return deeply immutable data structures but can't. (The R̶e̶c̶o̶r̶d̶s̶ ̶a̶n̶d̶ ̶T̶u̶p̶l̶e̶s̶ / Composites, and Structs proposals would help here)

- Concurrency coordination primitives (Imagine an array of 10 async functions that we wish to run. Going through them one at a time is too slow. `Promise.allSettled()` executes them all at the same time which might slow things down even more due to bottlenecking. We should have an easy way to say only execute a maximum of 3 at a time. As 1 function resolves, the next one is started, until all are resolved).


It's not standard unless it's in the actual standard.


Those aren't a standard library for the language itself - they're not showing up in browsers, for example.


Thanks but that doesn't answer my question. Forget node and bun then. What is missing from the standard library?


There’s been a lot of progress (Temporal, URL, TextDecoder, Base64 encoding, etc.) but there are still gaps.

Math.clamp is a big one (it’s a TC39 proposal). I’d also love to have the stats functions that Python has (geometric mean, median, etc.).

On the more ambitious end: CSV reading/writing and IPv4/IPv6 manipulation.


> On the more ambitious end: CSV reading/writing

Deno's standard libary has nice CSV parsing/serializing, and you can use it in any environment.

Docs: https://docs.deno.com/examples/parsing_serializing_csv/


What standard library? Do you mean the built-in Array.x etc methods you get in the core language spec?


In the browser, Javascript’s role is to add interactivity to the web page, and the API has a good surface area (even if not really pretty). People talk about the lack of standard library, but they can never say what’s missing.

https://developer.mozilla.org/en-US/docs/Web/API

The above seems fairly expansive, even if we remove all the experimental ones in the list.


I suppose we could quibble about what exactly “standard library” means, but I’m presuming we’re talking about the web (rather than, say, Node or Bun). And to me it’s fair to use it to refer to all web APIs that are widely available. Things like crypto, ArrayBuffer, TextEncoder, File and the File System Access API, Intl, the Streams API, Window.performance, etc.


Most things in Remeda, ramda, rxjs, the methods in the Ruby stdlib, etc. would all be great to have. I use at least Remeda in every project when I can.


String.splitRight, for one. (As an example: "www.a.north.website.com".splitRight(".", 3) == ["www.a.north", "website", "com"].)


Python and Rust have such a thing, but not e.g. Java, Go, C#. And I can't find any libraries on npm which do this. That seems like a very niche need, not actually the sort of thing whose absence causes people to have lots of npm dependencies.


When would you want that when it wouldn't be covered by more domain-specific use cases?


We're talking about JS in browsers: many fewer options there, plus needing to support old devices.


I like rants though. They help me understand, not only how people feel about stuff, but also why.


Flickr was the first site I saw where you could edit some text on the screen inline, without a complete page reload to get an “edit” form.

Today this is utterly ordinary. At the time, it was remarkable.


I think this “story” started when The Economist did a filler article about it. The Economist article was based on some pretty weak understanding and knowledge of Kiwis and their culture of spending time abroad.

From there the usual YouTube “experts” started stories on it. You know the type - they sound authoritative but they are basically regurgitating stuff from Wikipedia (or some Economist article) with some pretty screens and clickbaity thumbnails.

Ultimately, there’s nothing behind this story. As has been the case since Pakehas arrived, lots of Kiwis go abroad and spend lots of time abroad, some go back, and some don’t, and meanwhile NZ’s population continues to grow.

The trends grow and shrink based on relative health of the Aus and NZ economies.


My daughter spoke four languages at age 3. Not because she is gifted, but because she grew up in an immigrant environment. One language with me, another with my partner who speaks a different mother tongue than I do, and the two local languages where we live.

And this is utterly unremarkable where I live.

When we visit my family (who are all monolingual), they think she is a prodigy.

She’s not. She’s just a normal kid.


Learning by immersion is a completely different process from learning by being tutored, never mind learning by oneself from books.


Latin and Greek are classical, 'dead' languages.


Latin/Greek were considered part of the core curriculum for a well-rounded classical education in the upper-class for hundreds of years (some degree of retained proficiency wasn't unusual in graduates of the elite schools in Britain even through the mid 20th century). Not spoken as a primary language, sure, but far from "dead" in education.

Latin was required for philosophy, law, rhetoric, and the classics. Greek skewing more towards the sciences, logic and also philosophy. One would be constantly encounter Latin/Greek in their materials and not just as a obtuse code to memorize like how a modern biology student typically views e.g. binomial nomenclature today.

So when viewed through the 21st century lens of English dominance throughout education, it loses the context that makes it much more understandable why and how a young student, especially a precocious one, would pick up those languages specifically in the course of their tutoring, reading, etc. (And not as some kind of genius parlor trick as modern retellings tend to portray it).


Latin was the common lingua franca for scholarship even into the 18th century so studying the classical languages was genuinely useful, not just a parlor trick. It's the equivalent of a modern child prodigy in a non-English speaking country learning English as a young age to access present-day research.


In the time of J.S.M. they were languages used by academics and upper classes regularly enough that in his circles he and many of his peers had early exposure.

Hence that scene in Monty Python's Life of Brian.

Still fun today: https://www.youtube.com/watch?v=Mip30YF1iuo


That there are no native speakers doesn't mean there are no tutors that speak it.


Learning by immersion is still a very different process from learning by being tutored. One is something that young childrens' brains do almost entirely subconsciously, the other is conscious academic work.


Oh those Slicehost articles were excellent. I felt like I could actually do my own sys admin by following them.


For many of us, the way we manage software projects has changed has changed so much since the days when Joel wrote this.

It was a different age, with different products. I’m sure there are still products built the old ways, but Joel was writing before SaaS and CI/CD and endless roadmaps.


Reading into Joel, he was building SaaS. Fogbugz to name one.

He seems to have other posts on the lifecycle of software and product budding. Maybe it wasn’t mainstream then but some folks were doing meaningful parts of it.


Fogbugz, if the first version even existed in 2000, was not a SaaS. Nor was Jira, by the way.

Both products were initially once-off purchases that you had to install and run on your own infrastructure, and with new, major versions packed with new features that you had to buy if you wanted, but could ignore if you didn’t.

The move to a SaaS model came years later for both products.


> What surprised me was how much the ugly first version taught me that planning never could.

Fred Brooks, author of “The Mythical Man Month” wrote an essay called “Plan to Throw One Away” in 1975.

He argues much what you’ve described.

Of course, in reality we seldom do actually throw away the first version. We’ve got the tools and skills and processes now to iterate, iterate, iterate.


“Damn”, this is good.

It takes me right back to 1998, making my first few web pages - with a hand-rolled index page. I probably used NotePad.

And how easy it was - I went from reading a “how to HTML” guide to having a page about whatever hobby I was into at the time in a single session. Can’t have been much more than an hour.

I guess I deployed via FTP, into the space my ISP provided.


A fine time to acknowledge Scott Adams’ remarkably simple and clear financial advice: https://www.mattcutts.com/blog/scott-adams-financial-advice/

I think it is pretty good.

You can, of course, debate it - and HN being HN people probably will.


Here it is, unabridged

    Make a will.

    Pay off your credit card balance.

    Get term life insurance if you have a family to support.

    Fund your company 401K to the maximum.

    Fund your IRA to the maximum.

    Buy a house if you want to live in a house and can afford it.

    Put six months’ expenses in a money market account.

    Take whatever is left over and invest it 70 percent in a stock index fund and 30 percent in a bond fund through any discount brokerage company and never touch it until retirement

    If any of this confuses you, or you have something special going on (retirement, college planning, tax issue), hire a fee-based financial planner, not one who charges you a percentage of your portfolio.


Solid advice overall. But I have to disagree with the 401k advice.

> Fund your company 401K to the maximum.

Fund it up to amount your company matches. The maximum you can contribute to 401k is 40% of your salary I believe. I wouldn't contribute 40% of my salary to the 401k. Just the amount your company matches ( 5% or whatever it is for your company ). That 5% match ( or whatever it is ) is free money. It would be foolish to leave it on the table.


No, if you can, max the 401k, as long as you've set up emergency fund and other stuff. After maxing the 401k, then go to taxable brokerage.

The personal finance reddit goes like, fund it up to the match is basic, but if you can, max it.

You reduce your taxable income and the money doesn't pay capital gains when you pull it out.


> You reduce your taxable income and the money doesn't pay capital gains when you pull it out.

You do pay income tax on it when you pull it out though. Whether or not you come out ahead depends at least partially on your marginal tax rates before and after retirement.


If you are in the situation where you can max your 401k, it's likely your income during retirement and the associated taxes will be lower.


But it does not follow that your marginal tax rate will be lower; there's policy uncertainty there.


There is not percentage limit, it's a flat number that increases annually https://www.irs.gov/newsroom/401k-limit-increases-to-24500-f...

I max my 401k because not taking advantage of tax-advantaged income is leaving money on the table.


So if your company doesn't match your contribution then contribute nothing to 401k?


Not American, but as I understand it, 401k's are tied to your employers 401k implementation and while you are employed you have little choice in how the funds are managed. If you are contributing to a third party managed fund (employer or otherwise) that is not being matched, then you are ceding control of your retirement funds for no practical benefit. You would be better off putting your savings into another tax shelter appropriate to your needs that you can control.

If you aren't getting a matching benefit or other reward for using an employer managed investment, then you shouldn't. If someone doesn't have the time, inclination, or knowledge to understand the difference then investing in an unmatched 401k is still better than not saving at all :S


This is incorrect. First off, you do control your retirement funds. The amount of control varies, but at the very least you are offered dozens of mutual funds, indexed funds and bond funds to choose from. Some companies allow offer Fidelity BrokerageLink which allow you to invest in anything including individual stocks.

Secondly, as far as "another tax shelter" there aren't any. For most people the only tax shelter available is 401(k). And the tax shelter is a very good reason to contribute to 401(k), even if there is no company match.


Most people could do an IRA, no?


IIRC limits on pre-tax contributions to an IRA are much lower than pre-tax contributions to a 401k


Right, it is much lower, and also there is this: If your company offers a 401(k), the IRS limits your ability to deduct Traditional IRA contributions from your taxes based on your income.


Tacking on, in evangelical circles Dave Ramsey's financial peace university talks about saving 15% of retirement when getting out of debt and generally working through that list, then once you have paid off the house, build more retirement wealth as you desire...most of us don't get to that point until later in life.


There is also the rent vs buy calculation to take into account, depend on where you live, it might make more sense to rent and invest the difference than buying.


Especially now since the mortgage interest deduction is less than the standard deduction for most people.


Every 401K I've been in has had some choice in investments. Even if they don't, you'd have to assume that you could do better actively managing your own funds in another tax shelter than the "S&P 500 index" or whatever the 401K is doing. For most people, this is unlikely.


Unless you work for Enron, where the retirement fund went down with the company.


401k's are independent of the company. The account is in your name, not the companies.


My bad, I think the problem with the Enron 401k was that employees were encouraged to buy more Enron stock in them: https://abcnews.go.com/Business/story?id=87516&page=1


70% in a stock fund is extremely risky if you are close to retirement. You will not have fresh income to dollar-cost-average your way back into the black in the event of another market crash.


This is solid advice assuming the shit doesn't hit the fan. In Adams' lifetime many countries' pension funds went bust and inflation ate any soft assets.


As a fellow business owner, I’ll always feel bad when business owners need to make these types of decisions.

I bought Tailwind UI - I always thought it was a critically bad business decision from their end to keep giving me additional new stuff for free. It seemed to me that it should have been a subscription.

However, knowing nothing about the inside of their business, I have no idea how that would have affected their viability.


He goes into detail the motivation/decision to do lifetime pricing vs subscription pricing here: https://hackersincorporated.com/episodes/lifetime-pricing-is...

The idea is that subscription businesses have churn, and if you can capture the lifetime value of a customer with your one time price, there isn't any difference (other than people feeling grateful when you add new content for "free").


That’s an excellent point, thanks for linking.

My takeaway from this thread is: his theory’s great until you discover that your customers are wiling pay *so* much more.

On a more positive note, I’ve been blown away by the (largely, one conspicuous troll-like annoyance aside) positive thoughts in the comments. Maybe it’s not too late?


Some are willing - many take the code they want and bounce after a month


It is true, I paid the lifetime fee for the premium tailwind offering, and they probably could have gotten double that from me with an annual subscription instead.


> It seemed to me that it should have been a subscription.

The one time fee should have been for personal licenses, and a annual subscription for businesses.


I like the approach of paying for major upgrades.. So you get free updates on your current version for as long as you want, but when the next major update comes out, you either stick with your current version at no cost (and ideally still get maintenance and security patches) but if you want the next major version, there's an upgrade cost.

That feels fair to me.


> I always thought it was a critically bad business decision from their end to keep giving me additional new stuff for free. It seemed to me that it should have been a subscription.

Maybe. One data point isn't all that useful, but I never would have bought it if it weren't for the model he chose. I will never, ever do a subscription for something like that.


Right, but you can do a one-off purchase to get the product as it existed at the time. Instead they offered all future improvements in the price.

This is not sustainable once your customer growth dies down, as it eventually did.


Their customer growth wasn't exactly dying down tho, it was massively disrupted. That is a key distinction that should be noted.


Not entirely true. They had one product at first. I think it was UI kit. The full app templates that came later were a separate product and they charged again. However, you’re right insofar as they added more templates to the later product for free.


I guess this is what makes marketing so tricky; I myself would’ve bought a $10/mo subscription so much sooner given the chance, which by now - and happily, incidentally - would’ve brought in way more dosh than my one-off payment.


I think it’s simple that people aren’t using CSS frameworks because the AI creates CSS on its own.


i bought Tailwind UI years ago and have barely used it outside of like a couple of abandoned side projects. I bought it knowing that is going to happen because it is a one-time payment, and the idea of supporting the project/Adam is prob a bigger factor that the product.

I definitely wont even consider it if its a subscription.

Selling UI components is a hard sell to begin with - i think they made the right decision with a one-time point payment at that higher price point. If it were a subscription, i probably would've cancelled it within 2 or 3 months.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: