Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 4y ago · link · parent

Pine Bluff's population has declined by 50% over the last few decades, presumably the reason they were so cheap is that there's a huge supply surplus? And given the murder rate is 10x the national average I don't see demand for property increasing. In short, run for the hills!

comment 4y ago · link · parent

in the UK this is already relatively common for online banking. I asked my bank to raise my daily transfer limit the other day for a property purchase and part of the process was recording a video of myself in their app.

comment 4y ago · link · parent

I'm so glad to see his tenacity paying off, it's been great to watch his progress. To be honest I never thought this would be possible because there's just so much variance with these small solid fuel motors. Impressive.

comment 4y ago · link · parent

indeed, I see that this project is storing documents as js objects so is likely to overwhelm the GC when the database is in the region of 500mb or so. For things like this it's usually better to use an ArrayBuffer for storage, but this complicates the implementation significantly.

It is possible to write very fast js, but it's hard to write very fast idiomatic js

comment 4y ago · link · parent

Tetris is challenging because TS escapes newlines in type output, so you'd end up with a bunch of\nwhich makes it\nhard to read the output. It could probably be done using arrays instead, but that gets truncated so you'd have to have a very small "screen"

comment 4y ago · link · parent

it'll tell you that `string` cannot be assigned to type `"RED" | "GREEN"`, and so you'll need to write a function that refines the type correctly, e.g.

    function isValidInput(input: unknown): input is "RED" | "GREEN" {
      return input === "RED" || input === "GREEN";
    }

    const input = readFromUser();
    if (isValidInput(input)) {
      doTheThing(input); // no type error
    }

comment 4y ago · link · parent

indeed, it's just the most prominent example at the moment

comment 4y ago · link · parent

This is already possible today and we don't need AI generated stock photos to do it. A bad actor can already spin events to fit their narrative, suppress dissent and control their population. Dictators have been doing it for centuries and we're seeing it in real time in the form of Putin's Russia right now.

comment 4y ago · link · parent

that's not what empathy means, you don't have to house someone to feel empathy for them. In this case, I'd say don't judge them so harshly because they're a product of a failing social system. They're the consequence of society's collective decisions and priorities.

comment 4y ago · link · parent

the UK edition is fantastic, I've not read the US version - is it worth it?

comment 4y ago · link · parent

* Cantrill

comment 4y ago · link · parent

GC pressure is the cause of many of your competitors' problems. I'd be planning a move to an alternative sooner rather than later otherwise you'll run into the exact same problems that they have - after a certain point in the company's life it becomes practically impossible to fix

comment 4y ago · link · parent

this is definitely not true - there's a huge depth of complexity in these multi-dimensional databases. It's relatively easy to make a proof of concept - it's "just" an array of arrays after all, but building something production quality is a multi-year endeavour

comment 4y ago · link · parent

that'd be Anaplan I assume?

comment 4y ago · link · parent

thanks for this comment, I'll look into fixing it. In the meantime I'm curious whether it works when you install deprank directly? e.g.

    yarn add deprank
    yarn run deprank ./src

comment 4y ago · link · parent

hmm, sounds like it, please could you open a github issue with some more info?

edit: I've just fixed an issue that looks similar to this, please run with `npx deprank@0.1.1 ./path/to/folder` and let me know if you're still having problems

317.

Deprank: Use PageRank to find the most important files in your codebase(github.com ↗)

164 points · by phpnode · 4y ago · 43 comments

comment 4y ago · link · parent

author of ts-sql[0] here, this looks great (and a way more practical approach!)

[0] https://github.com/codemix/ts-sql

comment 4y ago · link · parent

I just want to say that this looks fantastic, especially the runtime types stuff - the idea that types are values hasn't caught on yet but it's great to see movement in this area. A long time ago I did something very similar to this for Flow (https://gajus.github.io/flow-runtime/#/try) but typescript is a much more suitable target. Congratulations on an amazing job, I really hope you have plans to sustain this project for a long time, because it's very ambitious but very compelling.

comment 4y ago · link · parent

Does it matter? The relevant part (to most of us) is whether they're laying off engineers. Almost any company is a tech company these days

comment 4y ago · link · parent

To make this work there would need to be a big social push towards eating in line with the seasons again (which was obviously the norm for 99.99% of the history of humanity). I think this might be a hard sell, people are now very used to being able to buy whatever they want whenever they want, e.g. strawberries in january

comment 4y ago · link · parent

Approximately 0% of consumers install browser extensions, it's a non-starter and also a totally different proposition. Every merchant wants more money but no one wants to mess up their payment flow, no one reasonable wants to add yet another option, yet another decision when it comes to the most critical part of their sales process - the thing that actually gets them paid. Fast's only shot was with merchants who already did a lot of sales via Stripe and they'd have to make integration utterly frictionless.

comment 4y ago · link · parent

(I didn't know of this company's existence until their non-existence today)

I don't think the idea is really that bad, and a form-filling browser extension would not be comparable to what they were trying to do here. The idea is pretty compelling in isolation - your random mom n pop ecommerce site can compete with Amazon on price for a lot of things, but it can't compete with convenience.

If I go to Amazon I can buy something with one or two clicks and be pretty certain that my card details aren't going to get stolen and the thing I ordered will probably arrive when they say it will just about.

If I go to a random ecommerce site I probably have to register, have to enter my card details and confront the possibility of getting ripped off. It's so much less convenient, so for most purchases I just go to Amazon, which is bad for a bunch of reasons.

What Fast was promising to do was to bring that convenience and trust to ecommerce sites, so that they could become more competitive with the Amazons of this world, get more sales, make more money, consumers save money, everyone wins.

Of course the problem is that they're only compelling when they're ubiquitous, and when everyone already has an account and everyone already trusts them. It's a bootstrapping problem, one that only really works if you burn a whole bunch of capital to get both consumers and suppliers signed up, or if you can piggyback off someone else's market penetration, e.g. Stripe, and even with that leg-up they weren't able to survive. All of this also ignores the existence of paypal, apple pay, google pay etc which do offer most of the convenience already.

comment 4y ago · link · parent

> Who is more cool?

> Somebody who makes it clear they're wealthy or well connected or attractive or smart or etc...

> Or somebody who is upbeat and friendly with no desire to display anything about themselves?

The first one. It's the first one.

comment 4y ago · link · parent

I think yours infringes the patent ;)

comment 4y ago · link · parent

Cool, here's a quick hack to try a similar technique with the comments in this thread (copy and paste into dev tools:

    $$('span.commtext').forEach(span => {
        const frag = document.createDocumentFragment();
        span.textContent.split(/\s+/).forEach(word => {
          const len = Math.ceil(word.length * 0.3);
          const leading = document.createElement('strong');
          leading.textContent = word.slice(0, len);
          const trailing = document.createTextNode(word.slice(len) + ' ');
          frag.appendChild(leading);
          frag.appendChild(trailing);
        });
        span.parentNode.replaceChild(frag, span);
    })

comment 4y ago · link · parent

I'm not criticising the idea or the framework, but the react team have had to go to enormous lengths to make that one simple idea work. And the community have had to embrace (and then sometimes, forget) some pretty controversial techniques and concepts in that time, with more big changes coming soon (hello concurrent mode!). It has cost FB tens of millions of dollars to develop. I'm not saying that investment hasn't been worth it, but peek under the hood and the complexity is huge.

comment 4y ago · link · parent

View = Function(State), the original idea behind React. I use React every day, and I enjoy it, but it hides nightmarish complexity to preserve a semblance of this original, neat and tidy idea.

comment 4y ago · link · parent

I think this is a bit naive. Startup founders do not care about providing careers for engineers, and usually want to stop being a "startup founder" as soon as they possibly can - they are chasing huge exits and being a founder is incredibly stressful.

The real reason that microservices are so prevalent is that they became fashionable, for exactly the same reason a particular item or brand of clothing becomes fashionable - influential people were seen using them and so regular people aspired to start using them too. At a certain point in the popularity curve, _not_ using microservices becomes a controversial viewpoint.

They also suffer from being what I call "conceptual crack". There is a certain kind of idea that really tickles some kinds of engineer's brains. Microservices seem like a such a clean solution, each service having its own single responsibility, so easy to draw on a whiteboard, so neat and tidy. Other ideas I place in this category are blockchain, redux, and V=f(s). Clean and tidy ideas that are compelling conceptually but result in nightmarish levels of hidden complexity when they're put into practice.

1
101112
53