SQLite Dynamic Data in Titanium
// November 30th, 2011 // No Comments » // General
My talk at @LondonTitanium on using SQLite as an API cache.
"Good artists copy. Great artists steal." | Online CV
Just another way to show what I'm doing... my Design, my Music, my Development.
// November 30th, 2011 // No Comments » // General
My talk at @LondonTitanium on using SQLite as an API cache.
// May 18th, 2011 // No Comments » // General
You may rewrite the whole API, you may do it so well that is actually 10x more performant of the ugly previous version that you spent months moaning about…
To be honest based on some queries, it may be 100x better… More robust, clean and scalable!!!
You do all this job in your own fucking world, close in your headsets and maybe whispering what are you doing to few fellas that venerate you like a God. The rest of the world, won’t even know the existence ’cause you can’t write and communicate about…
But if they ask you… Well of course you stand proud of your 10x or 100x performance factor.
So in that way I found out about the existence of this miraculous piece of code and I decide to investigate if not, use it.
Surprise!!!
All those lines of genius are empty. Why? ’cause you didn’t wasted 10sec in creating a doc about, you couldn’t even spend 2sec to add a line of comment before opening a curly bracket…
Result?
You’re a kamikaze! You’re not a developer, to be honest with you… You’re pretty useless ’cause you’re useless to the community around you; even the first men living in a cave managed to leave us something.
Maybe rough and not pretty, but not useless.
// May 17th, 2011 // No Comments » // General
// February 2nd, 2011 // No Comments » // General
// September 10th, 2010 // No Comments » // General
There's nothing more toxic to productivity than a meeting. Here's a few reasons why:
For those times when you absolutely must have a meeting (this should be a rare event), stick to these simple rules:
// September 6th, 2010 // No Comments » // General
Start making something. If you want to learn web design, make a website. Want to be an entreprenuer and start a business selling web based products? Make an app. Maybe you don’t have the skills yet, but why worry about that? You probably don’t even know what skills you need.
If you want to build something on the web, don’t worry about learning HTML
, CSS, Ruby, PHP, SQL, etc. They might be necessary for a finished product, but you don’t need any of them to start. Why not mock-up your app idea in Keynote or Powerpoint? Draw boxes for form fields, write copy, link this page to that page. You can make a pretty robust interactive prototype right there with software you already know. Not computer saavy? Start with pencil and paper or Post-it Notes. Draw the screens, tape them to the wall, and see how it flows.
You probably don’t even know what skills you need, so don’t worry about it. Start with what you already know.
You can do a lot of the work with simple sketches or slides. You’ll be able to see your idea take form and begin to evaluate whether or not it really is something special. It’s at that point you can take the next step, which might be learning enough HTML to take your prototype into the browser. The point is, go as far as you can with the skills and tools that you have.
Many times the reasons we don’t start something have nothing to do with lack of skills, materials, or facilities. The real blockers are self-criticism and excuses. In the excellent book, Drawing on the Right Side of the Brain, the author, Betty Edwards, discusses how we all draw as kids but around adolescence, many of us stop developing that ability.
“The beginning of adolescence seems to mark the abrupt end of artistic development in terms of drawing skills for many adults. As children, they confronted an artisitc crisis, a conflict between their increasingly complex perceptions of the world around them and their current level of art skill.”
At that age kids become increasingly self-critical and equally interested in drawing realistically. When they fail to draw as well as they know is possible many give up drawing at all.
This feeling continues into adulthood. We want to design a website or build an application but if our own toolset doesn’t match up to the perceived skillset we never start. It doesn’t help that the internet gives us nearly limitless exposure to amazing work, talented individuals, and excellent execution. It’s easy to feel inadequate when you compare yourself to the very best, but even they weren’t born with those skills and they wouldn’t have them if they never started.
People who succeed somehow find a way to keep working despite the self-doubt. The artist, Vincent Van Gogh was only an artist for the last ten years of his life. We all know him for masterful works of art, but he didn’t start out as a master. Compare these examples from Drawing on the Right Side of the Brain showing an early drawing compared to one completed two years later:

He wasn’t some child prodigy (he was 27 when he started painting), he learned his craft by hard work. If he’d listened to his own self doubt or despaired that his skills didn’t compare to Paul Gauguin’s it’s likely he never would have even tried.
This is all to say that there are many things that can get in the way of the things we should be creating. To never follow a dream because you don’t think you’re good enough or don’t have the skills, or knowledge, or experience is a waste. In fact, these projects where there is doubt are the ones to pursue. They offer the greatest challenge and the greatest rewards. Why bother doing something you already have done a hundred times, where there is nothing left to learn? Don’t worry about what you need to know in order to finish a project, you already have everything you need to start.
via Signal vs. Noise
// August 30th, 2010 // No Comments » // General
// August 27th, 2010 // No Comments » // General
On jQuery & Large Applications – rmurphey
http://rmurphey.posterous.com/on-jquery-large-applications
I’ve been thinking a lot lately about JavaScript applications. As my skills have evolved, I’ve had the privilege of working on more actual applications, and I’ve gotten further and further from clients who want to add a bit of Ajax or bling to an otherwise fairly traditional web site.
The most interesting applications I work on are client-side intensive: the server is responsible for providing data as JSON to the client, and most everything else — templating, state management, data management, site navigation, and of course user interaction — is left to the client side.
It’s a lovely way of writing an application. There’s no need for me to touch server-side code; in some cases I work with a server-side developer to decide what the data they send will look like, but in others I just take what an API already provides and make it work. I get to use the same templating framework across projects, regardless of server-side technology, and I can prototype complex interactions before the server side even exists.
This is a land where HTML, CSS, and JavaScript are almost all you need, and I like it. I’ve become a firm believer in moving giant hunks of functionality that used to belong to the server over to the client. For a variety of reasons, I think it’s clear that this is where most interesting web development is headed, to the extent it’s not already there.
This style of building an application changes the front-end development game. In fact, “development” may no longer be an adequate description; we’re moving into the realm of engineering, here. We’re not using JavaScript to add a bit of bling to our sites — a slideshow here, some Ajax there — we’re architecting an application, damnit. We can’t just write some procedural code that binds a bunch of anonymous functions to some events and call it a day; if we do, I can tell you from experience that we’re going to end up with a steaming pile of unmaintainable crap.
Among a host of questions presented by these sorts of applications, some of the most interesting to me are:
At the risk of making a broad generalization, this isn’t the way today’s average JavaScripter learned to think. The mantra of jQuery, the most popular JavaScript library on the internets, is “get some elements, do something with them” — perfectly terrible preparation for analyzing an application from a perspective other than the DOM. And, IMHO, therein lies a tremendous problem.
As more and more application logic moves to the browser, I’m eager to see the JavaScript community rise to the challenge, but instead it feels like the opposite is happening. People with little understanding or appreciation of these questions are taking on projects that demand these questions be answered. The result is a land of fragile code that gets the job done while giving the finger to the next developer; a land of code so tightly coupled, so deeply beholden to the DOM, so blatantly not reusable or extensible or maintainable as to render every subsequent commit a complete crapshoot, as liable to cripple the application as not. The viability of the project is threatened, and so is the reputation of JavaScript.
We are better than this. JavaScript, even that old-fashioned browser kind, is a language worthy of respect, not a thing to be dreaded. But — and here’s the sentence I have struggled 10 months to realize and an hour to write: in order to prove that we are better than this, we must make abundantly clear to the budding developers, to the project managers, to the enterprises, to anyone intending to build a remotely complex JavaScript application, that there’s more to JavaScript than jQuery. The questions are bigger, the answers more complex, and the relevant skills, alas, a bit harder to come by.
We have to make clear that, in fact, jQuery is but a hammer. When it comes to building these intensively client-side applications, we’re talking about building skyscrapers, for god’s sake. The problems solved by a hammer are the least of our concerns.
It was just a few months ago that I gave a presentation on building large jQuery applications. I emphasized jQuery’s role as strictly a DOM and Ajax tool, and demonstrated a few other tools — John Resig’s simple inheritance, James Burke’s RequireJS dependency management and build tool, Jan Lenhardt’s mustache.js — that one would want to bring to the table for such an undertaking.
But to what end do we assemble said hodgepodge of tools? Is it just so we can continue to “use jQuery”?
jQuery’s API is, indeed, dead-simple, but we are smart people! We are building skyscrapers! When it’s time to write a complex application, and we need all of these things that jQuery doesn’t offer, can we not learn to use another hammer — learn that dojo.place('<div>I am new!</div>', oldDomElement, 'last') means the same thing as $('<div>I am new!</div>').appendTo(oldDomElement) — if learning it gives us access to legions more functionality than jQuery even aspires to provide?
Do we assemble this hodgepodge because finding jQuery developers is perceived as an easier task than finding practitioners of another library, even though someone saying they “know jQuery” is little indication that they will know how to work with the assembled solution?
Do we do it for the plugin ecosystem — full of code of varying quality and maintenance — even though many of the large application needs addressed by those plugins are addressed by other libraries as well, and sometimes better?
And when we do it, when we assemble this collection of tools ourselves, what risks are we accepting? What price will we pay down the road to maintain three or five or 10 different pieces from three or five or 10 different authors, with different release cycles, no guarantee of compatibility or maintenance, and no central project thoughtfully considering their future?
I’ve wrestled with these questions for months, agonizing during sleepless early-morning hours over how to advise clients on the answers. I’m the co-host of yayQuery, a contributor to the jQuery Cookbook, and, I’ll venture to say, a decently respected member of the jQuery community. I did not arrive at this conclusion lightly, and I have few illusions it will be well-received, or even heeded.
But I’ve grown weary of people championing a tool that simply does not answer the big questions I see in project after intensively client-side project. I’ve grown weary of those same people dismissing tools that answer those questions handily and have been answering them for a while now. I cringe when clients tell me they’ve chosen jQuery because it was “easy,” and then watch them predictably struggle with all of the questions it does not answer. And I’ve found I can’t continue to bite my tongue when people recommend jQuery as an enterprise-grade solution while failing to acknowledge these questions, let alone answer them*.
I do not want to see jQuery go away. The simplicity of its API was undeniably instrumental in the rise of JavaScript as a language these last few years. It is a perfect gateway drug, and I greatly enjoy watching people transition from “get some elements, do something with them” to the elegant patterns of JavaScript itself.
jQuery is an entirely appropriate answer to so many questions, but it falls so short for large applications, forcing you to assemble such a tenuous toolkit of your own, that it simply isn’t a viable answer — or, in my opinion, part of an answer — for large applications. If we hope to continue to gain respect as a community, we ought to admire jQuery’s immense contributions, but we must not be afraid to accept and make very clear its limitations. We do otherwise at our peril.
// August 26th, 2010 // No Comments » // General