Archive for the ‘Development’ category

The six week test

August 15th, 2009

I’ve been speaking with a number of local entrepreneurs over the past few weeks, and they all have a few things in common.  All are sharp, smart, have good taste (hey, they’re talking to me, right?), have some killer ideas, and seem to be stuck.  Taking definitive action on the ideas seems to be the next key step that is holding each of them back.

During our discussions, each idea was solid, but not necessarily reaching for the sky as in “I’m developing the next Google killer” (and that’s a good thing, in my view).  All were certainly achievable with enough effort and time, but time is the killer factor here.  Most of the ideas had very long time horizons – there was no plan to be even ‘launching’ for several months – usually 6-12 months from starting.  That’s a workable plan for some people, but in these cases, I didn’t think it was.

I began asking this simple question.  “Now that you’ve identified a target market to serve, what could you do in the next six weeks to be able to serve the people in that market in exchange for money?”  The question brings everything to a short pause.

The motivation behind the question isn’t to force people to only do something that will result in cashflow within six weeks.  Six weeks *is* a fairly short time period, but it’s also possible for many projects to be started and have revenue in that window. The idea is to get people thinking about short term goals, and to focus on small achievements, testing the marketplace, and so on.

If you have an idea that may take 8-10 weeks, that’s fine too.  Hey, it’s even fine if you have an idea that really *will* take 10 months – go for it!  But for the majority of people I talk to, they’re very likely to get lost during those 10 months, stumble around, and eventually give up on the idea altogether.

Does this approach work?  Well, it can.  I’m living proof that it can.

My own GroovyMag and JSMag ventures took longer than six weeks to start up, but they definitely weren’t 10 month ventures.  I started looking in to the idea in earnest in late June 2008, started serious planning in August 2008, and launched GroovyMag in November 2008.  That was probably 12 weeks total, but much of that time was working with others – writers, layout, etc. And at the 6 week mark it was in full swing, with a defined launch date.  During that time I wasn’t quiet about it either – I engaged the community for feedback and input, created a signup form to collect contact info on those interested in the idea, and had a ready-built customer list on day one.

Similarly, my brother recently launched a small project, and it took about two weeks from idea to cashflow.  Will this take over the world and let him retire on just this project?  Probably not, but it’s also given him a customer base of people who have an interest in that particular topic.  As that grows, he’ll have better insight as to what those customers want and need, and can serve them better with other related products.

On the other end of the spectrum, I’ve followed a couple of people working on projects over the last 12 months, and neither of them have launched yet.  They’re doing everything possible *except* putting the product out there for sale, which is a shame.  Had they started smaller, gotten better feedback from potential customers in the first few weeks, and changed course accordingly, I think both people would have had better products after all this time.

This “six week test” isn’t anything new.  Many of us have heard the phrases “release early, release often” or “ready, fire, aim” or similar ideas.  My only twist on this is phrasing the concept with a specific time limit attached.  Six weeks wasn’t an arbitrary choice, mind you.  It was longer than ‘two weeks’ (very few people can organize themselves enough to be productive in just two weeks), longer than ‘a month’ (months have different days in them), and not ‘two months’ (which often ends up being something people feel is so far in the future that they can put it off).  “Six weeks” is, to me, concrete enough for people to realize it’s a short time period, but long enough to accomplish something in.  It’s also 42 days, and we all know the benefits of 42.

What could you accomplish in the next six weeks?  Do you have an idea for a new product or service you’re thinking of putting together?  Does six weeks seem doable to you for your ideas?

Service to record voice conversations from cell phone

June 17th, 2009

I’ve wanted a way to record cell phone conversations for *years*.  With the proliferation of smart phones, you’d think we’d have this by now, but it’s still not a feature widely available (and, reportedly, blocked by some device manufacturers).  So, to scratch my own initial itch, I’ve put together a service to allow me to record my own calls.  It’s not part of a handset, nor is it downloadable software for any particular phone.

The service is just that – a service.  Specifically, you just need to conference in the service to your existing phone conversation and everything during the conference will be recorded.  Within moments of hanging up, you’ll have an MP3 emailed to you.

Based on the number of posts I’ve found when searching for ways to record phone conversations, this seems like it’s something other people might need or want as well.

Pros
No extra hardware to buy
Works with any phone that can conference call
Easy to use – just dial and go
MP3 emailed on completion

Cons
Per-minute cost

This service would like be 5-8 cents per minute to use, or possibly just a monthly flat rate.  Is this something that people would be interested in using (or at least trying out)?  I’ve used it from my phone (older Ericsson) and plan to test recording a voice call on a BlackBerry Pearl soon.  I’ll also be testing an iPhone soon too, just to see how easy it is.  If you’re interested in giving this a trial, let me know and I’ll let you take a test spin to see what you think.

I know Google Voice will have a feature to make this possible (recording just by pressing a button) but from what I’ve read, it will only work on incoming calls.  If you make an outgoing call, it won’t allow you to record.  Maybe that’ll change, but until Google Voice actually allows new people to come in and use the system, it’s of limited value to me and most people.  Additionally, as useful as it is, I don’t seen everyone switching to Google Voice any time soon.

Palm Pre pre-development – waiting for SDK

June 4th, 2009

I’ve been hearding a lot about the upcoming Palm Pre smartphone.  I’m so on the fence about getting one.  I almost got an iPhone two years ago as well (stood in line on the first day but chickened out).  I *hate* dealing with cell phone companies – making switches, signing ridiculously one-sided contracts to get locked in to a one-sided relationship for the ‘privilege’ of getting a ‘discount’ on a phone.  NEWSFLASH – I’m going to have to use *one* of you stupid major carriers regardless of which phone I pick.  Have *decent* service, and I won’t leave.  Keep your phone prices under $200 retail, let me choose my carrier, and if you suck, I’ll switch.  Chances are, for every person who switches away, you’ll get someone who switches *to* the same carrier anyway.  This is the game they play now with inducements to try to get people to switch already – extra discounts, group plans, etc.

I digress…, but really I hate dealing with new phone stuff.  I hate the feeling, and (for better or worse) that’s kept me out of the new ‘smartphone’ market for some time.  As a developer, I’d like to be able to have multiples – I want an iPhone, and G1/G2 Android, a Blackberry, some mobile Windows and now a Palm Pre.  If each one was under $200, I’d be very likely to buy them all.  I wouldn’t necessarily have phone service on each one all the time, but I’d definitely have more than a couple.  As it stands, ‘retail’ – I have to spend $600+ on each one – it’s insane.

Anyway – back to the Pre.  I had a Palm VII years ago, liked it, but got disenchanted with all the work you needed to do to write apps for it then try to distribute them.  Palm had an ‘app store’ of sorts back then, but the hoops to jump through were (IIRC) quite a lot.  I’ve heard mixed things from iPhone app developers about the iPhone situation as well, but there’s clearly enough support there for tens of thousands of people to have signed up in a year.

Thinking that Palm might be embracing their developer community a bit more this time around, with the launch of the Pre just days away, I went to developer.palm.com to sign up for their Pre developer program.  “Apply now” was the first orange button I saw, which already had an offputting feel to it.  Perhaps Apple’s is the same way, but “sign up” or something more inviting would have been better.  “Apply” already intones that I have to pass some sort of approval process, and I was right.

I had to fill out a basic contact form  (no big deal) but then they asked a bunch of questions about “what type of app are you going to develop?”  To be fair, these were not required questions, and perhaps this is the best time(?) to get some demographic info, but really – I have no idea what I’m going to write.  I don’t know what your SDK is like.  I don’t even have the stupid DEVICE yet – how would I know what sorts of apps I’m interested in writing, or what’s even possible?

I also think this might not just be purely demographic information – they might be making a decision as to who gets the SDK first based on your answers.  I can’t say for certain – and maybe I’ll get approved soon, but I got the following message:

“Please note: because we expect more applications than we have openings for, we can not guarantee that you will get into the program immediately. Because of this, you may not hear from us right away. We will keep your application and you will be contacted by email when your application is approved.”

*NOW* does not seem to be the time to be shy about getting Palm SDKs in to people’s hands.  The launch is imminent, developer awareness is piqued (because we’ve not seen ‘in the field’ reviews yet), but they’re being way too controlling about this.  Perhaps Apple worked this way too, but this doesn’t seem to be a tactic which serves Palm well.

Is this just a short way of me ranting that I didn’t get the toys I wanted immediately when I wanted them?    Perhaps, but there’s likely many other developers that want this stuff too.  The more hoops devs have to jump through, and the more delays you put in their way, the fewer devs you’ll have.  An underdog platform doesn’t seem to be in a position to keep developers waiting, even if it’s only for a few hours/days.

Ways I’ve increased my productivity

January 22nd, 2009

Productivity has been one of those issues for me over the years that always seemed elusive.  This isn’t to say I never get anything done, but I always feel I could be doing better.  As some of my elementary school teachers used to write on my report card “Could do better”.   That always stung, because it’s not that I didn’t know how to do the work – it was just bloody boring.  Fast forward 30+ years and I feel like I’m in the same boat.  I’ve always had this feeling that I could be doing better when it comes to how I get things done.  Couple that with the idea that “productivity” is (in my view) a somewhat hard thing to measure, and you’ve got a recipe for a situation that’s driven me crazy for a long time.

Definition

Dictionary.com includes these for productivity and productive:

Productivity

  1. The quality of being productive or having the power to produce
  2. Economics The rate at which goods or services are produced especially output per unit of labor.

Productive

  1. having the power of producing; generative; creative: a productive effort.
  2. producing readily or abundantly; fertile: a productive vineyard.
  3. causing; bringing about (usually fol. by of): conditions productive of crime and sin.

“Having the power of producing”.  Since I’ve been self-employed, that phrase has taken on new dimensions of meaning, and in ways that I wasn’t aware of during my first round with self-employment from 1999-2003.  I’ve learned many lessons during and since that time, but it seemed many of them were not really *part* of my life yet.  Many of them still aren’t, but they will be.

The “power of producing” also means “the responsibility of producing” in an work situation, and possibly doubly so in a self-employment situation.  In its basest sense, whatever you “produce” must have “value” to someone else.  If you “produce” things of no value, but do so rapidly, you’re “productive” by the book definition, but you’re out of a job in the real world.

What am I producing?

So I’ve had to be more aware of *what* specifically am I producing for people that bring them value?  Currently I deliver three products to various customers: custom web applications, training services, and PDF magazines.  Each one of them is a separate concern – there’s not much overlap between my customer base.  And each one involves separate skills: development, teaching, editing.  But I realized that in each case, the person buying the product is buying value, and that value to them is time.

Web applications

When someone contracts me for web work, they’re wanting one of two things:  either an application that will streamline some aspect of their business, or an application to get more sales in the door.  The second one is more of a marketing type of thing, and I don’t usually involve myself in those project.  I tend to focus on the quantifiable projects – “process X used to take 8 hours, and using this software it takes 27 minutes”.  In those cases, I’m saving the customer’s time from doing automatable work to focus on tasks that have higher value to them.

Training

When people buy training services, they’re learning how to save time by doing something they didn’t know how to do before.  They’re saving time both by having someone experience (me) show them how to do what they want rather than learning on their own (savings 1) and by utilizing the knowledge they learn to automate or eliminate things they currently do with their time (savings 2).  I know this is a rather abstract way to talk about it, but training/education services all seem to have this in common.

PDF magazines

I launched GroovyMag a few months back as a way of bringing together information about the Groovy and Grails ecosystems to people in a consistent, regular fashion.  The value provided here is education under a different delivery vehicle.  People buying GroovyMag are hoping to get information which will make their Java and Groovy development processes faster, saving them time to do more important things (more complex Java work, disc golf, time with the family, whatever).

So while I’m not producing time directly, I’m producing things which have a direct impact on people’s time, and ideally let them keep more of their time for higher value tasks.

Keeping more of my own time

Given that the things I’m producing all end up with time as a key factor, it follows that I would also be looking for ways to save my own time to spend on producing things of value, right?  Here is a list of a few steps I’ve taken which have been beneficial to me so far:

Read Getting Things Done (GTD)

I succumbed to the hype around this book and bought it many moons ago.  It’s staring at me from my bookshelf as we speak.  I was not quite able to implement all the physicality of the book’s ideas yet, but one suggestion from it is already paying some dividends.

Keep folders for everything

I have dozens of folders labelled now, each with only a few bits of paper in them.  Years ago I would have *never* done that, but the GTD book suggested it, and it’s helped me be able to quickly find things I need when I need them.  I need to reorient my office so that all of that is closer to hand, and I’ll use that technique even more in 2009.

Dual monitors

I’m split on whether this has actually *helped*.  During my training sessions it has, because I’m using WebEx for training, and I can keep chat windows open in one window and the ‘shared applications’ open in another.

I tend to use a laptop a lot (as in, I only own laptops right now), and I like to sit leaning back in a chair with my feet up quite a lot.  I swivel.  I move.  Keeping a second monitor plugged under those conditions doesn’t work very well.  I already ruined one VGA cable because of so much twisting.  I’m really waiting for wireless video (bluetooth video?!).  So, despite the hype of “dual monitors make you more productive!” I can’t say it’s been a total time saver for me, except in training situations.

Macbook

I picked up a used Macbook in October, and it’s become my primary laptop.  It directly saves me time because of the fast suspend/resume and intelligent wireless behaviour.  It’s not a perfect laptop, but using previous laptops (both with XP and Linux) I realized I was always spending way too much time for the laptop to resume to a workable state, and for wireless functionality to come back up.  I’m normally able to use my macbook within 4 seconds of opening the lid.  Under my XP and Linux laptops, it was more like 10-15 seconds.

This doesn’t sound like much, I agree, but usually in those extra 6-11 seconds I’d get mentally miffed about the delay, my mind would start to wander, and I’d end up thinking about something else for a bit, or walking off to do something else for those ‘few seconds’ and end up wasting a minute or more.  So, while I could have tried adjusting my concentration habits to remain “focused” on my initial reason for opening the laptop, trying out Mac hardware was an easier step which has ultimately saved me time every day.  This isn’t saying my Mac saves me hours per day over another system, but little bits add up over time.  And my frustration level has gone down some because of it.

Delegation

This might have fit under the GTD heading above, as its recommended in that book, but its something that tends to be recommended by many personal development systems.  And it works.  In a corporate setting, delegation might be a situation where you ask a team mate to do something for you that better matches their skill set.  I’ve not recently been in corporate situations where I had direct authority to delegate to other people, so this one always a difficult one for me to grasp.  Being self-employed now, its easier to grasp and implement.  The downside is that ‘delegation’ means ‘paying someone to do something’, but the upside is that, once you find the right people, it works wonders.

I was initially going to try to produce the GroovyMag PDF magazine on my own.  I got a trial of InDesign, tried Apple’s Pages, and messed around with Scribus.  After a few days I realized that there was *no* way I could handle this on my own.  It would take me weeks or months to become proficient enough with any one of those tools to save myself any time at all.  I ended up finding a good design person who charges reasonable rates, and I delegate the production of the magazine to her.  We discuss layout options, design ideas, etc., so I have some input, but she’s able to do things in 15-20 hours that might take me 15-20 days of solid work.  The delegation principle has worked wonders for that project, and I’ve tested out the concept on a smaller scale in other projects with similar, smaller scale results.

Turn off the phone

My cat knocked over a glass over water over night and my cell phone sat in a pool for about 7 hours.  It doesn’t hold much of a charge, and flakes out now and then.  I was initially miffed, and was suddenly thinking of all the expense and hassle a new phone brings.  Considered an iPhone (but held off for now) and decided to see what things would be like without having the phone on all the time.

It’s great.

I check voicemail once every day or so, but people who need to get ahold of me know to email me, get me on IM, or Skype me.  It may seem counterintuitive that I have the phone off, but keep IM on and still check email.  Other productivity people will say “don’t check email”.  I agree, and *usually* don’t check email but once every few hours.  There are times, however, when I fall back in to old habits and check email every 5 minutes.  When I notice myself doing this I need to figure out why.  It’s *usually* because I’m working on something I’m having a huge mental block on, which I’ve not readily acknowledged.  Once I recognize this, I stop the email fidgeting, get up, walk around, perhaps get on the treadmill for a few minute, or even go watch some television for 5 minutes.  What I do isn’t as important as breaking that cycle and clearing my mind of that block.

Small notebook

I picked up a pocket-sized moleskine notebook a few weeks ago and carry it around with me.  I find it easier to jot down notes in there any time of the day or night, laptop resume time notwithstanding.  I sort of wish I’d gotten the ‘calendar’ one instead of the free-form ‘ruled’ paper one, but when I went back to the store, they didn’t seem to have the smaller sized calendar ones around.  Maybe I just imagined they had them?

Another lesson learned – a good pen makes a difference.  Or, put another way, a bad pen makes it really hard to write.  My penmanship isn’t very good to start with.  Couple that with a pen that makes me work too hard and it’s a recipe for chicken scratchings.

Things to try or master

There are still many things I’ve not tried or not incorporated in to my daily routine yet.

Virtual assistant

Having a virtual assistant has been one of those things I’d like to try.  I always feel like I don’t have ‘enough’ to pass off to someone else, but I think I’m getting to that point.

iPhone/smartphone

At some point I’ll get a smartphone to see if the portability of having certain apps around with me outweighs the potential timewasting of having games like BubbleWrap 2 seconds away at all times.

“Refactoring your Wetware”

This book by local publisher Andy Hunt looks good.  I saw him give a presentation on it at our local JUG, and the presentation has been an inspiration to me as I look for ways to be more productive in my day to day life.

“Getting Things Done” software

I’ve tried out a few GTD-inspired pieces of software, but nothing has stuck with me yet.  I think I’m more tactile, and while I love computers, I’m just not yet able to organize my whole life there.  I think expanding the ‘everything in folders’ concept may yield more short term benefits for me, but I’ll keep trying out software.

Am I more productive today?

Thinking about it today, I think I’m able to produce more value than I was a year ago.  Whether this value is worth as much in the marketplace as I think it *should* be is a different story  :)   As is the case with most introspective journeys, the more you become aware of your situation, the more you realize there’s room for improvement.  As I identify and make those improvements, I’ll document those here, or perhaps in another blog.  This type of post isn’t keeping with the style of what this blog has been up to now, and I might want to start keeping these ‘introspective/improvement’ posts someplace dedicate to them.

Twilio – phone app proxy service

December 15th, 2008

I had no idea how to describe Twilio, so “phone app proxy service” was the best I could come up with. It’s probably nowhere close, so let me explain what Twilio does.

Register for a Twilio account, and you’ll get a phone number. People calling in to your phone number will trigger Twilio’s server to hit *your* server; specifically, a unique URL you give Twilio. Your URL will return back some specific XML which instructs Twilio to play a message, say some text, or ask the user for some input (key or voice). Twilio will then send the user’s input back to your URL, which you can then parse and send back more XML to instruct Twilio which step to take next.

That’s it. You can build your own phone-driven service without investing in any hardware and very little software. Cost is 3 cents per minute, which is very reasonable in my view.

What sorts of apps would you build with such a service? I’ve got some ideas of my own, and will let you know if/when I build any of them. :)

Age of software industry

November 13th, 2008

Talking with my friend Shawn Hartsock the other day, and we got to talking about the state of software, and some of the history of software development.  He’s a big nerd on this subject, and considers ‘computing’ to go back hundreds (or thousands!) of years.  Yes, one can make that argument, but I when I talk about computing, I’m generally referring to the stuff that started to become available to mainstream households in the mid ’70s.  Systems that one could order or buy in a store that came with enough to let you write your own useful software, or load prewritten software.  Visicalc was a bit of a defining moment, and one could argue that the ‘software industry’ as we know it today was born either with Visicalc, or certainly right around that time frame anyway.

Using that as my premise, we can say that the ‘software industry’ has been around for *about* 30 years.  I know it’s gone on for far longer than that, but really only for a select few people.  It was not an *industry* in the sense that we know it now, nor could it have been.  Most software was written specifically for particular pieces of hardware before the time period that I’m talking about.  

Given that the modern software industry started about 30 years ago, I was shocked to realize that I’ve been involved in it professionally for nearly 50% of that industry’s lifespan.  I started programming in 1981 on a Timex Sinclair ZX81 with 1K of RAM, soon expanded to 16K (assuming the RAM pack didn’t jiggle out of place!)  This was a hobbyist phase, to be sure, but I got hooked early.  I didn’t do any *professional* programming until 1993, and even then it was just a bit of freelance parttime stuff working through school. 

Looking back, and what Shawn and I were discussing, is that we’ve seen a massive shift over the last few years away from ‘shrinkwrap software’ (which is, imo, what was born in the mid/late 70s) to the current ‘software as a service’.  Yes, many people still buy MS Office, and we still buy operating systems (Windows, OS X, etc.)  But the majority of software that many people use today is web-based.  Email may be a prime example, but we’re already seeing moves to web-based word processing, spreadsheets and other ‘office’ staples.  Accounting software – Quickbooks is online.  There’s likely hundreds of examples to illustrate this switch we’re seeing.

The days of going and buying a disk with software on it are fast disappearing.  The gaming industry might be the last major consumer hold out, but I’m not a huge gamer, so I don’t know much about how that’s shaping out.  What is interesting to me is to be witnessing this shift happen, somewhat gradually, but at the same time rather quickly.  

Taking, say, 1978 as a starting point for the modern software industry, we had about 15 years until the ‘internet’ started to become something ‘average’ people might be able to use.  Students were using it more and more when I was in school at that point (email, ftp, telnet, irc, etc.)  From 1993 through 2008, another 15 years, we’ve seen a dramatic shift away from packaged software to ‘software as a service’, the latest fancy term for ‘client/server’ from decades earlier  :)

This was a post I’d started several weeks ago, then let sit.  I’ve lost some of the points I was going to make, so I’m putting it out here now in case any one cares to comment on it.  It might help jog my memory as to what I was planning to say.  Perhaps, in a nutshell, this is just my way of saying “I feel old”.  :)

TIOBE and Groovy and Grails random thoughts

November 13th, 2008

So having recently launched a magazine on the Groovy language, I decided to check out the TIOBE index and see where Groovy sits.  Not terribly high (#41) but not too bad for a relatively new language.  Certainly higher than many others with much longer pedigrees.  The TIOBE index also has a couple other interesting notes:

  • The trend for the last year for dynamic languages (vs statically typed languages) has gone down slightly. 
  • Perl is at an all-time low

Not much to do with me really, I was just somewhat relieved to see Perl start slowing down.  Yes, it’s going to be around for a long time, and yes, it’s powerful and CPAN has functionality to do everything except take out my garbage.  It’s just a difficult language for me to be productive in.  Always has been, likely always will be.  So, to the extent that alternatives make headway against Perl, I’m happy.  :)

How does all this affect Groovy?  Groovy is a unique beast, being able to be statically or dynamically typed, and compiling down to Java.  Many fans are eager to say Groovy *is* Java, but can be more if you want it to be.  Groovy brings the power of Java to the ‘scripting world’, and brings the power of scripting to the Java world, yet even that nifty phrase feels like it’s shortchanging Groovy some.

G2One, a consultancy based around Groovy and Grails (founded by the project leads of both Groovy and Grails) was recently acquired by SpringSource.  SpringSource is a consultancy and product development company built around the Spring framework.  I have to admit, not coming from a Java background, I still don’t 100% grasp how Spring fits in to the Java ecosystem, but I’m learning fast.  The shorthand version I’m getting from people is that the Spring framework simplifies Java development.  Anything that simplifies Java development is good in my book, but it apparently didn’t go far enough, because Grails seems to simplify Spring development, by bringing a standardized approach to web development and building on top of the Spring framework where appropriate.

I suspect that the acquisition will see a tighter integration of more Spring framework functionality in to the Grails framework.  It’s too early for me to say whether that would necessarily be a good thing.  Frankly, as a primarily non-Java person looking at the web development world in Java, the no-nonsense Grails approach has been much more productive for me than anything else (and I’d looked and tried out multiple web approaches in Java before discovering Grails).

SpringSource has an application server which looks to be a bundle of a modified Tomcat system and the Spring framework.  I installed it, and there seems to be less server management functionality than even a base Tomcat gives you.  From a ‘bloat’ standpoint, perhaps that’s good, but it seems to me that there’s still work to do to address the needs of the small web hosting business.

Why address those needs?  Because that’s where many businesses start off.  Many of the ‘enterprises’ of tomorrow will start with modest shared hosting accounts today.  Right now, it’ a PITA to have a Java web app (and specifically a Grails app, but others as well) live at the root of a domain.  It’s very easy to have “http://domain.com/myWebApp/” but harder to have “http://domain.com/” point to a standard WAR file.  Tomcat lets you do this once per server instance by specifically naming your WAR file “ROOT.war”.  Totally ridiculous, imo, and we need a Java hosting system that can manage mappings between virtual hosts and application installations (if only WAR files).  

“But Java is for enterprise applications” many Java die-hards will be thinking.  That’s only because it’s ceded the low-end hosting space to PHP and others by default, not because of any long-term strategy.  I’ll reiterate – this is important to Java’s long term future in the web world (and what part of the software space isn’t web-related?).  Smaller companies (which often grow in to larger companies later) will make their decisions based on a number of factors, but hosting support is one.  Developer availability is another, and developer familiarity with hosting options plays a part in what those developers end up devoting time to learning.

Virtualized servers solve the problem to some extent, but it’s the virtual host mapping which makes LAMP-style servers attractive to many people.  Multiple domains, all with root-path goodness, on one server with multiple discrete directories hosting various code.  I realize I’m harping on this over and over, but it’s been shocking to me how poor the support for this sort of thing is.  No decent interfaces, no way to delegate this sort of management to anyone except a server admin who has to futz around with multiple XML files on a server.  This went out of fashion in the LAMP world about 10 years ago, and I believe played no small part in the fast adoption rate of LAMP applications as the dominant face of public web applications.

Have I missed something?  Is it so simple to do this that no one even bothers to write about it because everyone ‘knows’ how to do it?  Or is this another area of Java which people have quietly abandoned (like cross-platform desktop multimedia).  To the extent that Sun is renewing their efforts behind JavaFX, we may see some traction for desktop Java again.  I’d like to see them (or anyone) make the same commitment to low-end Java hosting.

SpringSource, with its Grails acquisition, may be in a good position to address the needs of this market, helping to nurture a next generation of Java developers getting their first start with Java on Groovy and Grails web applications.  I’ve no idea if this is in their plans, but it doesn’t seem out of the realm of possibility.  Or does it?  Am I barking up the wrong tree?  Or just barking?  ;)

 

 

Looking in to Erlang

July 9th, 2008

I’ve putzed around with it before, went through some example code, etc., but yesterday picked up the “Programming Erlang” book from Pragmatic Programmers.  Might still return it if its too dense, but doesn’t seem to be so far.

The biggest takeaway I have is that Erlang is good for concurrent programming because of it’s ‘shared nothing’ approach (my words, not theirs).  Actually, there’s quite a bit on Erlang at Wikipedia.  For example: “Process communication is done via a share-nothing asynchronous message-passing system: every process has a “mailbox”, a queue of messages sent by other processes, that are not yet consumed.“  What does that sound like?  How can I tie this in with PHP?  ;)

PHP and Perl for sure (and I believe Python and Ruby, though I’m not sure) use the “shared nothing” approach in web development (for the most part, mod_perl notwithstanding).  This has demonstrated that it’s very easy to ‘scale out’ web sites that need it usually by simply adding more front-end web servers.  Scaling out the database does become a more difficult bottleneck problem, but it’s not impossible.  Contrasting this with the complexities that Java has when trying to ‘scale out’ applications.  This isn’t saying Java apps can’t scale.  However, specifically in the web domain, the Java code I’ve come across has tended to use threads for many problems, and threadded applications are harder to ‘scale’ across multiple machines.  Again, not impossible, but harder to manage.

Should the VMs just get more advanced and manage the threads across multiple cores (or multiple physical machines) for you behind the scenes?  Or should programmers be required to think about app design fundamentally differently than the traditional ‘spawn multiple threads’ approach that Java (and others) take?

This is not me necessarily saying that PHP is the be-all and end-all.  It’s not – it certainly has its share of problems.  But I’m finding it interesting that one of the key tenets of Erland – shared nothing processes – has been a key factor in what’s allowed PHP to become as dominant as it has.  This is also what allowed Perl CGI apps to become as popular as they did in the mid-to-late 90s as well.  Process and queue management in PHP6 would, imo, make it a viable contender to Erlang for the ‘concurrent processing’ market.  The ‘o’ in the ‘imo’, however, is based on a very early understanding and basic experience with Erlang – that ‘o’ may change in the next several months.  :)

What are your thoughts regarding the pros and cons of PHP compared to other languages/platforms?

Optimization will become more important in the next few years

July 8th, 2008

I was looking at hosting provider mosso.com this morning.  No particular reason – just saw an ad and clicked on it to poke around.  The pricing seemed reasonable, but because mosso is a ‘cloud computing’ sort of provider, I dug a bit further.  You’re charge $100/month for “10,000 compute cycles”.  Seemed a bit nebulous, so I dug in the the FAQ.

For example 10,000 compute cycles would power:

  • about 2.1 million page views using a database-driven content management system
  • about 11 million page views of mosso.com
  • about 25 million requests for a static 15KB image

and then:

What goes in to calculating a compute cycle?

Mostly, CPU processing time. However, compute cycles also account for the disk I/O your application’s operations consume. For example, a page with heavy database queries will consume more compute cycles in part due to the larger volume of disk I/O it requires.

So, for people who are used to “just get it done” coding (a valid approach, I might add), a move to cloud computing may ultimately end up costing more than being faced with CPU limits on one initial box.

Obviously, more traffic will increase your site usage, and you’ll eventually need more boxes (if you’re using a traditional server approach).  But by watching the stat usage on that single box, you’re more likely able to determine where some bottlenecks may be.  You’ll likely get a better idea of what’s *causing* the box to use CPU time – is it user code or database calls?  Working at that level first, and optimizing there, might be a better approach before moving systems to cloud computing systems.

Because a system like mosso transparently expands to whatever your needs are, you may just get hit with a bigger bill than you bargained for without necessarily being aware of it beforehand.  It does seem they offer a ‘used compute cycles’ counter on their dashboard though, which would help monitor the situation.

This isn’t to pick on mosso.com – I like the look of their offerings.  It’s more to point out that optimizations, both code and database, will likely become ‘in fashion’ again as people move to cloud computing systems with an eye towards keeping the costs down.  Database optimizations in particular will probably become key for many projects.

Related story:  back many years ago I was working with a company who was growing ASP projects like gangbusters.  Scaling up meant throwing more servers in to a farm.  Everything was built with MS Commerce Server.  Well, one day MS comes knocking and says “oh, you can’t use the dev versions of Commerce Server for production”.  We were paying for the ‘developer program’ where you get copies of everything for a yearly license fee.  I’m not sure if we all knew we couldn’t use them in production or not at the time or not, or just assumed that because they weren’t crippled, they were fine to use.  Either way it was something like $8k per server we needed to pay per server running a production copy of Commerce Server.  We had about 150 servers running at that point.  Next day the owner came in to the engineering meeting and said “we need to focus on optimization!”.  I’m not sure how many optimizations were done, but it became a big priority for a few weeks – even a 10% reduction in servers would have saved $120,000 at that point.

Perhaps most people won’t be dealing with projects on such a large scale to start with, but part of the attraction of cloud computing is that you can scale up to those levels while leaving the infrastructure headache to someone else.  They’ll gladly provide it to you, for a fee.  Just make sure you really need what you’re being charged for, or if easy optimizations would be able to save you a bunch.

Help test a new URL shortening / redirection service

June 28th, 2008

What?  Another URL redirection service?  What’s the point?  Well, there’s a couple of points.

1) I hadn’t done one yet, and it looked like a simple yet difficult enough challenge to get me thinking about coding again.

2) I didn’t see anything that offered usage statistics.  I tried one that claimed to offer them, but it appeared broken.  I’m pretty sure I’ve heard of some others that do, but I couldn’t find them.

So, today I put up http://ewerl.com. It’s a play on the word “ewe” pronounced as “you”, as in “YOU R L” (URL).  Yeah, I probably shouldn’t have to explain it, but the picture of cartoon sheep should help drive the point home.  Otherwise one might read it as “e-whirl”.  Not what I was going after  :)

I asked for some feedback on Twitter and already saw someone poking XSS holes in the supplied data.  Completely my fault, as I wasn’t cleaning the data for security (see, needing to get my head back in the game, so to speak).  I’m using the PHP PDO library, and binding data with prepared statements, so I’m not *as* worried about SQL injection, but the XSS was a bit of an eye opener (thanks, whoever you were).  That’s plugged temporarily while I come up with a better long term solution. It’s *workable* now, but I want to see if there’s a better approach than what I took.

On the stats end, any URL you shorten with the service has stats publicly viewable by adding “/stats” at the end of the URL.  If you’d prefer to get them in RSS form, add “/rss” instead of “/stats”.  The ewerl.com/faq/ page has a link to an example stats page and that has a link to the RSS feed.

If there’s any features you’d like to see in a service like this, please comment here or drop me an email.  Please test it out, bang on it, poke holes in it, and send me any feedback (good or bad) that you have.

Thanks!