Live data from Hacker News

Ask HN: What do you regret you didn't know when programming for iOS or Android?

news.ycombinator.com

71–80 of 166 posts

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#71
Example code is invariably dross from an architectural point of view.

Unit tests are still valuable in a mobile environment.

Most good apps are simple. Simplicity is not easy.

Some aspects of mobile development will become far easier over time (memory management on iOS) while some will remain in a baffling stasis (refactoring tools in Xcode). It’s impossible to predict which category an aspect belongs to ahead of time.

There are times to embrace the approach taken by a platform, and times to distance yourself from it.

Mobile as a platform will crush all before it and transform society, while most contemporary technological hopes will remain geek toys.

The remembering self can really help out the experiencing self; you can never learn too much about the past, present, and future of mobile programming.

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#72
post #53

That developing for Android isn’t even as half as smooth as developing for iOS. Yes, with iOS you’re using Xcode and have to set up provisioning for your dev device and all that, but once you’ve done that you’re mostly on your way. UIKit, while not the shiniest thing out there, is quite competent and functional — you can easily write world class apps with it while keeping third party libraries to a minimum. On Androi…

> You’ll spend inordinate amounts of time researching the “right” way to do things only to find that there really isn’t one, but instead several ways with varying levels of wrongness with different trade offs. From what I've heard Android is unusually bad for this but this particular sentence resonates with me in terms of basically everything ... though that may be because I do a bunch of deployment/ops stuff which i…

The best-case end result of this instability, of course, is the "double interface" - an interface abstraction on top that talks in terms of the domain problem, and then a second layer to convert the lower level interfaces into that abstraction.

Unfortunately GUI is particularly fiddly and difficult to write the double interface for, since you get a "thousand words is one picture" problem: it doesn't reduce well to text.

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#73

Earlier quoted context omitted.

Personally I think that Flutter is the future for cross-platform UI toolkits. As a React dev (in my spare time, I’m still a student), using RN was a pain due to the need to install native extensions for almost everything. The batteries-included approach of Flutter and just the polish around the dev workflow made it more attractive to a beginner mobile dev.

I would be hesitant to recommend seriously pursuing cross-platform. Most serious applications generally run into scaling issues as they get more complicated and demands require more than the abstractions the cross-platform tool can provide.

On the other hand, very few applications need to scale to the point where it matters. If the options are "ship something now and refactor later" versus "ship something in six months that's perfect but too late", most people here would benefit from cross platform solutions.

Very few companies have ever failed because their tech stack didn't scale well.

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#74

Earlier quoted context omitted.

Agreed. This absolutely kills me when people say “just read the documentation” or “the documentation is very good” as a reason why they don’t produce examples or templates or starter kits. Not all of us are CS majors or programmers in large teams or with decades of experience to fall back on. Just reading the documentation isn’t enough to get me into a new framework or language. I need to see practical examples. For…

Apple used to have a lot of pretty good (not perfect, but pretty good) conceptual/architectural documentation. Most of it has sadly been sunset, and is hard to find, even though it's still largely applicable. And it hasn't been replaced -- hopefully that's just "hasn't been replaced yet ".

Apple documentation in the 90s was a piece of beauty. Microsoft's was pretty good too back then with MSDN Library CDs.

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#75

I regret not knowing that Android API is awful. Then I regret looking into Nativescript, because it was pretty buggy. Then I regret not knowing about Flutter earlier. THEN I regret not knowing that Flutter is pretty buggy as well. Next step is me trying to learn other frameworks, like Cordova or React Native. I wonder what my regrets will be.

Cordova and react native are going to disappoint you for the same reasons.

Everything sucks in its own sweet way :-)

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#76
I develop for Android since 2011. Since 2016 I also do more iOS. I mostly regret not looking into new developments faster. Things like Kotlin and Architecture Components. They are great, so at least experiment a bit with them to see what all the fuzz is about. Try to keep up!

Also, I wish I realized that Google Play is giving you a lot of stats and data about your apps (store) performance these days, which in most cases can help pinpoint a issue with your reach/growth.

I also regret everything about Objective C ;)

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#77
On Android: being paranoid about multithreading in all the wrong places before I stopped worrying and love the main thread.

Move actual work off thread whenever possible, but never try to integrate off threat memory access by hand using synchronized and friends, just enqueue your final result plumbing on the main looper.

Be paranoid about multithreading in the right places, particularly when you hand a callback to some black box. A callback that checks the thread it's running on to enqueue itself on main if necessary might become a familiar pattern. You might start to hate all callback methods that don't return void.

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#78

On the iOS side, I regret not knowing how horrible Xcode is and how horrible Apple's documentation is. On the Android side, I regret not realizing that no matter what kind of slick new well documented APIs Google releases we will all be writing code for Android 4.4 for the rest of our lives. Also, I wish I knew mobile developers are some of the lowest paid developers other than game industry peons.

> I wish I knew mobile developers are some of the lowest paid developers other than game industry peons. Everything is relative of course, but can you back up your claim with some numbers? Where do you live? What salaries and compensation packages are you seeing?

https://stackoverflow.blog/2018/09/05/developer-salaries-in-...

Well, ok, I guess it's not that grim. Still, it's a pretty crappy job.

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#79

That mobile web apps aka PWAs are a perfect fit for classical data-driven applications. The return on investment for 2 native apps vs. a PWA is far...

You're not allowed to use full PWA capabilities on iOS though right?

Re: Ask HN: What do you regret you didn't know when programming for iOS or Android?

#80

Earlier quoted context omitted.

Personally I think that Flutter is the future for cross-platform UI toolkits. As a React dev (in my spare time, I’m still a student), using RN was a pain due to the need to install native extensions for almost everything. The batteries-included approach of Flutter and just the polish around the dev workflow made it more attractive to a beginner mobile dev.

I would be hesitant to recommend seriously pursuing cross-platform. Most serious applications generally run into scaling issues as they get more complicated and demands require more than the abstractions the cross-platform tool can provide.

Today is a weird time to get into mobile app dev. The standard 'native' UI frameworks are pretty terrible in terms of how they cope with complexity and their ability to change over time with their dated OOP APIs. Though on both platforms the tooling has been climbing ever upwards towards local maxima.

The best options available for most Apps today (even if just for a single platform) are typically React Native or Flutter. With their React(-ish) UI approaches you can both quickly build and iterate in the future.

SwiftUI is not ready for most uses (I've shipped a small but non trivial app https://apps.apple.com/us/app/pattern-maker/id1484249212 and was surprised by how many bugs there are for very standard things and how many hacks seemed to be required). Jetpack Compose seems to be at an even earlier stage. I expect both will be great but probably not for some time.

Post reply on HN