who needs social life when you have broadband?

Inventas vitam iuvat excoluisse per artes / Let us improve life through science and art.

Archive for the 'JavaScript' Category

To: my future Canadian boss :-)

Hello!

I’m not sure if this post is going to help me or not but I’m blogging anyway :)

Fact is I wanna move to Canada. I had enough of hot summer and would like to experience living abroad (again). So, if you are a Canadian please check my résumé clicking here and hire me hehehe. If you want, you may contact me directly by e-mail: bigodines ||at|| joomla.com.br

If you’re not sure if it will be worth to read my resume, I’m the main developer of two of the most famous Joomla! sites around the globe: Porsche and UNRIC (please note: developer != designer). Ok, that sound like I’m trying to impress :/. I don’t like these self-promotion lines but sometimes we need it :-)

Now, the bad news:
I’ve been reading about visas and it seems that a permanent work-permit for skilled professionals (According to those HSMP calculators I found on the web I am a skilled professional :-P) can take up to 14 months. A friend told me that if I manage to find a company interested in my services, this waiting time may be shorter (I’m still checking this information).

There is also another alternative: I can go to Canada as a student and work legally 20hrs/week while waiting for my permanent visa… but first I need some networking contacts in Canada.

drop me a line if you need a responsible, dynamic, nerd web developer :P

No comments

It’s all about opensource

I’ve spend the whole afternoon yesterday trying to port my dynamic form generator made with JQuery to Mootools. I’m almost there (but “almost” is not “there” yet and the script is rising some really weird arbitrary errors. odd…). But why would I change from JQuery to Mootols?

That’s a very interesting question (I’m actually asking myself every 5 minutes). The [partial] answers are the following:
- Joomla! 1.5 uses Mootools. As working with Joomla! still pay the bills around here, I must adapt to them :)
- I don’t wanna load two different JS frameworks that do the same thing (or not!) in my components.
- It is always good to learn new stuff, even if, at the end your conclusion is: It was a total waste of time learning this crap. This sux! (as I did with Dojo).
- I need to post new stuff in my blog, what could be better than a comparison between JQuery && Mootools from a regular developer point-of-view? It’s gonna be fun :D

For now, all I have to say is: [IMHO] Mootools’ learning curve is longer than JQuery’s.

No comments

Javascript 1.7 (or Pythonscript ?)

Hello! This topic will explain some of the new features of JavaScript 1.7 which are
embedded in Firefox 2.0 Beta1+ versions and probably in IE (I'm not sure).
The most interesting point in the new features is the "apparently" correlation
with the Python same features, which I will cite.
Well, let's prepare to use our new features. First of all, we need to declare some
special string in the script type attribute like that:

HTML:
  1. <script type="application/javascript;version=1.7"></script>

With this tag, we enable the v.1.7 features on our scripts.
This is needed because some new reserved keywords of 1.7 version may
interfere in the old code, the words are: "yield", "let", etc...
Let's begin.

Generators
Generator are like interactive functions with state variables.

JAVASCRIPT:
  1. /* The function */
  2. function gen()
  3. {
  4.     var i = 0;
  5.     while(true)
  6.     {
  7.         yield i;
  8.         i++;
  9.    }
  10. }
  11.  
  12. /* The "g" var isn't a simple function,
  13. is a instance of an generator */
  14. var g = gen()
  15.  
  16. /* This for loop show 3 alerts with
  17. respective values: 0, 1, 2 */
  18. for (var i=0; i&lt;3; i++)
  19. {
  20.     alert(g.next())
  21. }
  22.  
  23. g.close();

This is a powerful new feature of JavaScript 1.7, and have the same
syntax of Python Generators as you see here.

I will post about other new features in next posts, cause now I'm busy
with the Distributed Rainbow Tables project.

Farewell,
Christian S. Perone

No comments

Orkut scrap flooding

Orkut is a plague! I have some "friends" that keep spamming my scrapbook promoting parties and other social events every single day!!! And the worst is that most of them don't even talk to me when we are in the same place. Now it's time for revange :)

I've made this small snip to flood their scrapbooks so they can have a taste of how I feel when I login and see lots of useless messages.

Open your orkut account (preferable a fake one, so when they feel ofended they won't report your original user ;) ), visit your "friend"'s orkut, go to the scrapbook page. Now, insert this in the address bar:

JavaScript:
  1. javascript:var i=0;function lambaFlood(){if(i>= 20) return; var a='uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'; for(z=1;z<=i;z++) a = a+"u"; i=i+1;document.getElementById('scrapText').value="Fuck "+""+a+"";submitForm(document.forms[1], 'submit', '');}; void(setInterval(lambaFlood,500));

Of course this is just a use case. Use your imagination and create your own version.

I guess now we'll finally have more visitors :-)

good luck,
-bigo

1 comment

dynamic forms with jQuery

I've been using prototype for a long time. This week I decided to give jQuery a shot and realised that JS could get even funnier :-)

As this is a nerd blog, I'm gonna try to post something useful here and teach you how to create and manipulate a dynamic forms using jQuery. There is a "special" feature when the user removes an item, the script rename the dynamic fields so the form stays sequentially ordered. Later I'm gonna show how to take advantage of this feature. But first, let me show the code:
Read more

1 comment