Function Search Engine / How To Search EngineDecember 28, 2014
I had an idea recently that has sparked a lot of excitement in my mind... not infrequently, I find myself needing a function that I know has probably been implemented 10,000 different times by other software developers over the ages, and I groan that here I am, about to do it again. Other times the function might be more unique, but I'm still convinced that its something that other people have already implemented at least a few times.
What if there was a really compelling way for developers to share functions/classes? There already exist places like GitHub for sharing projects
, and that's great, but so often what I want isn't an existing project, it's an existing function. Imagine this search engine was more than a search engine, it was a combination of a search engine and a source code repository like GitHub. People could upload functions, associate unit tests with them, and the site would allow others to view those functions and even run them interactively on the website to play with them. Users could file bugs against those functions, resolve those bugs / commit fixes, etc. Users could comment on functions or make requests for improvements, etc.
The second ingredient would be to make these functions very findable through clever use of NLP, etc. So, you're coding in Java and want code to download a webpage? No problem -- search for "download webpage", and see functions that do exactly that.
This could be expanded to also encompass the idea of "how to's" / "example code". Search for "Java convert string to integer" and a function would be found that demonstrates how to do that. You might not want to use the function in the end, but at least to be able to examine the function to learn how to do what you were asking for.
Next: The ability to write functions that call other functions on the site. Technically you'd be calling a certain REVISION of that function, since future revisions of the function you were calling might cause breakage, but automated tools could be used figure out if it was safe to call a newer version of that function. It would also be interesting, upon modifying your function, to see if any of the tests for things that call your function break. (A kind of canary in the coal mine that might suggest you broke something in your function)
I think this idea combines (can combine) some powerful things:
|Exponential nature of technology (building up more powerful pieces)|
|Ratings: People could rate functions to make them higher in the search results|
|Status: As people contribute more, they gain status. Useful for resumes, feeling good about one's contributions, etc.|
Also imagine people defining "interfaces" + tests that define useful bundles of functionality, and being able to associate functions with interfaces. The system might even try to automatically detect when a new function matches an existing interface. Lots of interesting possibilities there.
The system could automatically sort functions by their runtime to show you which implementations were fastest, etc.
Yet another way to search for a function could be to define the arguments of a function you're about to write, the description, and a few sample input/output value pairs, and then have your IDE connect to the service to see if there are any existing matches or close matches. If so, it could essentially fill in the body of the function you were about to write automatically, or download the function and simply refer to its implementation.
Then imagine associating implementations in one language with implementations in another so that if you're learning a new language, you can simply click on a link to see how some particular thing is implemented in another language. It could also then generate metrics to show how many relative lines of code you need to implement something in one language VS another, the speed of execution, etc. That could then be used as a semi-automated tool for converting code from one language to another -- just use the properly mapped function.
And the final idea I'll propose is to provide a way to map what a function does onto a semantic model with the goal of making it even more possible to simply write a specification of what you want done, and have the site be able to cobble together the appropriate functions to do what you want, and spit out the required code.
Lots of really exciting possibilities in this space...Having an Android phone and iPhone in addition to a BlackBerryAugust 17, 2012
This week I decided that in addition to owning a BlackBerry, I should own an Android device and an iPhone. I feel this way because never having owned an Android or iPhone, I feel somewhat ignorant. I want to have a clear sense in my head how well various use cases are executed on each of the leading platforms.
I also think it would be useful to be able to experience the leading apps on each of the platforms. As an app developer, it's a shame that I have no idea what the top Android and iPhone apps are, or what they're like.
Another pull is that, working for Wolfram Alpha, I want to be able to play with devices that integrate our knowledge engine: Siri and S Voice. Back in October, before I had had so much success on App World, I almost switched from BlackBerry to iPhone because of Siri. Siri represents many of my CS passions converging, so not having Siri is a bit odd for me.
I bought a Samsung Galaxy S III today from Wind Mobile, and I've been delighted with the device as I played with it this afternoon. I will share my early thoughts in a separate post.The Future of The PlayBookJuly 23, 2012
Time flies: It has already been a year and three months since the PlayBook launched, and I have written about 30 PlayBook apps.
Back in the fall of 2011, even though I was focused mostly on PlayBook development, I had also ported one of my apps to iOS, Android, and Windows Phone. It was a great learning experience, and I considered writing more apps for those other platforms. But in December, when iTunes Sync sales went through the roof, it ended up changing the flavor of my efforts.
Firstly, I was spending more than half of my app development time answering support emails. Secondly, I needed to spend time fixing bugs that users reported. That left a pretty small chunk of time left for doing new things.
The other big effect was shifting my focus solely to PlayBook. Not that I would be opposed to developing apps for other platforms, but with so much revenue coming from PlayBook, it was natural to keep my focus there.
And finally, my app development time became somewhat less about having fun and more about trying to keep the income coming in. Don't get me wrong, I've still been having fun, but there has been a dose of stress and anxiety that has come along with the money.
And so here I am in July 2012. Amazingly the revenue rate of my apps is still about $13,000 a month. My rate of new development is very low, and the time that I do have is spread between support, BB10 learning, and a little bit of PlayBook development. As I phase out my PlayBook development for BB10 learning, it's interesting to take a moment to think about where the PlayBook is at, and what lay ahead.
I'm usually an optimist about these things. A year ago, even though I agreed with everyone that the PlayBook had a difficult road ahead, I wasn't "worried". Maybe I should have been, but I was optimistic.
These days I question a bit more what lay ahead for the PlayBook. What has caused the shift?
I think an example of that would be talking to people I saw with PlayBooks in airports on my way down to BB10 Jam in May. Everyone basically said the same thing: "Oh, it's ok. I wish I had an iPad, it's way better. But the price was right". That reaction makes sense. It seems as though many PlayBook owners are wanna-be iPad owners, but since the PlayBook is being sold at a loss, they went with the PlayBook to save a few hundred dollars.
As a PlayBook fan, I'll be honest: I don't like hearing that. What I'd like to hear is, "Yeah, the hardware is great, I like the 7" form factor, and it's way cheaper than the iPad". A response like that would come across as more encouraging, rather than "Oh, it's ok. I wish I had an iPad".
The second discouragement are sales numbers. I think there are roughly 1.3 million PlayBooks out there, with something like 200,000 being sold every quarter. That's not terrible, but for a tablet that's being sold at a loss, it's pretty discouraging.
What that all makes me wonder is where the future business case is for the tablet. I'm not talking in the past tense: I think making the PlayBook was a fantastic way for RIM to build on QNX and create a developer community as it shifted its phones to QNX. But now that BB10 is coming down the pipe, where does that leave the PlayBook? For a company that wants to minimize costs, isn't it a tough sell to keep selling the PlayBook at a loss? And we all know that if RIM raises the price above cost, that's not going to improve sales numbers.
Certainly for BlackBerry owners, it's nice to have a BlackBerry tablet, so one can make the argument that the future roll of the PlayBook is to augment the experience of BlackBerry phone customers, not to directly compete with the likes of iPad. That future makes more sense to me. And as Thorsten has said many times, RIM is building a platform, not a device. Ideally, the PlayBook is just one more device that can harness the rich platform they're building. And cars another. From that perspective, it's not critical that PlayBook be a cash cow, so long as their core phone business is healthy.
I suppose one optimistic hope for PlayBook is that if customers go crazy for BB10, and the PlayBook can build on the BB10 experience, you might sell significantly more PlayBooks and the price constraints might not be so severe.
We'll have to wait and see. But for now, I'll be honest, I'm anxious about what lay ahead for my favorite tablet.older >>