HNHacker News
TopNewBestAskShowJobs

sorahn

683 karma · joined October 23, 2013

submissionscomments
sorahn··on How Does setState Know What to Do?
Is there any way (other than the chrome bug tracker) for devs to talk to you guys about Dev tool bugs, or suggestions?

There are definitely some lingering low pri bugs in the issue tracker that would improve the QoL that would really help the dev tools experience.

Example: https://bugs.chromium.org/p/chromium/issues/detail?id=771144

This happens every time. So I just stopped moving the tabs, but if the dev tools are not wide enough to show the (ever increasing) number of tabs, it’s always the 3rd party ones that get pushed off.

sorahn··on How Does React Tell a Class from a Function?
The new suspense api is based on throwing and catching promises as part of the render, so I don’t think its that.
sorahn··on iPad Pro
How do you like Coda? I’ve been a Transmit user forever, so I’m willing to give them the benefit of the doubt.

With support for the lg 4/5ks I could actually see myself going all in on an iPad Pro for a home setup.

sorahn··on iPad Pro
That is what i'm talking about, but I didn't know if it was macos doing it or what.

I've seen videos where there is a faint circle representing where the cursor is and then it 'touches' the screen.

shrug I just wasn't sure if that was part of the ipad itself (like maybe accessibility) or all from the simulator.

sorahn··on iPad Pro
Something in the simulator supports a mouse, so I wonder if it's down in the code somewhere, just not enabled.
sorahn··on iPad Pro
That only works with their vnc software. So, mouse on windows, through remote desktop running on the ipad.

The iPad itself still has no concept of a cursor.

sorahn··on iPad Pro
Does anyone know if the iPad pro will support a mouse via USB-C or Bluetooth?
sorahn··on Apple Finally Updates MacBook Air with Retina Display, Touch ID
3rd party companies make these[0]. It's a little plug into the USB-C port, then a break away cable.

My only complaint about the usb-c is that they're on the same side. I've gotten used to flipping back and forth on my mbp for plugging it in. (different setup at home and work)

[0]https://www.amazon.com/Griffin-BreakSafe-Magnetic-Breakaway-...

sorahn··on Introducing Hooks
FYI. https://github.com/acdlite/recompose/commit/7867de653abbb57a...
sorahn··on React v16.6.0: lazy, memo and contextType
I felt that way too.

Seems like it’s more of a monkey patch for people who liked “the old way”.

sorahn··on Police told to avoid looking at recent iPhones to avoid lockouts
FWIW I just tried this with my Xs locked and it worked exactly as described.

Thanks for the tip!

sorahn··on Handling Notch on iPhone X, XS, XR, XS Max
The phone does this by default. You have to double tap the video to zoom in to get the notch/corners to cut some of your video.
sorahn··on Learning from Terminals to Design the Future of User Interfaces
Yup this. If I wanted to carry around a bag of plugins all day, I'd just use bash.
sorahn··on Learning from Terminals to Design the Future of User Interfaces
Check out Fish Shell.
sorahn··on JavaScript fundamentals before learning React
> TL;DR: Write more integration tests instead of unit tests with mocking.

Interesting. I will investigate what that looks like at work tomorrow. Thanks!

sorahn··on JavaScript fundamentals before learning React
OK, you caught me, give bar an argument. (I'll edit the gist)

Why should mocking only be used in 'extreme circumstances'? I want to test what bar does, and I don't care what baz does, and if someone breaks baz, my unit tests for bar shouldn't fail, because it is doing its job.

I would mock it if it was calling some function in another module, so what's the difference if it's calling another function in the class?

sorahn··on JavaScript fundamentals before learning React
Given this super contrived example: https://gist.github.com/sorahn/2b287c2a97a12e318585e84d9a9e8...

If 'baz' was a fat arrow function, you would never be able to test bar in isolation.

for example: Jest is set up so it's super easy to say `jest.spy(Foo.prototype, 'baz').mockReturnValue('whatever')`and test that bar is doing the right thing.

sorahn··on JavaScript fundamentals before learning React
It’s worth noting that using the fat arrow syntax for class functions make them exponentially harder to unit test because they do not exist on the Prototype of the component, but are instead only initialized when the class is initialized.

If you are trying to unit test a function that calls another function in the same class you cannot mock the second one it if it is a fat arrow.

sorahn··on Why Isn't Debugging Treated as a First-Class Activity?
A lot of modern IDEs are debuggers too. So now you’re reading the code, in your document reader, but it’s got a bunch of the variables filled in with real values.
sorahn··on Apple Engineers Its Own Downfall with the Macbook Pro Keyboard
It’s not so much the half keys that makes it obnoxious, but having the left and right keys be full height, and not having a gap to orient my fingers in the keys means I’m often pressing “shift” with my middle finger thinking it’s “up”.
sorahn··on If a pilot ejects, what is the autopilot programmed to do?
This is why my favorite coffee table book is the “XKCD What If”. He only spends a few seconds on “why it probably wouldn’t happen”, then fully digs into what would happen if it did.
sorahn··on React profiling component to measure the "cost" of rendering
Reddit could have been rebuilt in react and looked exactly the same, and no one would have ever noticed. The problem with the new reddit design isn't react, it's designers.
sorahn··on iOS 12 introduces new features to reduce interruptions and manage Screen Time
This is my most wanted feature. Similarly, if we could just send all unrecognized numbers to voicemail that would be awesome.
sorahn··on The dots do matter: how to scam a Gmail user
You’re not missing anything, but if gmail delivers all the mail, and I just trash it, we’ve fixed the symptoms, but not the problem, and we’ve made the problem invisible.

I agree that sending verification emails should be the standard. But if I can’t bounce the emails then there isn’t even the slightest way to inform the sending service that there might be a problem.

sorahn··on The dots do matter: how to scam a Gmail user
My issue with doing that is that the other person will never get help. They’ll just say “oh my emails keep getting lost”, but if google would bounce them, then hopefully one of these services would notify the person that that isn’t their email. Instead of them happily continuing to send it all to me.
sorahn··on The dots do matter: how to scam a Gmail user
It’s not too short. 12 characters including the name separating dot.

This person that recently started using this email is using the same name but with no dot.

first.lastname@gmail is what I use, and now I’m getting a bunch for firstlastname@gmail.

Some of these emails look pretty important too, if I had malicious intent, I could probably ruin and or steal this persons identity and or business with the specific mail that I’ve received recently.

I’m really amazed at the lack of confirmation of emails before sending things like your HVAC business license, or city contracting permits, that have other people’s identifying information in them too.

sorahn··on The dots do matter: how to scam a Gmail user
I really wish that I could tell google to bounce all the emails that don’t match my “dot pattern”

I’m now in complete control of someone else’s commercial business hvac account because of precisely this problem. And the worse part is that I don’t know the correct email to get ahold of this person. They’ve set up library appointments, I received a receipt for a down payment on a lake house, basically most of this persons recent attempt to start a commercial business has been emailed to me.

I don’t want this email google. Please give us the option to make it stop.

sorahn··on Tesla fatal car crash prompts NTSB investigation
Got a link?
sorahn··on Apple Maps vs. Google Maps vs. Waze
I have a similar issue with my head unit. It will stop whatever music I'm currently listening to and start pandora. It's obnoxious enough that I just don't have pandora installed on my phone anymore.
sorahn··on The Future of Transmit iOS
My experience with a keyboard on iOS has been awesome. Even more impressive is that large handful of the ⌘ keyboard shortcuts work, including some of the globals like ⌘-tab (change app) and ⌘-space (spotlight).
← PreviousPage 3 of 5Next →