inicio mail me! sindicaci;ón

Archive for November, 2006

HTML - not so good

malformed html in the world

Interesting chart, huh.

This is just a general statement. I’ve had to do a lot of HTML/CSS/Javascript work over the last 5 months. My takeaway. This stuff is still a mess. Every decent programmer I know follows in agreement. Everybody puts up with it because there is nothing that you can do about it.

It’s interesting to watch all the different camps out there as well. There are all these different, vocal minorities:

  • CSS freaks
  • the ‘em’ or the ‘damn you if you position with pixels’ crowds
  • usability (can you say Jakob Nielsen - nice photo)
  • accessability
  • anti-table freaks
  • it must be XHTML 1.0 compliant
  • it must work on Netscape 4.0!
  • it must work on my 30″ dell as well as a 2″ Nokia!
  • A List Apart approved
  • You should using BBEdit or Textmate on a mac, otherwise you don’t ‘get it’

You get the picture. Funny thing about these groups. They are full of contradictions. Google and Yahoo break most of the rules. I mean the GOOGLE homepage uses TABLES!! I wonder. If they stopped using Google, would anyone notice?

The real steam behind the web is Photoshop or Fireworks. What do I mean? Just look at every site that looks good. They all use ant-aliased graphics and rendered NON-WEB fonts.

Yes, things have improved. CSS has made things better. However, the basic breakage and contradiction is still there. Take CSS for example. If the XML like languages are so good, why isn’t CSS in XML? :-)

My biggest problem has been with the layout system inside HTML. I mean there have been so many times when I get surprised at what I see on the screen versus what I had in my mind. “What is that doing over there??” When you dig in, you just find a mess of inconsistency. Is it any wonder that people still use tables for a lot of things? How about inline vs. block - why doesn’t height get respected for inline? What about floats - whose idea was that?

… and then there is the whole ’silent failure’ aspect. You receive no warning about a div that doesn’t have a width, that is floated. Things just break and you have to do the binary search on your document to figure out what went wrong. No fun.

If you want to look at a better system, check out XUL. They have eliminated a lot of the warts with HTML. Layout is simpler and easier to understand.

I will also say this. Without Javascript, this medium would have died a long time ago.

So, when HTML sucks.. it is good to have good tools. Hence, the earlier post about Firefox. Without it, this would all be way way too hard.

Firefox is still excellent - and then some

firefox logo

Recently, Firefox went to 2.0. The upgrade isn’t mind blowing, but a good sign of progress. When you step back, its kind of an amazing story. A small team got together out of a larger organization and built a competitive browser that works on every major platform. They diverted from the larger group (that was failing, but with good intentions) in order to ship a product. I can’t think of any apps that are consumer and on every platform. Amazing. Its another rare success in the line of open-source success stories (Apache, BSD, Linux, PHP, Rails, Python, etc.). Again, the big difference is that this is an actual end consumer app. I mean, people that normally use IE can actually use Firefox.

Anyways , the other day, I did the optional upgrade to IE 7. What can I say about it? Not much. It is now on par with Firefox. They didn’t really move the needle. Is it better than IE 6.0? Yes. Is it good that they built this? YES! Just being able to use PNG images with Alpha is a great thing. Will it be my default browser? Not really.

Why? One word: EXTENSIONS!

The firefox extensions are by far the best extensions that I’ve used on a browser. When Firefox first launched, they didn’t have an extension mechanism. After they launched and iterated the extension mechanism, they had a good system. Yes, I’ve tried the ones on IE7… no comparison. I mean, there is even a Firefox extension that allows you to embed a COM IE Browser object into a Firefox window/tab.

I use about 5 extensions, but the ones that I use the most are the following:

webf developer toolbar preview

The web developer toolbar was the first toolbar that I really took to. It is just fantastic. It has so much that it would not be possible to cover it in a single blog post. It is a mandatory install for me on every Firefox browser.

Firebug logo

I’ve been using Firebug more and more. It is just super excellent. The XMLHTTPRequest debugging and Javascript debugging that it excels at were sorely needed on Firefox. The inspector for HTML and CSS are just top notch. This is a another must have (more in another blog post)

The other extension I used is now essentially built into Firefox 2.0. It was tab manager plus and session saver. This extension has set the bar for what a browser should do. Essentially, the system provides a redo-log for actions on the browser. If your browser (or computer) crashes, or you accidentally close a tab…. no worries. This extension allows you to undo a tab close. If you crash, a dialog pops up when you restart that will ask if you want to restore your windows and tabs. This has saved me SO MANY TIMES. I now feel comfortable opening more windows and tabs as I dig around the internet doing research.

Overall, I think Firefox is technically better, friendly enough for the consumer, and the price is right. I don’t see this platform becoming smaller as time rolls on. The fact that google is supporting them and incenting users to install is good news as well. I can see Firefox getting bundled with future PCs. I would also like to see Apple drop Safari and just move to Firefox… they are wasting resources by developing their own browser which is too difficult to extend technically. They could instead help the Firefox platform get even better.

So a big thank you to Firefox and all the extension makers out there!

The x86 Jmp instruction

8086 image

I’ve been holding off on blogging about this for a while as well, and just want to get it out there.

About 6-7 months ago, I was doing some x86 thunking. As I was doing on the fly code generation, I hit a roadblock, which forced me into research mode for way too long.

The x86 didn’t have an instruction to do an immediate jump.

Essentially, I wanted a:

JMP #4C018030

I wanted it to be 5 bytes and I wanted to be done witht he project I was working on. It turned out that there is no such instruction. This is strange since they have immediate mode instructions for CALL and a few others. If they were trying to force the object code to be easily reolocatable, then they would have consistently made all IP mutators to be relative. They didn’t, so what gives?

I asked around and did a lot of research. Nobody really knows and the concern is not there. Almost all implementors do a BRANCH instruction which requires the destination addresss to be calculated.

I posted to USENET about this in June and got no real answer.

The surprising thing is that this is really a very very old instruction set (origins from the 70’s). I had serious doubts that they would eliminate an instruction that was so efficient and basic in order to force code to be position independent.

This is why I have quotes on my quotes page about the x86 instruction set. It always surprises me.

NeWS, NeXT, VMS, and Windows NT … connections

HyperLook

Quick note…

As you may recall in the past, I’m late to the game in noticing that WNT was 1 letter off from VMS.

Well, as I was thinking about a neat old windowing system (more on the great history on the web later…) called NeWS… I noticed something.

It was developed at Sun around the same time that NeXT computer was forming… (late 1980s … LATE 1980s!!! Has it been that long!)

Here is another parallel.

Sun made Workstations. NeXT was making a workstation. The NeWS system was based on PostScript. The NeXT system was based on Display PostScript. Hmm, I can’t think of any other companies attempting to use PostScript as their graphics engine!

Similar technology choices and an un-canny similarity in naming! Which came first? NeXT or NeWS? Notice that ‘WS’ is 1 letter off from ‘XT’?

James Gosling worked on NeWS. James was the architect of Java. Arthur van Hoff worked on NeWS for James. He built a SimCity clone on their interface toolkit called HyperLook. Arthur was part of the original Java team that left to start up Marimba. He formed another ’stealth’ company after that which sold Java tech to Tivo for their platform.

The initial magic numbers on a Java class file are ‘0xCAFEBABE’.

I remember working on NeXTSTEP / OpenSTEP on Intel and ALSO seeing that signature. A quick search reveals that I wasn’t crazy. The question now is: who came up with it first? NeXT or Sun??

Moving the blog

I’m going to be moving the xxeo.com domain and the blog over the next few days. If you notice any downtime or issues… be patient, but not too patient :-).

I’m going to stick with wordpress. None of the Ruby based blogs have wowed me too much yet. I will change the theme, however. I want to move to something different… the existing theme doesn’t quite fit.

Text Filters

CSS has really become a success and really helped separate content from design. Previously, I was in the doubter crowd, but I’m completely turned around. Now, if you are writing a blog or some content for a web page, you can really just focus on the text. Once you get into it you can then understand the interest in “Text Filters”.

Not too long ago, I would get an email about some form of text to html hack known as a lightweight markup or text filters. As I saw each one of these, I put them into the same category as ‘wiki-text’… systems that would eventually go away once people had WYSIWYG (or more accurately WYSI ‘Kinda’ WYG) editors. This still hasn’t happened, and with the true separation, I can honestly see the appeal of these systems by bloggers and web designers.

Of all of these, I think MarkDown looks the closest to what I want. I just wish they swapped the emphasis and strong semantics.

The other popular one that I’ve seen is Textile. The guy behind that is a true typographer, so, of course, his site looks excellent. The problem that I see with Textile is that it requies paragraphs to be these huge lines. Maybe this won’t be a big issue.

I’m going to give both a try. Either will be a huge win over old HTML.

Error handling

error dialog

Updated: there is now a page on this site dedicated to this topic.

About 8 months ago, I was going to a big blog post on error handling in programs. I think its an interesting and practical topic. Proper code requires lots of good error handling. I was trying to understand which systems work the best and I couldn’t really come to a conclusion myself.

So before going on, what is the best system for error handling that you have used?

How does language X, Y, or Z handle it. (C, Smalltalk, Objective-C, Forth, Common Lisp, Io, Erlang Haskell, Ruby, Python, PHP, Java). What about OS level systems or windowing systems?

What is the best system that you have used?

Just to get things started. I’ve found that a lot of the C style systems to be too laisez faire. On the other end of the spectrum, putting a try / catch/except handler for every possibility doesn’t make me feel too good either. Then you have things like PHP which toss errors if you use an ‘@’ symbol on the function call.

Anything innovative out there?

Good blog software for comments?

hey, it is quick question day. What do you guys out there like for comment systems on a blog? I’m finding that people I know or don’t know may write an interesting comment. The problem is that others don’t really get to see it?

What is the answer?

« Previous entries · Next entries »