Frequency modulation in gnu-octave : square wave carrier and sinusoidal message

Frequency modulation is a common analog modulation technique. Here the instantaneous frequency of the carrier wave is varied with the instantaneous amplitude of the message signal. That is the information regarding the message is available in the frequency of the carrier. It is a kind of more generic technique called angle modulation. [][1]Sinusoidal frequency modulation of square wave carrier Gnu-octave has built-in function fmmod() available in octave-communications package for implementing frequency modulation. [Read More]

Parsing CLDR plural rules in javascript

English and many other languages have only 2 plural forms. Singular if the count is one and anything else is plural including zero. But for some other languages, the plural forms are more than 2. Arabic, for example has 6 plural forms, sometimes referred as ‘zero’, ‘one’, ‘two’, ‘few’, ‘many’, ‘other’ forms. Integers 11-26, 111, 1011 are of ‘many’ form, while 3,4,..10 are ‘few’ form. While preparing the interface messages for application user interfaces, grammatically correct sentences are must. [Read More]

Browser language preferences: navigator.languages is coming

Browsers provide an option to choose the preferred language a website to be shown, often named as “Accept language“. [][2]Firefox accept language preference These preference values allows websites to deliver a suitable language version to the user. For the developers, to read this value, the existing options is to check the Accept-Language http header value. It works and many websites use it already. But this value was never exposed at client side. [Read More]

W3C Workshop at Madrid

I will be speaking at the upcoming W3C workshop at Madrid. The workshop is on 7-8 May 2014 and the theme is “New Horizons for the Multilingual Web”. I will be co-presenting with Pau Giner, David Chan from Wikimedia Foundation Language engineering team on best practices of translation at wikipedia. It will cover the design (from both technical and user experience perspectives) of the translation tools, and their expected impact on Wikipedia and the Web as a whole. [Read More]

A laboratory manual for basic analog communication experiments

I was in need of a manual for introducing the analog communication lab experiments to students who had no prior exposure to electronic circuits or analog communication techniques. Since I found no such book which matched my needs, I planned to prepare a laboratory manual which could help students with the basic understanding of electronic circuit theory to learn and experiment the fundamentals of analog communication techniques. The lab manual discusses different methods of implementing analog modulation and demodulation using transistors, switching IC CD4016, opamp IC 741, PLL IC CD4046, timer IC 555 etc along with passive components like IFTs(Intermediate Frequency Transformers), capacitors and resistors. [Read More]

Configurable node logger with winston

For an advanced logging system for nodejs applications, winston is very helpful. Winston is a multi-transport async logging library for node.js. Similar to famous logging systems like log4j, we can configure the log levels and winston allows to define multiple logging targets like file, console, database etc. I wanted to configure logging as per usual nodejs production vs development environment. Of course with development mode, I am more interested in debug level logging and at production environment I am more interested in higher level logs. [Read More]

Mediawiki moves to json based localisation file format

Mediawiki is moving from PHP array based localisation file format to json format.

This is based on the RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format

A lot of extensions were also migrated to the new localisation format, thanks to Siebrand Mazeland

The json based localization file format was first introduced in our frontend javascript i18n library https://github.com/wikimedia/jquery.i18n

If you are interested in seeing some of the sample json files see https://gerrit.wikimedia.org/r/#/c/122787/ , claimed as “largest patch set in the history of MediaWiki” 

Brackets, my favorite javascript IDE

I use Brackets for web development. I had tried several other IDEs but Brackets is my current favorite IDE. A few things I liked is listed below It is free software licensed under the MIT License written in HTML, CSS and JavaScript Availability of large number of extensions Some extensions I use with Brackets are: Markdown Preview for easy editing of markdown Brackets Git for git integration Themes for Brackets For Monokai Darksoda theme I use Brackets Linux UI Interactive Linter realtime JSHint/JSLint/CoffeeLint reports into brackets as you work on your code WD Minimap for SublimeText like code overview Beautify for automatic code formatting as you save using jsbeautify Beautify extension helps me a lot because most of the MediaWiki related code I write needs be as MediaWiki javascript coding convention. [Read More]