Better HN
topnewbestaskshowjobs
Log inSign up

Prefinem

337 karma · joined Mar 6, 2013 (13y ago) · 282 submissions

william@prefinem.com
Submissions

comment 7y ago · link · parent

How can apple justify $1000 for a stand?

comment 7y ago · link · parent

You should play it while you can. It's a very fun game and the PVE server is some of the best relaxing gameplay I have experienced (as long as falling into an abyss doesn't stress you out)

comment 7y ago · link · parent

SpatialOS is doing much more than that. It's main goal was bringing a single world spread over multiple server instances instead of individual servers.

It's like atlas vs ark, not like unreal vs unity

comment 8y ago · link · parent

If you are writing a reviver, what difference is it to instead write a deep clone function?

JSON.parse(JSON.stringify(obj)) !== deepClone(obj)

EDIT: Also, how can you determine if the string should be a date, or a string? Sure, if it fits, you can always convert it to a Date, but if your first object is coming from something that sends ISO Dates as strings and you used JSON.parse with a reviver, you would get a different object.

comment 8y ago · link · parent

Piping is relatively easy to write a function for. Here [0] is a package that I wrote that has a few trivial functions (including pipe) for things such as this.

0: https://www.npmjs.com/package/afpf

comment 8y ago · link · parent

Not OP, but where I work, we have a hybrid approach for our system.

> Share code between your SPAs, for example, utilities?

We alias a common folder for our utils with webpack which allows all our code to use the same utilities. We actually have two. One for shared frontend and backend, and one for just shared frontend

> What if your SPAs have large dependencies (React, Vue), should every SPA come with their own?

Webpack code splitting is how we split our apps. We also build into multiple bundles to keep bundle size small. That does mean that React does get bundled with each, but if you split thing appropriately, you can potentially save off a few MB with caching each bundle from page to page.

> Should every SPA have its own build tools?

With webpack, you can build all your bundles with one config / command

> What if there's an update to a library, should it be allowed that one SPA runs on an older library?

We have a root package.json for all of our react apps. This means that we don't update a library unless we can update it across the board. It takes more time to test upgrades, but it also means smaller bundles, easier package management and easier maintenance in the long run.

comment 8y ago · link · parent

I will be honest, I was completely unaware of your other products, not that I would be your target audience. That being said, thank you for not pushing your other products on tracker users. That was something that always annoyed me with Atlassian.

comment 8y ago · link · parent

Oh wow. So yeah, I guess we call it pivotal so much at work that I didn’t even realize it was actually called Pivotal Tracker.

It’s a great product. The speed and ease of use is amazing.

comment 8y ago · link · parent

Tracker?

comment 8y ago · link · parent

Not parent, but we replaced Atlassian with Github and Pivotal

comment 8y ago · link · parent

Thanks. It's been through a few revisions and really needs to be reworked for mobile. If you have any input, I would be more than willing to hear it.

comment 8y ago · link · parent

Shameless plug, I made one that uses an AWS Lambda and S3 and encrypts everything before it gets sent over the wire. You can view a live version of it here (https://todos.md/) or view the source here (https://github.com/Prefinem/TODOS.md)

EDIT: grammar hurts

comment 8y ago · link · parent

Just saying they didn't do nothing. Maybe they didn't do as well as they could have, but they did do something.

comment 8y ago · link · parent

NPM revoked all tokens. How is that irresponsible?

https://status.npmjs.org/incidents/dn7c1fgrr7ng

comment 8y ago · link · parent

I used it so much in my text editor, I ended up creating a site that did the same thing but kept things synced

https://todos.md/

comment 8y ago · link · parent

I was in the same boat waiting excitedly the whole time.

comment 8y ago · link · parent

> A Deferred object is returned by the obsolete Promise.defer() method to provide a new promise along with methods to change its state.

> Starting from Gecko 30, this object is obsolete and should not be used anymore. Use the new Promise() constructor instead (or use the above backwards/forwards compatible Deferred function given below). For example, the equivalent of

Seems like it's obsolete. [0]

If you want to write async code, use async / await.

    const run = async () => {
        const response = await new Promise((resolve, reject) => methodOne(data, (e, res) => e ? reject(e) : resolve(res)));
    };
If you spend enough time with fat arrow, it's as easy to read as `function` is. On top of that, IMO it looks cleaner. It also allows you to do scope binding in a different manor which in React is much better.

This:

    <a onClick={this.onClickEvent.bind(this)}>Click Me</a>
becomes this:

    <a onClick={(event) => this.onClickEvent(event)}>Click Me</a>
[0] https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_...

comment 8y ago · link · parent

Life is more fun with fat arrows sometimes

    new Promise(function (resolve, reject) {
        methodOne(data, function (error, response) {
            if (erorr) {
                reject(error);
            } else {
                resolve(response);
            }
        })
    })
vs

    new Promise((resolve, reject) => methodOne(data, (error, response) => error ? reject(error) : resolve(response)));

comment 8y ago · link · parent

Not OP, but thanks for the link to that app. It's quite amazing.

comment 8y ago · link · parent

I am also interested in knowing. Seeing as it's been a business and had a trademark, I would assume 6 figures, but I honestly have no clue.

comment 8y ago · link · parent

Wes Bos has some good courses that takes you up through ES6 which will be pretty close to the latest node version

comment 8y ago · link · parent

Awesome, thanks for this!

comment 8y ago · link · parent

The irony is that sublime text doesn’t slog down

comment 8y ago · link · parent

The linter was the issue.

I actually have better performance with Sublime Text and JavaScript than I do with vim and JavaScript. I wish that weren’t the case.

If you know if any better ways to get vim working with Syntastic for linting (eslint), I would love to know.

12345
10