четверг, 14 июля 2011 г.

Reasons that will turn you to Git

Git is a second product represented by Linus Toralds ( you might already be familiar with the first one – Linux core ). Staring a discuss about Git, most people will represent its history. Thus, although this system has become extremely popular, not much users are really aware of its benefits and purposes. So, this brief article will help you to jump into Git fairly easy.
I will skip Git installation process and customizing. I will simply advice you to download for Windows, Linux or Mac here and use default settings. If you’re interested in more detailed info, visit official site documentation: for Windows, for Linux or Mac. Use Git quick-start guide to learn more about Git usage.
So, you might wonder if Git is worth using and why so much talks about it. I have found the following advantages of its using:

  1. Distribution: de-centralized management system. 
  2. Branches: every developer that is enabled to commit has his own branch(or even several). He can give it a name of implemented feature. Thus, it will be easy to understand what was done in every branch. Git also has ‘master’ branch where stored application project that is ready for update to production.
  3. Collaboration: commit changes without distributing others. So, there’s no ‘main’ developer.    All of them are equal. There’s no need to wait for other developer’s commit.
  4. Performance: people think of performance as about time that every branch costs. Well, who cares how much time it will take if you mostly merge files. The real problem is that most of developers(who use other source control management systems) take time for coffee break while merging files. With Git it will take x times less time.
  5. Reliability: not a single point of failure. If it wasn’t so then no other reason wouldn’t sound seriously. Developers want to trust their data. 
  6. Data view: Whereas other systems look at data as on the list of files, Git thinks of data as of a project. Single file history is mostly uninteresting : developers want to know how a feature - that affects a plenty of files - is implemented. Git history will also show the trace of function if it was transferred from one file to the other.
  7. Easy to use: basic of Git are easy to understand. The one rule is to forget the way other systems work. And then you will succeed )
  8. Git is local: the project history is stored locally that result in availability to work off-line.

Asterisk 1.6 installation with Swift (Cepstral) Ubuntu 10.10

While Asterisk 1.6 (+ additional modules ) installation I faced the number of the problems. This article is devoted to the problems appeared while installation on Ubuntu 10.10 and doesn’t give a full installation description(you may want to learn it either here) See the list of problems and how-to resolve them below:

  1. Swift (Cepstral TTS) Installation: Cepstral official site has several categories. For telephony it is recommended to apply 8kHz voices. After Alice-8kHz voice installation Asterisk denied to use it and showed an error ошибку app_swift.c:240 swift_exec: Failed to set voice. The problem can be solved by installation of the same voice for desktop. To make Asterisk и Swift  work together the module app_swift is necessary. Here you will find more detailed information on where download module and how to patch it.

APE (Ajax Push Engine) Installation on local server

APE is a comet-server that is delivered with JS framework APE_JSF. Installation is described fairly clear on the official site, read more here. Tutorial "Hello world" contains the following code that concerns configuration file:
/***
 * APE JSF Setup
 */
APE.Config.baseUrl = 'http://yourdomain.com/APE_JSF/'; //APE JSF 
APE.Config.domain = 'auto'; 
APE.Config.server = 'ape.yourdomain.com'; //APE server URL

Firstly, I wrote necessary domains. I got an error in browser console Permission denied for <http://local.ape-project.org> to get property Window.APE.. I looked through the example mine configuration files and noticed inconsistency: instead of value ‘auto’ developer should write his own domain. As a result, configuration part will look like the one below:

/***
 * APE JSF Setup
 */
APE.Config.baseUrl = 'http://local.ape-project.org/APE_JSF'; //APE JSF 
APE.Config.domain = 'ape-project.org'; 
APE.Config.server = 'ape.local.ape-project.org:6969'; //APE server URL


Good luck in learning and do not be afraid to make experiments!

Bugs in Sencha(Ext JS) v4.01

Recently, I came across a strange bug in plugin Ext.grid.plugin.CellEditing. Official documentation claims that beforeedit event takes Ext.grid.plugin.Editing editor and Object e as first and second parameters respectively. In fact, it takes parameters visa verse: Object e and Ext.grid.plugin.Editing as first and second parameters respectively.

HTML5 Geolocation - standarts in our life.

HTML5 new standart brings about a plenty of interesting and useful possibilities both for web-developers and casual users. One of such features is geolocation API. Geolocation API is an geolocation service interface that user himself can select in browser settings. By default, Google Location Services is used. Service does the following: it returns user’s current location as coordinates(longitude and latitude).

How it works:
Browsers(Firefox, for example): send information on the closest access point to server (if user is connected to any WiFi point). In case user has no access to WiFi browser uses IP address to determine location.
Mobile devices find solution as follows: coordinates are defined by the means of GPS receiver if it is on. Otherwise, mobile devices are allowed to use information on the closest stations.