Interview questions for Web developer position

  1. What’s the difference between primary key and unique key?
  2. The Perl script on the site is working slow. What’s your plan of attack?
  3. Name several reasons why a Web site would not work entirely.
  4. Write an SQL statement that would select only the customers who made multiple orders within a single week.
  5. What version control systems do you use?
  6. How do you configure the maximum number of processes in Apache?
  7. How much memory do you need for Web server app? Describe your logic of calculating this number.
  8. What are response codes 302 and 303?
  9. How do you delete all files with file extension temp recursively on a Linux box?
  10. What Perl tools do you use for coding, testing, debugging?
  11. Do you use DHTML and JavaScript? Describe the projects you’ve used them in.
This entry was posted in Unix/Linux, Web dev. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

18 Comments on Interview questions for Web developer position

  1. S.Swaminathan
    Posted 6/28/2005 at 3:23 am | Permalink

    Both Primary & Unique keys are Indexes.

    Index:

    An index is a structure in a table that orders the data. It allows the database to access data quickly (In MySQL its implemented using B-tree algorithms).

    Primary Key:

    This is an index that cannot be NULL, Primary Keys are used in building relationships between tables in a database. (an index is automatically created on the primary key). The difference between primary and ordinary keys is that there can be multiple keys, but only one primary key.

    Unique Key:
    Unique and Index are same, the difference is, in Unique, duplicate are not allowed in any circumstances and that is enforced by database server. Primary key(s) qualify to be Unique on basis
    of their uniqueness.

    In case, your table has 2 primary keys means that the 2 fields together form one unique key. Each field by itself may have repeating values, but both primary keys combined together must be unique.

  2. kamlesh
    Posted 8/26/2005 at 3:34 pm | Permalink

    Unique Key means it allows distinct values or scaler values. It dosen’ allow duplicate values. It allows enfinite number of NULL value.
    Primary Key is the combination of unique key an not NUll. It doesn’t allow NULL & duplicate value. Maximum no. of composite primary key is 32 column.

    Kamlesh

  3. Posted 11/4/2005 at 9:36 am | Permalink

    Q 6. How do you configure the maximum number of processes in Apache?

    This arrangement uses more advanced mod_rewrite features to get the translation from virtual host to document root from a separate configuration file. This provides more flexibility but requires more complicated configuration.

    The vhost.map file contains something like this:

    http://www.customer-1.com /www/customers/1
    http://www.customer-2.com /www/customers/2
    # …
    http://www.customer-N.com /www/customers/N

    The http.conf contains this:

    RewriteEngine on

    RewriteMap lowercase int:tolower

    # define the map file
    RewriteMap vhost txt:/www/conf/vhost.map

    # deal with aliases as above
    RewriteCond %{REQUEST_URI} !^/icons/
    RewriteCond %{REQUEST_URI} !^/cgi-bin/
    RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
    # this does the file-based remap
    RewriteCond ${vhost:%1} ^(/.*)$
    RewriteRule ^/(.*)$ %1/docs/$1

    RewriteCond %{REQUEST_URI} ^/cgi-bin/
    RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
    RewriteCond ${vhost:%1} ^(/.*)$
    RewriteRule ^/(.*)$ %1/cgi-bin/$1 [T=application/x-httpd-cgi]

  4. Alex
    Posted 11/4/2005 at 9:41 am | Permalink

    Quest. 6
    The MinSpareServers directive sets the desired minimum number of idle child server processes. An idle process is one which is not handling a request. If there are fewer than MinSpareServers idle, then the parent process creates new children at a maximum rate of 1 per second.

    Tuning of this parameter should only be necessary on very busy sites. Setting this parameter to a large number is almost always a bad idea.

    http://httpd.apache.org/docs/2.0/mod/prefork.html#minspareservers

  5. daman
    Posted 11/4/2005 at 9:45 am | Permalink

    Q 6.

    The MaxSpareServers directive sets the desired maximum number of idle child server processes. An idle process is one which is not handling a request. If there are more than MaxSpareServers idle, then the parent process will kill off the excess processes.

    Tuning of this parameter should only be necessary on very busy sites. Setting this parameter to a large number is almost always a bad idea. If you are trying to set the value lower than MinSpareServers, Apache will automatically adjust it to MinSpareServers + 1.

    http://httpd.apache.org/docs/2.0/mod/prefork.html#maxspareservers

  6. daman
    Posted 11/4/2005 at 10:09 am | Permalink
  7. vishal
    Posted 11/13/2005 at 11:37 pm | Permalink

    what is difference between ereg and eregi?

  8. Posted 11/21/2005 at 4:58 am | Permalink

    primary key is both unique key and not null.

  9. kamlesh
    Posted 1/2/2006 at 5:49 am | Permalink

    what are the types of stored procedure? describe its kinds.

  10. Posted 4/13/2006 at 5:11 pm | Permalink

    MaxClients directive.
    The default value (256) can be redefined at compile time - HARD_SERVER_LIMIT

  11. Posted 8/15/2006 at 1:01 pm | Permalink

    Quest 4
    Write an SQL statement that would select only the customers who made multiple orders within a single week.

    SELECT * FROM tblorders WHERE DATE_SUB( CURDATE( ) , INTERVAL 7 DAY ) 1

    Would be glad if any corrects me if i m wrong

  12. Posted 8/15/2006 at 1:04 pm | Permalink

    Quest 4
    Write an SQL statement that would select only the customers who made multiple orders within a single week.

    SELECT * FROM tblorders WHERE DATE_SUB( CURDATE( ) , INTERVAL 30 DAY ) 1

    Would be glad if any corrects me if i m wrong

  13. Nick
    Posted 4/21/2007 at 9:31 pm | Permalink

    Paul: I think you may have missed part of the question. It asks for only the customers who have placed *multiple* orders during the *week* (I do not think that your query handles the multiple orders part of the question, and you mentioned 30 days instead of 1 week):

    Here is my solution:

    SELECT COUNT(`customer_id`) AS `frequency`, `customer_id` FROM `tblorders` WHERE `date` >= DATE_SUB(NOW(), INTERVAL 1 WEEKS) GROUP BY `customer_id` HAVING `frequency` > 1

  14. Nick
    Posted 4/21/2007 at 9:41 pm | Permalink

    Question 9:

    rm -r *.temp

    Is it that simple, or am I missing part of the question?

  15. Natalia
    Posted 5/4/2007 at 1:28 pm | Permalink

    >Question 9:

    >rm -r *.temp

    I don’t think it is correct answer (see explanation below), I propose the following :
    find / type f -name “*.temp” -exec rm -rf {} \;

    Nick, I think your answer is not what is required. As I understand, you need to remove all *.temp files in any hierachy of the system. What you do by the command, you just remove all *.temp files and dirs in the current directory. If for example there is a file /a/b/c/kuku.temp - your command will not remove it.

  16. Lenny
    Posted 7/3/2007 at 11:27 am | Permalink

    #9
    from /
    rm -rfR *.temp

  17. Gagan Aneja
    Posted 8/6/2007 at 2:07 am | Permalink

    I think natalia has the correct answer which is
    find / type f -name “*.temp” -exec rm -rf {} \;

    This command will basically find all the files ending with .temp extension and exec a remove command.

    More Detail.
    -rm, short for remove
    -r, which removes directories, removing the contents recursively beforehand
    -f, which ignores non-existent files and overrides any confirmation prompts (”force”)

  18. Posted 1/12/2009 at 7:48 pm | Permalink

    Hi my name is Casey & I was hoping if I could please have a moment of your time as I am seeking a career within the web design/developing field and want to know if I could request to gather some information from you pertaining to the profession. Thank you in advance for any information that you are able to provide. I have a list of questions that are prepared below.

    1) Name of the source for the information
    1. Name of contact
    2. Place of Employment

    2) Education Required
    1.What is the minimum education required to obtain this job?
    2. Do you recommend any specific schools or courses?
    3. Where did you get your training?

    3) Skills/Qualifications Required
    1. What are the skills necessary to be successful in this Job?
    (how can I get these skills? i.e. training, volunteer work, testing?)
    2. Do you need to become a member of a specific group, association or union to work in this job?
    3. Do you need specific current licences, tickets or certifications to get this job?
    (i.e. drivers licence.)
    4. Do you need to be able to provide clear and valid pre-requisite records?
    (i.e. criminal record, driver’s abstract.)

    4) Experience & Background Required
    1.Do you require experience to obtain this job? If so, how much?
    2. Where would you recommend getting this type of experience if just coming out of a training program>
    3 What background do most people entering this occupation have?

    5) Working Conditions
    1. Where is the typical place of work for people in this occupation?
    2. What are the pros/cons of your job?
    3. What do you really enjoy about your position?

    6) Work Schedule
    1. What is the typical hours of work for this job?; # of hours/week?
    2. Is there shift worked involved?
    3. What days of the week do you work?
    4. Are there seasonal contracts involved?
    Day hours ___ Weekend hours ___ Shift work ___ Seasonal ___
    Permanent full time ___ Perm. Part time ___ Contractual ___ Temporary ___

    7) Wage/Salary Range
    1. What is the usual starting wage for this job?
    2. What is the usual peak wage for this job?
    Annual salary ___ Hourly wage ___ Commission work ___ Mileage___

    8) Future Outlook & Current Trends
    1. In your opinion, what is the future outlook like for this occupation?
    2. Do you feel there are currently jobs available in this area? Why?
    3. Are there new developments influencing the jobs available?
    4. Would you recommend I enter this field, considering the local need?
    Trends influencing job availability:

    9) Other Information
    1. Do you anticipate hiring persons with these skills? When? Number and frequency of job vacancies?
    2. Can I bring my resume for placement during training or after training?
    3. Who else would you recommend I speak with?

    Hiring certified persons? Yes ___ No ___

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*