HNHacker News
TopNewBestAskShowJobs

joshuakcockrell

325 karma · joined December 27, 2015

Cofounder @ Envelope

https://envelopebudgeting.com

Former iOS Engineer @ Robinhood, Twitter, Tesla

submissionscomments
joshuakcockrell··on Kotlin multiplatform is stable and production-ready
I just already had a graphql backend, which uses the gql schema to codegen the networking layer.

Probably not much different from an open-api schema + codegen, I just had it set up so it was an easy choice for me shrug

joshuakcockrell··on Kotlin multiplatform is stable and production-ready
We picked Kotlin libraries that supported KMM. So we used Apollo Kotlin, and our network requests were handled by that library's KMM translation. So there was a layer of abstraction we accepted. We never wrote raw `HttpURLConnection` code on the Kotlin side, so I'm honestly not sure what that would get translated into. KMM compiles your code into an iOS framework, so you don't actually get to see the code it creates for you (you get access to the Objective-C headers).

You're totally right, you're at the mercy of these KMM libraries and their knowledge of platform specific optimizations.

joshuakcockrell··on Kotlin multiplatform is stable and production-ready
I've been using Kotlin Multiplatform Mobile (KMM) heavily for the past 2 years on my current YC startup. I'm in the process of removing the entire thing.

KMM is an alternative to cross platform mobile libraries like Flutter, React Native, etc. The idea is that we could write all of our mobile app's business logic, networking layer, and caching layer in Kotlin, and KMM will codgen the matching iOS code. "We only need to write it once!" is the selling point. Then we get a blank canvas to build our UI using 100% native SwiftUI & Jetpack.

In reality, the codegened iOS code gets you 90% of the way there, the but extra 10% is extremely frustrating to work with. Enums (Sealed Classes in Kotlin) get mangled in translation and you lose exhaustive switch statements. Basic data types like Bool and Int get wrapped so you can only access them using additional .boolValue or Int64(..) constructors. Entire companies are being built around solving the pain point of this last 10%: https://touchlab.co

In my opinion, the fatal mistake the KMM team made was designing it to support Objective-C, instead of just Swift. So you're using a Kotlin layer -> mangled through Objective-C -> accessed from Swift. It's a confusing decision, as the only iOS teams still actively using Objective-C are legacy apps (like the Twitter app), which seems like the opposite target market for new mobile tech like KMM. Kotlin and Swift are both modern languages, and my gut says the interop between the two would be much better without Objective-C in the middle.

Further discussion from Droidcon if you're interested: https://www.droidcon.com/2022/08/01/sdk-design-and-publishin...

> As you progress beyond "POC" to integrating and shipping real production code, the design of the "SDK surface" becomes more complicated and nuanced (or, possibly, problematic)... An Android consumer can see all the richness of the Kotlin language, but the iOS side gets filtered through Objctive-C into Swift. Much can get lost along the way.

P.S. I'm replacing KMM with the Apollo Kotlin and Apollo iOS SDKs, which codegen your app's entire networking/caching layers. So it solves the same pain point (aside from business logic), but in a much cleaner way!

joshuakcockrell··on Increase: Banking API
I’m currently building this at envelopemoney.com
joshuakcockrell··on Ask HN: Do you create music? let's hear it
I make all the beats for my YouTube vlogs. I post the songs for others to use royalty free. Some have several thousand plays.

https://youtu.be/JhQpXwXUWok

joshuakcockrell··on Why ‘playing hard to get’ may actually work
I got married ~3 years ago after several years of dating around. This book really helped me understand the psychology of finding a partner and getting married

Love Factually - Duana Welch, PhD

It talks a lot about playing hard to get. The book basically frames it in the same “more in demand” that this linked article talks about.

And also adds something I’ve always remembered.

We see hard-to-get as attractive because we know, for others, they will be impossible-to-get once they’re our partner.

(I’m paraphrasing)

So hard to get only works as long as we perceive they’re hard to get for others also.

Anyways, that book was definitely a life changer for me so if you’re interested in this kind of stuff or trying to understand the confusing world of finding a partner I highly recommend it.

joshuakcockrell··on Show HN: AI Dungeon 2 – AI-generated text adventure built with 1.5B param GPT-2
> open my laptop

You open up your laptop and type in your name and hit enter. You get an error message though, saying that you need to install Adobe Flash Player first.

> burn my laptop

You decide not to bother with installing Flash Player and instead just burn your laptop. When you turn it on you get an error message again telling you that you need to install Flash Player. This time you choose to ignore it and proceed with burning your laptop

Sounds pretty accurate!

joshuakcockrell··on Uber lays off around 350 more across Eats, self-driving and other departments
Honest question: Why don't large scale acqui-hires happen in these situations? Often hiring is one of the top challenges for these companies. They go through 100s of resumes and interview dozens just for each role. Times that by 300+ people and it’s an incredible amount of effort and value here. So to fire 300+ people is years and years worth of human lives that went into hiring that many top tier tech employees.

I’m sure Google or someone would pay a TON of money to have them all sent down to Mountain View for the day to do a huge round of interviewing. The same way they do for smaller-scale startup acqui-hires.

joshuakcockrell··on Startup Stock Options – Why a Good Deal Has Gone Bad
One problem with this is that later round investors usually want their investment to go into growing the business, instead of paying off employees. So the incentives aren’t aligned here to allow employees to sell their stock while the startup is still private.

Employees are also not usually invited to the investor meetings where these types of negotiations would take place. They would probably need the founders to vouch for them to make this happen.

joshuakcockrell··on South Korea accepts geothermal plant probably caused destructive quake
It would be the equivalent of controlled burns to prevent larger forest fires. That would be very interesting to see applied to earthquakes.
joshuakcockrell··on What is it like working at a company after releasing a negatively-received game?
Back in 2011 I was a game tester on Hasbro Family Game Night 4. Definitely not an official spokesman here. It was so bad that we opted out of even having public reviews for the game from the large review sites.

Morale went way up once we released the game because everyone was so sick of working on it and knew the game was terrible. It was a product of having a low budget and tight deadlines. Sounds like my experience lines up with most of this Reddit discussion.

I think it may be different if, for some reason, the team is convinced their game is amazing before shipping. But in my experience game developers usually know if their game sucks.

joshuakcockrell··on Teen Becomes First Hacker to Earn $1M Through Bug Bounties
One of the best introductions to the field is going through overthewire’s bandit vulnerability games. https://overthewire.org/wargames/bandit/

They have 30+ levels where you ssh into a server and attempt to find some type of vulnerability. They start out very easy and get tough quick. It’s very eye opening to see the types of exploits that exist.

They also have a set of challenges aimed at serverside web security. http://overthewire.org/wargames/natas/ I went through the web challenges last year and they helped a ton in my web dev roles.

joshuakcockrell··on America’s Professional Elite: Wealthy, Successful and Miserable
> We want to feel that we’re making the world better, even if it’s as small a matter as helping a shopper find the right product at the grocery store.

My question for HN is do you feel that the content you are working on makes a difference in your career satisfaction? Or do you just need to know that _someone_ out there is being benefited?

Is it just as fulfilling to work on a video game that flops (but maybe a few people still enjoy it) as it is to work on Fortnite where your code changes are used by millions?

Is it more satisfying to work on consumer facing iPhone apps like Apple Fitness where you are enabling millions of people to be healthier compared to working on a high frequency trading algorithm that makes a few people lots of money?

joshuakcockrell··on Top Paying Tech Companies of 2018
[deleted]
joshuakcockrell··on What Really Happened to Apple’s Airpower
Apple's own website lists a wireless charger for sale from Belkin:

https://www.apple.com/shop/product/HLZ42/belkin-boost-up-spe...

So, although I've never used one myself, clearly these chargers are feasible and the overheating challenges the article lists are solvable. I know the Belkin one looks more simple (1 device instead of 3), but why doesn't Apple enter the market with a similar product? The article doesn't really answer the question for me of why Belkin is creating one but Apple is not.

Edit: Not sure why I'm getting downvoted. This is a genuine question and it's getting a lot of informative responses.

joshuakcockrell··on Apple Special Event [video]
With FDA clearance you're allowed to brand and advertise your product as a "medical device". Also, without FDA approval, you have to be very careful about certain terms you use to describe your product's features. For example, without FDA approval, you cannot say your device "monitors" falls. You can only say it "tracks" falls. There are several other limitations because the FDA doesn't want you making these types of medical claims to customers unless the FDA has approved them.

Source: I worked on a fall detection app for the Apple Watch last year.

joshuakcockrell··on Apple Special Event [video]
With FDA clearance you're allowed to brand and advertise your product as a "medical device". Also, without FDA approval, you have to be very careful about certain terms you use to describe your product's features. For example, without FDA approval, you cannot say your device "monitors" falls. You can only say it "tracks" falls. There are several other limitations because the FDA doesn't want you making these types of medical promises to customers unless the FDA has approved it.

Source: I worked on a fall detection app for the Apple Watch last year.

joshuakcockrell··on Show HN: Namegine – find a name for your startup or product
> -Im not really a fan of the name, which is a problem that stands out when your product is about good names. "Namegine" parses strangely, I think my brain's looking for another "n" to complete the word "engine" and keeps wanting to pronounce this word "Namm-Egg-Inn". Honestly, I think just NameEngine would be a better name. Obviously very subjective though.

My mind jumped to pronouncing it as Name-Genie, thinking it was a reference to a genie in a bottle that would spit out a startup name for you.

joshuakcockrell··on Ask HN: How to not fail on coding interview questions?
Yeah, it's exactly like taking the same test multiple times! I recommend it :) In my experience, this only happens in the same season if it's the recruiter's idea. Google did this with me one time. The recruiter knew I just got rejected interviewing with one Google team, but she was incentivized to put me in the interview track with another team so I got two shots.
joshuakcockrell··on Ask HN: How to not fail on coding interview questions?
> going through 200+ rejections is just soul wrenching

Yeah I've been through this many rejections total, and some of them have been pretty tough emotionally, but it only takes 25-50 before landing another really cool job I've been excited about. 200 rejections is pretty soul wrenching, but getting the other big companies on the resume makes it more than worth it.

joshuakcockrell··on Ask HN: How to not fail on coding interview questions?
> I am interested in how you've managed to apply to multiple roles at the same company? is this across 3 internship seasons?

A lot of companies will list the same roles across different teams. Applying to (or interviewing with) all the different teams helps your chances. I'm at Tesla right now and I applied for 15 different roles over the span of 3 years before they gave me an offer.

joshuakcockrell··on Ask HN: How to not fail on coding interview questions?
> But each failure kind of brings me down, and makes me think that I'm a bad engineer

First off, you are not a bad engineer for failing a technical interview. Over the past 3 years, I've applied for hundreds of roles across dozens of companies. I've been through dozens of interviews and I've got offers from (or worked at) Uber, Twitter, Microsoft, Tesla, etc. The side of the story I don't focus on is that I've had over 200+ rejections. Some after first rounds, some just after they look at my resume. Rejection is part of the game but you just need to push through it. Here's my advice.

- As other comments have said, it's definitely a numbers game. Some days you just don't mesh with your interviewer, others you know the answer to their coding question before they've even finished asking it. Just apply over and over if you want the best odds. You can't get too emotionally attached to any single interview opportunity. I've had to apply for ~50 roles for each offer I get. That's just the way it works.

- Practice a ton. It sounds like you are more worried about coding under pressure and thinking through the answer while you are in the middle of trying to explain your thought process to the person interviewing you. I recommend pramp.com You interview someone for 30 minutes over the webcam and then they interview you for 30 minutes. It's super convenient and gets you very comfortable thinking through problems on spot with someone else watching you. I normally do ~10 pramp.com interviews while I'm preparing for an upcoming interview. In person interviews with friends is good too but less convenient than just signing up online for a time slot.

Just remember that bad interviews don't make you a bad engineer. At the end of the day, no one will remember dozens of rejections, but they will remember the job you eventually land. Keep interviewing till you get an offer that you're excited about. Good luck!

joshuakcockrell··on Unfortunately, the Electric Scooters Are Fantastic
These scooters are getting stolen left and right in San Francisco.

I read the HN article last week about charging these (where they pay you to collect scooters and you charge them over night), so I recently signed up to become a charger for Bird scooters. When I first opened up the app to search for ones to charge it showed dozens of these things[1] that had gone missing in the Tenderloin. I went searching for some yesterday and after being unable to locate about 5 in a row, I saw two homeless guys dissecting one. The electronics were hanging out and they had screw drivers in hand.

Of course I didn't confront them, and I went home empty handed.

[1] Yesterday I counted ~33 that had gone missing in the Tenderloin within the past two weeks. To put this in perspective, there are only about 75 - 100 of them in the entirety of SF right now if you open up the Bird app.

joshuakcockrell··on Tesla in autopilot mode crashes into parked Laguna Beach police cruiser
Here's the exact spot on that road that matches the picture in the article https://goo.gl/maps/pj3X4gAuG672
joshuakcockrell··on The forgotten 80s home robot trend
Surprising how many of these look like they were taken from the set of Star Wars.

This one looks like R2-D2 with giant Coca-Cola sticker slapped across the front. http://www.theoldrobots.com/cobol.html

joshuakcockrell··on What It Felt Like in Hawaii When Warning of an In-Bound Missile Arrived
Mormons stopped practicing polygamy in 1890.
joshuakcockrell··on Ask HN: How do I prepare for an interview for AMZ/GOOG/APL/FB?
> How do you guard against just memorizing the questions?

I don't think you need to worry about this. A simple search for "binary search" shows 20 different questions. If you can't do the 1st bst problem and you look at the solution then that's okay! You have 19 more to try it on. Even if you do all 20 then come back in a month and try them again. There's no way you're going to be able to memorize that many variants. And that's just 2% of their entire set of questions.

To really answer your question, I prefer to just hit the "random problem" button and see if I can solve it in 15 minutes with an optimal solution. If I struggle, then I just go read the solution (to understand how I should have solved it) and try a couple related problems to make sure I'm not just memorizing it and I actually understand the methodology behind solving it.

Good luck!

joshuakcockrell··on Ask HN: How do I prepare for an interview for AMZ/GOOG/APL/FB?
I've worked at Microsoft, Adobe, and Twitter over the past few years. I've also received offers from (or interviewed with) Google, FB, Dropbox, Uber, etc. I would recommend:

https://www.pramp.com - 1 hr online interviews where you interview someone and they interview you back. Go through ~20 of these to get really comfortable solving problems while talking through them. They also give you the optimal solution at the end. This will prepare you really well for the initial technical phone screenings.

https://leetcode.com/ - collection of 700+ interview coding challenges. You should be able to solve any random medium difficulty question within 15 minutes if you want a shot at the companies you listed. Keep doing a couple of these per day till you get really good.

"Elements of Programming Interviews" or "Cracking the Coding Interview" - Read through either one of these to get an overview of the interview process and what companies expect.

Polish your resume - This is only important to get the interview. Once you are interviewing onsite the resume doesn't matter much. Here is mine to give you an example. http://joshcockrell.com/joshua_cockrell_resume.pdf Feel free to send me yours if you want some feedback.

joshuakcockrell··on What was it like to self-learn programming before Stack Overflow? (2016)
I remember downloading open source projects that I found online and combing through their source code to find out how they did something. Back in the mid 2000's I was working on a video game and I would spend hours looking through the games on pygame.org for examples. Painful process.
joshuakcockrell··on Ask HN: What are you working on?
A color palette generator that searches palettes from dribbble.com

http://paletteship.com/

← PreviousPage 2 of 3Next →