Posted in Uncategorized

Machine Learning: Basic Terms for Dummies

Machine learning is becoming increasingly relevant today in trying to solve a host of problems. Essentially you are writing programs which are learning and getting better at doing something as more data is made available to them.  A program gets better at telling users which products they might like as it learns more about user preferences and similarities between users. Continue reading “Machine Learning: Basic Terms for Dummies”

Posted in Alexa, AWS, Programming

Writing Custom Alexa Skills using AWS Lamdba and Python

In this tutorial, we will learn to write an Alexa skill and publish it for certification. We will use AWS Lambda to host the code which will be used to implement the skill.

When you write an Alexa skill it generally involves two set of activities.

  1. Writing a service which will perform the tasks/actions of your new skill. This is the part we will write in AWS Lambda. You can host this service yourself too if you want to by hosting it on a web server and providing an HTTPS endpoint. Lambda just takes cares of many aspects of this and makes it easier to integrate with Alexa
  2. Configuring your skill in amazon developer portal (name, words associated with your skill, how to invoke it etc) and linking it to your service.

Continue reading “Writing Custom Alexa Skills using AWS Lamdba and Python”

Posted in Database, PostgreSQL, Uncategorized

My New Book : PostgreSQL Server Programming

My new book PostgreSQL Server Programming – 2nd Edition is now available on all major online retailers.

This book will show you that PostgreSQL is so much more than a database server. In fact, it could even be seen as an application development framework, with the added bonuses of transaction support, massive data storage, journaling, recovery, and a host of other features that the PostgreSQL engine provides. Continue reading “My New Book : PostgreSQL Server Programming”

Posted in Database

Autovacuum Internals (From 2008)

I wrote this entry for planet postgreql back in 2008. I am posting it here again not to lose it. The details here are a bit out of date but some of them might still be relevant.

Autovacuum, something that comes up a lot when you talk about PostgreSQL maintainence, and it is relatively new, started from PostgreSQL 8.1 to be part of the backend proper. Before that it was a contrib module IIRC. In the generally excellent PotgreSQL documentation you can find its reference here however i will also try and state a few things about autovaccum which are not in docs but perhaps should be, i will also try to keep it as end-userish as possible. Continue reading “Autovacuum Internals (From 2008)”

Posted in Web Development

Nginx Module Extension

My new book Nginx Module Extension is now out on all major online retailers. You will find this as a one stop guide to getting familiar with nginx module system and how to install and configure HTTP and 3rd party modules. The unique thing about this book is a chapter on how to write your own nginx module. Open source is all about creating for yourself and others what doesn’t already exist. Hope nginx users and developers will find it useful.

Posted in Psycology, Usability

Speed of Thought – Why is speed the killer feature

Losing your software user’s attention is a matter of seconds, or probably just one second. That is why you must strive very very hard to make sure the application has sub-second response times. Speed of your application, is still The Killer Feature. Here is why

Continue reading “Speed of Thought – Why is speed the killer feature”

Posted in Database, Performance Tunning, protocol

Anti-Caching a better way to do memory management for database systems

I have been confused about this for half a month until i figured this out. So what is Anti-Caching? And why is it needed? How is it different from the traditional buffer-pool system in all the databases today?

Dr. Stonebraker gave a talk where a small part of it talks about “Anti-Caching”. It is supposed to be a better way to use memory with databases dealing in large datasets

Continue reading “Anti-Caching a better way to do memory management for database systems”

Posted in General Utility

Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?

If you are using Mac OSX (i am on Lion)  and you just installed Oracle JDK / JRE 7  your Java applets in Chrome will stop working. You will basically be told Chrome does not support Java 7 on the Mac platform. A 64-bit browser (Safari or Firefox, for example) is required to run Java 7 on Mac OS X. 32-bit browsers such as Chrome do not support Java 7 on the Mac platform. Continue reading “Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?”

Posted in Frameworks, Programming

Difference between Multi-Threading and Parallel Programming

Since the use of multi-core computers / PCs is common these days, there are more and more parallel programming frameworks coming up. If you use Scala (or Java)  you might have used the AKA framework which is based on Actors. In java 7 there are the Fork/ join APIs.  However you might ask why do we need these , since multithreaded apps are already quite common. If you use Servlets and so on you are automatically using multiple threads and JVM is a beast when it comes to scaling up using threads and utilising multiple cores.  Continue reading “Difference between Multi-Threading and Parallel Programming”

Posted in Programming

Writing a custom Nginx module – Sample Hello World Module

If you want to write a custom Nginx module, Emiller’s guide is a very good starting point. This article is a wee bit long and you might want to get your hands dirty just to see a full program. In this case you can find this hello world module useful.

I found both of them useful, but the hello world program was  simplistic enough for me to miss some concepts, so i wrote this improved hello word module. Continue reading “Writing a custom Nginx module – Sample Hello World Module”

Posted in SOAP, Web Development, Web Services

Error handling in SOAP Web Services – The Right Way

I have seen too many web services (and done a few) where fault handing is not user friendly / graceful.  Most of the times the way people code the web services using annotations or using POJOs in  frameworks like Axis2 the SOAP faults just contains an error message since this is the easiest thing to do. However for  clients this is not too friendly as they can only do error handling  based on your error strings. SOAP 1.2 specifications here , provide a better way of populating your SOAP faults. That is to provide at-least SOAP codes, sub-codes and a fault string as well as details (if possible). This is old news, but i still thought should be talked about.  Continue reading “Error handling in SOAP Web Services – The Right Way”

Posted in Database, PostgreSQL, Replication

PostgreSQL Replication Options

Based on different parameters, reuirements etc you have the following popular options.

  • Block level replication – DRBD
  • PostgreSQL Streaming replication (SR)– only available 9.0 +
  • Slony Trigger based replication – Almost the gold standard for Master – Slave replication
  • Bucardo – Perl based multi master Async replication
  • pgPool- II – Load balancer, Query cache, connection pooller , Replication manager
  • pgCluster – multi-master synchronous replication

Continue reading “PostgreSQL Replication Options”

Posted in JavaScript, SEO, Web Development

All you need to know about Search Engine Optimization

Your online businesses are ultimately only as profitable as they are accessible—if no one can find you online, your hard work in creating a useful architecture, providing interesting content, and coding them correctly will be for naught. This is where Search Engine Optimization (SEO) comes into play, and most of you know what it is.

Contrary to what you might hear from companies who try to sell SEO services to you, there are no magic secrets that guarantee you’ll be at the top of every list of search results. However, there is a set of free best practices that you can do on your own to make sure your site is as easy to find as possible.

Continue reading “All you need to know about Search Engine Optimization”

Posted in Web Development

Getting Around Browser’s Same Origin Policy (SOP) With Proxies, Script Injection , JSONP and CORS

If you work with Web Development or Javascript / Ajax a lot you must have come across browser’s same origin policy or SOP. Same Origin Policy or SOP is a security concept in which documents retrieved from distinct origins are isolated from each other. This is quite strictly implemented by almost all major browsers today.

Continue reading “Getting Around Browser’s Same Origin Policy (SOP) With Proxies, Script Injection , JSONP and CORS”

Posted in Programming, protocol, Web Development

Implementing HTTP Digest Authentication in Java

I recently had to implement my own version of RFC 2617 which addresses the digest authentication in http protocol. This RFC is an improvement over RFC 2069 which was the previous version of Digest Access authentication. However RFC 2617 adds some additional security features such as quality of protection (qop) to try to counter re-play attacks. Continue reading “Implementing HTTP Digest Authentication in Java”

Posted in Management, Psycology

The Maker’s Schedule – Know how your developers function

Do you know why your developers get so irritated when someone (You) distract them? After all you have a software in production, and so your developers should be able to constantly adjust to the changing needs and nature of the challenges you have , either due to problems in production , or because of competition. As a manager or a CEO you would love to work in such a fluid organization which can adjust priorities rapidly based on external factors. In reality you might be shooting yourself in the foot.

Continue reading “The Maker’s Schedule – Know how your developers function”

Posted in Uncategorized

Unskilled and Unaware of It – The Dunning Kruger Effect

I came across a very interesting phenomenon today. Something i have known and observed for a very long time. I often wondered that in our business (Technology) people who generally rate themselves high, are in general not that competent. For example,  i have had bosses in a software company , who were MBAs, who always thought they bring more value to the company as compared to those people who actually build stuff they are selling.

Continue reading “Unskilled and Unaware of It – The Dunning Kruger Effect”

Posted in Frameworks, Programming, Web Development

Asynchronous Non-Blocking Backends – Node.js is cool

I am beginning to have a liking for the new stuff everyone is buzzing about. The server side V8 based javascript framework called Node.js.

In the start when i heard about it at a hacker’s get together, i thought its another one of those, cool buzz words framework which makes you cool and hip if you use it.  However after playing around with it for a bit, it seems pretty nice.

Continue reading “Asynchronous Non-Blocking Backends – Node.js is cool”

Posted in Management, Scrum

Should you rotate the Scrum Master Role?

I have heard a couple of point of views on this topic. Some think the role of scrum master needs to be consistently with one person and one person only. This is much like the role of a Project Manager in the non-scrum based models.

Others tend to think, that since Scrum master is just a facilitator , the role should be rotated among the team members, so more people get to be the “servant leader” of the team.  Continue reading “Should you rotate the Scrum Master Role?”

Posted in Online Payment, Programming, Web Development

PayPal Integration Primer, Quick way to integrate online payments to your website

Over the years i have worked and integrated with many payment systems and gateways. Some have been server-to-server and some have been “front-end” systems. Some have been extremely simple to integrate and some have been quite complex with fraud prevention and management as part of the integration.

Continue reading “PayPal Integration Primer, Quick way to integrate online payments to your website”

Posted in Scrum

How much do you know Scrum Theory? Find out with Scrum Self Assessment Quiz.

i have recently designed a quiz with an intention to asses the scrum knowledge of the development team members and scrum masters. This can be a good gauge of if you know your scrum-fu in enough detail. Remember that it is critical to have a thorough scrum theory knowledge to be able to implement scrum in it’s full form and function. Any partial implementation of scrum is NOT scrum.

Continue reading “How much do you know Scrum Theory? Find out with Scrum Self Assessment Quiz.”

Posted in Management

How to make Offshore Software Outsourcing work for you

I work for a company which relies heavily on outsourcing to an offshore company in Ukraine. Actually last 3 companies i worked for, relied heavily on outsourcing in india, pakistan , china etc. I also have worked for companies who were being outsourced to , and then sat on the other side of the table where i was outsourcing work to other companies. i have seen both sides of the equation. That makes me a wee bit qualified on this topic

Continue reading “How to make Offshore Software Outsourcing work for you”

Posted in Version Control

Comparitive analysis of available version control systems

We had a decision to make about which version control system to switch to. We were using CVS and were not happy with it (the project grew too big for CVS to keep us sain). So we decided to do a quick analysis of what options do we have. We looked at Mercurial, Git, SVN and Bazaar. We were using Eclipse for Java development along with Cruise Control for Continuous Integration and JIRA for bug tracking  so compatibility with those tools was a big consideration also.

Continue reading “Comparitive analysis of available version control systems”

Posted in Algorithms

O Notations

O -notation is the most common notation used to express an algorithm’s performance in a formal manner. Formally, O -notation expresses the upper bound of a function within a constant factor. Specifically, if g (n) is an upper bound of f (n), then for some constant c it is possible to find a value of n, call it n 0, for which any value of n ≥ n 0 will result in f (n) ≤ cg (n). Continue reading “O Notations”