SQL like query on CSV and other tabular data

CSV files are ubiquitous in the programming world and most data interchange is done using the CSV format. One problem however is that you cannot quickly check for certain rows depending on a particular field criteria. As an example, say you need to find all the rows from a CSV file that has a particular value in a field. The most probable path would be to import the CSV in a spreadsheet and then process it to find the particular information.

In this post we will look into a command-line tool that allows you to query CSV data with SQL like syntax. q – Text as Data is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files). You can look at q as a meta-tool which provides access to all the data-related tools that SQL provides (e.g. expressions, ordering, grouping, aggregation etc.), but on tabular data files.
(more…)

Read More

3 tools to increase your web design productivity

Gone are the days when designing a site entailed starting from scratch with html and css. Now we have tools that take away the grunt work out of designing boilerplate code and other miscellaneous work, and lets you focus on what really matters, the end product. Below are a few good tools that will help you in designing and prototyping web and mobile products, whether working as a team or as a lone ranger.
(more…)

Read More

Using a mobile accelerometer to enhance web app UI

A accelerometer is one of the important sensors in mobiles. This sensor along with a gyroscope is essentially used by most mobiles games to detect motion in 3 dimensions whenever a mobile is moved or shaken. Although common with mobiles applications, web applications seldom use the features provided by these sensors. With some ingenuity we can use these sensors to enhance the user experience of a web app on a mobile device without much effort.
(more…)

Read More

Period: Time range API for php

Date/time programming is one of the tricky aspects of software development. Although inherently not complex in itself, coding date/time algorithms can be a subtle source of bugs. Especially in web development a feature such as payment subscription processing that ranges from days to weeks to months can get complex quickly. Also such kind of scenarios require additional features like auto renewal, scheduled email alerts to subscribers etc. Such kind of features require good date/time handling algorithms and libraries that handle such chores are always welcome.
(more…)

Read More

Sentiment Analysis of Twitter feeds

In the last post we looked into accessing Twitter API v1.1 from PHP. In this post we will see how we can add sentiment analysis for the tweets. Generally speaking, sentiment analysis aims to determine the attitude of a writer with respect to some topic. A basic task in sentiment analysis is classifying the polarity of a given text, whether the expressed opinion in a sentence is positive, negative, or neutral.
(more…)

Read More