Thursday, February 02, 2012

Chaos Python

Add this into your functional tests and smoke it.
import sys, random
def chaos_trace(frame, event, arg): 
    if event == 'line' and random.random() < 0.000001: 
        raise MemoryError()
    return chaos_trace
sys.settrace(chaos_trace)
You will get some lovely random failures injected into your code. A great way to find bugs, and make sure your reasoning is sound in the face of CHAOS!

Monday, December 19, 2011

CherryPy - I love it because it's pyhon.

CherryPy moved to bitbucket a while ago, and also got a website refresh.

I love cherrypy, since I can use it with python 3 - not legacy python.

I love cherrypy, because I can just use python objects.

I love cherrypy because it has a clever name.

I love cherrypy, because it just works.

I love cherrypy, it is minimal.

I love cherrypy.

Wednesday, December 07, 2011

Thoughts on Python 3

It's awesome.

Go get some!

Sunday, November 20, 2011

PyGameZine issue0

Today we are very excited to announce the launch of PyGameZine!





There is more information about it on the http://www.pygame.org/ website.

Friday, November 11, 2011

Vintage in Paris



Our Vintage in Paris app has been published on the Nokia app store!



The process was pretty simple, since it was a very technically basic but content heavy app.

The main difficulty in this app was walking around the streets of Paris taking pictures, and researching really good places to find Vintage.

Why a Vintage in Paris app?

Finding cool second hand and retro clothes is a hobby of mine, and my partners.   It's always fun finding interesting old styles, rummaging through clothes racks.  Especially in other countries, and especially when you find a bargain.




There's something special about wandering down some back alley, and finding an old shop stuffed to the rafters with old stuff.  It's like taking a journey back in time to some fantastical version of Paris you may have in your head.  If you like Art Deco stuff, then Paris is the place to get it.

What was the signup to the Nokia store like?

I have been signed up as a Nokia developer for quite a while already, so there hasn't been too much paper work, or forms to fill out.  I can't remember what I needed to do originally, so there might be more bureaucracy than I remember.  I'm sure there will be more forms for me to fill out in the future too.

Technical parts.

The app is available as a J2ME Java app, a Meego app, and a WRT app.  Nokia has so many different platforms now!  They are adding a couple more platforms too.  Luckily HTMLish apps "work" on all their platforms.

Our Content Management System(CMS) is written in Python/JavaScript/C/SQLite and uses pygame for image processing.  The CMS part is still in development, but is slowly getting there.

We use a form based system to define schemas.  I wrote about this in a "Validation through html forms" blog post, and mainly in "Using a html form as the model".  Basically this allows us to create a html form, and then that's it for the content type.  No need to mess around with schemas, or python models, just create a html form, and that is it.  Since I usually follow a design led approach, the html forms are usually done before anything else.

The data is stored in a mini database system I built which I detailed in the blog post "sqlitepickle SQLite Vs pickle".  It lets you use a dict like interface to save python objects.  It's basically a very simple key value store built on python stdlib modules.

We're using JavaScript on the server side as I detailed in a blog post "server side jQuery" to generate the html.  The nice thing is I can use jQuery plugins on either the client side or server side depending on the need.  Including form validation, and other goodies.  I see it as a replacement for a templating language.

This app as it stands doesn't need much of a CMS, but future apps we have in development require a beast of a system in order to process the vast amount of data - and squeeze it down onto various different formats ready for distribution on multiple channels.



Well it's out there now.  So hopefully it'll help some fellow vintage treasure hunters find some good stuff in Paris.

This is part of a series of blog posts on "my journey getting published on various app stores".

Friday, October 28, 2011

Halloween pumpkin juggling published to intel appup

So it looks like the little Halloween game we made has been published on the intel appup store.

It is listed here:
http://www.appup.com/applications/applications-Halloween+Pumpkin+Juggling


Friday, October 21, 2011

Getting into the Samsung store

So, I registered for the Samsung app store 'thingy' the other day.

Samsung have a number of platforms themselves, not just one platform.  Including Bada, Android, Tizen, and windows mobile 7.  They have tablets, TVs, laptops, mobile phones... and probably other things too (maybe internet fridges?).

It seems most of the platforms support web apps of some sort.  Either through wrapping with phonegap (Bada, Android, win7) or just accepting an archive of the files.

Once joined you can distribute free apps through there.  Which is quite lovely really.  They have their own advertising program, and I'm not sure if you're allowed to do In App purchases with them.

It seems for TV, you can only distribute to the US.  Not to other places around the world.  No idea when or if that is going to be possible.  Yes, their SDK does include support for 3D content.  After speaking briefly with someone(I didn't get their name) at a JavaScript meetup I found out you can try out apps on your own TV/DVD player without having to release to the store.

In order to sell applications, you have to submit a bunch of company paperwork - and sign over your first born child*.  They don't currently charge you join though, which is nice compared to some other programs.


* may be a joke.

Thursday, October 20, 2011

Android developer store, problem. No problem.

So, I've got my app working on Android.  It's not even all that slow.  Ok, it is a little slow.  However the new webkit upgrade in Android 4.0 should get it going fast.  Note that Android 4.0 has approximately 0% of the android users on it at the moment - since they haven't really released it yet.

I had to get touch events working with gamejs, which wasn't all that hard.  I had a little chat on the mailing list, about it, then implemented it not long after.  I will send a pull request soon to that project soon.

I'd like to do a phonegap implementation of sound for shitsound too, but haven't got around to that.  This should get around the html5 Audio issues on the android browsers.  But the game is pretty much ready.

So now that it's ready, I went to sign up to the Android market place so that I could try and release the application.  I went through the signup process, and paid my $25USD.  I even got sent a receipt.  But then something weird happened.  I followed the link, to try and login... but it just sent me back to the signup page again.

The help suggested I try all sorts of things, including just signing up again with another credit card... and if all that fails finally to send them a support request.  So now I'm waiting on the famous Google Support to get back to me to fix up my account... or so I thought.

I tried one more time, but this time with another browser.  Somehow it had gotten my personal account mixed up with my business account.  So I cancelled the registration that got mixed up, and then reapplied again after cleaning cache and clearing cookies.

So anyway... long story short, my Android Market account seems to work now.

I linked up my google checkout account to it - the same one I used for the google chrome web store.  Then it told me I can now sell apps on the android store.

So now I have to actually try and release this game, and get it through the validation process.  Luckily I heard the android validation process is really quick.

Monday, October 17, 2011

notes on chome, and android.

One thing I forgot to mention was that my flash sound for chrome did not work after uploading to the chrome web store.  I made the change at the last minute to use flash for sound, because chrome sound was bad for me.  Of course, a change made at the last minute will be a bug!  Luckily the bug was reported to me, and I fixed it quickly.  This made me glad that the chrome webstore allowed very fast updating.  I can deploy updates there as quickly as uploading to a website.  It also made me remember the importance of testing from the users perspective.  Always check you changes on the live version that people use, rather than just on development servers or simulators.  You need to get into the users shoes and experience it the same way they do.

I did a quick port to android, and tested it on my Advent Vega tablet with android 2.2.  Surprisingly the game ran fairly well.  There were a couple of modern javascript features I was using that did not work, but I quickly found those bugs (html5 data attributes was the main one).

I also needed to add touch support to the game, since so far it only works with mouse and keyboard.  You can play it with the mouse emulation that the browsers support by tapping on the screen to move the player around.  However it would be much nicer if it worked by dragging your finger around.

I have an android environment setup from some previous projects, so I'll be doing that port next.  I'm only going to release it for very modern androids that have a fast enough browser in it.  Canvas and javascript have changed so much in the last year, and last years android just isn't good enough (neither is todays really... we wait for android 4 for decent graphics and audio support).  The other point in favour of releasing on android next is that publishing to the android market is a very easy thing to do.

I'm not sure about doing an iphone port yet, since Halloween is 13 days away - and I am doubtful I could get it through their store acceptance process in time.  But I'll make the decision on which store goes next after the android port is done.

I decided to up the $ amount for the Ludumdare October challenge, since the game has made over $1 now.  So my next personal challenge amount is now $1000 in October.

beta testing intel appup apps

So, I've been going around in circles the last few days with the validation our app on the intel appup store.

The support people escalated my request, and it looks like they have fixed a problem with the validation program.  It looks like their automated validation program had a bug.

In the mean time I've gone through the beta testing process.  This is where you can send your app to some beta testers and ask them to test for you.  If they already have the intel appup installed on their computer, your app appears in their "My Apps" section.  Then you can click on it, to try and download+install.

Just like the Mac OSX Application stores, if the download fails halfway through the system fails.  This is 2011 mind you, so you'd hope that people had figured out that internet downloads could possibly fail, and might need resuming.  Especially on mobile netbooks which are using unreliable 3g wireless internet connections.

As far as I can tell, there is no automated feedback collecting system in place.  Which means you will need to manage that feedback yourself.  Either by emailing your beta testers or using your own in game beta feedback forms.  If you're going to be releasing on multiple platforms, you'll want to create your own beta testing process anyway.  Since not all platforms make feedback easy, or possible at all.

It took me quite a while to actually download anything on their store.  Even small programs took a while.  I guess they are having connectivity issues with their download servers.  A 0.42MB app took over 10 minutes and multiple tries to download successfully.

The apps the html5 encapsulator by intel creates all include their own web browser.  Which means that every app is at least 10MB big, not even including your app data.  This is compared to other platforms, you mostly only need to include your actual data, or have a thin wrapper - like phonegap - which doesn't take up too much space.

Anyway... fingers crossed it passes their validation process soon.

Friday, October 14, 2011

'Halloween Juggling Pumpkin' published to the chrome web store... I think.

Well, I clicked the publish button, and it seems the 'Halloween Juggling Pumpkin' app has been published to the chrome web store.  I'm quite happy that it is up!

Here is a screen shot of the menu screen.

Well, that wasn't too hard to do after all.


Here is a screenshot of some game play.

Here is the lovely store URL it gave me for the store: https://chrome.google.com/webstore/detail/ndnpdjgfifincamlnbidkagoljbiagcb

This was way less work compared to the intel appup store, which I'm still having issues publishing it. To be fair, their store is still in beta for html5 apps.

encapsulator app 'binary validation failed' no other details.

Just got a rejection notice for my intel appup app, with 'binary validation failed'.  There were no other details, which seems to be typical for this program.

I've sent them some messages for more information, so I'm expecting a few days of waiting before anything happens.

chrome audio sucks

Chrome Audio is worse than firefox, safari, and internet explorer Audio.

There are cracks, pops, and sounds cut short.  It seems there's also not many sounds that can be played at once.

Luckily I can use jquery.shitsound and soundmanager2 to prefer using flash audio over a javascript bridge.  This has a slight delay compared to firefox/safari html5 Audio, but is better than the built in chrome Audio.