Monday, September 24, 2012

Gooi - my new endervor (Draft)

So I just started a new github project called Gooi. Which is located here.

Gooi will be a pureJs application scaffold. It will concentrate on the presentation layer and server connectivity of a web site. I expect that it will include some external plugins where they are available to take care of some of the underlining activities.

Gooi's topography will be explicitly represented on the file-system. The folder Gooi will represent the taxon, the top level of the scaffold's taxonomy. 

The taxonomy will be scoped into the following domains, "Core", "Helpers", "Page", "Type", "Picto", "Ux" and a "Plugins" location. Each will house all the Broader Terms, those resources that are logically grouped under that category. Each top level category will house any general resources, and all appropriate related term nodes. 

Gooi attempts to manage resources by implementing a controlled vocabulary and will  associate all "related term" resources via placement in the file-system and the resource's file name to establish its placement in the taxonomy. 

The first two hierarchical levels of the Gooi app scaffold are represented below, with sample broader terms added as examples, see Figure 2 in the appendix. 

Gooi attempts to solve the following problems. 

  • Presentation Resource Management and Categorization
    • Images
    • Sprites
    • web fonts
    • style sheets
  • Consolidation of resources, 




Figure 1.
Note: Taxon > domains > broader terms > related terms

Figure 2.

  • Gooi
    • GooiCore 
      • GooiCoreLoader
      • GooiCoreModules
      • GooiCorePackages 
      • GooiCorePrimatives
      • GooiCoreSockets 
    • GooiHelpers
      • GooiCoreArrays
      • GooiCoreUtilities
    • GooiPage
      • GooiPageHeader
        • GooiPageHeaderMenu
      • GooiPageContent
    • GooiType
    • GooiPicto
    • GooiUx
      • GooiUxButton 
      • GooiUxFaceted 
      • GooiUxForm
      • GooiUxGrid
    • Plugins
      • JSon2 (1.3kb)
      • Microajax (.4kb)
      • Qwery (2.6kb)
      • yepnope (1.8kb)
Auxiliary project resources, like the Topography document and it's associated resources and the solutions readme file will be prefixed with an underscore and added to the Gooi folder root.












Friday, September 21, 2012

Thoughts on being a programmer - retweet



  • Don't be an asshole.
  • Simple code is hard to write.
  • Exquisitely simple code is exquisitely hard to write.
  • Just because it's easy to understand doesn't mean it was easy to write.
  • In fact, the easier it is to understand, the harder it probably was to write.
  • There are many ways to do something.
  • The first way you think of is highly unlikely to be the best way.
  • Anyway, there probably is no best way - just lots of ways that are differently good.
  • There's always plenty of room for improvement - in your code, in your abilities, in you.
  • If you think you're as good as you're ever going to be - you're probably right.
  • "One-line changes" aren't.
  • Learn to desire success more than you fear failure.
  • You're only old when you can no longer learn new tricks.
  • Always back up before tidying up.
  • RTFM.
  • Err vicariously.
  • Sometimes it's OK to be a bit of an asshole. But don't make a habit of it.

 -- reposted from http://www.yelsew.com/thoughts.html

Saturday, September 8, 2012

GoF in ES

Learning JavaScript Design Patterns

Preparing Yourself for Modern JavaScript Development

Understanding JavaScript OOP

ES Style Guide

JavaScript and the Semicolon

Sometimes, we realize that we have taken a course for decades, and have not really thought about why. I found myself in that curious position when I read this entry JavaScript Semicolon Insertion, whose author knows 50 times more about the state of the ECMAScript specification then I do.

So I have written allot of javascript over the years. I have been writing JavaScript professionally since 1997 and the browser wars, so that is allot of semicolons. I never really thought to wonder about it, just inserted them in the appropriate place at some line terminations.

Good.
function add(event, callback) {
  if (fn_p(event)) {
    callback = event
    event    = this.default_event }
  insert_callback.call(this)
  return this

  function insert_callback() {
    if (this.value)  fire(this, event, callback)
    else             add_callback(this, event, callback) }
    }
}

Bad
function add(event, callback) {
  if (fn_p(event)) {
    callback = event;
    event    = this.default_event;
  }
  insert_callback.call(this);
  return this;

  function insert_callback() {
    if (this.value) {
      fire(this, event, callback);
    }
    else {
      add_callback(this, event, callback);
    }
  }
}

But, this is all well and good from a human readability standpoint, but I have serious doubts about the adverse reactions from putting good human readable code through javascript uglification and minification.

How old men retweet

Programs must be written for people to read, and only incidentally for machines to execute.

-Sussman

A computer is like a violin. You can imagine a novice trying first a phonograph and then a violin. The latter, he says, sounds terrible. That is the argument we have heard from our humanists and most of our computer scientists. Computer programs are good, they say, for particular purposes, but they aren't flexible. Neither is a violin, or a typewriter, until you learn how to use it.

Marvin Minsky,
Why Programming Is a Good Medium for Expressing Poorly-Understood and Sloppily-Formulated Ideas

From:

Donald E. Knuth, Fundamental Algorithms (Volume 1 of The Art of Computer Programming)

Wednesday, September 5, 2012

Retweeting Einstein

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." -- Albert Einstein