Sunday, June 20, 2010

Quick Take: Portability

Yep, I just began a new series of posts for my blog. From now on, if their is something tiny I want to post it will be named as 'Quick Take: Subject.' As for now...today I saw a woman carrying an iPad while using an iPhone, while standing in line at Moe's. I thought it was a redundancy fail. I'd like to hear your thoughts in the comments.

What makes one browser better than another?

First, I apologize in advance for inevitably being biased against Internet Explorer, it's just sooo bad, see, I blew it already.
A browser is a program which downloads code from remote servers and renders it onsite, for your convenience. So, the browser downloads html (see the post on html5), javascript (more on that later), and content for plugins (such as Adobe Flash or Java). It then renders the code, which means that the code is processed and displayed on your screen, formatted for your computer.
So javascript, it is another markup language (see post on html5), it looks alot like html but can do a whole lot more, if used to it's fullest extent, it can provide high quality applications that are fully web-based, like Gmail or Yahoo Mail, like GDocs or Office Live, like Facebook, but it can also do smaller things, like handle all those little buttons you like to click. To show the difference between html, javascript, and flash: Wikipedia is about as pretty as html can get, Facebook is a great use of Javascipt, and Flash is what plays all those youtube videos.
A few years ago, browsers used to make claims to fame based on security, or features, or compatibility with certain websites, but now most browsers try and claim to be the fastest. When a browser claims it is fast, it is talking about javascript execution speed, which can be easily benchmarked. Not all browser engines were created equal. Internet Explorer (the slowest browser) uses an engine called trident. Trident is old and outdated, and Microsoft knows it, that's why, instead of saying that it is fast, or making a newer, better engine, they brag about how IE has a good spam and phishing filter. Firefox uses the Gecko engine, which is far faster than trident, but still slower than many other browsers. But firefox has some things going for it anyway. Firefox has the most addons and themes for its browser as well as great security. It is also so much like IE that many people can switch to it and still feel comfortable with the interface. Both Chrome and Safari run on Webkit, which means that they have similar speed and compatibility, but with vastly different outcomes. Safari has been more focused on getting the most features ported to the mobile version of Safari used on Iphone and Ipod Touch, whereas Chrome has focused on the desktop by adding themes, extensions, and syncing user settings across multiple computers using your google account.
There are two main ways of ranking browsers: javascript rendering speed, and rendering accuracy. The most recognized javascript benchmark is called Sunspider, and browser are constantly trying to outdo each other on this test, currently the ranks are as follows:

  1. Chrome 6 (currently in beta)
  2. Safari 5 (just released)
  3. Chrome 5 (standard release of Chrome)
  4. Safari 4 (what most Safari users still have)
  5. Firefox 3.6 (or really any build will beat IE)
  6. Internet Explorer 8
As for rendering accuracy, this is how well a browser represents how the page is supposed to be seen. For years code has been writted knowing that the once-king of browsers IE didn't render accurately, but now there are browser that do render accurately, this means that pages may even look worse when finally rendered correctly. The test used to measure this is called Acid 3, and it's ranks are as follows:

  1. Chrome and Safari (both scoring 100/100)
  2. Firefox (94/100)
  3. Internet Explorer 8 (20/100)
Mobile browsers:

  1. Mobile Safari (100/100)
  2. Opera Mini (98/100)
  3. Android Browser and Blackberry Browser (93/100)
  4. Web OS Browser / Palm Pre and Pixi (92/100)
  5. Internet Explorer Mobile 7 (12/100)
In the end, it's still your choice. Some of you may have heard of opera, however I have not discussed it because it is so much like Chrome and Safari in terms of speed and compatibility.

Further reading:
Acid 3
Sunspider Javascript Benchmark
and for comic relief: Opera parodies Google's Chrome speed tests mercilessly (video) -- Engadget

Monday, June 7, 2010

What is Linux (and why is it better)?

First, an apology. I have used the terms 'linux' and 'ubuntu' interchangeably with the faulty assumption that people know what I'm talking about. Here's for a clean Start (get the pun?).
Linux is the name for a large collection of operating systems which are free, open source, and built on Unix. Open source means that the code is free to download and edit, and that it is maintained by the community of users, as opposed to being sold. Closed source is (cough...Apple, Microsoft) software which cannot be freely edited and is sold to line the pockets of big software corporations. Unix is open source, while Windows and Mac OS are closed source. Everyone uses both: Microsoft Office is closed source, but Google Chrome is open source. Chances are, if it's free, it's open source; and if it costs money, it's closed source.
And now for Unix. Now as I write this I realize that I pretty much have to write a new post inside this post. We shall call this sub-post -- What the heck is a kernel, and what does pop corn have to do with computing?
Unix was on Operating System made in the AT&T labs appox. 1970. Here is the evolution of Unix, courtesy of Wikipedia:


 I will be the first to say I don't understand the 40 year history of Unix, but I do know that many operating systems follow it's example in the kernel and that they comply with the standards to be called Unix-like. They also use the Programming Language: 'C.' That is not a typo, apparently the computer geeks of 40 years ago like a simple naming scheme. Not suprisingly, C was the successor to B, and C has been passed by C++. But all that is irrelevant.
The kernel is the most basic code in the OS which serves as an intermediary between the lowly hardware and the higher software services. It has the dirty job of say taking what you type on the keyboard and sending to the program that needs it. So as I type the kernel is making sure that what comes from the keyboard percolates up through the many layers of software all the way to the Chrome browser I am using to blog. If I click a pretty little icon on the screen the kernel informs the hardware of the request and the hard drive loads the needed data into RAM which then is sent to be rendered by the Graphics Card. And here is a super overly simplified view of Windows:
Applications
          |
GUI (Graphical User Interface)
          |
Services (such as the .NET framework)
          |
Kernel
          |
Hardware

Now not all kernels were created equal. A Windows kernel blurs the lines between the GUI and the kernel itself, meaning the windows can have far more visual effects, but the a bug in the code can also have more pronounced effects, such as "freezing." A Unix style kernel, which is used by Mac and Linux, separates the kernel and the GUI, which means that interactions are less elaborate but more stable. Both types have their advantages and disadvantages. So linux and Mac are similar at a very low level. So linux is fully open source and free, but mac has an open source base yet still charges money for its OSes. This is a fundamental difference between all 3 major OSes. Windows uses its own kernel (the NT kernel) and charges money for, Mac uses someone else's kernel open source kernel (a Unix-derivative called the Mach kernel), adds a custom GUI (an evolution of NextStep) and charges money for it. Linux uses a Unix-derivative kernel (called the Linux kernel because it was developed by Linus Torvalds and is both free and open-source), as well as an open source and free GUI (either GNOME or KDE) and keeps it all free and open-source.
So now you know what linux is, but what is Ubuntu? Because Linux is open-source and anyone can make their own version, there are many versions, called distributions, or distros. They all use the same Linux kernel but use different GUIs, GNOME, KDE, or whatever the heck they want. Ubuntu is the most common linux distro and uses the GNOME GUI.
Now that you are a veritable expert on this stuff, on to the next point, why is it better?

  1. It is free. It's amazing that on OS can be completely free and still compete with the traditional big OSes.
  2. It is open-source. Programmers edit and develop the code because they want it to be better, not because they are getting paid.
  3. Ease of Use. To really see this you would have to try out Ubuntu, but in my opinion it is easier to use than any other OS, while still being by far the most customizable, you can make it look and act however you want.
  4. Performance. Ubuntu boots up in under 30 seconds, shuts down in 5 seconds. It uses less RAM than Mac or Windows, meaning you can have more programs running simultaneously without slowing down. And over time is doesn't get progressively slower.
  5. Killer apps. As I see it there are two killer apps: Empathy and Compiz Config. Empathy is THE BEST IM client there is. It is flawlessly integrated with the desktop and works with every major chat client, all at the same time. It has a unified interface whether you are chatting with a facebook friend, google talk, yahoo chat, AIM, etc. And Compiz Advanced Desktop Effects, THE BEST desktop effects program. I can't do it justice in text, you would have to see, but I will say that 4 desktops on a cube means never having to deal with an overload of windows and never having to set up 5 different use accounts on the same computer. Here is a screenshot to close this post:   
















This is what it looks like as I switch from Desktop 1 to Desktop 2

Further Reading:
http://www.whylinuxisbetter.net/
http://www.ubuntu.com/
http://www.unix.org/what_is_unix.html/




Thursday, June 3, 2010

HTML5

I am sure you have heard this term tossed around in relation to Adobe Flash, Apple, Steve Jobs, iPhone/iPad, and mobile browsing. If not, you will. First let's talk about HTML. HTML is an abbreviation for HyperText Markup Language.


First, what is hypertext: this is just a fancy way of saying more than just text. It refers to text which links to other text, which links to other text and so one. It is because of this that the internet has been nicknamed, the "Web," it is a web of "hyperlinks." And now for Markup Language. Markup Language is code which gives text attributes, such as bold, being part of a list, being the title of the page, font size, etc.
 There are many other markup languages such as XML. The point of a markup language is so that something written on one machine can be sent to a completely different machine and be shown different ways. This is why if you have a page full of text you can resize your browser window and the text will adjust accordingly.
Every few years, the tech geeks who "control" html make additions. Recently they have added an element called canvas to the newest version of html, html5. This and other elements have allowed html to produce videos and basic games without having to use an Adobe Flash plugin. However, not all browsers are compliant with these new standards (ahem....Internet Explorer) so the new technology does not hit the mainstream for years. The benefits of html5 are: less resource consumption when compared to flash (ex. less fan noise, better battery life), better security because html5 is part of the browser and not a separate plugin, more accessible to programmers because you don't need a special program to write html.
Here is the controversy, and where I get to give my opinion. Apple has repeatedly refused to allow Adobe to put flash on the iPhone and iPad, claiming the reasons listed above and saying that flash is a dying technology. However, on the flipside, html5 is years from widespread adoption and I think apple fears that if flash were on its devices people could play games for free on the web that they currently buy through the app store.
Just a last note, if you look in your browser's address bar you will see that the address begins with "http....." This stands for HyperText Transfer Protocol and tells the computer that the page you are reading was transmitted using the "accepted" standard for doing so. Also https means that the page has been transmitted using a secure, encrypted method.

EPILOGUE: Html is included with every browser but not all browsers support it equally. Some process the code faster than others, some support more features than others. Html5 brings tons of new features to the html language but not all browsers support it. Internet Explorer does not support html5, Firefox supports some html5, Safari a good bit more, and Chrome and Opera support almost all html5 elements. There is a reason (albeit, not very satisfying) why there is such varying support for these new standards. They aren't made up, but they also aren't "forced" upon browsers. Html is "technically" controlled by a company called W3C. W3C still has a "beta" tag on html5, this is the only reason people have for not supporting it, and this reason is woefully insufficient because even though is not official, it willed be called beta for many years, and it is still quite easily implemented.


Further Reading:
HTML5: seriously, it's not just for video -- Engadget (requires: Chrome, Opera, or Safari to fully enjoy)
Will Apple Embrace the Web? No.
http://news.cnet.com/8301-30685_3-20003742-264.html