JStORM moves to Mercurial

In order to improve the development of JStORM i decided to move it to Mercurial.

I couldn`t find the copy of the svn repository from my old server so i had to start from a clean Mercurial repository so there is no history.

The new mercurial repository is on bitbucket: JStORM repository.

 

 

Getting your dear .py files from .pyc files

Today happened something really strange,i was looking at this blog source code to take some code to use in other site and i notice there is no urls.py(the routing file in django) file,so i wondered how this is working?!

a quick look at the folder(both local/svn and server) showed that there is only a urls.pyc file,so now i need to recover my source file from a bytecode file. searching in google gave me a tool called decompyle but it wasn`t working yelling something about a bad magic number(i guess it didn`t support python 2.5),so i looked around and found DePython this nifty site convert your pyc to py for FREE(if it is under 5KB),this site saved my day :)

Back to linux on my laptop

Well after more than a year with Vista in my laptop,i am happy to get back to Linux land. I used Vista for the reason it could use all of my 4GB(and it used alot of it).

I personally hate Vista,it is a unfinished version of windows that took years to develop,so after getting some really weird problems with application crashing all the time and trying to fix this for few hours I tried to install Windows XP but to my surprise my laptop(HP dv9925nr with 4GB RAM) isn`t supported by HP in Windows XP so there is no drivers,arghh!!!

I tried for a couple of hours to search for drivers and then gave up,i like Windows XP - it is a stable OS which i used alot but i also like Linux alot.

I moved from Linux back to Windows XP for my work which was mostly in C# with Visual Studio. But now i left that place so i decided to install Linux again,i grabbed the latest Kubuntu version 8.10 and tried to installed it,i had a small problem that was fixed by adding acpi=noirq to my grub config.

Now with Linux i got the sound,network,webcam and card reader all working out of the box,and for getting the drivers for nvidia card and wireless i just had to do two clicks in the "Hardware drivers" application.

This is a example of how much Linux has improved,hardware is better supported than ever,kde 4.1 looks amazing(still some funky bug with the systray).

i am really happy going back to Linux.

Why JavaScript is NOT the new Assembly

There is a bunch of people in the internet saying that JavaScript is the new Assembly(in the sense that developers shouldn`t write JavaScript directly and instead use some sort of compiler like GWT).

I totally disagree with that,first of all i think JavaScript is a great language,it is dynamic and have a compact syntax.

The reason that most of the people don`t use Assembly is that there is no benefit in speed compared to the time it takes you to write the same code in C or even in higher level languages. JavaScript is a really high level language with a few quirks,i admit,but even with it quirks there is no reason to use another language and then compile it to JavaScript.

A better approach to working around those quirks(both of the language and the browser) is using a library like: jQuery,Mootools(there are more but those are my favorites),using JavaScript libraries makes working with JavaScript and the browser really a fun and productive thing. You get all those things that you get with GWT:classes,clean api,good organization of code(for example with dojo).

So i still don`t understand why people are using stuff as GWT,Script#,pyjamas and Ra-Ajax. Is it because they don`t want to learn a new language? is it because they are accustomed to having a compiler checking all those small mistakes? because of those cool widgets that come with them?

Just my 2 cent rant,it is 2008 - no one should fear from JavaScript.

JStORM supports Mozilla Rhino!

Thanks to Christopher Thatcher,JStORM now fully supports Mozilla Rhino,using JDBC to connect to either SQLite or MySQL.

There were few difficulties when trying to adapt JStORM to work with Rhino,for some reason Rhino doesn`t enumerate object properties in the order they were declared,that is the reason that tests have a number prefix.

Other problem was that Rhino doesn`t let you change the function name property which hold the name of the function,the problem was that i was keeping the table name on the model in a property called name,the fix was just to not use it since it can be reached using model._meta.tableName

The support is in the trunk