Monday, August 31, 2009

Why Firefox Should Support ActiveX




Check it out. Pretty sweet, huh? If you're using Firefox or Safari, you won't be able to see it. It's a calendar. All you have to do to embed one in a page is type the following code:

<object classid="clsid:232E456A-87C3-11D1-8BE3-0000F8754DA1"></object>

That's one line of code. In contrast, I made a calendar on my site in HTML, CSS, and Javascript that performs most of the same functions: http://home.comcast.net/~richmaxw. I made that with 95 lines of code, plus 33 lines of CSS and a 40 lines of JavaScript. I had to add the JavaScript to ensure it would display properly in browsers other than Internet Explorer. There are many other ActiveXObjects you can use. You can browse them using OLE View. Unfortunately, Internet Explorer 8 seems to be moving away from ActiveX. I added a Windows Media Player object to a site of mine and whenever someone tries to view it, it displays a warning asking if the user is sure they want to watch the movie. Flash objects don't trigger the warning. It must be a security issue, but crackers can exploit all features of a browser, including JavaScript, for malicious purposes. Should we disable JavaScript, too?

Thursday, August 27, 2009

List of Navigator Attributes by Browser and Operating System


As a web designer, I have had to test my sites in many different browsers. My pages tend to be customized for each browser, and over time, I've accumulated a list of navigator attributes that I test for. Sometimes I redirect a browser based on what operating system they use (navigator.platform) other times by language (navigator.systemLangauge, which isn't supported by Firefox). So, here's a table of the attributes for which I've tested. I believe that some people would find it useeful. Note that these were obtained in different operating systems (usually virtual machines). Internet Explorer 2 is not included in the results because it did not support scripting:
 
navigator.platform

Windows (all 32-bit versions)  Win32
Mac OS 10.5  MacIntel
openSUSE 11.1  Linux i686
Ubuntu 8.04  Linux x686
Solaris 9  SunOS5.5.1_i86pc
 
navigator.userAgent

BrowserUser agent
Internet Explorer 8 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Internet Explorer 7 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Internet Explorer 6 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Internet Explorer 5 Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Internet Explorer 4 Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)
Internet Explorer 3 Mozilla/2.0 (compatible; MSIE 3.02; Update a; Windows NT)
Firefox 3 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Firefox 2 Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
Firefox 1 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Safari 4 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19.1
Safari 3 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.28 (KHTML, like Gecko) Version/3.2.2 Safari/525.28.1
Safari 2 Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.8 (KHTML, like Gecko) Safari/419.3
Konqueror 4.1 Mozilla/5.0 (compatible; Konqueror/4.1; Linux) KHTML/4.1.3 (like Gecko) SUSE
Opera 9.64 Opera/9.64 (Windows NT 5.1; U; en) Presto/2.1.1
Opera 8.5 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.50
Opera 7 Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.02 [en]
Chrome 2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.39 Safari/530.5
Netscape 4.79 Mozilla/4.79 [en] (Windows NT 5.0; U)
 
You may have noticed that Opera 8.5 identifies itself as Internet Explorer 6.0 by default, although this can be changed by going to Tools → Preferences → Advanced and selecting another option from the Browser Identification drop-down menu. That browser never ceases to impress me.

You may have also noticed that almost every browser includes the word Mozilla in its application version information. It has nothing to do with Firefox. This is an old spoof used by browsers to pretend that they were Netscape Navigator.
 
navigator.appName

BrowserApp name
Internet Explorer 8 Microsoft Internet Explorer
Internet Explorer 7 Microsoft Internet Explorer
Internet Explorer 6 Microsoft Internet Explorer
Internet Explorer 5 Microsoft Internet Explorer
Internet Explorer 4 Microsoft Internet Explorer
Internet Explorer 3 Microsoft Internet Explorer
Firefox 3 Netscape
Firefox 2 Netscape
Firefox 1 Netscape
Safari 4 Netscape
Safari 3 Netscape
Safari 2 Netscape
Konqueror 4.1 Netscape
Opera 9.64 Opera
Opera 8.5 Microsoft Internet Explorer
Opera 7 Microsoft Internet Explorer
Chrome 2 Netscape
Netscape 4.79 Netscape
 
As you may have guessed from the above answers, detecting Netscape Navigator is a bit tricky today! It makes me wonder whether the usage share of Netscape Navigator is under-estimated by HitsLink!
 
navigator.AppVersion
 
BrowserApp version
Internet Explorer 8 4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)
Internet Explorer 7 4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Internet Explorer 6 4.0 (compatible; MSIE 6.0; Windows 98)
Internet Explorer 5 4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Internet Explorer 4 4.0 (compatible; MSIE 4.01; Windows 95)
Internet Explorer 3 2.0 (compatible; MSIE 3.02; Update a; Windows NT)
Firefox 3 5.0 (Windows; en-US)
Firefox 2 5.0 (Windows; en-US)
Firefox 1 5.0 (Windows; en-US)
Safari 4 5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19.1
Safari 3 5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us)
Safari 2 5.0 (Macintosh; U; PPC Mac OS X; en)
Konqueror 4.1 5.0 (Compatible; Konqueror/4.1; Linux) KHTML/4.1.3 (like Gecko) SUSE
Opera 9.64 9.63 (Windows NT 5.1; U; en)
Opera 8.5 4.0 (compatible; MSIE 6.0; Windows NT 5.1; en)
Opera 7 4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1)
Chrome 2 5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.39 Safari/530.5
Netscape 4.79 4.79 [en] (Windows NT 5.0; U)
 
To test this out in your own browser, type the following code into a text file and save it with a .html or .htm extension:

<html>
   <head>
      <script type='text/javascript'>
         document.write("User agent: " + navigator.userAgent + "<br/>");
         document.write("App name: " + navigator.appName + "<br/>");
         document.write("App version: " + navigator.appVersion);
      </script>
   </head>
   <body>
   </body>
</html>

Wednesday, July 22, 2009

What is "computer science"?

How academics are limiting our understanding of computers

Edsger Dijkstra said that computer science is no more about computers than astronomy is about telescopes. He couldn't have been more wrong. To define the term as anything more than the sum of those two words is exaggeration. In reality, academics like Dijkstra have re-defined computer science as a synonym for programming, largely ignoring other fields such as networking, administration, and hardware. My alma mater has a computer-science curriculum mostly devoted to learning Java. They have a second major called "Applied Computing Technology" with a strong emphasis on artificial intelligence. They offer two elective courses on networking. I majored in computer-information systems (among other things) at CSU.1 That major required you to take two courses covering networking. But those just scratch the surface.

I just earned my Network+ certification. It's one test, but it covers more ground than both CIS networking courses. And Network+ is considered an entry-level certification. In order to become a CCNA (Cisco Certified Network Associate), you have to pass two challenging tests. Then, you can become a CCNP (Cisco Certified Network Professional) after passing two more tests. And there are three different types of CCNPs. You can be a CCNP specializing in routing, voice communication, or security. There are people who have all three CCNP certifications. Then, you can become a CCIE (Cisco Certified Internetworking Expert), specializing again in voice, routing, or security. You can also earn one of the many certifications from Microsoft if you want to learn how to run a Windows server. There are separate Microsoft tests for e-mail servers (Exchange), Active Directory, and so on. You can also earn a certification on how to run a Linux server. As you may have guessed, you could easily fit all of this material into a Ph.D. education with material left to spare.

Cisco Certification Path
The Cisco certification path.

So, I think categorizing these programs at universities as "computer science" is misleading. My friend majored in computer science at CSU and he said that he's a "networking guy." There are many students like him who enter college thinking they will learn about networking (or system administration), but end up studying Java — or worse — programming theory.

There are two solutions to this problem. The first is to admit that your students are studying programming and rename the department and major to take this into account. The other solution is to create a second major and call it "networking." Then, rename the computer-science major to "Programming." The networking major could include courses devoted to routing, security, telephony, wireless networking, databases, Windows-server administration, and Linux-server administration. You could easily make room for these subjects by eliminating courses you don't need. At CSU, for example, they teach a course on artificial intelligence, which is ridiculous. They also teach a course on graphics with 3-D modeling using Google SketchUp. Replace both of those courses with networking ones. Google SketchUp isn't used for 3-D modeling outside of CSU and you shouldn't be teaching modeling when there are art and construction departments at CSU that can go into it in more detail. They also offer a web-design course for CS students covering HTML, CSS, and PHP. Web design technically isn't networking, but in my experience, it still helps to understand it. They offer a web-design course for CIS students at CSU, as well, but it covers ColdFusion. ColdFusion is not nearly as common for server-side programming as PHP or ASP.NET. The same goes for Java. Java is being replaced on the server side by PHP and ASP.NET. On the client side, it is being replaced by Flash and AJAX. This re-inforces my view that universities in general are mismanaged. I had a similar experience while earning my bachelor's degree in "business management." A couple of the courses for that major taught us how to organize companies (something a president or vice president might worry about, but not a fresh college graduate). They also offered a course on public relations. Universities are lost in theory.

So, in order to prepare students for the real world, better equipment and professors help. But what is needed the most is direction. Universities need to teach the right things to their students. I've learned far more by reading books on my own than I have in school. There was no professor telling me what to study. There were no computer labs. And yet, I can still put what I know on my resume and tell employers what I know in interviews. I emphasize what I know and not what courses I took. Does that say more to an employer than a degree? I think so.

_________________________
1. They should name it "Business Information Systems."