Site Moved

This site has been moved to a new location - Bin-Blog. All new post will appear at the new location.

Bin-Blog

Firefox 2.0 Release(and IE 7)

The recent release of Firefox 2.0 has created a lot of buzz in the blogsphere. And, as it is my favorite browser, it would be unfair if I did not give it a write up. In short : The update was more of a response to IE 7.

IE vs Firefox

As you may already know, Microsoft have released their latest browser - IE 7. Many have speculated how it will affect the popularity of Firefox. Perhaps this scared the Mozilla foundation to release a new version of Firefox - just to keep up with the buzz.

Take a look at IE 6 and IE 7 - the difference is obvious. You have trouble believing it is the same browser - even the logo is changed(slightly). Now look at Firefox 1.5 and Firefox 2.0 - you have to stare really heard before you can make out a single difference.

That said, let me assure you that I have no plans to move back to IE - I am not suicidal.

New Features in Firefox 2.0

I am not saying that Firefox 2.0 was just a marketing hack - it has some new features. Some of them that caught my attention are...

Search Engine Plug-in Manager

After a long wait, the firefox team have included a feature that must have been in the browser from the first release - a Search Engine Plug-in Manager. Using this you can delete search engines from the browser. I would have liked to see an option to create and edit the plugins too - but something is better than nothing.

Previewing Feeds

This is one of my favorite features in the new version. You can click the 'Subscribe feed' button in the address bar and preview the feed. More importantly, you can copy the feed URL into you favorite RSS reader. That was not possible in the previous versions.

Inline Spell Checking

Another must have for all browsers - the spell checker. This will check for spelling mistakes in all the textareas on a page when you are typing.

These are the features that are helpful to me - there are more feature - but they are not for me.

Built-in phishing protection

Must be heaven send for many 'normal' web surfers - but we geeks know how to recognize which site a URL belongs too. It is very hard to fool any geek with a disguised URL - possible - but very hard.

JavaScript 1.7

Don't get me wrong - I love javascript. But despite the upgrades, I will not be able to take advantage of the newer features as it is not supported on other browsers.

Broken Extensions

The thing I hate most about Firefox Upgrades - a lot of extensions stop working. Fortunately, this upgrade did not break too many extensions. The broken extensions(in my system) are...

  • PrefBar
  • Tab Mix Plus - The developers of this extension have promised an update within one week. [Update : Works now]
  • Nuke Anything -
  • This extension was reported as incompatible with Firefox 2.0 - but the authors have upgraded it - so it is working fine now.

Conclusion

So, should you upgrade? There are some new feature - but there are as many reason why you should not upgrade. I have upgraded - and it is my opinion that the upgrade is worth it.

Oh, by the way, if you use IE, please, please upgrade your browser. Upgrade it to Firefox. If you can't do that, at least upgrade it to IE 7. That upgrade is definitely worth it.

Read More...

Custom Search Engine from Google

You may have heard about the customized google search feature they just launched. I have decided to give it a try. I used it to create a search for all my sites - that is for these sites...

See it in action

According to Google...

Google Custom Search Engines empower users to choose which pages they want to include in their index, how the content should be prioritized, whether others can contribute to their index, and what the search results page will look like. With this launch, we're extending the power of Google search beyond Google.com.

Learn more - Custom Search Engine FAQ

Search My Sites

More Info...

Filed Under...

Read More...

Bookmark Every Digg

Not long ago, I complained that Digg did not provide a bookmarking option. Now I decided to stop complaing and to do something about it. As a result, I created GreaseMonkey Script that provides an option to bookmark each post in digg in three most popular social bookmarking sites - del.icio.us, Furl and Ma.gnolia. You will see the icons of these three services to the right of all titles in the Digg page.

I created this script to celebrate my first Digg homepage entry. It was an old article on AListApart on how to tame footers using div.

If you are using a social bookmarking system that is not in the given list, edit the script and add it - it is very easy.

Install Bookmark Every Digg

To install, you must have the greasemonkey extension for firefox browser. If you have it, just right click the link and choose "Install This User Script".

More about the script 'Bookmark Every Digg'...

The Script in Action
Read More...

No Sound in Flash running on Firefox in Linux(FC5)

I had a small problem with Flash in Firefox today - flash works - but no sound. I don't know what causes this error - but it seems to be fairly common. This problem only occurs in Linux systems with Firefox.

Fortunately, it was easy to fix. Before letting you know how to fix it, let me say that I use KDE on Fedora Core 5 Distro - I don't know how this solution will help people using other distros. So if you are using FC5, this is the solution...

  • Open the KDE Control Panel.
  • Find the 'Sound & Multimedia' Menu
  • Choose 'Sound System' inside this menu.
  • Click on the 'Hardware' Tab.
  • Find the checkbox labelled 'Full Duplex' and make sure that it is OFF.
  • Click on Apply - this should restart the sound system.

An image to make this more clear...

If all goes well, your sound should be working now.

If anyone knows the cause of these errors, please leave a comment.

Filed Under...

Read More...

Invalid JSON

I just read a post in Simon Wallace's blog about Invalid JSON. The main point is that valid JSON strings must be enclosed in a double quote(") - not a single quote(').

In JSON (unlike in JavaScript) these MUST be double-quoted strings. In fact, ALL strings in JSON must be enclosed in double quotes (JavaScript also allows single quotes; JSON does not).

Sorry guys, but my JSON generation function created JSON with single quotes. I have already updated and uploaded the modified version - but if you are using the old version, get the modified function from the sql2json() page.

If you have never heard of this function before, sql2json() function will take a SQL query as it argument, execute it, fetch its result, convert it to a JSON string and then return the JSON string. This is extreamly useful if you are creating Ajax applications and decide to use JSON over XML. If you have decided to use XML, take a look at my XML Parser for JavaScript instead.

Guess I should have read JSON's RFC(RFC 4627 - text file) before creating the function. And I have been creating a lot of converters recently - the great '2' functions.

sql2json()
Converts SQL Results to JSON String - the function we were talking about just now.
xml2array() for PHP
Converts a XML string to a PHP array. xml2array() is a easy to use PHP function that will convert the given XML text to an array in the XML structure. Kind of like my Javascript xml2array() function.
xml2array() for JavaScript
Converts a XML document to a JavaScript array.
Read More...

SQLite

SQLite Logo

SQLite is one of the smallest DBMS available. Unlike other RDBMS solutions like MySQL, PostgreSQL etc. SQLite does not have a Client-Server architecture. SQLite is a embedded into the software using it. The main advantage of this is you can create an application that uses a database without expecting the end user to have a database server.

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
SQLite Official Site

SQLite is in no way a competition for MySQL or PostgreSQL as they tend to different needs. In the context of the LAMP platform, it is rare to see SQLite being used in a web server as most servers have MySQL(or PostgreSQL) server running. SQLite is more relevent in the application field where the user may not have a server running.

In client-server model RDBMS like MySQL, PostgreSQL, etc. there will be a server running in the background at all times. For example, take MySQL. It uses a background process 'mysqld'(mysql daemon). When a program(like PHP on Apache) tries to execute an SQL command, this program will communicate with the background process and give the SQL command to the server. The server will then execute it and return the status.

In contrast, SQLite is embedded into the application that uses it. For example amaroK music player, uses SQLite to store its playlist and media library data. This application can read and write to the database using SQL commands without the need for a database server to be running on the user's system.

Some well known applications that use SQLite are...

  • amaroK MP3 Player
  • Yum - Yellow Dog Updater
  • Banshee Music Player

(Well, they are well known if you use linux.)

Features

The features for SQLite include...

  • ACID compliant.
  • Zero-configuration - no setup or administration needed.
  • A complete database is stored in a single file.
  • Backing up, Exporting/Importing is very easy
  • Supports databases up to 2 terabytes in size.
  • Sizes of strings and BLOBs limited only by available memory.
  • Very small code footprint.
  • Faster than popular client/server database engines for most common operations.
  • Easy to use API.
  • Self-contained: no external dependencies.
  • Open Source

Filed Under...

Read More...

PostgreSQL

PostgreSQL is a RDBMS that many claim is better than MySQL. This is basically the only Open Source competion MySQL has. There are other Open RDBMS but they are not in the league of MySQL and PostgreSQL.

PostgreSQL is a open source object-relational database server(database management system). It supports many advanced features that are not in MySQL.

Features of PostgreSQL

Functions
This feature allow blocks of code to be executed by the server. Functions in PostgreSQL can be written many languages like PL/pgSQL, PL/Perl, plPHP, PL/Python, PL/Ruby, PL/Tcl and more.
Indexes
An index is storing some columns of a table separately to allows quick access to the table. This makes the index smaller than the original table (due to having fewer columns), and it is optimized for quick searching. Most RDBMS supports this.
Triggers
A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit access to data. In addition to calling functions written in the native PL/PgSQL, triggers can also invoke functions written in other languages like PL/Perl.
MVCC
PostgreSQL uses Multi-Version Concurrency Control (MVCC), which gives an user a copy of the database, allowing changes to be made by one user without being visible to the other users until the change is committed. This also lets you 'roll back' to an older version of the database if necessary. This is similar to the Version control systems like CVS or Subversion.
Inheritance
This feature lets tables inherit the properties of a parent table. Data is shared between parent and child tables. For example, adding a column in the parent will cause that column to appear in the child table also.
Referential Integrity
PostgreSQL allows column constraints, foreign key constraints, and row checks.
Other features
And many more features like...
  • Views
  • Full, inner, left and right joins
  • Sub-selects
  • Encrypted connections via SSL
  • Point-in-time recovery

Another open source RDBMS is SQLite. This provides no serious competion for MySQL or PostgreSQL as it tends to a different need. It is a a small C library that implements a self-contained, embeddable, zero-configuration, single file SQL database engine. More about SQLite in the next post.

References

Comparisons

Read More...

Subscribe to : Posts