Domain: nshipster.com
Stories and comments across the archive that link to nshipster.com.
Comments · 7
-
Re:No one tests software on a slow connection
Works for iOS and macOS.
http://nshipster.com/network-link-conditioner/ -
Re:WTF is "guard"?As NSHipser describes it:
guard is a new conditional statement that requires execution to exit the current block if the condition isn’t met.
You can exit the current block from an if-statement, of course. But it doesn't force you to. Also, having a separate keyword for things like preconditions can make code more readable, because you can express your intent.
-
Re:Looked at it. Dismissed it.
You can actually add Regex literals to Swift at compile time with a type extension and a type annotation.
-
Re:Objective-C was ahead of its time
Nothing speaks agaisnt a vm-less, class loader less, vtable based, method dispatch WITH reflection and introspection.
Sigh. I agree with this, but point out that C++ and Swift don't provide these, and that vtable dispatch creates an array of method pointers, and unlike objective-c, does not preserving the method names. This information has to be added on separately. Java 1.0 didn't include reflection. Even if I was mistaken in this, there is no need to start making personal insults and calling this "retarded".
Important (for you):I think you might be missing the point about method interception. Are you familiar with this concept? In Objective-C we call this method swizzling. You can either swizzling the look-up table for a method (modify all instances) or change the isa pointer for a class - modify a single instance.
In the Objective-C community, swizzling is misunderstood to be a hack, but it affords all kinds of useful features, such as Cocoa's elegant property observers, Core Data managed objects and such.
People also misunderstand that this has nothing to do with introspection and dynamic invocation. In Java we can do the following:
- * Before a class is emitted from the class-loader, emit a run-time generated sub-class, where methods are proxied in the same way as above. Libraries like asm, cglib and javassist do this. Spring uses cglib to proxy concrete classes and provide AOP such as declarative transaction management and security. Hibernate uses it to provide 'managed objects'
Er, to emit a runtime generated sub-class of a class, just prior to it being loaded, does require a class-loader, which in turn requires a JVM. Many people outside the Java community don't relaize this, but it gives most of the benefits of Objective-C's (messaging) late binding, although it does not allow arbitrarily adding new methods to a class.
I do know something about Java, having made some contributions to the framework that revolutionized enterprise development, and going on to teach it around the world. Later I created my own framework to help Objective-C developers implement a design pattern that is well understood among Java developers.
I enjoy discussion, I'm open to being corrected if I make a mistake, but if you would like to revert to childish insults then I don't have time to participate. I'm interested in sharing my knowledge and learning new things.
-
Network Link Conditioner for OSX
For OSX, Apple provides a superb tool for simulating "bad" networks -- slow, dropped packets, high latency, or all the above -- called Network Link Conditioner
more info at --> http://nshipster.com/network-l... -
Difference between what exists?
There's already a ReactiveCocoa, I wonder how the Facebook framework differs? Apart from being able to be used cross platform that is...
The cross platform stuff I try off and on through the years, but it always leaves be cold compared to whatever tools exist specifically for each platform.
-
Multipeer Connectivity and Friends
Firechat uses Apple's Multipeer connectivity for IOS, and a similar protocol for Android, to achieve a mesh network. I do not believe that any of this is MANET (the IETF's favorite mesh networking protocol).