Tag Archives: RxCalc

Passion Project: Update #2

Back in November I talked a bit about my passion project. I’ve rewritten the Pharmacokinetics Math library for RxCalc in C++ and I’m rewriting the UI completely in Swift. It’s been a real blast. My November update talked about bringing C++ and Swift together with a tiny layer of Objective-C++.

Over my holiday break I didn’t code as much as I wanted to, but I did manage to get some done. Since returning to my day job I’ve felt a bit more excited about working on the RxCalc update at night. I don’t know why, I just have.

I now have the new mixed Swift, Objective-C++, C++ based app in a working state, but I have a lot of polishing to do as well as adding some new features. Of the remaining 1.x features I have to implement is Options. Once that is complete I’ll move on to adding IAP, Theme, and 3D Touch support.

I really love working in Swift. The code base feels so tiny compared to its Objective-C counterpart. Not that Objective-C is bad, just different.

Next up? The Android version. For that I need to spend some quality time with JNI.

I’m not in any shape to ship this release, but it’s getting close by the day.

The App Store Gold Rush?

tap tap tap: “The reality is the gold rush days of the App Store are long over – that’s not to say there isn’t loads of gold still locked up in the hills, it’s just all the easy gold deposits have been scoured and panned for and found. The market has matured, and App Store customers’ tastes and demands have grown more sophisticated. Success stories these days tend to be of hard earned fortunes and corporate bought victories instead of the parade of indie lottery-winner stories we heard again and again during the App Store’s early days.”

Back when Jay and I were working on RxCalc I was hoping to make a few hundred dollars a month. The reality of it was all together something else. A few dollars a month. On a good day we sell five copies. I haven’t given up on the idea of making a living on iOS or OS X, but it’s not going to be easy.

How can I connect?

Apple Core Labs: “My frustration with the disconnect between us and our customers on the App Store continues to grow. For RxCalc we typically see ratings that have to do more with lack of features, or new features, than the features we actually have. Don’t get me wrong, that’s great! The problem is we have NO way of communicating with these users to find out what they really want. We can make an educated guess and hope we’re correct, but that’s the best we can do.”

I posted this back in early February. If there are any iPhone development shops out there that have resolved this problem I’d love to hear from you.

Oh, and if you’re a Pharmacist using RxCalc we’d appreciate your feedback here and at the App Store.


Paid vs. Ad Suppprted

Inside RogueSheep: “First, the good news. Putting iAds into an iOS application is as easy as the documentation says it is. And in its first week as a free app with iAds, SnoGlobe had respectable downloads, over 50,000 ad requests, and made 3 times what it made in all of November.”

RxCalc IconMy brother and I have struggled with the idea of making RxCalc free with iAds support. These results seem to support that idea but a Snow Globe app verses an Pharmacokinetics Calculator? I don’t have the slightest clue how that would work for us. We made RxCalc free for a day just over a year ago and downloads exploded, but there was no telling how many were by medical professionals.

We’ve also struggled to resolve our feelings about changing to ad supported because of our current user base. I think we’d do it in a heartbeat if there was any way to know if we were upgrading an existing user and turn off the ads. If there is a way to do that I’d love to hear about it. We could then make RxCalc ad supported with the option of turning off the ads for $0.99, for new users, and turn them off automagically for existing users.

Oh, and you’d be surprised how many folks are reluctant to spend $0.99 on iPhone applications.

Now, we wait

RxCalc 1.2 IconI’ve been sitting on a new release of RxCalc for a while now. Jerry and I took a look at the code about a month ago and fixed up a couple of minor issues. For the first time we opened the door to beta testing. RxCalc is small but it’s getting to the point that it’s nice to have more eyes on it. We were able to enlist a great Pharmacist by the name of Robert Martin to help us verify our numbers were correct. Between Robert and Jerry we have over 30-years of heavy Pharmacokinetics experience. We’re very thankful to have Robert’s experience. He definitely helped make RxCalc 1.2 the best release ever.

Now we wait

The binary was submitted today, October, 3, 2010 at 4:35PM. Now, we wait.

RxCalc 1.1

RxCalc 1.1Apple Core Labs Blog: “When we released RxCalc 1.0 we felt the need to focus most of our effort on making sure our math was correct. We felt if the standard user interface was good enough for Apple, it was good enough for us. Since that time we’ve collected a bit of feedback, some great, some not so great, and a couple of really horrible comments that made us cringe”

It felt good to finally get that release out the door, and to celebrate we started working on the next release. We’ve made some great progress.

If you have a request please feel free to drop me a line, rob@applecorelabs.com or rob.fahrni@gmail.com, I’d love to hear what you have to say. You can also get it touch with us via one of our contact addresses.

C++ to Objective-C

About year ago I started looking at writing my first iPhone application. My brother and I had decided we’d finally go ahead and create an application we’d had many fits and starts on but had never finished. The code started its’ life on Palm and Windows. Back when we started I’d written the math code in portable C++ so we could use it on many different platforms.

RxCalc128x128.pngAround Thanksgiving I’d put together a prototype of our iPhone application using that C++ code. I started by creating an iPhone Cocoa View Based Application, and added my existing C++ classes to it. That was pretty simple, now to compile the code. This is where I ran into my first problem.

Say What?

The Objective-C compiler didn’t like having a mix of C++ and Objective-C. Oh, I thought that was allowed? It is. You simply need to name your source files with a .M or .mm extension instead of the standard .m for Objective-C. That was easy.

Below is an example C++ class used in an Objective-C class. The PKMath namespace is where the C++ types and classes live. PKMath::VancoBolusDose() just worked. I verified that by viewing the instance vancoBolusDose in the debugger, so I knew we were good to go with a mix of C++ and Objective-C.

- (IBAction)calculateNewHandler:(id)sender
	double height           = heightTextField.text.doubleValue;
	double weight           = weightTextField.text.doubleValue;
	double age              = ageTextField.text.doubleValue;
	double scr              = scrTextField.text.doubleValue;
	double peak             = peakTextField.text.doubleValue;
	double trough           = troughTextField.text.doubleValue;
	PKMath::Gender gender   =  (0 == genderSegment.selectedSegmentIndex) ? PKMath::kMale : PKMath::kFemale;
// Create an instance of a C++ VancoBolusDose. PKMath::VancoBolusDose* vancoBolusDose = new PKMath::VancoBolusDose(weight, height, age, scr, peak, trough, gender);
// Do stuff with dose here. delete vancoBolusDose; vancoBolusDose = NULL; }

So, along comes December, and I haven’t really done much with the iPhone app. I was thinking about it, but not writing much code. I wanted to mess with Objective-C more, try some things out. I decided I’d port the PKMath classes from C++ to Objective-C. It took very little time and I had the beginnings of the PKMath library used in RxCalc 1.0.

Revisiting the code example above, this is what it looked like after creating the new Objective-C version.

- (IBAction)calculateNewHandler:(id)sender
	double height           = heightTextField.text.doubleValue;
	double weight           = weightTextField.text.doubleValue;
	double age              = ageTextField.text.doubleValue;
	double scr              = scrTextField.text.doubleValue;
	double peak             = peakTextField.text.doubleValue;
	double trough           = troughTextField.text.doubleValue;
	PKGender gender         = (PKGender)genderSegment.selectedSegmentIndex;
// Create an instance of an Objective-C VancoBolusDose. VancoBolusDose* vancoBolusDose = [[VancoBolusDose alloc] initWith:weight :height :age :scr :peak :trough :gender];
// Do stuff with dose here. [vancoBolusDose release]; }

Apple Core Labs first product, RxCalc, was accepted in the iTunes App Store on July 4, 2009. What a great day!

appstore.pngIf you’re a Clinical Pharmacist, and perform Pharmacokinetics calculations on a daily basis you can purchase RxCalc for the very low price of $0.99.

It’s clear I’m doing something wrong

Finger Gaming: “Based only on Refenes’ sales figures for a limited number of the game’s many price tiers, Zits & Giggles generated at least $4,431 at the $15, $50, and $299 price points alone. It currently holds an App Store customer rating of two and a half stars out of five, with only two written reviews, one of which reads in its entirety, “It’s hilarious.”” – Caution: There’s a bit of language in article, but it’s interesting to see what Refenes’ experiment produced. Folks buying a silly little game for over $300.00. Wow, I think I need to get into gaming.