The Joys Of Internet Explorer

Apr 30 2008

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

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

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

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

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

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

Dynamic Silverlight

Mar 30 2008

Yesterday, I was at BarcampGhent. The first one, ever. Since the concept of Barcamp is that participation (in whatever way) is key, I gave a presentation on my n00b findings on Silverlight, the DLR and Ruby.

You can check out my presentation here, although it’s not telling the whole story without me doing the talking:

SlideShare | View | Upload your own

If anyone is interested, I can post the code for the demo too.

More slides from BarcampGhent in its Slideshare event group…

One response so far

FindControl and ContentPlaceHolders

Mar 07 2008

Suppose you have a MasterPage with two ContentPlaceHolders, and you need to reference a control from one ContentPlaceHolder in a control in the other ContentPlaceHolder. You can’t use the normal control id, since ASP.Net will complain that it can’t find the control living in the other ContentPlaceHolder.

The solution is very simple: just prefix the referenced control id with the id of the ContentPlaceHolder it’s living in, seperated by a $ sign. Like this:

SomeContentPlaceholder$SomeReferencedControl

And now ASP.Net will happily find the control and continue it’s business as planned. It even works for UpdatePanels across different ContentPlaceHolders.

For example, you have a form in a left ContentPlaceHolder, but you want to display the validators in another ContentPlaceHolders. Here’s how to do that:



	Required Text: 




	

Easy peasy, ain’t it?

One response so far

Some new homegrown WordPress plugins

Mar 05 2008

I put 2 new WordPress plugins online tonight.

First one, wp-fancyzoom, is one that I had developed a while ago. It’s basically a simple wrapper around Cabel Sasser’s FancyZoom, which enables fancy zooming effects on links to images on your blog. Great for displaying larger versions of thumbnails, for example.

Second one, wp-deredactie-embed-fix, is a simple filter plugin that fixes the embedding code of deredactie.be videoclips. Most of the time, these work okay but fail when an editor puts quotes in the description or title of the clip. This plugin fixes that.

More info (and a download links) at the plugin pages.

No responses yet

IE8 Standards Mode

Mar 04 2008

Looks like they caved in. Oh well, my previous points still stand: it’ll all depend on how good IE8 implements its standards mode. If that implementation is good, all will be fine. If it’s bad, the opt-in approach would have been better. And I’m still not sure that all the developers yelling “Thank you!” now will be so happy in a few years. We’ll see.

But hey, since they (MS) seem confident about this, I assume IE8 will rock.

And you know what would be awesome: support Firefox extensions in IE. Without the memory leaks. I know, that won’t happen, but I’d dump Firefox for it, I think.

iTunes » GoldfrappCrystalline Green

One response so far

« Newer - Older »