Europa's Ocean Chemistry Could Be Earth-Like Slashdotby manishs on space at January 1, 1970, 1:00 am (cached at May 18, 2016, 11:37 pm)

An anonymous reader writes: Alien life in the universe could be close to home, swimming around Europa's ocean. The idea has been floating around scientific minds for more than a decade: beneath the icy surface of the Jovian moon could slosh a deep, wide ocean with the perfect environment for life to develop. In new research published in the journal Geophysical Research Letters, NASA scientists studied how the chemical composition of the Europan ocean may have evolved and what chemicals it possibly contains, assuming similar geochemical processes as on Earth are at play. Europa is thought to possess a rocky core fractured with deep cracks that have filled with water. Since the formation of the moon, the core has continued to cool, creating more cracks and exposing more rocks to chemical processes with this water."We're studying an alien ocean using methods developed to understand the movement of energy and nutrients in Earth's own systems," said planetary scientist Steve Vance, of NASA's Jet Propulsion Laboratory in Pasadena, Calif. "The cycling of oxygen and hydrogen in Europa's ocean will be a major driver for Europa's ocean chemistry and any life there, just it is on Earth."

Read more of this story at Slashdot.

French police denounce 'anti-cop hatred' AL JAZEERA ENGLISH (AJE)(cached at May 18, 2016, 11:30 pm)

Police car set alight with two officers inside in Paris during protest by force to decry violence directed at it.
Inflation confronts Argentina with big challenge AL JAZEERA ENGLISH (AJE)(cached at May 18, 2016, 11:30 pm)

Buenos Aires residents struggle to put food on the table as lifting of energy subsidies prompts jump in consumer prices.
Foreign Hackers May Be Targeting U.S. Presidential Candidates (Yahoo Security) SANS ISC SecNewsFeed(cached at May 18, 2016, 11:30 pm)

Googles VR play is all about content, not hardware (Yahoo Security) SANS ISC SecNewsFeed(cached at May 18, 2016, 11:30 pm)

Spy Chief: Foreign Hackers May Be Targeting Presidential Candidates Slashdotby BeauHD on usa at January 1, 1970, 1:00 am (cached at May 18, 2016, 11:06 pm)

An anonymous reader writes from a report via NBC News: Director of National Intelligence James Clapper warned Wednesday that foreign hackers may be targeting the campaigns of U.S. presidential candidates. The FBI and Homeland Security are working with the campaigns to tighten security and prevent cyber intruders from penetrating their defenses, said Clapper. "We have already had some indications of that, and a combination of DHS, FBI are doing what they can to educate both candidates of potential cyber threats," Clapper said, without specifying which candidates they were advising. "I anticipate as the campaigns intensify we will probably have more of it." A senior U.S. intelligence official told NBC News that they are "most worried about Trump, who has no experience with government computer systems or protocols." Foreign hacking against American political candidates is nothing new, Clapper said. Prior to the 2008 presidential election, Chinese cyber spies had targeted the presidential campaigns of then Sen. Obama and Sen. John McCain in order to read emails and policy papers. The hackers successfully compromised some emails, including private correspondence from McCain, NBC News reported. Also, both Obama's and GOP candidate Mitt Romney's campaigns were hit by Chinese cyber-attacks during the 2012 election. The Office of the DNI clarified Clapper's remarks tweeting: "We're aware that campaigns and related organizations and individuals are targeted by actors with a variety of motivations -- from philosophical differences to espionage -- and capabilities -- from defacements to intrusions. We defer to FBI for specific incidents."

Read more of this story at Slashdot.

Europa League: Sevilla complete hat-trick of titles AL JAZEERA ENGLISH (AJE)(cached at May 18, 2016, 11:00 pm)

Spanish club comes from behind to beat Liverpool in the final and win third successive final.
OCR's Deven McGraw on HIPAA Audit Preparation (InfoRiskToday) SANS ISC SecNewsFeed(cached at May 18, 2016, 11:00 pm)

Snapchat Faces An Outcry Against 'Whitewashing' Filters Slashdotby manishs on yro at January 1, 1970, 1:00 am (cached at May 18, 2016, 10:36 pm)

Last month Snapchat was thrown under the bus for a feature that many found downright racist. The photo-sharing app had added a face-altering filter that made users look like Bob Marley. Less than a month to it, Snapchat is getting blasted over another controversial feature. Several users are reporting about a "whitewash" filter that aims to "beautify" their looks. Mashable reports: Users of the app have noticed that many of the face-altering filters "whitewash." Upset Snapchatters point to the flower crown filter and the beautifying filter, both of which seem to lighten skin and eyes and contour the face to make one's chin and nose appear smaller. Since the debut, and subsequent popularity, of the Coachella-inspired filter, Snapchat users have taken to forums to voice their disproval with the app.

Read more of this story at Slashdot.

0.0001% of the Way to Core Data inessential.comat January 1, 1970, 8:00 am (cached at May 18, 2016, 10:32 pm)

This post isn’t about Core Data — but it’s a well-known example of adding methods at runtime, so I’ll use it.

Let’s imagine you want to make something like Core Data. You have a bunch of different model objects backed by a database. You want to implement faulting — that is, an object’s properties are nil in memory until you actually access one of the properties, at which point it pulls its values from the database.

You have some options for how to do this. You could skip properties entirely and override valueForKey: and setValue:forKey:, and always access the values that way. Your overridden versions of those two methods would handle faulting. But this makes for a bunch of strings in your code, and it isn’t nearly as readable as obj.foo = bar.

Alternately you could create all the getters and setters by hand, for all the properties in all your data objects, and be sure to include a hypothetical fetchIfNeeded call in every single getter and setter. That’s a ton of copy-and-pasting. It gets you obj.foo = bar syntax, but it’s also tedious, error-prone, and painful to maintain. (You could use macros or a script to make this a bit easier, but it’s still sucky.)

Instead, you want to solve the problem reliably and once. You want maintenance of your data objects to be no more difficult than adding and removing properties and their associated @dynamic declarations. (Actual database schema maintenance is a separate consideration — that’s in the remaining 0.9999% of the way to Core Data.)

While I can’t say for sure how Core Data adds methods at runtime, I can say for sure that this particular magic is available to us and not just to Apple. Which is as it should be — we have every right to expect that same power.

How to add methods at runtime

Here’s the plan. We’ll create a DataObject class that adds methods. Your model classes will inherit from DataObject. Your model classes will be free of anything odd — all that stuff goes into DataObject, which you can write once and then forget.

You need a class method — + (BOOL)resolveInstanceMethod:(SEL)selector — that will get called when the runtime is looking for the accessors for your properties.

If the selector is a getter or setter for one of your properties, then your resolveInstanceMethod will call class_addMethod, which appears in objc/runtime.h, with the appropriate parameters, including a C function that is the actual implementation of the method (an IMP).

Example: class_addMethod(​[self class], selector, (IMP)getterIMP, "@@:");

It’s actually unbelievably easy. See my sample demo app on Bitbucket, which shows the basics.

(You can get fancier than I did — you might start by using reflection to get the list of property names instead of using an array, for instance. You could handle non-object types.)

But why?

Maybe you’re thinking, “Great, but I already just use Core Data and don’t need this at all.”

First: congratulations on using Core Data. It’s the right move.

Second: imagine a different scenario — think of DB5. DB5 lets you put a bunch of appearance definitions — strings, colors, edge insets, and so on — inside a plist so that you don’t have to scatter all these values throughout your app. It’s a nice utility, but its API is all string-based, which means plenty of room for typos and errors.

Imagine, instead, if you could define the set of appearance properties your app needs. This would make errors less likely: the compiler would be your friend. But you definitely don’t want to go through the error-prone work of actually creating a hundred accessors — you want those created automatically for you at runtime.

As you might imagine, someone’s actually already done that: it’s how Omni’s OAAppearance class works. And, as a bonus, there’s an Xcoders talk from Curt Clifton that goes into detail. (The audio isn’t great, but the talk is worth it anyway.)

And, as a double-bonus, OAAppearance is open source on GitHub.

0.0001% of the Way to Core Data inessential.comat January 1, 1970, 8:00 am (cached at May 18, 2016, 10:32 pm)

This post isn’t about Core Data — but it’s a well-known example of adding methods at runtime, so I’ll use it.

Let’s imagine you want to make something like Core Data. You have a bunch of different model objects backed by a database. You want to implement faulting — that is, an object’s properties are nil in memory until you actually access one of the properties, at which point it pulls its values from the database.

You have some options for how to do this. You could skip properties entirely and override valueForKey: and setValue:forKey:, and always access the values that way. Your overridden versions of those two methods would handle faulting. But this makes for a bunch of strings in your code, and it isn’t nearly as readable as obj.foo = bar.

Alternately you could create all the getters and setters by hand, for all the properties in all your data objects, and be sure to include a hypothetical fetchIfNeeded call in every single getter and setter. That’s a ton of copy-and-pasting. It gets you obj.foo = bar syntax, but it’s also tedious, error-prone, and painful to maintain. (You could use macros or a script to make this a bit easier, but it’s still sucky.)

Instead, you want to solve the problem reliably and once. You want maintenance of your data objects to be no more difficult than adding and removing properties and their associated @dynamic declarations. (Actual database schema maintenance is a separate consideration — that’s in the remaining 0.9999% of the way to Core Data.)

While I can’t say for sure how Core Data adds methods at runtime, I can say for sure that this particular magic is available to us and not just to Apple. Which is as it should be — we have every right to expect that same power.

How to add methods at runtime

Here’s the plan. We’ll create a DataObject class that adds methods. Your model classes will inherit from DataObject. Your model classes will be free of anything odd — all that stuff goes into DataObject, which you can write once and then forget.

You need a class method — + (BOOL)resolveInstanceMethod:(SEL)selector — that will get called when the runtime is looking for the accessors for your properties.

If the selector is a getter or setter for one of your properties, then your resolveInstanceMethod will call class_addMethod, which appears in objc/runtime.h, with the appropriate parameters, including a C function that is the actual implementation of the method (an IMP).

Example: class_addMethod(​[self class], selector, (IMP)getterIMP, "@@:");

It’s actually unbelievably easy. See my sample demo app on Bitbucket, which shows the basics.

(You can get fancier than I did — you might start by using reflection to get the list of property names instead of using an array, for instance. You could handle non-object types.)

But why?

Maybe you’re thinking, “Great, but I already just use Core Data and don’t need this at all.”

First: congratulations on using Core Data. It’s the right move.

Second: imagine a different scenario — think of DB5. DB5 lets you put a bunch of appearance definitions — strings, colors, edge insets, and so on — inside a plist so that you don’t have to scatter all these values throughout your app. It’s a nice utility, but its API is all string-based, which means plenty of room for typos and errors.

Imagine, instead, if you could define the set of appearance properties your app needs. This would make errors less likely: the compiler would be your friend. But you definitely don’t want to go through the error-prone work of actually creating a hundred accessors — you want those created automatically for you at runtime.

As you might imagine, someone’s actually already done that: it’s how Omni’s OAAppearance class works. And, as a bonus, there’s an Xcoders talk from Curt Clifton that goes into detail. (The audio isn’t great, but the talk is worth it anyway.)

And, as a double-bonus, OAAppearance is open source on GitHub.

SEC warns cybersecurity is biggest threat to financial system (The Register) SANS ISC SecNewsFeed(cached at May 18, 2016, 10:30 pm)

SEC warns cybersecurity is biggest threat to financial system (The Register) SANS ISC SecNewsFeed(cached at May 18, 2016, 10:30 pm)

iOS 9.3.2 Bricking Some 9.7-inch iPad Pro Devices With 'Error 56' Message Slashdotby manishs on bug at January 1, 1970, 1:00 am (cached at May 18, 2016, 10:07 pm)

An anonymous reader writes: iOS 9.3.2 is causing problems for some 9.7-inch iPad Pro owners, with multiple users reporting issues shortly after installing the update over the air. Affected users are seeing an "Error 56" message that instructs them to plug their devices into iTunes. Apple has issued a statement to iMore, simply stating the company is "looking into a small number of reports" regarding this issue. The statement reads: "We're looking into a small number of reports that some iPad units are receiving an error when updating the software. Those unable to restore their device through iTunes should contact Apple support."

Read more of this story at Slashdot.

iOS 9.3.2 Bricking Some 9.7-inch iPad Pro Devices With 'Error 56' Message Slashdotby manishs on bug at January 1, 1970, 1:00 am (cached at May 18, 2016, 10:07 pm)

An anonymous reader writes: iOS 9.3.2 is causing problems for some 9.7-inch iPad Pro owners, with multiple users reporting issues shortly after installing the update over the air. Affected users are seeing an "Error 56" message that instructs them to plug their devices into iTunes. Apple has issued a statement to iMore, simply stating the company is "looking into a small number of reports" regarding this issue. The statement reads: "We're looking into a small number of reports that some iPad units are receiving an error when updating the software. Those unable to restore their device through iTunes should contact Apple support."

Read more of this story at Slashdot.