Today is a good day to code

Why I Decided to Raise the Price of Mides

Posted: February 13th, 2010 | Author: irv | Filed under: Apple, Cocoa, Companies, Objective-C, Programming, iPhone, mides | Tags: , , , , | No Comments »

A few days ago I completed an analysis of what my profit and loss looked like for both of my applications. What I discovered was very disturbing, or would be to any entrepreneur.

I have to date put around 200 hours of work into Mides and around 90 hours into CycleMetrics. So far I have made less than $2,000 total on either of them.

Part of this is my fault, I started out with something of a flawed concept with the design of Mides because I was in love with the idea of nested code, self closing tags, and closures. This ended up eating away almost all of the devices’ memory, and was so recursive as to be nearly unmaintainable.

So I killed my darlings, went in for a heavy refactoring of the code without nesting, and ended up with a pretty decent mobile IDE.

However, at what my hourly rate is at this point in my career, based on my salary plus benefits, I am as of now, with all of my original plus ongoing effort into the software, about $30,000 in the hole on Mides, and $10,800 in the hole on CycleMetrics.

When I launched my app, shortly after the app store launched, I thought that I would be able to make back my money in 2 years and get positive. It has been 2 years, and I’m nowhere near making my investment back.

This is mostly O.K. since I have an awesome job, and I’m not missing a house payment or anything, but I think it is unwise to basically give away software that you keep shelling out effort on. I can’t let it die either, that doesn’t make sense, I love the idea of programming on your mobile, and I love the idea of being able to code on the apple tablet even more.

I also hate ads, and don’t want to do the ad driven thing. So while I’m still subsidizing the hell out of Mides at $9.99, it isn’t the slap in the face that $4.99 was.

So as a result, I have decided on $9.99 for Mides. I am putting in a fair amount of work to get to the tablet in an intuitive and sane manner, I also have a bunch of features planned. Some of which have been suggested by the awesome community at getsatisfaction.com/mides, and others that fit in with my dream of Mides.

I am still not sure what I want to do about CycleMetrics, but I have some online features that should be able to drive more reveneue for me. I don’t want to go to ads, and I don’t want to lock users in or try to steal their personal info to try to make a buck on it. That just doesn’t jibe with my philosophy.

We’ll see if the market thinks Mides is worth $9.99. I still think it is worth way more, but that is because I see it as it will be, not as it is. If people don’t think it’s worth $9.99, then they will later, but I can’t promise to keep the price there as I struggle to make it my dream of a fully featured mobile development environment.


Mides 1.7 New Features and Changes

Posted: January 25th, 2010 | Author: irv | Filed under: Apple, JavaScript, PHP, Programming, iPhone, mides | Tags: , , , , , | 2 Comments »

I wrote Mides originally to help me to write web applications when I am on the go.  A huge part of web application development is JavaScript.  The iPhone / iPod is an awesome device for heavy client JavaScript apps.  So as a result, I added JSLint in Mides 1.7 to make debugging JavaScript easier.

The main problem with the developer setting in Mobile Safari is that it is inaccessible to other applications.  Since one of the main purposes of Mides is to enable development with either no, or an unreliable internet connection, it wouldn’t be possible for Mides’ internal HTTP server to run and serve the mobile safari application with content.  This is the entire reason I wrote an HTTP server for Mides, so that JavaScript XHRs would work correctly for testing.

What I have done to help out with JavaScript debugging is to modify Douglas Crockford’s JSLint library slightly to make it work on the iPhone.  It helps out with outright errors, but also with many excellent tips for writing safe and readable JavaScript applications.  You can see the errors and optimizations by tapping on the burst and exclamation point icon when it appears over your JavaScript or HTML.  This feature is optional and can be disabled in the iPhone settings.

Another issue I wanted to address with a new feature is that I always forget the argument, or the exact PHP method call that I want to use, especially around MySQL.  I already had the documentation in there, but since it is a full-text search, it tends to take a while.  So I added a new feature that allows you to look up just the method signature, that is the method name and the arguments to the method.  I didn’t want to put a button in there for this, it just didn’t seem right.  I tried for a while to come up with something usable, and I think I have figured out something that works.  You just need to twist the phone to the right ( or left ) to do the code-completion on the method.  If the text before the cursor matches one or more PHP method signatures, then it will add that value in context, in line into your code with the argument types.  If it matches more than one, it will display a modal dialog that will allow you to choose from the top 5 PHP methods that match what you have typed.

One fix that a customer asked for on getsatisfaction.com/mides was that I make tabs parse properly.  I also added that in Mides 1.7, now your tabs will be properly displayed.  To create a tab, just space 5 chars into the document.

I am adding features both at the request of customers on the burgeoning community on getsatisfaction, as well as through my own usage of the product.  I probably won’t implement all of them, but please keep the suggestions coming.  They help tremendously.  Some of them are really tough to implement, but if they make it more usable I’m all for it.

One of the main issues around Mides is moving files onto and off of the phone, Apple hasn’t made it easy, and FTP is not the best solution, it is a nightmare to support, and difficult for users to set up.  I thought about having a small application that you could install on your Mac and PC that would make it much easier to transfer files with, but this didn’t seem like the best solution either.  I am actively thinking through better ways, but nothing so far has really stuck.

At any rate, I am constantly trying to make Mides more useful, I know it has been rough, but I’m glad to see that some of you are starting to get real use out of Mides.  I hope to keep making it better and eventually to rival and in some ways improve upon the desktop coding experience.


Mides: What’s Going On

Posted: July 8th, 2009 | Author: irv | Filed under: iPhone, mides | Tags: , , , , , | No Comments »

I have been getting killed in the reviews for the past couple of weeks.  Probably deservedly so.  I wanted to drop a brief update as to what is going on with Mides.  After exploring the concept of including a PHP interpreter to debug scripts, I have decided that at this time it isn’t practical.  There are too many problems and roadblocks to implementing it, not to mention that it is only palatable, performance wise, on the iPhone 3GS, which many people do not have at this time.

What I have decided to do is to work on additional features to improve the functionality of Mides as an IDE.  I have some code completion features I am working on, improving the performance of the documentation searches, and adding line numbers are a few of the improvements that I have brewing for the next release of Mides.

I appreciate all of the awesome feedback, and am working to implement as much of it as I can, or at least as much as my day-job will allow.


Trials and Tribulations of a PHP Interpreter / Compiler Writer

Posted: June 7th, 2009 | Author: irv | Filed under: Programming, android, java | Tags: , , , , , , , , , | No Comments »

For the past couple of months, I have been struggling to write a PHP interpreter for an upcoming Android version of Mides.  The tokenizer was fairly easy, building the Abstract Syntax Tree was relatively uncomplicated, but now we come to actually writing the executor.  This is giving me pause.

I totally understand why Joel Spolsky says that there are two classes of programmers, one class that sort of hacks their way through life, and another that writes compilers for fun.  I guess I am trying to blunder my way into the latter class.  At first, it didn’t seem to be so difficult, but eventually it has gotten so hard that sometimes I feel like just dropping the whole thing entirely.  However, when I feel like bashing my head into the desk, and / or throwing my MacBook Pro out a window, I know I am on the right track.  That is how I felt when I was trying to learn Java and Objective-C a few years ago, or attempting to understand domain modeling as it pertained to Object Oriented Programming, before understanding Object Oriented Programming.

I guess these are just things that we all must get through, I also see why most CS majors don’t every actually finish their compilers.  I, however have a dream that I can develop web applications without being encumbered by any sort of connections from my handheld.

The first part that slowed me down was that I was trying to approach the executor by compiling the program to opcodes and then running them against the system, sort of like the asm function in C.  That won’t work with Dalvik, at least not in an elegant way.  Then I asked this question on StackOverflow, and the answer made me think;   I don’t think I quite got it immediately, but now I understand.  It basically comes down to a large hashmap of keys ( variable names ) and their values, ( the statements to evaluate into them ).  OK, I get that, but the new problem I am facing with the top-down recursive descent parser is how to handle classes and functions efficiently.

I realize that generally a class is just a new hashmap of values, scoped to a variable handle in the global hashmap, a function is similar in that it has its own scope that is not shared with other objects in the main hashmap.  The recursion here can make your head hurt.  The problem I am facing now is that if I have a statement ( series of tokens ) mapped to a variable, how do I handle, a ) parameters, and b ) not re-interpreting the tokens each time the class is instantiated.  Another issue is how to keep the scope of a single instance different than another instance, unless there is a shared static variable in the hashmap between them.  I am looking at V8’s source to try to understand the concepts behind their VM.  I think that is how they boosted speed so greatly for OO based JavaScript applications.  They must only parse those tokens once.  There are all kinds of bugs I can see introducing into my fledgling interpreter by doing that.

I guess what I am understanding is why PHP has taken more than a couple years or more to get where it is today, why Ruby still has quite a few oddities to the language, and why Python basically needed a complete rewrite for version 3.  This is not easy stuff, but nothing worthwhile is.  I have never considered the possibility that this may not fully work in any practical sense.  When I do release the Android Mides, the PHP parser functionality is likely to be beta.  I did look at the code once for Quericus, but without some sort of object diagram, I can’t really understand what I am looking at.  Much of the code is mixed up with the server code so it is difficult to figure out what is doing what.  I have read a few pages of the Mak book and I’m thinking about buying it just to see how he implemented the parser, but I am not sure it will do me any good.

I may consider creating my own language for use with Mides, and then compilers that generate PHP and Ruby source code from it while I work on versions for Apache, Nginx, etc… In lots of ways I think it would be much easier, and I could offer type checking and other things from compiled languages that help build more robust code.  I would maintain the PHP documentation that is present in Mides, and naturally you could FTP up the code to your server and test it there.  But I think that would be copping out, and I don’t like to have something like this beat me.  I do however have to realize that PHP wasn’t built in a day, and that this process will not happen immediately.

I keep asking myself what would Steve Jobs do, and the answer I keep coming up with is that he would go his own way, well I’ll keep stewing on it, and hopefully the end result is that I will become the sort of programmer that Joel would want to hire, although somehow I doubt I could ever achieve that level of software engineering excellence ;-) .


The TouchBook: The NetBook to End All NetBooks?

Posted: May 21st, 2009 | Author: irv | Filed under: Uncategorized | Tags: , , , , , , , , | No Comments »

The primary problem with my iPhone, G1, iPod Touch, etc… Is that they are too small and have too limited a battery life.  What I have been hoping for, for a very long time is a single slab tablet computer, sort of like a big iPod Touch with a 3G / LTE modem, a soft keyboard, and an open set of programming APIs so that I can make whatever applications for it that I wish.  Ideally it would have a dual core ARM CPU and great battery life, plus the option for a physical keyboard, well it seems that while I was hoping that Apple has done it, Always Innovating has taken matters into their own hands:
TouchBook

The TouchBook will run a variant of an open operating system called OpenEmbedded, a variant of something called the Angstrom Distribution, which I suppose is a distribution of the OpenEmbedded OS.  Although I have only seen the you tube video:

It seems to have the right stuff to be successful.  At $299 for just the touch part, or $399 for the touch part with the keyboard and second battery, the price is right.  The 3D in the video appears to be sufficient to compete with the iPhone, but what it will likely come down two are a couple of things:

  1. Are the APIs polished, or are they as disjointed as the normal Linux programming APIs
  2. Is Apple going to do a large form factor iPod Touch

If Apple is going to do a MacBook Touch, or a MacBook Mini, even at $499 or more, that can run the current crop of iPhone apps as desktop widgets, it will make it difficult for normal people to justify buying the TouchBook over a big iPod Touch.  Hax0rz, evangelists, early adopters, and general geeks like me may buy the TouchBook, but it is going to be an uphill battle for widespread customer adoption with yet another programming environment for developers to adapt their iPhone apps to.

On the other hand, if they were to make a pre-installed Android option available that was running Gnome or something, but could still run Android apps with little to no modification, in the same widget system as was described above, it could be interesting.

I respect what these guys are doing, its something I have thought of doing many times myself, and I might even spring for one if I get a little personal government bail-out money, but I just am afraid that I will crave whatever Apple makes.  Even though I have switched my personal phone over to a G1 and love it, and love coding for it, I still pine after the iPhone, some things are just simpler.   It really has nothing to do with the G1 hardware, while it is ugly as the offspring of sin and feces it functions adequately.  Its the OS that seriously lacks polish in places, and the unavailability of any sort of desktop synchronization mechanism is difficult at times, especially since the iTunes app doesn’t always play ball when dragging large numbers of UN-DRMed files out.

I suppose Google could modify gears to allow Android to tether to some kind of web app / web management system, that would be interesting, but I see that as being in the distant future.  Love it or hate it the iPhone and the iPod Touch, Cocoa Touch is just way ahead of any of its competitors.  If Apple would loosen up on the app store policies, allow 3rd party libraries and scripting languages on the iPhone, I think most of the competition would disappear overnight.  You’d still see the Linux guys pushing stuff for the fringe crowd, but Apple would have the consumer market locked up.

I think that the App Store situation is what is going to hurt Apple the most.  I am only developing for Android because I can’t flush out my app on iPhone, not because I can’t or because its obscene, but only because Apple doesn’t allow PHP, Ruby, and Perl, which is what my application is all about.  I can’t believe I am the only one who is playing by the rules and doing what Apple is making me do, develop for competing platforms.  I’m sure Apple doesn’t and wouldn’t care, my application applies to only a subset of a subset of a subset of the general population, web developers, and isn’t likely to bring in a ton of money for them or me, but I do it because I love the concept of building web apps while mobile.

The TouchBook is really perfect for my application, so after the Android release, I guess I’ll be doing it again for the TouchBook. Here’s to hoping people buy it, and that Apple doesn’t announce a large iPod Touch at WWDC.


Writing a PHP Interpreter for Mides

Posted: May 7th, 2009 | Author: irv | Filed under: PHP, Programming, android, iPhone, java, mides | Tags: , , , , , , , | No Comments »

For the past few weeks I have been working on writing a PHP interpereter for Mides.  As I know that I am not allowed to do it for iPhone, as it would involve downloading and executing scripting code, which is not allowed.  I have only been looking at the tokenizer for the iPhone, while I have been looking at the full monty for Android.

I actually have gotten to the point where the tokenizer is passing a lot of my tests, but there is a lot of ground to cover with PHP. Tommy Carlier’s blog on writing a parser has helped tremendously.  Still, even after getting the tokenizer working, I have to write an interpreter to execute the tokens.  This involves implementing the many methods that PHP has built in, so it will be a while until I get that completely done.

I am pretty frustrated with Mides for iPhone, actually, I wanted it to be a full PHP implementation and editor, but until the Terms and Conditions change it isn’t worth the effort to build an entire PHP interpreter just to have the app rejected. I am still improving the iPhone version, and the next update should be a huge improvement over what is currently there.  I had to remove the nesting because I need the memory for documentation search as well as the PHP tokenizer that I am working on.  Overall, the next update for Mides will make it better, it will be close to what I was hoping for, but it will never be completely what I was hoping for on iPhone.

The Android version of Mides on the other hand is shaping up nicely.  The Android text view supports color so I have some syntax highlighting happening which doesn’t hurt performance on the G1 too badly.  The tokenizer is mostly done, and now I am designing the interpreter.  Development on Android is going a lot faster since I don’t have to worry quite as much about memory leaks, although if you try you can still make them happen.

At any rate that is why there haven’t been any updates for Mides in a while, I have been working on localization, parsers, and interpreters.  I am spending most of my time on the iPhone version of Mides, but it seems that I am getting farther with the Android version, go figure.


Mides and The PHP Interpreter

Posted: January 17th, 2009 | Author: irv | Filed under: Uncategorized, mides | Tags: , , , , , , , | No Comments »

Mides and The PHP Interpreter

I really want to put a PHP interpreter into Mides, the problem is my interpretation of the Ts & Cs of the App Store. It is my understanding that executing downloaded scripts is prohibited. To the best of my knowledge, downloading a bunch of PHP templates and running them through the interpreter runs afoul of that provision.

What that really means to me is that the dream that I had when I originally wrote Mides will be a long time coming. I think that with some competition, Apple will hopefully broaden the types of applications that are available in the app store. It would be fantastic if they allowed scripting languages to be included in apps. It would be awesome to have the ability to have ruby on the device, as well as PHP and Python. Really the only platform that I could put some sort of PHP interpreter onto would be Android, but for some reason I am just not super excited about it.

What I am super excited about is the Palm Pre. It looks sweet, oh well Mides fans, I guess we’ll just have to wait.

* 5/6/2009 – I am currently working on a Dalvik compatible compiler for PHP that will work on Android.  It is a bit harder than I thought, so we’ll see if I can get through it.  I looked at it on iPhone, and it still seems to be a no-go. *