Announce: Altered States, Python monkey-patching for Humans

by jacob on March 6, 2012

TL;DR;

Releasing Altered States, Python monkey-patching for Humans. Using just a single function.

$ pip install altered.states

Examples

Long read

A recurring problem when writing tests is that you want to test your code and not the code of all the frameworks that your code is working through. Reality in many cases are that when your code get it’s fiften milliseconds of fame your deeply embedded in a complicated framework setup (think smack in the middle of a multi-app Django project).
Read the rest of this entry »

Hotelier – en plattform som låter hotell skapa egna appar

by erik on February 27, 2012


Idag smyglanserar vi Hotelier, en plattform som gör det möjligt för svenska hotellverksamheter att enkelt och smidigt skapa sina egna appar för iPhone och Android .

Mobila appar hjälper hotell att öka merförsäljningen av hotellets bekvämligheter, tjänster och evenemang till besökande och anländande gäster.

Exempel på appar för hotell

Hotelier är en tjänst som skapades efter att vi på Plexical tidigare byggt appar åt bl a lyxhotellkedjan Relais & Chateaux och efter många förfrågningar ganska snabbt insett att det fanns ett naturligt behov för hotellverksamheter att utöka sina tjänster i form av en mobilapp.

Hotelier fungerar både på iPhone och Android och är en så kallad SaaS produkt (Software as a Service) där hotellet efter en initial startavgift prenumererar på tjänsten månadsvis.

Läs mer om Hotelier här.

Tre mobila trender under 2012

by erik on January 27, 2012

2016 beräknas det att det kommer finnas 1 miljard smartphone användare. 1 miljard, det är en enormt stor siffra. Redan under 2013 räknas det med att 1 miljard HTML5 “aktiverade” telefoner kommer säljas.

Detta har en stor inverkan på företags digital strategier. Här är tre trender som vi tror kommer vara ständigt närvarande inom app och webbutveckling under 2012:

1. Övergången från desktop till mobilt fortsätter

Under 2012 kommer övergången från traditionella datorer till den verkliga PC’n, alltså mobilen, att ske i allt snabbare takt. Denna “växling” kan liknas vid PC-revolutionen på 90-talet och det enklaste sättet att se på detta paradigmskifte får man genom att studera data:

  • Totalt ökade den mobila nättrafiken med 50% i Sverige 2011.
  • Datoranvändningen i hemmen har däremot gått ner med 20% sedan 2008. Allt eftersom människor använder smartphones för enklare uppgifter som att surfa på webben används traditionella datorer mindre..

Det här kan din organisation göra för att ta sig an denna “växling”:
Tänka “mobilt först”, dvs utveckla nya projekt i åtanke om att många av dina användares första kontakt med din digitala service kommer att ske mobilt. Utveckla en app som kan distribueras på en appstore eller utveckla en HTML5 -”webapp” som fungerar direkt i webbläsaren.

2. Att tänka “framtidsvänligt” blir allt viktigare

Mängden och mångfalden av olika typer av uppkopplade apparater, varav vissa idag kan vara svåra att föreställa sig kommer 2012 att öka dramatiskt. För många variabler gör det allt svårare att försvara utvecklingen av skräddarsydda digitala lösningar för särskilda enheter. Några exempel som kommer att lanseras under 2012:

  • Från Apple, en iPad 3 med retina display, en 7-tums iPad samt förmodligen en tv.
  • En mycket stor mängd läsplattor baserade på Android varav en direkt från Google, samt TV-apparater med Android som operativsystem.

Så här kan din organisation “framtidsförsäkra” sig:
Anamma ett såkallat “One Web” tänkande, dvs formge din organisations digitala tjänster så att de kan utvecklas med en enhetlig kodbas som kan anpassas för olika skärmupplösningar (via så kallad “responsive design”). På så sätt garanterar du att din webbplats/webapp kommer att fungera bra i framtiden också.

3. Webbläsaren som “the killer app”

Ett för många okänt faktum är att majoriteten av dagens populära appar är utvecklade med webbläsarens renderingsmotor. Detta ger dem möjlighet att visa innehåll och skapa interaktion på flera olika plattformar samtidigt via standardiserade webbteknologier. Under 2012 kommer allt fler företag att välja distribution av sina appar direkt i webbläsaren och inte AppStores.

  • SVT bestämde sig under 2011 att fokusera sin utveckling och appdistribution på webben.
  • Facebook, Microsoft, LinkedIn och NetFlix har redan valt webbrowsern som grundbulten för all vidare utveckling av sina mobila appar.

Så här kan din organisation utnyttja detta faktum:
Det naturliga steget i din organisations digitala strategi efter att ni bestämt er för att tänka “mobilt först” är att ta reda på om det verkligen är nödvändigt att distribuera er app via en AppStore. För många organisationer kan det vara mer logiskt att utveckla appar som kan köras direkt i webbläsaren.

Writing CoffeeScript Modules for Browser and Node

by jacob on January 25, 2012

The other day I read this post, and liked how it solves something I’d been wanting to solve myself for a while. However, I can’t just adapt it as it is since I try to write as much of my Javascript as CoffeeScript as I can. So I decided to do an as straight forward and preferably short adaption to CoffeeScript as I could. Here’s the steps I took:

``

The original script expects to run in the global context, and only after a few lines will it do the now very common Javascript module pattern. Vanilla CoffeeScript inserts this pattern from the start, and sends this as a parameter. Sure I can run my compilation with the -b parameter (docs), but it’s considered somewhat bad form, and more importantly, if I did that the actual implementation would start at indentation level 1, and I’d like to avoid that. This implementation would look something like this:

foo = exports? and exports or @foo = {}

do(foo) ->
  # Being at indent level 1 here makes me uneasy!

  class foo.Cls
    meth: -> 1

  foo.func = -> 2

Running this in Node shows the “module”:

$ echo "var foo = require('./foo'); console.log(foo);" | node
{ Cls: [Function: Cls], func: [Function] }

And invoking in the browser with two script tags like this:

outputs on the console:

Functionally what I wanted, but let’s get rid of the unwanted indentation and the dependency on the un-elegant -b flag:

I decided to try to use the fact that this sent in by the CoffeeScript function wrapper actually is the same as Node’s exports global (docs). Knowing that I could construct this line (using short-circuit evaluation):

foo = exports? and @ or @foo = {}

That lets me put things into my module under it’s prosaic name I’ve used here, foo. Final result:

# See http://braintostring.blogspot.com/2012/01/writing-javascript-modules-for-browser.html

foo = exports? and @ or @foo = {}

class foo.ExampleClass
  method: -> 1

foo.func = -> 2

view raw both.coffee This Gist brought to you by GitHub.

Assignment completed with 1 less effective line of code, no -b flag and intuitive indentation.

2012 python meme

by jacob on December 22, 2011

Not that I’m a famous Python programmer
like Tarek Ziade, but I still think this was an interesting exercise, and thought I’d give it a shot too.
Read the rest of this entry »

How To Decide on Mobile Operating System (and Finding the Right Service Provider for Your Next App Project)

by erik on November 8, 2011

Companies are increasingly pressured to deliver great mobile apps. Competing mobile operating systems and devices is making it difficult to select the right app development methodology and balance a great user experience with reaching multiple devices.

That’s some text from our recently published whitepaper

In this whitepaper you will learn:

  • How to get your app onto multiple mobile operating systems
  • What to look for in your next service provider
  • The pros and cons of the different mobile operating systems
  • How you can leverage the hybrid app development approach for your next app project

Click here to download it

Have a great day!
Team Plexical

developer tip: install proper readline on a fresh Python 2.7 on older OS X

by jacob on October 13, 2011

Are you on OS X, coming recently from a Un*x world, and sweating over lack of readline in your Python?
Read the rest of this entry »

Mobile First, Mobile Only. (More and more people access internet from their mobile device)

by erik on September 29, 2011

Mobile First, mobile only . It’s true and there is no question that everyday, more and more of the world’s population access the internet from mobile devices.  Even more interesting is that in a lot of Asian countries and across the Indian continent, people access the network solely from a mobile device, a lot of them has never even touched a desktop computer.  Their first encounter with the internet is via a mobile phone.

We did an infographic to visualize this development, enjoy!
Read the rest of this entry »

There is a mobile web

by jacob on September 19, 2011

No mobile web? That’s certainly a claim that was bound to unsettle us a bit here at Plexical, where it’s our business to create apps and sometimes content targeting just that. Actually after looking a bit closer on what was said in the presentation by Jeremy Keith (I recommend Luke Wroblewski summary) I see that it was obviously a very good talk with a lot of radical points. I like radical.

But, the “there’s no mobile web” goes a bit over the top. I don’t think there are many who think it would be a “physically” different internet or whatever, but sure, it’s a provocative prelude, I appreciate the necessity of those to capture attention. But to critique the usage of a label I find too postmodern. I’m not one of these general everything-postmodern-bad people, but this is a bit too much paranoia about the bad effects of definitions and labels.

“Mobile web” is a language thing, but language is important. It enables us to talk about stuff. I assert that some signifier is needed to talk about web for the small screen. The necessity of a term to talk about various classes of display sizes won’t go away. The progressive thing to do would be to invent an alternative term and try to spread that instead (I could think of extending the concept of “smallscreen” from the moving picture industry as one option).

This is somewhat similar to the situation with term HTML5. Also inaccurate, but a term that has come to stuck and is useful. We must not forget that these kind of terms are used a lot in discussing with clients, design people and others who doesn’t read all about the latest development in browsers. Creating a term that’s theoretically pure have a tendency of creating terms that can only be understood by a small elite.

Two questions to get you started with designing for mobile

by erik on September 8, 2011

According to a study recently carried out in the UK almost 50% of Internet users are now connecting to the network via their mobile phones (source).

That’s a lot. A whole lot. One can only note that mobile usage is exploding and what more, a lot of digital strategies are in dire need of an overhaul. I’m surprised by, of the biggest websites out there, very few are designing experiences made to work on touch interfaces.

Because when 50% of your users interacts with your website using their fingers on a device with a screen size of 320×480 rather than a mouse, it does have its consequences.

One excellent first step towards designing digital products for touch interfaces is to embrace a mobile first strategy.

If you today are starting on a new project or just started one I recommend you to take a step back and think about your project objectives from a mobile first perspective.

Ask yourself:

  • Am I focusing on only the most important data and/or actions?
  • Am I leveraging the unique capabilities of the mobile platform?

Asking yourself these two very simple questions can get you a long way.

Why these two questions then?

As mentioned earlier, when your users are swiping their fingers across a screen with a resolution of 320×480 there really is no space for any superflous information or ornamental design elements. The user should be presented only with the most relevant data and be made to execute only the most important tasks. Not more, not less, just the correct data and tasks.

Building a webapp or a website starting with the mobile experience (or better yet, with a command line interface) in mind first and gradually add functionality or data as you move up the device stack makes for a much more focused design effort.

Asking yourself if for your project it makes sense to leverage the unique capabilities of today’s mobile browsers is the second question you should ask yourself. The browser that’s in the majority of the mobile phones are much more capable then their brothers and sisters of the desktop world.

Take GPS location for example, we just designed a dealer locator for a client of ours that asks the user to allow for the browser to pinpoint the users location and then we present the nearest locator based on the coordinates the browser gives back. That’s no-brainer really, but it’s interesting how so very few websites take leverage of a feature such as this.

There are more unique capabilities of mobile browsers, offline storage is another big feature of a mobile browser. Today you can basically store a whole website offline which your user can later can read offline. (The Financial Times just did some great things with offline storage.) . More impressive is how Amazon just leveraged offline storage technology with their Kindle Cloud Reader which let’s you read your Kindle books offline in your browser.

As you see it makes a lot sense to start designin for mobile first, if you’ve been hesitant before, just start asking yourself these two questions:

  • Am I focusing on only the most important data and/or actions?
  • Am I leveraging the unique capabilities of the mobile platform?