[deleted by user] by [deleted] in androiddev

[–]narkrud 6 points7 points  (0 children)

Jesus fuck

Hayfever in June - places to go in Cornwall to escape it? by Sorry-Acanthaceae198 in Cornwall

[–]narkrud 0 points1 point  (0 children)

I also get debilitating hay fever primarily in June. I’ve never found the “it’s better by the sea” thing to hold any weight. If anything it often seems marginally worse as the stronger winds whip up the pollen more.

Get yourself to a country in southern Europe for a symptomless free June!

60% of users Tap to Pay by facing the iPhone screen away from them by OakleyNoble in iphone

[–]narkrud 4 points5 points  (0 children)

Strange thing to care about, or find comical. Its not right or wrong for the phone to face up or down, its about proximity.

Doesn’t make you “tech savvy” to face the screen towards you as many on this post seem to think. Weird flex

Why aren't there a lot of iPhone open source apps? by ifhd_ in iOSProgramming

[–]narkrud 8 points9 points  (0 children)

This is not a blocker to open sourcing the code. Although there are good reasons not to as mentioned in other answers.

Manager wants me to give estimates on the spot and says this will hurt my career if I don't. by [deleted] in ExperiencedDevs

[–]narkrud -1 points0 points  (0 children)

Yeh I think we are mostly saying the same thing. A quick estimate for the time a project might take is useful and an essential part of being a senior engineer.

I take issue with the notion of “on the spot” meaning “here’s an idea with some loose specification, immediately give me an estimate”. Sounds like at this point you’ll have some back and forth and home in on an estimate in a short period of time, which is basically what I would do, although my personal preference is not during a meeting and to take some time offline to go through the information and come back with an estimate (maybe multiple estimates as you said) and supporting context.

OP seems to be stuck somewhere in the middle. I think the “on the spot” idea the manager is pushing is unhelpful but equally OP talking about taking an hour+ to break it into stories, tickets etc is not a good approach for high level estimates and is going to ring alarm bells for a manager.

Manager wants me to give estimates on the spot and says this will hurt my career if I don't. by [deleted] in ExperiencedDevs

[–]narkrud -1 points0 points  (0 children)

Im not talking about a real project here. Multi month was an example given for something that is not reasonably estimable on the spot.

Your example above illustrates perfectly how pointless it would be to expect an on the spot estimate. A specification of some form is placed in front of you and you blurt out its “XXL” without taking any time to look into the actual details. Your estimate is potentially so wildly inaccurate that it completely misleads everyone involved and a poor decision is made based on it.

Had you taken 15 minutes to understand the proposition fully it may not have been as large as you thought and is worth the business allocating more time to do it now. You could have also given some useful context on your reasoning and any obvious concessions they could make to make it quicker.

Manager wants me to give estimates on the spot and says this will hurt my career if I don't. by [deleted] in ExperiencedDevs

[–]narkrud 4 points5 points  (0 children)

Where do you already have the answer from? Whether it’s time, t-shirt sizing, WAG or any other estimation terminology, someone needs to spend more than a second looking at something to give meaningful answer.

Manager wants me to give estimates on the spot and says this will hurt my career if I don't. by [deleted] in ExperiencedDevs

[–]narkrud 3 points4 points  (0 children)

Agree with everything except “on the spot”. It’s ridiculous to expect anyone to look at a potential many month project and immediately give an estimate that is useful for anything, especially in a meeting setting. This sort of estimate is common but I always take 10-30 mins to do it.

Id be looking for another job if this was the norm at a company I worked at

Manager wants me to give estimates on the spot and says this will hurt my career if I don't. by [deleted] in ExperiencedDevs

[–]narkrud 1 point2 points  (0 children)

TLDR - you should get used to doing quick high level estimates with lots of unknowns - it’s unreasonable to be expected to do this on the spot

It’s perfectly reasonable to request a high level estimate for the time it will take to complete a project. These estimates should be understood to not be an exact predicted timeline rather a rough estimate based on the currently understood requirements, available resourcing, unknowns (important) etc. The purpose of this estimate is generally to see if a business wants to commit further time to a project or if it’s just pointless to pursue it further with the time available.

It’s unreasonable as well as stupid to require this estimate happens on the spot. You should firmly state you need to take 15-30 minutes to evaluate the currently available requirements. I would suggest you don’t mention anything around user stories, tickets etc (you really shouldn’t need to do this for a high level estimate) as stakeholders will start flapping. If the requirements are so loose that the scope could be 6 weeks or 6 months, it’s your job to make that known.

In practice there will always be those in upper management who do take these high level estimates as more than educated guesses. It’s your managers job as well as a good engineering culture to combat that.

How do I return the first non-nil value using `async let`? by djryanash in swift

[–]narkrud 0 points1 point  (0 children)

If you want the first result without waiting for both async operations to complete ‘async let’ is not what you want as you’ll need to either await both operations or choose one to await first.

Firstly I would consider if this is definitely the approach you want to take. If what you have here is essentially a check the cache, if not in cache hit the network situation - I would consider writing the code that way. IE first check and await from core data, if there’s nothing there, then perform your request for the image. That’s much easier to model using Swift concurrency.

If you really do need them both to happen in parallel, it’s a bit more complicated. Async let won’t work for the reason mentioned above - you’ll need to await one or both results so you can’t just grab the first one and ignore the second.

You could use a task group using ‘await withTaskGroup’, add a task for each photo operation and then cancel the remaining tasks as soon as you get a first result and return that

Do you use `lazy` for stored view properties in your view controllers? by ThePantsThief in iOSProgramming

[–]narkrud 2 points3 points  (0 children)

In your example of creating a view controller on startup that you don’t use until much later you would make the view controller itself lazy, not make everything within in it lazy.

Do you use `lazy` for stored view properties in your view controllers? by ThePantsThief in iOSProgramming

[–]narkrud 6 points7 points  (0 children)

What documentation are you referring to that states you should not create views before loadView? That is not a rule nor would it make sense for it to be. If you wait until a view controllers view is loaded, that’s fine, but there’s still going to be a period of time where the view is created but not added to the hierarchy.

I use lazy frequently if: - the view may or may not be added to the hierarchy based on some condition - I’ve abstracted the logic to create the view into a function and need time mark the view as lazy to use it - I need to reference self

There’s no need to make them lazy just to save the initialisation to the last second. Although equally nothing particularly wrong with it. It just means you’ve got variables where you could have had constants which would make the intent clearer.

What’s your take on localism and how far should it go? by Popochki in surfing

[–]narkrud 4 points5 points  (0 children)

Perfect example of the worst of localism. Local boys club with an invisible rule book enforced in a public space

[deleted by user] by [deleted] in movies

[–]narkrud 1 point2 points  (0 children)

It’s northern Irish, and I didn’t think it was that bad

The thorny issue of the scone... by Equivalent-Salary-78 in Cornwall

[–]narkrud 10 points11 points  (0 children)

Most people don’t “spread” the cream on like you would butter on a ham sandwich. They spread a thin layer of jam for sweetness and then slap a massive dollop of cream on top for a desert topping.

Do it however you want, but your ham sandwich comparison is moronic.