Code Rage 2.0

I have collected some of the most highly rated, informative, and controversial Juixe TechKnow articles and made then available as a PDF document. The collected works is entitled Code Rage 2.0: Rants of Code and Other Essays. Code Rage 2.0 is available on scribd.

Comments are always welcomed and appreciated. If you like to leave a comment please free to do so in the corresponding article.

Technorati Tags: , , , , , , , , , ,

Test Drive Google App Engine

Google App Engine was released to a lot of fanfare. App Engine promised easy application deployment and management. App Engine is not so much a framework as it is an infrastructure power by Google. I have been looking for a simple development and deployment solution for micro-web applications so I gave Google App Engine a try.

My first App Engine application would be as simple as possible. I wanted to micro-web application like Tumblr or Twitter so that I could simple post quotes. Since the best way to learn is by example, I grabbed a sample Google App Engine project. The sample project I used as a basis was a mix of App Engine models and Django forms.

When working on a App Engine application, the first step is to define your models. The application I have in mind has one Quote model and I defined it as follows.

Google App Engine has its own query language commonly refereed as GQL. GQL is like SQL except I found its parser more strict and temperamental. You can use GQL to persist and retrieve instances of your model, for example for my model I used the following GQL query.

One word of caution, be careful with the name of the Bigtble table you enter, the query language is case sensitive. If you use lowercase quote as the table name in your query, you will get an exception “No implementation for kind ‘quote’.” Basically you can mix case for sql key words such as select and from but not the table name or column names.

Another issue that new Google App Engine developers will deal with involve indexes. On a deployed system, you need to define and build indexes used by your queries. You will get NeedIndexError errors if you do not have the same exact index you query for. Indexes are defined in index.yaml and this need to match the select query you execute in db.GqlQuery. If they do not match, such as you have an order by modified and created descending but query for created ascending then you will get this error.

A second issue I encountered with indexes is that they need to be built and this can take anywhere from a few minutes to hours. If the index is in the process of being built, you will still get the NeedIndexError. A framework is not a rapid development framework if once you deploy an application you have to sit on your ass for a day while it builds shit. This development environment reminds me of the programming model of 1950 when coders turned in piles of whole punched cards to an operator and had to return two days later for the result.

Because of my issues with indexes and other issues with settings I quickly learned that the production environment does not mirror the development environment as much as I would have hoped.

It seems that at the time of this writing, you can only set the authentication options at creation time. I wanted to have only users from my domain login as I developed the app and then switch to the world at a later time but because of this hard coded limitation, it seems I cannot do that.

This experience has thought me that learning a new platform requires learning a whole new set of known issues and limitations, and to discover new ones in the process. Anyone eager to deploy a web application on a new framework is a masochist.

Technorati Tags: , , , , , ,

Microsoft DreamSpark

Even thought I am a Windows user, I am no where near a Microsoft lackey but recently I learned that Microsoft is giving away a ton of professional grade software to students. Through the Microsoft DreamSpark program, students can get access to Visual Studio 2008 Professional, Windows Server 2003 Standard Edition, Microsoft Expression Studio, XNA Studio, XNA Creators Club, SQL Server 2005, as well as other free software such as their express edition software. That is well over $1,500 of free software. I am typically not a Microsoft fanboy but I do have to give credit to Microsoft for making its development tools free of charge to students across the world. Now I wish Adobe would do the same.

Technorati Tags: , , , , , , ,

Edit Me

Just saw an interesting bit of JavaScript that allows anyone to edit the content of a web page from IE or FireFox. This is a JavaScript trick that runs on the client side and does not have any effects on the actual file on the server. With this you can change the text of a web page to your hearts content.

Once you visit a page you are interesting in modifying, enter the following JavaScript in the address or location bar all in one line.

javascript:document.body.contentEditable=’true’;document.designMode=’on’; void 0

To edit this page, just click here.

Technorati Tags: , , ,

The Rubyist: June Edition

Here is a recap of the top Ruby-related links for the month of June. The month of June saw a lot of articles, interviews, and video from RailsConf 2008. The big excitement from RailsConf was news of MagLev, a ruby implementation built on top of a Smalltalk VM. Other big news items to in the Ruby sphere was several security concerns. Links for The Rubyist are provided by A Rubyist Railstastic Adventure, a tumblelog.

Scaling and Security

RailsConf and RubyConf

News and Announcements

Tools and Tutorials

Opinion

Jobs

Technorati Tags: , , , , , ,

Shutdown Remote Windows

I have just too many Windows desktop laying around. I use the default Windows’ Remote Desktop Connectivity (RDC) client to connect to anyone of them. For the most part this works great, I even use the OS X version of RDC to connect to a Windows machine. One issue that I have had with RDC is that it allows me to log off from the machine but not shutdown the desktop.

To shutdown or restart a desktop which you are connected to via RDC you can use the shutdown command. From the command prompt, execute the following command.

shutdown -s -f

The -s option indicates that you want to shutdown. The -f option forces your request. You can also use an -r option to restart.

You can also hit Ctrl+Alt+End to pop up the Windows Security dialog box for the remote desktop. You can shutdown the remote RDC desktop from the Windows Security dialog. This is the same dialog that will open with you hit Ctrl+Alt+End.

Technorati Tags: , , , ,

previous posts »