Skip to content

Instantly share code, notes, and snippets.

View david-mark's full-sized avatar

David Mark david-mark

  • David Mark LLC
  • West Chester, OH
View GitHub Profile
@david-mark
david-mark / gist:3279190
Created August 6, 2012 22:47
Sencha Touch Still Sucks

Was asked to look at this thing again; only reviewed the JS portion. Last I checked, the CSS was similarly reality-challenged. Graphics are nice, but are tantamount to the paint job on a used car. Under the hood, this thing is all junk. It's hard to imagine the innards of any Web or mobile device-based application would end up like this, which raises the question of whether the authors have ever written such applications (or any amount of meaningful JS).

/**
 * @class Ext
 * @singleton

There (still) are no "classes" or "singletons" in JS (starting off on the wrong foot by mangling JS terms).

@david-mark
david-mark / gist:3768460
Created September 23, 2012 01:28
"RWD" and "Mobile First" buzzwords explained

Have been fighting with some RWD "expert" on Wikipedia of late. At the time of this writing, my edits to the related article are still visible.

http://en.wikipedia.org/wiki/Responsive_Web_Design

RWD is just a buzzword. According to the article (and a fairly recent book it seems), it incorporates these techniques:

  1. Use EM units to size text (and containers of text of course).
  2. Use media queries
  3. Let the browser scale images (by using em's instead of pixels)

Forget AMD and that's straight from the source. Sorry for the long build-up on the history, but if I'm to convince you to forget this non-technology, I think it's best you know where it came from. For those in a hurry, the executive summary is in the subject line. ;)

In Spring of 2009, I rewrote the Dojo loader during a requested renovation of that project. The primary pattern used to make it more practical was:

dojo.provide('foo', ['bar1', 'bar2'], function() {

[module code]

});
@david-mark
david-mark / addpropertiestotheglobalobject.md
Last active October 22, 2023 08:04
Always Declare Global Variables

Often see library code similar to this:

// NOTE: Do not use this or similar code

(function(global) {
  'use strict';

  global.$ = {};
})(window);
@david-mark
david-mark / usestrict.md
Last active December 27, 2023 17:07
'use strict' Considered Pointless and Harmful

'use strict' Considered Pointless and Harmful

What is strict mode?

According to the MDN reference, it is:

ECMAScript 5's strict mode is a way to opt in to a restricted variant of JavaScript [sic].

It goes on to say: