Over Design

 

I found this picture of showing over-design pretty funny:

 

 

Keep it here to remind me now to do something like it!

Zen of Architecture

 I attended the talk by Juval Lowy at SVCC. He had a very good argument about why functional decoposition is bad. Here is how the logic goes.

Suppose the customer wants function A, B, C. The original design might be:

You might say this is not so good, since the client has to know A, B and C. How about the design below, where the client needs to know only A: 

This sounds like a better design. However, since A needs to call B and C. What you are acutally getting is:

 

A ended up beling bloated since it has to carry the parameters to call B and C. It can be worse, if you addeing in the error handling and transactions, what you are really end up is this:

 

Noticed that B, and C is even more bloated than A. B and C has to inform A what to do if there is an error. 

The good design should be layered approach where the upper layer only needs to know one layer down, and it has to be resilient to change:

 

The good design use those layers of abstraction (the image is not clear, but you get the idea ...

Silicon Valley Code Camp 2012

 I attended Silicon Valley Code Camp 2012 over the weekend. This is a few event for developers. I have been attending for the past few years. It is amazing to see so many people (over 2200 for last year) to join this kind of events at the weekend. This must be only in Silicon Valley!

Take a look at the crowd

The event is very well orgainized. You can sigin when you arrive and you will be given a name tag with map at the back.

There are a lot of sponsors for this event. Microsoft is showing off their "concept car". They are trying to pack as much tech as possible to the car. 

 

 

 

OK, enough for the pictures. I will post some session I attended later.

TypeScript: JavaScript Improved!

 Microsoft just annoced a new language called TypeScript, which is very promosing. 

TypeScript added static typing so the IDE and other tools can provide automatic code completion, together with a lot of other tricks. 

If you are cruious, just follow the link to the Online Playground. I like that it shows the compiled JavaScript in the other side, it helps me understand more of javascript as well. 

Here is a great video for the introduction:

 

Another CMS on AppEngine

On my research on CMS running on AppEngine, I found a new one called gae-django-cms 

Try to the name, I am able to deploy the code to Google AppEngine in under half an hour.

Check this out: http://charles-cms.appspot.com/

 

gae-diango-cms

DD4T

 DD4T is whe way to go!

Posting with FCKEditor

It has always been a problem of editing html for posting to html blog, then I found one editor which I can easiey integrate with this blog. 

I learnt this editor from App Engine Site Creator. It uses this editor. I though I should be able to do the same since it is running on Python. 

Just a few hours later, I am happying blogging with this editor. It has cutdown the time of composing the blog by at least half.

If you are interested, please feel free to grab the code from Github 

For a view of the UI, please check editor

PIL working with AppEngine

I am so glad to read the PIL is working on AppEngine here, will test it out.

CMS on app engine

I found one nice review http://thoughts.inphina.com/2011/08/12/cms-for-your-web-application-on-google-app-engine/ . Will verify it.

Instant Press in AppEngine

My original intention is to run Instant Press on AppEngine. I have run into a few road blocks, here is a few

  • Admin login works with localhost: http://localhost:8000/admin/default/site, but it doesn't work with 127.0.0.1 !!
  • Try follow https://bitbucket.org/mulonemartin/instantpress/wiki/Home to install Instant Press won't work, have to use git repository. I have it here if you want to grab it https://github.com/mycguo/instantpress
  • When deployed to AppEngine, it is complaining about the table column named "parent". It has to be changed to something else.

I managed to run Instant Presse locally

Finally, I hit this error in AppEngine and have to give up. Apparently, it is using PIL internally and it is not supported in AppEngine.

			Traceback (most recent call last):
  File "/base/data/home/apps/s~charles-web2py/2.362154009981920312/gluon/restricted.py", line 209, in restricted
    exec ccode in environment
  File "/base/data/home/apps/s~charles-web2py/2.362154009981920312/applications/instantpress/controllers/instantpress.py", line 11, in 
    from plugins.instantpress.admin import PluginI2PAdmin
  File "/base/data/home/apps/s~charles-web2py/2.362154009981920312/gluon/custom_import.py", line 298, in __call__
    raise e
ImportError: No ...