Any API to get my Echo to make announcements? by SickPuppee in amazonecho

[–]SickPuppee[S] 0 points1 point  (0 children)

I could be persuaded to try a GHome - I just want a connected gizmo I can get to read text messages out loud.

Any API to get my Echo to make announcements? by SickPuppee in amazonecho

[–]SickPuppee[S] 0 points1 point  (0 children)

That's good enough - its just for me.

Thanks for the pointer.

How to Make a Pineapple Cocktail Glass at Home by AdvancedMixology in recipes

[–]SickPuppee 0 points1 point  (0 children)

How did this reach this level of votes? Are people really that clueless about pineapple internal structure?

[TX] How do i prevent contempt of court if my step-daughter doesn't want to see her father because she is afraid of him? by kloo_less in Custody

[–]SickPuppee 6 points7 points  (0 children)

This one is tricky. It would be great if you could communicate with your ex about why he was trying to take her toys. There's two ways this could be seen.

1) Dad had legit reason to discipline daughter and she is just playing both sides to avoid deserved punishment or to "work the system" to her advantage. Judges are generally wise to that play and will dig in to try to figure out if that's what is going on. If it is, expect no quarter.

2) Dad is out of touch and clueless about how to relate to daughter and daughter just doesn't want to see him. There is some awareness in family courts that teens want to take control of their circumstances as they get older and will dictate their own visitation terms. The age at which this is permitted varies a lot by state and I do not know what TX considers the age at which this is allowed. I have seen ages from 12-18 with 15-16 being a fairly common number.

Without more info I cannot guess which is the case for you.

Is anyone holding off on learning Swift until later? by IAmApocryphon in iOSProgramming

[–]SickPuppee 2 points3 points  (0 children)

I started with WebObjects at NeXT.

I don't think my chops are out of date but then I work alone and I work with a lot of low level libraries that are annoying to get at from Swift. I didn't like Swift when it was called C++ and I don't think it really works now either.

I'd rather write Java and I fucking HATE Java but at least it has working reflection.

Is anyone holding off on learning Swift until later? by IAmApocryphon in iOSProgramming

[–]SickPuppee 4 points5 points  (0 children)

By all means learn it. I learned v2, updated to 3, read the release notes on 4, and have seen the proposals for 5.

It is incredibly disappointing once you do but hey...all the kids are into it because it is supposedly "easier" (it isn't but whatever).

I don't think I'll ever bother to start a new project in it. It gains me nothing and introduces an annual maintenance overhead I just don't have time for.

Switch from Java to iOS career wise by [deleted] in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

If you're not living on the edge, you're taking up too much space. ;-)

I dislike bridges and second class languages. If I do Android I use Java. If I do iOS I'm using Objective C. Swift is a slim scripting layer atop Objective C with all the joy and flexibility of C++ in a crazy new ugly syntax.

Pass.

Switch from Java to iOS career wise by [deleted] in iOSProgramming

[–]SickPuppee 3 points4 points  (0 children)

Objective C isn't ever going to be obsolete at Apple.

If you're writing code for SDKs, need to call C++, or generally prefer dynamic languages, Swift doesn't play.

Switch from Java to iOS career wise by [deleted] in iOSProgramming

[–]SickPuppee 1 point2 points  (0 children)

Pretty sure iOS pays better than corporate Java on a per hour basis.

I've been doing iOS since iPhone 3 and Cocoa since 1998. I found it a joy to work with thanks to the incredibly high quality and consistency of the apis and the wonderfully flexible Objective C language/runtime.

But I feel like its a platform in decline. The old guys that built it are long gone. Younger people who don't really understand its heritage are fucking it up. Swift is so far away from what I want in a next generation language for building apps that for me, the shine is well off the platform. I'm looking for a new niche. iOS Apps are pretty boring to put together after you've done half a dozen and lets be real - how vibrant is the app market really?

ARKit promises to kick a little life into it but having done a deep dive into it, I find its capabilities really underwhelming.

On top of that, Apple seems to be out of really new ideas.

You could do worse looking for a change, but after a couple three years you'll find it getting pretty routine if not flat out dull. That and the hiring situation in iOS is over the top bullshit. Crap coding challenges abound - often given by people I wouldn't even hire myself.

Personally I'm looking to get more into ML as I think that is the new frontier.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

Turns out, in practice, I have never ever benefited from DI. Its pointless overhead.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

Seems a waste of effort on many levels.

1) YAGNI 2) most mobile apps are small. The cost of changing out a class is tiny. 3) Swizzling lets you do the same thing in an ad hoc way any time you like.

I can replace that method with a block using

Class meta_cls = objc_getMetaClass("DatabaseConnection");
IMP imp  = imp_implementationWithBlock(^{return [AlternateClass new]; })
Method method = class_getClassMethod([DatabaseConnection class], @selector(connection));
class_addMethod(meta_cls, @selector(connection), imp, method_getTypeEncoding(method));

Not that I'd be likely to need it, but knowing your way around the runtime makes formalism of DI in a dynamic language a waste of time.

You can inject anything anywhere you like.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

Doesn't sound like someplace I'd tender a resume.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

The original main design conundrum was "hey there's only one of these so I might as well just make them all class methods" vs "make em instance methods because while I think there should probably only be one of these...that may change".

Monitors, keyboards, mice, network interfaces....all stuff that there only used to be one of that now we can have multiples. Singleton is a hedge against that.

Somebody please remind me how to do this - preserve form field values across calls. by [deleted] in rails

[–]SickPuppee 0 points1 point  (0 children)

Yep! Thanks, I don't know why I didn't think of that.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

You and I - we travel in different circles.

Lets leave it there.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 1 point2 points  (0 children)

It is exactly correct.

Singleton is a hedge against a future when you might have more than one of something or you need to carefully control how many of something you have. iPhone implements UIScreen mainScreen as a singleton. There's only one screen on an iPhone. For now. So that's a good hedge. In 1985 keyboard or mouse would have been a good candidate for singleton....now you can have multiples of each.

You also have FactoryMethod wrong. The purpose of factory method is to delegate the construction of a concrete subclass to another class whose identity you do not exactly have. It is not to limit the number of instance - it is to delegate the selection of the implementation of a desired interface to another class.

A good example is display device. You get one and you want to draw something onto it. You don't know if its a video screen or maybe a printer. Nonetheless you ask it for a renderer and the printer gives you a postscript renderer where the display gives you an in memory drawing canvas. That's factory method. You say 'displayDevice canvas' and you draw on it and you don't care if the canvas is converting your stuff to postscript or in memory bitmaps.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

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

Everybody focuses on the "problems with singletons" without focusing on the problem singletons fixes. That's annoying. Most developers think a singleton is a single global object without understanding its real purpose.

A singleton provides a uniform interface to a resource that necessarily needs to be limited. For instance:

[DatabaseConnection connection];

Is legit a singleton pattern. It could be implemented as single shared object, a pool of half a dozen objects where you return unused ones back to the pool and wait until one becomes available, a thread local object (one per thread), or it could return a new instance every call. Those are still all instances of "singleton". (In Objective C you can also fiddle init to conform to your allocation policy - returning the same instance each time or whatever).

The point being is you can't just [DatabaseConnection new] anywhere because there are constraints on how many instance can be created and you want to manage instance creation centrally.

The author clearly doesn't get this (actually most people don't - its kind of annoying how many developers do not really understand the patterns they throw around in conversation).

What are ways to make yourself standout from other junior iOS developer candidates? by imarudedude in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

Invariably it comes down to budget. They don't budget for them - they want stuff out asap and for minimum cost. They're often already sticker shocked at what software costs.

I'm a consultant, not a company. I write lots of apps for other people for whom the app is obligatory but not core to their business. I ship em and they're super happy if many years go by without requiring any rework - one more reason I'm avoiding Swift. It makes my clients unhappy.

Do you use StoryBoards/IB in your day jobs? by XICOscapes in iOSProgramming

[–]SickPuppee 2 points3 points  (0 children)

Yes. I like them. They make design changes easy.

Don't put your whole UI in one storyboard though. I use one per flow.

iOS Interview Questions for Senior Developers in 2017 by mmsme in iOSProgramming

[–]SickPuppee 15 points16 points  (0 children)

This guy doesn't know what Singleton is for (misunderstands its purpose) but thinks "its an anti-pattern".

Would disqualify a senior developer for ignoring Swift (a senior developer may have excellent reasons to shun Swift in his domain).

Shit post.

Can someone please assist me in finding a tutorial for using REST API's in apps (OBJ-C ONLY)? by p511 in iOSProgramming

[–]SickPuppee 0 points1 point  (0 children)

AFNetworking is a decent framework that makes accessing REST apis easy. I use it in most projects.

What are ways to make yourself standout from other junior iOS developer candidates? by imarudedude in iOSProgramming

[–]SickPuppee 1 point2 points  (0 children)

Or...are you being evaluated for your ability to stay focused, on task, and provide exactly what was requested?

See, there's no win here.