Archive for April, 2008

The Joys Of Internet Explorer

Apr 30 2008 Published by Inferis under Javascript,microsoft,web

Next episode: the one hundred million line javascript:

Error

Somehow, I don’t think that I have 191.057.020 (that’s one hundred ninety one million fifty seven thousand and twenty) lines of javascript code in this project. That, or IE’s javascript parser is incredibly quick.

Something’s fishy, because I get a different number of lines when reloading the page:

Error (2)

After that, I get 191057020 again, and then 191843452. And so they keep alternating (I’ve tried up to 7 times). 

Of course, all those millions of lines could be empty lines. That might explain the quick parsing. No way to tell for sure, though: if I open the offending line in a debugger, I get the first line of my page (which is HTML) as the problem line. Not really helpful.

Meh, no other way than to search for it, I guess.

No responses yet

Today

Apr 23 2008 Published by Inferis under Uncategorized

I spent some part of the day:

  • learning Ruby. Pretty new stuff, that ruby syntax. Cool nonetheless, and not particularly difficult.
  • learning Shoes. Shoes is a framework build on ruby. Cross platform too. Pretty basic, but it does nice stuff like video and so. And it has no horizontal scrollbars. :)
  • I actually had to build Shoes on my machine, because there’s a bug in the latest available binary which caused a problem for the thing I was trying. Shoes crashed the minute I started the program. Not good. The new build worked flawlessy. I had to build it twice though, because I forgot video support in the first build.
  • I also had a fight with git. Git is supposed to be better than svn, but it’s also harder to learn. It took a while before I got my chances to actually commit to the repository.

Some new stuff, in other words. Open source software is pretty cool. ;)

No responses yet

Postpone

Apr 09 2008 Published by Inferis under Uncategorized

Ah, it might be a good idea to postpone that new laptop purchase I’ve been wanting to do until this actually shows up. Looks promising: given the fact the Core2 can already compete with similar AMD systems, I wonder what the jump to the new architecture will do. 1 second compiles FTW. :)

No responses yet

Microsoft sends letter to Yahoo!

Apr 06 2008 Published by Inferis under microsoft

And puts it on teh internet.

And somebody thinks this is the white-collar equivalent of going to their door with a baseball bat in your hand.

Oh please. This is just business. What do you think this is, kindergarten?

2 responses so far

Debugging Javascript

Apr 03 2008 Published by Inferis under Javascript

Debugging Javascript can be a pain. Most of the time you use alert() calls or some other mechanism to trace information, but this is clunky at best. Even if you have a full fledged debugger at your disposal, debugging javascript can be a pain.

But when I found out about the “debugger;” statement. This is essentially a hook into the debugger you have installed: when the engine encounters this, I’ll fire up a debugger and set the current execution point to the debugger call. You can step through your code from there.

Nice.

3 responses so far

Framework vs Language

Apr 03 2008 Published by Inferis under ASP.Net,PHP,web

Last night on Twitter, I had a discussion with some folk on whether you’d consider ASP a programming language. Actually, it started with: “is ASP.Net a programming language”.

In my opinion: no.

Asp.Net is a framework coupled with a markup language (which is not a programming language, just as HTML nor XML aren’t a programming languages). C#, Visual Basic, Boo, or whatever CLR language you like is a programming language you use in conjuncting with Asp.Net to produce webapps. So ASP.Net supports the code (for example, in C#) to actually getting things done. ASP.Net builds on the .Net framework (which isn’t a programming language either, of course).

And so we got to ASP. “ASP is a programming language”. Well, no, it’s not. Again, ASP is the framework (the objects like Server, Request, …) and the markup (the <% %> stuff in your HTML). It’s (usually) VBscript that’s the programming language. Like in ASP.Net, your perfectly capable to use another (Active)scripting language to power your websites. I’ve done numerous ones in JScript. There’s also PerlScript. It was/is even possible to combine more than 2 languages in the same project (that’s where the <script runat=”server”></script> blocks were born).

Finally, PHP. PHP is a bit of both. It’s both a programming language AND a framework: the numerous functions and modules included in PHP give you a large codebase to work with, and getting to form values (something for which you need a framework object for in ASP) is built into the language (the variables are right there where you need them, automagically created). I know there’s more to it than that, but basically everything is just right there.

So that’s a fundamental difference between ASP, ASP.net (but also JSP, for example) on one side and PHP on the other side.

I guess Perl is on the PHP side, although it’s “standard” library is much less extensive than PHP’s.

Oh, and another thing: people who claim that PHP shouldn’t be mixed with HTML. ORLY? That’s what was it made for in the first place, n00b. :p PHP begs to be mixed with HTML. That’s where it shines!

5 responses so far