
Apple ResearchKit on GitHub - narfz
http://researchkit.github.io/index.html
======
xasos
Here's a link to the current project's source if anyone is interested:
[https://github.com/researchkit](https://github.com/researchkit)

Love that Apple is going open-source, and hopefully they do this for more of
their code (pssssttt...Swift)

~~~
baldfat
EDIT (To Clarify) Warning I am Strongly Anti-Apple Bias:

Apple has a fairly decent Open Source history.

[http://www.opensource.apple.com](http://www.opensource.apple.com)

There is things to complain about but there are more I am concerned with in
regards to Open Source (Oracle).

EDIT: I don't like Apple's products or the way the conduct business BUT I
think they have done more good for Open Source than bad.

~~~
suyash
I can sense some Strong Anti-Oracle Bias here.

Oracle is one of the major contributor to open source, see the lineup here,
chances are you're using some of them:
[https://oss.oracle.com/](https://oss.oracle.com/) starts with Java

~~~
Joky
Java, is it the thing they used to sue on API copyright? Good demonstration of
how to mess with "open-source" IMO.

If you remove what they got from Sun, what reminds?

~~~
pjmlp
Sun would have sued Google if they had the money for the lawyers[0].

Initially I was partnering with Google, but now I side with Oracle's decision,
as it is now proven how Google just pulled a Microsoft and fragmented the Java
eco-system.

Now we are stuck with partial Java 7 assuming 4.4 devices, good luck using
try-with resources in lower versions and no plan for future versions as of the
Android Developers Fireside at Google IO 2014.

The Android team seems more interested in porting the whole Eclipse/Ant
infrastructure, building more Google APIs or making Android run everywhere
instead of improving the language support.

[0]
[http://nighthacks.com/roller/jag/entry/my_attitude_on_oracle...](http://nighthacks.com/roller/jag/entry/my_attitude_on_oracle_v#comments)

~~~
baldfat
Actually another post on Sun wouldn't have sued. Sun's CEO Jonathan Schwartz
testified on behave of Google. He even blogged a congratulations to Google for
releasing Android running Java.
[http://web.archive.org/web/20101023072550/http://blogs.sun.c...](http://web.archive.org/web/20101023072550/http://blogs.sun.com/jonathan/entry/congratulations_google)

[http://www.theverge.com/2012/4/26/2977858/former-sun-ceo-
jon...](http://www.theverge.com/2012/4/26/2977858/former-sun-ceo-jonathan-
schwartz-testifies-for-google-oracle-trial)

~~~
pjmlp
If you have bothered to read what Gosling had to say about it:

"Google totally slimed Sun. We were all really disturbed, even Jonathan: he
just decided to put on a happy face and tried to turn lemons into lemonade,
which annoyed a lot of folks at Sun."

~~~
suyash
\+ I trust Gosling's word over anyone else Sun CEO or folks here talking on
HN.

------
DannyBee
While it's wonderful they did this, as a short rant:

I hate when companies just feel the urge to add a random sentence or two to an
existing license, particularly in cases like these:

"3\. Neither the name of the copyright holder(s) nor the names of any
contributors may be used to endorse or promote products derived from this
software without specific prior written permission. No license is granted to
the trademarks of the copyright holders even if such marks are included in
this software."

The first sentence is BSD, they added the second sentence. The problem with
this is a few-fold.

Either this clause is needed _for the entire world_ (since BSD is used for
trademark'd software all the time), or it's _not needed at all_.

It turns out, in fact, arguments over trademark inclusion due to OSS licensing
has been made before, and nobody has ever won on this before[1] So other than
some lawyer just "not being satisfied unless they added stuff to the license",
all this does is make a gratuitously different license that

A. can't be merged with other licenses (since it requires you reproduce _this_
condition text, and _this_ condition text is not the same anymore as the other
ones)

B. Isn't actually the BSD license, and was deliberately changed, so ends up
worse in court since now the other side can reasonably argue that the same
precedent should't apply.

C. Makes analyzing compatibility with other licenses more difficult and
annoying.

[1] Since they are very clearly licenses about the software work, not
trademarks, and you can't stop someone from saying "this uses apple's
researchkit" regardless of what trademarks you have or what you write in this
license, anyway.

~~~
oddevan
> No license is granted to the trademarks of the copyright holders even if
> such marks are included in this software.

This line was probably required to get some manager at Apple to sign off on
this. There are few companies as protective of their trademarks--their _name_
--as Apple, and they probably wanted to make sure that an accidental commit
from a developer that included an Apple logo or the word 'iPhone' didn't cause
irreparable damage to their trademark.

Valid fear? That's debatable. But I'd rather have a company add _one line_ to
an already minimal license than not open source at all out of this fear.

~~~
DannyBee
"This line was probably required to get some manager at Apple to sign off on
this." I agree here :)

"Apple logo or the word 'iPhone' didn't cause irreparable damage to their
trademark."

As I said, this is a problem either no company who uses the BSD license has or
all of them have it.

"But I'd rather have a company add _one line_ to an already minimal license
than not open source at all out of this fear."

I don't agree here at all. Because this is how we ended up with the mess that
caused things like open source license certification by OSI to exist in the
first place.

Random companies would add random one-liners to licenses, like "don't use in
nuclear reactors", etc.

Down this path is madness, and it starts with good intentions.

~~~
derefr
It's probably a problem all of them have. Apple is just the only company that
cares enough to make a big deal about it in advance, rather than imagining
that they'll just let things slide for now and argue post-facto in some later
court case that the license should be read as not granting trademarks.

In other words, this isn't like the nuclear reactors bit—this is something
that could actually belong in the BSD license, and where when merging BSD-
licensed software with Apple!BSD-licensed software, probably the Apple!BSD
would keep winning, and the trait would end up at fixation, rather than
"speciating" the license.

~~~
DannyBee
1\. I strongly disagree with the idea that they are the only ones who would
consider it a large deal enough to do something if it was a real fear. It's
somewhat ridiculous to believe that, say, Google or Facebook, wouldn't do the
same if they thought it was a concern.

2\. The part about "having to argue post-facto" would be a valid line of
argument if, as i pointed out, there wasn't already plenty of precedent that
shows their fear is completely and utterly unwarranted.

In fact, i doubt they could even cite a single time a judge even considered
this a non-crazy argument.

In other words, this in fact, is exactly like the nuclear reactors bit. It
doesn't actually belong in the license, because if was a real concern:

A. There would be at least some case somewhere that concerneed folks.

B. After 20+ years of BSD licenses, it'd _already be there_

------
jebblue
I'm not an Apple fan but this is very professionally done, it reminds me of
the work an Orthopedic Sureon had me do for him years ago when I see the
layout:
[http://researchkit.github.io/docs/docs/Overview/GuideOvervie...](http://researchkit.github.io/docs/docs/Overview/GuideOverview.html)

The flow is consistent, step 1, step 2, etc.

Something else that Apple makes I'm a fan of, CUPS Printing. It's also very
professionally done. If we could only convince Apple to go Linux on
everything!

~~~
stephenr
Why does the kernel matter so much to you?

~~~
jebblue
I guess I was expressing that the stuff that Apple Open Sources seems genuine,
legit, honest and I admire that. I guess as I get older I realize (sorry for
all the I's) that maybe I should give Apple a second look, on all fronts.

~~~
stephenr
Sure, that makes sense, I just don't quite understand the "convince Apple to
go Linux on everything" bit??

In terms of userland tools, OS X has pretty good compatibility with an average
Linux distro (yes there are obvious differences between *BSD and GNU
implementations of various tools).

Personally I think you should give Apple a(nother) look in terms of a
productive workstation machine, even if that's paired with/using services
from/developing systems for Linux-based servers.

------
bthomas
Is there anything about App Store guidelines? Curious if Apple is going to
require any kind of IRB approval first.

~~~
semi-extrinsic
The other big issue I see is: if you try to do any kind of population or
cohort study with this, how on earth do you correct for the bias that comes
from only sampling iPhone users? It's borderline facetious to claim that there
is no sampling bias, and it will be a nightmare to control for.

~~~
Fomite
My guess is that some of this will make field collection with iOS devices
easier, rather than relying on the user's device.

------
richerlariviere
I hope they will open Swift, like Microsoft is doing with C#.

~~~
melling
C# is 15 years old. F# is 10 years old. It's great that Microsoft is in the
process of open sourcing their code. However, it gets a little old when
they're held up as some example to follow. Objective C has been open source
for a long time. How about, let's hope Apple open sources Swift like they did
with Objective C.

[http://en.m.wikipedia.org/wiki/F_Sharp_(programming_language...](http://en.m.wikipedia.org/wiki/F_Sharp_\(programming_language\))

[http://en.m.wikipedia.org/wiki/C_Sharp_(programming_language...](http://en.m.wikipedia.org/wiki/C_Sharp_\(programming_language\))

~~~
davvid
_How about, let 's hope Apple open sources Swift like they did with Objective
C_

To be honest, don't hold your breath. If you research the history of
Objective-C you'll realize that it was in fact the first GPL violator. It's
only _because_ of the GPL that Apple was forced to open source it, not the
other way around.

------
talles
Is this the first _thing_ of Apple on GitHub?

(is the first one that I recall seeing)

~~~
smackfu
They have WebKit on self-hosted git, but not GitHub.

------
qzervaas
It's interesting to see how code is structured when it comes from Apple (or
vendors they're working closely with).

Surprising some of their best practices aren't followed, such as hard-coding
English strings instead of using something like NSLocalizedString()

(e.g.
[https://github.com/ResearchKit/GlucoSuccess/blob/master/Diab...](https://github.com/ResearchKit/GlucoSuccess/blob/master/Diabetes/TasksAndSteps/EnterWeight/APHEnterWeightTaskViewController.m))

~~~
jshevek
Surprising?

After learning of apple's goto bug, I'm never surprised to read about apple's
failure to follow best practices.

~~~
qzervaas
Sure, but that was an isolated mistake, whereas using NSLocalizedString() just
becomes habit after a while.

It's jarring when you see hard-coded English strings in any iOS code. Android
does a much better job of pushing developers to localizing strings.

One big thing I don't like about iOS is even if you have a base language, you
need to duplicate all strings in any subsequent languages. (I often have a "US
English" and "Australian English", so trivial changes require changes in two
files).

On Android, the language files extend the base file, so you can just override
favourite/favorite labour/labor type strings without having to duplicate
everything.

(Obviously you can script / auto-generate language files, but that's not the
default position).

~~~
jshevek
I agree with you what you are saying about string localization.

Separately, I find that people tend to assume (for some reason?) that big
successful companies that write lots of software will also write quality
software. They have the money for it!

But its often not the case. Look at Microsoft in the late 90s.

Look at Apple these past few years.

Maybe the people at the top sometimes feel they no longer _need_ to write
quality software, because they are at the top?

The goto fail bug is a singular mistake, but I'm not convinced it was an
isolated mistake. I've worked with teams of amateurs that had code quality
practices sufficient to prevent such a bug; and yet apple included this in a
product, and left it there for a long time before it was fixed. It suggests,
to me, organizational issues.

------
atmosx
I wonder if I can use this along with a raspberry Pi & Arduino to offer
automated customized services to my patients.

E.g. build a system with RFID cards that uses sensors to automatically measure
blood pressure, etc[1] and keep history.

ps. Too many interesting possibilities out there and too little time to pursue
them!

[1] [http://www.cooking-
hacks.com/documentation/tutorials/ehealth...](http://www.cooking-
hacks.com/documentation/tutorials/ehealth-biometric-sensor-platform-arduino-
raspberry-pi-medical)

------
beshrkayali
Sloppy scripting
[http://cl.ly/image/1L2G1V3C0A08](http://cl.ly/image/1L2G1V3C0A08) :P

(Edit: added emoticon for joke emphasis)

~~~
8ig8
I think we've all done something along those lines. I'm not sure if this
counts, but recently HN asked us to avoid gratuitous negativity...

[http://blog.ycombinator.com/new-hacker-news-
guideline](http://blog.ycombinator.com/new-hacker-news-guideline)

~~~
beshrkayali
I just thought it's a bit funny, wasn't trying to be negative. Yes, we've all
done something similar at some point.

------
orbitur
Interesting that this framework isn't written in Swift.

~~~
bpicolo
Not really. One, I bet they've been working on it for a long while, and two, I
bet it's a lot easier for them to generate Swift bindings for objective c than
vice versa.

------
pistle
It's a start! There is big space for improvement in supporting the
complexities of research studies, but this can definitely be a jumping-off and
may well support broad consistencies in design and implementation.

There would still be a massive effort to implement most of the requirements of
a research study. But, at least the iOS UI implementation and some on-ramps
via ActiveSteps would be eased.

------
jordanbrown
Would be great to see them merge the pull request for cocoa pod support.

~~~
k-mcgrady
Looks like the devs jumped in on the comments on the PR and want to do it.

------
TheSoftwareGuy
GitHub says its 99.7% Objective-C, why didn't they use swift?

~~~
billyhoffman
Swift was released to the public 7 months ago. The vast majority of Apple's
own employee's didn't know it existed until it was publicly announced.

Research Kit was announced 6 months after Swift. Seems like a bit of a
stretch...

~~~
TheSoftwareGuy
Makes sense.

------
InverseSandwich
Researchkit is a rather cool idea - it will be interesting to see if it
integrates with wearables.

~~~
ci5er
That's Healthkit land. It should.

