28
Nov 09

Untitled

“Ora isso está totalmente em autogestão.” http://ping.fm/WbnAA I rest my case: http://ping.fm/EJ37z


28
Nov 09

Untitled

“Things take longer in the short run but they happen faster in the long run”


28
Nov 09

As Escolhas do MV (XI)

Entretenimento para um fim de semana prolongado:

  • isto às vezes pode dar jeito. Em vez de instalar um interpretador/compilador para testar meia duzia de linhas de código, é usar o Ideone. Executable pastebin, any language, nuff said.
  • porque é que há cidades que são mais empreendedoras do que outras? É a pergunta e um artigo  do New York Times. Raciocinio interessante, aplicável também aos países. Em suma o autor (um economista) chega a algumas conclusões interessantes e se calhar contra-intuitivas. Uma delas: um aumento de 10% no número de empresas por trabalhador (mais empregadores potenciais portanto) em 1977 está associado com um crescimento de 9% no número de empregos entre 1977 e 2000. Ou seja, mais empresas, mais emprego. O que parece óbvio, com uma excepção: não têm necessariamente de ser novas empresas. Essa é uma outra conclusão: um decréscimo de 10% no tamanho médio das empresas está associado a um aumento de 6.5% e 4.5% na rapidez com se obtém um emprego (em empresas novas e em empresas existentes, respectivamente). Ou seja: quanto maiores são as empresas existentes numa cidade ou país, e portanto menor o número de empresas por trabalhador, menor é o empreendedorismo nesses locais, mas lento é o processo de empregabilidade e menor é o sucesso dessa cidade ou país. Ou dito em economês, alguns gigantes verticalmente integrados numa cidade/país eliminam o empreendedorismo e a inovação. O que só vem confirmar algo que digo há muito tempo: os maiores culpados da falta de empreendedorismo e de inovação em Portugal são empresas como a PT. Secam o mercado de talento acenando com lugarzinhos seguros e uns salários confortáveis.
  • quando chega o Outono/Inverno saco sempre dos álbuns dos meus caros Jethro Tull. Grandes tempos que passei a ouvir o “Songs from the Wood” e a ler o Hobbit e o Senhor dos Anéis (já lá vai para 1985 ou 1987). O álbum “Heavy Horses” é um dos meus preferidos, nomeadamente a canção “Heavy Horses” (há o video mas o link tem a letra do poema que mostra a capacidade do Ian Anderson em escrevê-los e mostra também a sua faceta de criador de cavalos). A música “Songs from the Wood” do álbum com o mesmo título também é magistral.
  • o vídeo desta semana é para fazer o revival de uma música de Frank Zappa, “Valley Girl“. Tem a curiosidade de ser cantada pela filha Moon Zappa e ter o Steve Vai na guitarra. E também tem uma letra hilariante
  • esta semana cinema também não. Ontem apanhei num canal qualquer o “Clockwork Orange”, um dos meus filmes preferidos. Ainda vi um bocado. Fica o link para o trailer.
  • estou a ler o “Collapse: How Societies Choose to Fail or Succeed“. Ainda não acabei. Lê-se bem, mas o tema é denso. E, não quero dizer assustador, mas pelo menos preocupante.
  • em tempos em que se fala tanto de mais impostos, mais taxas de Segurança Social, mais programas de investimento público, mais desemprego, etc, etc, vale sempre a pena ler e ver aquilo que já é sabido há muito tempo: as falácias por trás dos argumentos a favor de políticas públicas. Assim em vídeo é mais fácil para as pessoas e os políticos que não querem gastar tempo a ler 1 ou 2 capítulos do livro “Economia Numa Única Lição” (pdf)

Agora vou ver o Jornal da 1h (com o gajo a fazer desenhos nos jornais) e as “Mentes Criminosas”.

Collapse: How Societies Choose to Fail or Succeed

Collapse: How Societies Choose to Fail or Succeed

27
Nov 09

Untitled

OK, projects server online again w/ TwitTV and CoffePye goodness! http://ping.fm/Z8mX6


25
Nov 09

Requirements for a Modern Web Development Framework

For the last 2 years or so I have been harping about a Future Web Development Framework and about how Javascript Will Save Us All. And even 2 years before that (4 years ago) I had actually come to the conclusion that Javascript would be the next big language and the one that would invest my time in for the next 10 years (2005-2015).

Aditionally, 2 years ago I hinted at the need and possibility that Javascript should be used at in all of the tiers of aplication development. And 1 year ago, at Codebits, I restated the need for a totally Javascript-based, REST-accessible, JSON-formatted web development framework. I tried to challenge people at Codebits to work in it, but no such luck. I also tried to start developing it but it was a no go: I dont have as much patience for coding as I used to (age is a bitch) and the context for serverside Javascript development just wasnt right (lack of standards, lack of OS API access, etc). And even having some Javascript interpreters (like jslibs which is what I was using at the time) with access to stuff like files and sockets wasnt much of a help: its not very much fun to try and reinvent the wheel writing a webserver from the (socket) ground up.

Well, things have changed a lot in this past year. The ServerJS/CommonJS group has been doing a lot of work on standardising a unified JS API. And there’s been a lot of work done on top of several Javascript interpreters/compilers/VMs (like Spidermonkey, Rhino, V8, etc) to provide for basic system level functionality. Plus a lot of Javascript-based basic blocks have been developed (like Narwhal, Nitro, Node, Awesome, Lawnchair, DjangoDE, PURE, etc) that allows us to get more concrete about what is needed and what can be done.

So its time to once again tell the Lazyweb what I think is needed or (better yet) what I want in a new web development framework that lasts for 10 years. Here goes:

  • I want it to be Javascript based. All of it. No Erlang, Python, Ruby, etc in sight. I want the frontend/View/presentation in Javascript. I want the appserver/Controller/logic in Javascript. I want to program the appserver in Javascript. I want the DBserver/Model/data in Javascript.
  • I want all the Javascript code to be compliant with the CommonJS standards. The code should be portable to any of the existing engines (Spidermonkey, Rhino, V8, flusspferd, Jaxer, Helma, etc) although I would touch anything Java-based with a long pole, so please make it work on Spidermonkey or V8.
  • I want all the data to be JSON formatted and REST-accessible. The data on the database should be stored as JSON data and accessible via REST. The appserver API should be REST-based, accept JSON-formatted parameters and return JSON-formatted results. The templating system should accept JSON-formatted data for rendering the view and make REST JSON-formatted calls to the appserver.

If this isnt clear enough, let me refer some analog components that are written in other languages and what is already available in JS:

  • for the database I want CouchDB but written in Javascript. Awesome or Lawnchair might be starting points. The endpoint would be something like Persevere but without the Java/Rhino dependency. Maybe Pintura is *it*…
  • for the appserver I dont have the right analog. Of course that it must support JSGI. But *the* most important thing: it can not and must not allow the generation of HTML and the return of HTML to the browser/client! All methods/functions should only accept parameters and return results in JSONified format. Maybe NitroJS could be *it*. If it threw away the sucky template format. Completely. No templates on the serverside. No serverside HTML generation. Pure HTML is the new template standard (see below).
  • URL routing should use the object hierarchy on the appserver as default. Explicit URL routing (static or using regexp) would have to be done explicitly.
  • for the presentation layer I want pure HTML+JS. The browser should be the only component responsible for rendering templates. The clientside part of the framework should make all calls to the server using REST/AJAX and providing JSON-formatted parameters. No GET or POST parameters. It should only accept JSON-formatted results. No HTML. Standard HTML is the only templating system needed. Page elements (DIV, SPAN, etc) should have an “id” as an identifier for serverside databinding. If a page has a tag/field with “id=xpto” then that tag/field should be filled with the contents of the “id” key returned from the server in a JSON string. A good starting point would be PURE, but without using “class” as the databinding identifier (“id” should be the standard).
  • I want the appserver to have features that Zope has had for years: I want acquisition (aka prototype-based programming, aka JS object-orientedness). I want a through-the-web management interface. I want ZClasses. I want automatic form generation for classes/objects and an automatic management (CRUD) interface for objects.

So, how’s that? It’s Xmas anyway, so I can ask for whatever I want. Gimme, gimme… Or I can start working on it… Who’s with me? I can be the Main Bitcher, Overall Architect and Project Manager.