25 Apr 2013

PgAdmin doesn't (directly) support restoring from PLAIN format backups (yet)


Was working with my team at office recently and had a request from the team to learn how to 'Restore' an existing backup using PgAdmin. I thought this was easy, since PgAdmin allows for both 'Backup' and 'Restore' but investigating further, I found that PgAdmin only allows for Restore in formats other than 'PLAIN'.

Cross-checked this on the internet and found references here, here and here saying the same thing. 

PgAdmin doesn't (directly) support Restore'ing from plain text backups. To restore a backup, backed up using PLAIN format, you'd need to pass it through a command line utility called 'psql' that is available in both PgAdmin as well as postgres server installations.

I think it's high time that PgAdmin support this feature, especially when all the building blocks are already in-place. Lets see if I could take out time and submit a patch for this.

... till later.

10 Apr 2013

What to ask Employer - Part 4 - Generic Questions

(This is Part-4 among an n-Part series detailing the pitfalls when selecting an employer, and provides very basic information that you should inquire when joining a company. Click here, to read from the beginning.)

There are some Generic questions that should invariably figure in all interviews:

Work Days

One should clearly confirm the days of work at a prospective employer. I couldn't recommend strongly enough that you should blindly reject a job profile that requires you to work six days a week. If you have a family you care about, you might want to stick with a 5-day job, if possible.

... back-tracking, another thing that you should make sure is that the weekends are the usual week-off days (i.e. Saturday and Sunday in India). While at it, do confirm if the week-offs are on rotation basis... For e.g. if in March your week-offs were Saturday and Sunday, is it possible that in April they could change to a Monday and Tuesday?

In the remote chance that you're ok with weekoffs that are not Saturday / Sunday, something that is not obvious to most people when someone says '5-day week' they may not always fall together. I've been on five-day work-weeks but the week-offs could be split. For e.g. week-offs could fall on Monday and Thursday. You may be okay with that spin of words, but I couldn't take this change very easily and despite a five-day work-week, I found split weekends difficult to adjust to.


Work Hours

Would you have normal (9am - 6pm) work hours? I would strongly recommend that. The only reason you may want something different (for e.g. 8am - 4pm etc.) is if the traffic situation in your city is downright painful and you prefer to get-in and get-out while the roads are still bearable. Besides that, anything else is something you should consider seriously.

Does your profile include 'Flexi-hours'? If so, be wary. Most companies tune flexi-hours such that you always end up working for more than 8 hours and that although isn't a problem in general, one should be careful if six-months down the line you start feeling a burn-out. 

Another question that could be linked here is that whether late-hours (or early-hours) reliable, comfortable office provided by the office? What are the alternate options to go home? Is it safe at all? How far is office from home? etc... Once you reach home, do you once again have to worry about reaching office 'on-time' the next day. Does the company adjust a late entry on the next day, owing to a late stay-back the previous night? Just be sure that the company is lenient in such cases.

Does your profile provide you a laptop? Does your profile require you to 'check-in' from home? Both of these are good warning signs that you are in for (a lot of) unscheduled work. Often, this may be something that you can't avoid in your field of expertise (Administrators, managers, etc..) but what you should ask is how frequent these 'exceptions' are going to be. I was in the 'exact' situation once and before i even went ahead I 'thankfully' took on paper that the exceptions are supposed to be 'rare', and rare defined as 'once a quarter'. To me that looked completely fine, in fact once a month would have been fine too, but that learning came from another profile wherein, 'after' I finished my work at office, I was required to login from home / chat with clients from home. Almost 'Daily' !! And beyond what words could describe, ... that sucked.


Overtime Policy

Before I begin here, the first thing one should understand is that this point isn't about money. It isn't about leaves either. Its just to know how bad its going to be.

Is the company aware of the kind of 'exceptions' and how frequent and what kind of exceptions happen? Only this would ensure that the company has enough resources to handle the volume, that is if they want to. In places, this generally means that one profile was overworked with all the 'exceptions' such as network downtime, disk failures, performance issues on production machines etc. Clarifying this early on, means that someone who confirmed in print, has to abide by it. At least that's one step better than you realizing this 'on-the-job' and then arguing with your reporting manager about how difficult it is and whether bringing in more hands to handle off-the-hour workload is a doable alternative.

Reporting Structure

Just try to be sure about the following questions:
  • Who would you report to? Any Dual-Reportings are generally a mess.
  • Any teams that you need to take care of?
  • Are my team's performance going to directly impact my performance bonus?
    • If so, can I decide what my team is? (Obviously, if you can't decide your team-members, you'd be paying the price of someone else's mess)
  •  

7 Apr 2013

What to ask Employer - Part 3 - New role / team / division


(This is among an n-Part series detailing the pitfalls when selecting an employer, and provides very basic information that you should inquire when joining a company. Click here, to read from the beginning.)

'Is this a new role / team / division?' is a question should invariably figure in all interviews. To different scenarios, the question could mean any (or all) of the following:

New Role

Having a 'New role' in a new company generally means that the work profile for this position isn't already cut out. In most probability this'd mean some frustrating hours for those workaholics, who find it unnerving to 'just browse the net' when on the job. This also means that if you're looking for 'idle' time, the initial few days / weeks might be just that. What this may also mean is that once work starts to trickle in, you're possibly looking at a 'lot' of work. Now that generally happens because new profiles generally mean that all teams that can possibly outsource work to this 'profile' send-it-all-in © as soon as possible. It also may mean possible confusion knowing who to take work from, who to report to (and who all report to you, work-wise or structure-wise).

New Team

New team generally means you're going to be working in a team that hasn't much of history to bank upon. The tools to use, the reporting, the work, the deliverables mostly all are in the air. To put it short, its probably going to be all the issues surrounding a 'New Role' compounded by interaction related confusions.

At times, this also brings in serious confusions about reportees. I've interacted with teams who were completely sure about who their new reporting managers were, but at the same time, they were completely unsure why all this was so. So although 'functionally' you are reporting to a person in the foreign country, you may be officially reporting to someone in your office. Personally, I have no idea what that means, in the sense that although I understand why this is done (essentially avoid a jay-walker in their new-joinee list), but I am not sure if this is the best solution for it.


New Division

Critical 'screw-ups' during a 'New Division' is the rare and therefore the least known about. Most 'New Divisions' don't start with a 'big-bang', however, they still almost always are clue-less about what to do about that 'comma'. What I mean by that metaphor, is that although they know who the migration manager is, without a peer-on-the-next-seat to ask (very) basic questions, there are a thousand tid-bits that they don't know who to ask from. This confused lot sadly under-performs for no fault of theirs. Basically, unless really looked after, a new division is a tough job, even if your domain isn't the main cause of the under-performance. 

What to ask Employer - Part 2 - Company Size



(This is among an n-Part series detailing the pitfalls when selecting an employer, and provides very basic information that you should inquire when joining a company. Click here, to read from the beginning.)

Company Size as a question should invariably figure in all interviews. To different scenarios, the term 'Company Size' could mean any (or all) of the following:

Company Strength

Company strength is the number of people working in the company. You may want to enquire the employee count separately for the local branch as well as the worldwide count. This gives a fairly good idea of how big the company is. 

In most cases, a company with a large head-count, generally has a few basics already in-place:
  •  HR policies
    • Although most companies wouldn't share it for keeps, but you could still ask for the Employee Manual. The existence of an Employee manual generally ensures some basic maturity in the HR policies.
      • Basic work-environment in place
        • Professional dress code
        • Professional conduct (anti-sexual harassment policies etc)
        • Fire / Safety policies enforced
      • Well-defined policies towards
        • Appraisal cycles
        • Joining / Relieving mechanism
        • Leave 
      • Possibly an Insurance setup
        • Health Insurance ?
        • Free Medical checkups?


Company Age

Company age is the years since the company came into existence. This gives a fairly good idea of how long this company existed. There is a general tendency that older companies are considered better purely by way of attrition. Among other advantages of a veteran company, the best point I believe is that if it survived this long, it probably has been through a few bad times and if need be, should be able to weather some more in the future.

On the other hand, new companies often are an enthusiastic lot of people who at-times work towards taking an idea off the ground. At times, owing to any of the hundreds of reasons why businesses fail, it may eventually be unable to have profitable outcomes. This in-turn could cause large-scale layoffs, for no fault of the individual.

Company Expanse

Company Expanse is how far and wide this company has been operating. Small firms or firms with only a very local presence score low here and generally tend to be subject to local influences (otherwise irrespective of the business or technology or domain that the business is in, per say). Since locality is a pain point, unwantingly it is business interest to bow down to local pressures and therefore over-time unable to maintain its own standards.

Company Domains

Company Domain is the area in which the company operates. Owing to different eras, different companies respond to external / internal scenarios by focussing on either a unifocal domain or at times expanding their domain expertise across different verticals. Despite this, it is generally better if a given company has independent profit making verticals. Weathering sudden changes (not in control of the company) is far easier in such scenarios.

Company Maturity

Company Maturity is a rather lose term for ideas that you should be on the lookout for, when joining a company. A mature company (or in case this is a local branch) would have some basic processes in place for key departments for e.g. Accounts, HR, Administration etc. You would be surprised how many companies fail at this basic test that they may not really have an Employee Manual, or, they may not have a Leave Policy, or an appraisal cycle (yes it happens quite often!). In fact, here in India, although working for an MNC is a big deal, I've worked at a place, where an HR executive personally said that ‘there is no Employee Manual, it’s all a word of mouth’!

Anyway, once these are found to be in place, you should look for basic amenities that the company offers. These vary widely across different countries / regions and so a good comparison is probably not just your previous company, but also a well-regarded company in that region. These could include Provident Fund, Periodic fun-events, Joining Kits, Planned Induction process etc. Although these are not a requirement, in most cases, I see their presence as a clear indicator that the company policies have progressed from ‘just grappling with the situation’ to ‘thinking about employee retention’.


Trigger-Points

These are checks that you should sound off in your mind, once you've evaluate a given company for the above characteristics:

Company Age vs Company Strength: If one sees a given company has been in existence for a decade but has only 20 people working on its rolls, some obvious questions arise:
  • Are there peers (of this company) in the industry that have similar characteristics (age / composition / clientele / profit margins) but are an order of magnitude larger? If so, why didn't this company grow as much?
  • If its difficult to find peers in the company's domain area, one needs to justify purely in terms of age. In this case, in ten long years why didn't the company grow larger? Is it a specific aim of the company to have bright highly-paid individuals doing smart work? If not, why is it not larger?
  • Is the company at its helm run by a team with sound professional experience? Did they just happen to be there because of luck, a specific (otherwise rare) skill, family fortunes? What are their backgrounds?

Company Age vs Company Maturity: Similarly, at times, a given company in existence for a while, doesn't have company policies fructified yet. The turmoil many a times is independent of a given work-profile, but it does pay to take into account what happened to cause a delay in getting these basics in place till now. A perfect example is to check whether a decade old company have proper HR policies, employee manual (or best practices that are documented?)

26 Mar 2013

Christian Marriage Registration (Delhi, India)

(Please scroll down to the read the entire-post to know more)



Documents required for Christian Marriage Registration
(a.k.a. Documents required for Solemnization and Registration of Marriages under Indian Christian Marriage Act, 1872)

Workflow to get your Christian Marriage
Registered with the Delhi Government

  • Who: Mr. Kom (Joint Registrar, Christian Marriage Act)
    • He doesn't do Special Marriage Act. etc. He is the *ONLY* person authorized for marriages solemnized in Delhi. One user commented him to be a very down to earth / humble / helpful person, however, as with all Marriage Registrars, he is very particular about Documentation / Process.
  • Where:  ITO, Sales Tax office , 4th floor, A.C.P. office. (Sometimes rooms change, please confirm room at reception first)
    • This address is correct as of ~December 25th 2016. 
  • Fee
    • Rs. 200/- If requesting Registration within 1 month of Marriage
    • Rs. 700/- If requesting Registration after 1 month of Marriage
    • Rs. 1500/- If requesting Tatkal Marriage Registration
  • When: Take an appointment
    • Please read comments (Paul and Mona) below to know the phone number, or you can approach the venue and take an appointment.
  • Documentation: (Carry originals. Recommended to carry a photocopy) 
    • Pastor License
      • Mandatory
    • Pastor Letter (on Church Letterhead)
      • Generally asked if marriage took place outside Delhi
    • Photographs
      • 6-8 Individual Passport size each
      • Joint-photographs of Husband / Wife
      • Marriage Pictures / Wedding Invitation Card if possible
    • Delhi based Identification Proofs (PAN / Aadhaar / etc.)
    • 2 witnesses and two ID proofs (aadhaar / pan) for each witness
      • Collect witness application form from concerned office
    • Affidavit for each Witness (stating they were present at the wedding)
      • Required only if the 2 Witness (required during Marriage Registration) are *not* the same 2 Witnesses that signed in the Church Marriage Certificate
    • Other documents
      • If one (of those getting married) comes from a different religion
        • Carry a Church Baptized Certificate
      • If one is a Foreign National
        • A No-Objection certificate from the Embassy (of the foreign national) in India
      • If one is a Divorcee
        • A copy of divorce papers 


28 Jan 2013

Setup Ubuntu for PostgreSQL Development (from tarball)

This very brief article is a primer for those wanting to start developing on PostgreSQL (on Ubuntu 12.10):

Getting Ubuntu ready for (PostgreSQL related) development

  • sudo apt-get install build-essential
  • sudo apt-get install git
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt-dev
  • sudo apt-get install autotools-dev
  • sudo apt-get install automake
  • sudo apt-get install libreadline-dev
  • sudo apt-get install zlib1g-dev

Get Postgresql source

  • Download: http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.bz2
  • tar -jxf postgresql-9.2.2.tar.bz2
  • ./configure
  • make
  • make install
If you want to know more about hacking on PostgreSQL in general, you could always refer to the (very) detailed PostgreSQL Developer FAQ:
Happy Hacking :) ! 

26 Jan 2013

Questions to ask your future Employer

A roller-coaster ride

I've been working for a decade now and have seriously considered joining a variety of companies... joining some on the way, and politely rejecting a few others. At the very least, its been an enriching experience, and thought it best to write an article that elaborates various 'interesting' scenarios that a person may encounter, when contemplating job-hunting in a developing economy. 

What to ask your Prospective Employer

Over these experiences, I learnt a few things the hard way, and then tried to avoid a few misunderstandings by asking the right questions at the right time. Here are a few of the questions that I'd recommend asking, in the hope that it'll help anyone on the lookout.

The context of these questions are mostly Indian, but if you're smart enough, you should be able to utilize similar ideas / questions for the country of your Prospective Employer:
  1. What is the Company Size?
  2. Is this a new role / team / division?
  3. Generic Questions
    1. Work days: Monday - Friday ?
    2. Work Timings: 9 AM - 6 PM ? Flexi-Hours / Work-From-Home ?
    3. OverTime policy: Compensation towards
      1. Stretch (9+ hours per day)?
      2. Early Start-of-Day?
    4. What would be the reporting structure like?
      1. Who would I report to?
      2. Who would report in, to me?
    5. How much Travel is expected?
    6. Would this profile be as an Employee or on a Retainership basis?
  4. Transition Period
    1. How long is the Probation Period when joining?
    2. How long is the Notice Period?
      1. During Probation
      2. Post confirmation
    3. What are the Relocation benefits?
      1. Financial assistance
      2. Logistical assistance
  5. What is the Leave Policy?
    1. Medical Leave
      1. During Probation Period
      2. After Confirmation
    2. Casual Leave
      1. During Probation Period
      2. After Confirmation
    3. (Any other class of Leaves? Earned Leave etc..) : ?
    4. Is there a concept of Planned / Unplanned leaves?
    5. Is there a concept of Sandwich leaves?
  6. What Employee Benefits do you offer?
    1. What is Company's response to certifications completed during employment?
      1. Process related certifications (for e.g. ITIL etc.)
      2. Domain related certifications (for e.g. Technical certifications etc.)
  7. Growth Prospects:
    1. What is the periodicity of Appraisals?
    2. Country-wide, among all managers, what would be a ball-park percentage of organic growth (promotions)?
    3. What is the periodicity of Performance Reviews (if different from Appraisals)?
      1. Minimum criteria for being considered for Appraisals?
  8. Day-to-day task:
    1. For e.g. Three months from joining, please explain how does my day proceed on a regular day on a work-day Tuesday? 
Most of the items listed are self-explanatory, however, since this is aimed at a prospective new employee, some terminologies would require explanation. Also, at times the reason why a question is important needs explanation. 

In the weeks to come, I would be elaborating all of the points above in detail and updating this article as required.

All the best in making the right decision!