Charles Proxy for iOS development – simulating 3g

Charles Proxy is a great tool for web developers and it can help you in mobile apps too.

Here’s what you’d need to set it up:

  1. Run charles on your pc / mac, go to Proxy -> Proxy Settings and note the proxy port
  2. In your device network settings, enable http proxy and enter its ip and port (see below for ios)
  3.  Back to charles, click on Proxy -> Throttling Settings and enable throttling while choosing the 3G Throttle Preset. In the example below i’ve created another preset where i’ve lowered the in/out bandwidth even further

That’s it – now go use your app and watch in the charles screen the requests.

For extra credits, you can introduce packet loss/reordering by running

tc qdisc change dev eth0 root netem delay 10ms reorder 25% 50%

in your box – see netem for more

Partial review of last year – php comeback?

Partial review of last year – php comeback?

In 2009 I did several php projects. The decision to use php was a pragmatic one – very cheap, available everywhere, easy to google for and I had a lot of experience with it in (its and … mine) early years. I even used to teach it at SPHY.
So anyway, up till last year, thinking of php would always bring back memories of spaghetti-code (though I hasten to add, the worst spaghetti-like project i’ve had to work on was in Java/jsp and that was back in 2001/2002 – copy/paste was the emperor and reuse was an unknown word). But all those memories have since changed – php 5 can do OOP and apart from a few gotchas, it’s not that much different to Java… and you do get instant productivity gains (due to save-reload workflow)
After doing a short review of the php web frameworks & libraries, I chose to use Kohana (ver.2) in my projects. Kohana has proven to be a very elegant and clean MVC implementation and its new version (ver.3) now implements HMVC (hierarchical MVC) which is awfully close to what component-based web frameworks are offering but with less magic and thus less complexity
( i’ll need another post -or posts- to explain this further)
Of course, when you’re back to the PHP land, it’s worthwhile to take a look at some of the best (and most used) apps that are written with that, namely wordpress, drupal and joomla (FlatPress is also great if you can’t afford a DB). I took a close look at the source code of wordpress and drupal and their architecture and found both straightforward – code is understandable, authoring plugins and extending default functionality is both easy and fun! And this makes you think… perhaps I can use any of those platforms as a base for my projects. Perhaps YOU should!
Anyway, i’ll expand my thoughts in the following days. I’ll close with screenshots of 3 greek blogs i was involved with this winter (onlybeauty.gr, ufoerotiseis.gr, grease.gr):
onlybeauty.gr
ufoerotiseis.gr
grease.gr

Athens Facebook Developer Garage

Athens Facebook Developer Garage
(live blogging from Athens, Zografou)

Evolution of the Web

Some stats on web, web2.0, adoption, AOL, yahoo, …, googlemaps, youtube

The facebook platform

  • Massive ditribution
  • Fast experimentation
  • but

  • Constant changes to policies

Architecture

php+java official libs (wasn’t official java support dropped???)

FQL – one table per query only (no join), access user, friend, group, group_member, event,event_member, photo, album, photo_tag

FBML – subset of HTML, some custom tags, Mock AJAX… Canvas belongs to you, apart from anything deceitful, you can put anything you want there (ads,..) – but ads like googleads don’t have context info to show related stuff, so???

Anatomy of An Application

  • Only one-line status messages can be added to user statuses from apps… bigger ones must be approved from users.
  • Now, limit to how many invitation an app can send to friends.
  • Presenter (Nikolas Kokkalis) took part to Stanford Facebook class
  • Cannot store male/female user info from facebook (for more than 24h), but if we ask users then we can!
  • Viral factor f = X*Y*Z, f>1 then Viral growth… For each user, at least one friend accepted invitation (for PerfectMatch, f was 1.4 – they had to rename to Best Match due to … lawyers!)
  • They’ve done experiments with the same exact app registered with 5 different names – and it does make A LOT OF DIFFERENCE (name matters)
  • Every concept can be made viral … with the right modifications
  • Other ways of income (apart from ads) : Virtual currency, virtual objects (VERY popular for teenagers to pay for those), surveys!!! (you ‘sell’ people filling surveys)
  • Also, users think your company is more legit if they see ads in your site.

Virality

  • It is an Art that requires a ton of Science
  • Invitation text is terribly important
  • Make it social, simple – use viral channels, ab test all
  • Viral channels in FB: invitations, notifications, newsfeed, email, profile box, profile action
  • Knowledge gap (we know the perfect match, do YOU know it? there’s a message for you, do YOU want to see it?)
  • Modify a channel, gather data, analyze results (& restart)
  • but… changing a channel can be time consuming, measuring + analyzing results difficult (reference to their http://viraltuning.com/ but not much info there yet)

Some apps

… developed by greeks

  • Greek Namedays
  • kerasmata
  • mySidebarBook

Everyone loves GoogleDocs

Everyone loves GoogleDocs
… and here’s another testimony from a Slashdot user:

I love Google Docs. When I had to kick my three-timing wife to the curb we used a google spreadsheet to collect data about our assets, debts, insurance policies, etc. for the property settlement phase of our divorce — and another to track child expenses for our shared custody arrangement. It’s awesome. I didn’t have to interact with her anymore than was strictly necessary. Thank you, Google.

Why DZone’s cross-promotional footer sucks

Why DZone’s cross-promotional footer sucks

I’ve hated their footer from the very first time, so it was quite funny when they even put up an article to describe how they did it! I mean, cmon you guys, do you ever use your site???
“So, what’s wrong with the footer?”, you might ask.
Well, it has a critical (toujours d’apres moi) usability problem… It makes your life difficult by now allowing you to use the END button.
Picture this: You find out that there are a few new comments in an article that interests you and you click to load the article, then hit END to see the comments. Imagine what that gets you: a 1280×1024 (and more) view of everything but comments… WTF!

English2Greek translation in Firefox

English2Greek translation in Firefox

I’ve been busy translating to greek an OS app lately… http://www.in.gr/dictionary has been a friend, but i needed more!

So, upon taking a look at Build Your Own Firefox Search Engine i quickly came up with this. As the article describes, copy it in your Firefox/searchplugins folder (optionally adding there this icon) and you’re ready to go.

But as always, there’s a faster way for this… Mozilla’s directory already contains this… grrrrrrrr… Which reminds me of a quote of the first chess coach of the very best Garry Kasparov : “I always tell Garry to think first and then move. But sometimes he does the opposite!”

PS. Just saw this
new tutorial. It contains the OpenSearch description format for search plugins that is supported by both FF 2.0 and IE7… Interesting read.