Thursday, June 17, 2010

Safari 5

I recently downloaded Safari 5 and I am impressed. I want to go over some things: Safari Extensions, Readability, UI changes. Those alone make this update worth the download.

I will start off with UI changes. There are a few things that the user will notice. First, the brought back the blue loading bar. Another UI change can be seen in the History and Bookmarks window. They changed the style of the buttons and the color. Anyway, since these UI changes were more for show than for functionality and accessibility, I will move on to the next two things I want to talk about.

Readability. This is a great feature that analyzes the active webpage. It breaks it down utilizing DOM's functionality. After parsing appropriately, it reformats for easy reading, what is most likely the main article in the page. It is much easier to use than the old Arc90 bookmarklet. I bet the code is essentially the same, but by putting it into the Objective-C language, it runs faster.

Finally, Safari extensions. Now any developer can create extensions to add functionality to the Safari Web Browser. One example is an extension that allows the user to download the current YouTube video.
I find it nice that an extension can really get a high level of interaction with a web page (UI Interaction and WebPage injection). Soon, I will post a tutorial on how to make Safari extensions.

In sum, Safari 5 is loaded with some killer features. Safari Extensions, and Readability, along with algorithmic optimization makes this browser REALLY impressive. It is something everyone MUST download.

Programming Tip: Be Care With Quote Syntax

The other day, I was writing a program. It has to display a "\". So obviously, my first instinct was to write that. What I did not remember was that a slash there usually is waiting for some letter to come after it to denote a return or something similar. So, it was taking a quote as that letter. However, a ' " \" ' doesn't actually mean anything so the debugger was getting stuck there. So when you want to write a back slash, you have to click it twice.

Essentially, by doing so you tell the javascript engine that the \ is not denoting a symbol to realize that the \ isn't actually waiting for something like "\n". Alternatively, you could use the special characters ampersand format for a slash: "&#92".

Slow Boot up Macintosh Snow Leopard

NOTE: This probably applies to Leopard too.

Over a month ago, I had a problem with start up on my mac. I think it was because I had a partition that was the main one for boot up, but after I deleted it Snow Leopard did not know what HDD to boot from. So, it would first check for network volumes. However, none could be found. We all know that loosely-connected or nonexistent network devices will cause problems, because they cannot be found. Anyway, that was my problem. It was increasing boot times between the bootloader and the Apple Logo up to 25 seconds.

Lesson to take away: If there is an unusually large delay in the time it takes to switch from the bootloader to the Apple Logo, the problem could possibly be remedied by going to "Apple Logo --> System Preferences --> Startup disk", and selecting a startup disk. (There is no need to click any apply buttons, because when you select the disk, the OS basically just automatically applies it.

Search This Blog