HNHacker News
TopNewBestAskShowJobs

mephitix

997 karma · joined December 29, 2011

submissionscomments
mephitix··on Atom 1.28
I see IDE competition kinda like browser wars. I was just thinking the other day that VSCode was slower than it used to be. What if VSCode becomes slower? What if MS adds a bunch of bloat to it and it becomes like VS proper?

Similar to when Chrome was the shiny new entrant, while FF was suffering with memory leak issues. Today, the roles are a bit reversed.

If Atom can pull a Firefox I could see it taking market share away... anyway, competition is healthy, even if the value prop isn’t so clear right now.

mephitix··on React Native at Airbnb
Thanks. I think I might try this out first since there isn't much overhead. What's the performance like for you? Any advice you have on mitigating possible perf issues?
mephitix··on PostgreSQL Features You May Not Have Tried but Should
Here is the section on the limitations. Having tried this out myself, please be aware that this is not really 'inheritance'. I had to ditch it completely from my design:

https://www.postgresql.org/docs/current/static/ddl-inherit.h...

For what I'm doing I got away with having insert/delete triggers on child tables that mirror their identity/type to a 'types' table. Also enforced through check constraints and FKs

mephitix··on PostgreSQL Features You May Not Have Tried but Should
Lots of limitations. The main one is if you're using FKs in your database, you're quickly going to hit issues: https://www.postgresql.org/docs/current/static/ddl-inherit.h...
mephitix··on PostgreSQL Features You May Not Have Tried but Should
I like having basic triggers like created_at/updated_at. No issues there... but tons of issues with 'inheritance'. There are a lot of limitations.
mephitix··on React Native at Airbnb
I invested a lot into a full React webapp - it would be great to share some of that code with mobile apps. I have an iOS background but was intending to make a RN app so that I could share the bulk of the React webapp code and get Android support as well.

I have separation of container components and presentational SFCs so I’m thinking I could easily re-implement UI layers in RN if I wanted to without sacrificing the shared code. Do you think this is a reasonable approach? Or should I ditch RN completely and build native...?

It would be nice if there was a way I could pull that shared JS logic (which really doesn’t have much dependencies) into mostly-native apps without having to adopt RN... maybe I could just repurpose the JS bridge and be aware of its limitations (a sync/serialized/batched..)

mephitix··on Fatalities vs. False Positives: The Lessons from the Tesla and Uber Crashes
Dunno about ‘galore’. The color of the circles seems to correlate with the confidence.
mephitix··on State of React Native 2018
Have you used it? I saw it before but felt wary about having yet another layer above RN and React. I’ve been burned by taking on too many dependencies doing magical/black box things in the past...
mephitix··on Has Vue passed React yet?
Another example: Typescript vs. Flow. Two different type checkers, with different capabilities and pros/cons. But given that many devs are using VSCode now there is so much emphasis being placed on Typescript by MS that Flow is slowly becoming a second-class citizen.
mephitix··on State of React Native 2018
I think the commenter is saying something I've felt about cross plat for most of the 10 years I've been working in it... ultimately the best user experience is delivered by the native platform and tools.

Cross platform tools can get you really close but you'll be spending a non-trivial of your time tinkering/tweaking shared code to fix or create different issues on different platforms. That's time that takes away from creating a great user experience on a single platform.

That's not to say Cross-platform tech is all bad. Just that you have to be aware of the tradeoff that you won't be able to 'give it your all' towards the best user experience on a single platform.

PS - the one tech stack that gets you really close from all the ones I've tried (Mono, C++, hybrid web apps, RN) is Unity. But that's for an entirely different use case than apps :)

mephitix··on State of React Native 2018
Hi - What's the latest philosophy/best practices on interop with React web?

Is the philosophy still 'learn once write everywhere'? There are so many different approaches now to reuse React Native with React, like react-native-web and react-native-dom, it's confusing.

Some of those solutions are non-starters for me since I started with a React webapp and want to now have a React Native app that shares most of my existing code.

My gut feeling is just stick with HOCs, SFCs, proper isolation of the views and I'll be able to share the bulk of things like action creators, reducers, etc. Is this reasonable? Are there other good practices?

mephitix··on Show HN: An Almost Ideal React Image Component
>> So, I think step one is to step back, all take a breath (devs, browser-makers, etc.) and look at creating a reasonable, cohesive platform for proper Web-development, free of the legacy baggage of a static document-based foundation with reams of duct tape on top.

Lol... this is way easier said than done. The ironic thing is, this has been attempted several times. In fact I would argue this thinking led to the React ecosystem.

mephitix··on Show HN: Recursive Recipes – directions to make food from scratch
No worries! we're all learning here :)
mephitix··on Show HN: Recursive Recipes – directions to make food from scratch
This is a cool concept but this is so meta - it looks like my browser history recursed on itself lol
mephitix··on Show HN: JQBX – Social Listening Web/Mobile App
Would be interested to learn more about how you share components/code between RN and React!
mephitix··on Best Practices with CSS Grid Layout
I just change “flex” to “grid”. It has the same result and it can be grids all the way down. I’ve seen issues on mobile platforms when containing grids in flex boxes.
mephitix··on Best Practices with CSS Grid Layout
You get it. Grid-gap is so powerful and I can never go back to flexbox even for 1-dimensional stuff. My favorite is using minmax() to control responsive overflow.
mephitix··on Best Practices with CSS Grid Layout
I really don't get this argument. Not only is it easier IMO to layout things in one-dimension with CSS grid, but there are subtle bugs that occur on different platforms if you have Flexbox and Grid nested within each other. Just stick with Grid all the time and make your life easier.
mephitix··on GDPR for lazy people: Block all European users with Cloudflare Workers
I don't understand... isn't that something that the company decides? How are users stealing something?

For the longest time companies have been able to market something as 'free' when they have been the ones who have been trying to hide the fact that users' data was being sold, etc. So I would argue that if someone is 'stealing', it is actually the companies themselves.

mephitix··on GDPR for lazy people: Block all European users with Cloudflare Workers
'Free' is a powerful word - there's a lot of incentive for companies to tout 'free' and for users to feel like they're getting a good deal - when in reality there's a whole lot of other stuff happening behind the scenes.

My take is that consumers need to be aware of what 'free' really means for each service that advertises it. What are the real implications - not just something hidden in doublespeak in a ToS or privacy policy.

Everything spelled out in the GDPR is a great thing for users and should have been there from the very beginning - being able to erase all their data, see all their data, export their data, and get notified when data is accessed.

mephitix··on GDPR for lazy people: Block all European users with Cloudflare Workers
>> EU citizens have turned into pests overnight.

Are they really pests for demanding privacy? In today's environment?

mephitix··on Mortgage rates have been rising at a pace not seen in almost 50 years
I guess I should rephrase - now is a good time compared to the foreseeable future? As in, next couple of years it will be a worse time.

I actually bought a house 5 years ago, and I really feel I totally lucked out. Back then though, the fear of rising interest rates scared me into buying. Like you, I don't expect those type of returns with any investment I make now... but I was thinking about diversifying my finances, and moving money away from stocks into property real estate.

I know that I'll have to be much more diligent about finding the right market/deal. I'm using Bigger Pockets at the moment which is quite an amazing resource. Thanks for pointing me to your site too.

mephitix··on Mortgage rates have been rising at a pace not seen in almost 50 years
I'm not an expert at all in this - but it seems like now is a great time to be a real estate investor?

Given that interest rates will rise, there will be more demand in the rental market. I don't think REITs will be a good option because of the potential for higher interest rates but investing in a property, locking in that interest rate, and generating positive cash flow from rent would be a sound decision?

mephitix··on Airbnb's new typeface
Actually my response was - WHY build/work on this? I understand that licensing a font can cost a company a lot of money but there is no reason why a company of this size can't just use any of the thousands of open source fonts available. It is a waste of time/resources that is pretty characteristic of a big tech company (having worked at one).

In at least the cases I've seen - the reason why this happens is because design teams want to stand out and stamp their identity on the company. It is a reason to add imaginary value to internal "design studios" and promote designers to arbitrary titles.

And engineers, PMs, etc. mostly do the same. Create work, features, platforms that add no real value but simply to stamp their identity and pursue (effectively) self-promotion.

The original commenter makes a great point about saying that there are many other things to focus their energies. Okay, throwing engineers at a single problem is not a good way to do things.

But the AirBnB iOS app has been broken for ages. Various visual and functional bugs. Offline support is arguably the most important feature for an AirBnb app (if you're traveling and don't have service). But this hasn't been tackled at all.

Instead AirBnB engineers are going through all of their properties and updating their fonts, fixing issues with responsiveness/scaling, packaging on mobile platforms, etc. WHY?

mephitix··on [dead]
How do articles like these get published? Mostly FUD, no mention of 'opinion' at all.

At least the intentions are clear - from the author, at the bottom of the article: "Disclosure: I am/we are short TSLA."

mephitix··on My struggle to learn React
>> I'd prefer that the documentation outright say "This is a BAD idea if you're just doing xyz" instead of "if you need, you can check out this".

That's a good point - I wonder if devs think enough about when not to use the tools they build. I was about to mention that the Redux docs do this but the only thing I could find was the 'Before Proceeding Further' section on the first page. I think my impression came from Dan/Mark's tweets and articles, like this one: "You Might Not Need Redux" [0]. But even that article talks about all the benefits of Redux first :)

>> Also, is it just me or is the tic tac toe tutorial really not useful?

I agree it's contrived. Building a game I think is a good way to get introduced to working with state in a slightly more complex and interesting way. React is at its heart all about rendering a state machine. It's up to you how to represent that state machine - either as primitive state, context provider, or redux. Personally I'm not a fan of address book examples but that's just because I've seen so many of them they don't hold my interest...

[0]: https://medium.com/@dan_abramov/you-might-not-need-redux-be4...

mephitix··on My struggle to learn React
I want to learn Mobx. I like the conceptual model (functional, immutable) of Redux though - I'm just not a fan of all the boilerplate although I understand why it is there.

What's your take on things you miss from Redux now that you've switched over to Mobx?

mephitix··on My struggle to learn React
I guess it depends on how you learn. I personally used CRA in my learning process and it helped me get up to speed in understanding React fundamentals (reconciliation, lifecycles, state management..) Then I started going down into the stack and understanding Webpack, etc..

For me personally it would be exasperating to learn all of the stuff that CRA bootstraps before actually getting to learn React.

mephitix··on My struggle to learn React
>> But the point would be to start with the basics and build up an understanding of why we need these libraries. And what problems they solve and what problems they don't solve.

This is exactly what the well-written official React docs do. It doesn't involve any CSS-in-JS, Redux, Thunking, Webpack, etc.

1) Start off with a basic app - build the Tic-Tac-Toe app through the official React docs

2) Build a simple React app with the official CRA (Create-React-App) tool

3) Build a more complex app

4) Keep building a more complex app, learn about routing, lifecycles, performance...

N) Look into Redux if you need it

---

Re. Redux:

The React docs have jumping off points throughout this process to understand why setState-based state management can get difficult in large applications (prop drilling) and the problems Redux solves. Look at this excellent doc on 'Lifting State Up' (https://reactjs.org/docs/lifting-state-up.html). This makes you go through the motions of setting up a component with setState, lifting state up, and experiencing prop drilling. Redux isn't even mentioned here.

Re. Thunking:

In the 'Basics' section of the Redux tutorial (https://redux.js.org/basics/actions), here's an excellent snippet: "Action creators can also be asynchronous and have side-effects. You can read about async actions in the advanced tutorial to learn how to handle AJAX responses and compose action creators into async control flow. Don't skip ahead to async actions until you've completed the basics tutorial, as it covers other important concepts that are prerequisite for the advanced tutorial and async actions."

Re. Reselect:

Again, in the Basics section, in "Usage with React" (https://redux.js.org/basics/usage-with-react): "These are the basics of the React Redux API, but there are a few shortcuts and power options so we encourage you to check out its documentation in detail. In case you are worried about mapStateToProps creating new objects too often, you might want to learn about computing derived data with reselect."

None of these 'power options' and extra tools are talked about in depth in the Basics sections of any of these docs. They are mentioned as jumping off points and the reader is warned not to dive into them early without continuing with the tutorials/docs. This seems to be exactly what you're looking for...

mephitix··on NASA advisers say SpaceX rocket technology could put lives at risk
That report came out 32 years ago. The article suggests that the space agency has become more safety-obsessed over time.
← PreviousPage 2 of 6Next →