Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Interview questions

Name: Anonymous 2007-09-07 9:47 ID:uaFBb2M3

Hey /prog/, this is one of the tests I give in job interviews to check for bullshitting. Too easy, too difficult? What do you think?


SQL
 
You have a table named orders with a structure described by the following statement:
 
create table orders
(
    order_number         varchar(12)  primary key,
    date_required        datetime,
    status               int not null
)

 
1. Write a query which lists all order_numbers where the status is less than 6 and the year of date_required is 2004. Have the list sorted by order_number in ascending order.
 
2. Write a query that returns the number of orders which have a status of 8.
 

There are two tables, structure as follows:
 
create table machines
(
    machine_id          varchar(5)  primary key
        check (machine_id like '[a-z][a-z][a-z][0-9][0-9]'),
    location            varchar(4),
    current_job_id      int
)

 
create table jobs
(
    job_id              int  primary key,
    partnumber          varchar(20),
    quantity            int,
    quantity_completed  int
)

 
Each row in the machines table represents a machine in the factory. Each machine has an ID number with three letters and two numbers. The location column is a four letter code representing different places in the factory. The current_job_id indicates what job the machine is currently running.
 
The jobs table is a list of these jobs. The item that is being made on that job is indicated by the partnumber column. The quantity and quantity_completed fields are how much needs to be made on that job, and how much has been made so far.
 
3. Write an SQL query that lists all machines located in location 'TOOL'
 
4. Write a query which returns all fully completed jobs for partnumbers beginning with 'H'.
 
5. Write another query that returns all machines that are running jobs for the partnumber 'P15/125'.
 

Visual Basic
 
Here is a template for a function that returns the number of occurrences of the character C in the string S:
 
Public Function CharacterCount(S as String, C as String) As Integer
  ...
End Function

 
Some examples of its use:
 
CharacterCount("eggs","e") returns 1
CharacterCount("oranges and lemons"," ") returns 2
CharacterCount("TESTING","t") returns 0
 
6. Write the body of this function, using any method you'd like.

Name: Anonymous 2007-09-07 9:51 ID:49bDGqeg

Needs more Java

Name: Anonymous 2007-09-07 9:52 ID:Heaven

ENTERPRISE

Name: Anonymous 2007-09-07 10:02 ID:Heaven

>>1
I have completely no fucking idea about SQL (since i don't know SQL anyway) but VB is ridiculously easy.
Seriously.

(in C)

size_t youregay(const char *fuck, int c) {
    size_t ret = 0;
    while(*fuck != 0)
        if(*fuck++ == c) ++ret;
    return ret;
}

as you see, it's only 4 lines of code.
5 lines in C means the task is ultra simple
(could be hacked to 2 lines)

for(size_t ret = 0; *fuck; ret += *fuck++ == c);
return ret;

i mean, seriously.

Name: Anonymous 2007-09-07 10:27 ID:Heaven

Nobody uses SQL anymore. You should ask some questions about XML and scalable ENTERPRISE solutions.

Name: Anonymous 2007-09-07 10:35 ID:Heaven

I'd need Google to find out how to extract the year from a datetime and such.

And all VB programmers are 'bullshitting', so there's no point in that part of the test.

Name: Anonymous 2007-09-07 10:43 ID:Heaven

>>6
YEAR(date_required)

Name: Anonymous 2007-09-07 10:55 ID:3aZhj6Pt

1. (sort . map order_number . filter ((== 2004) . date_required) . filter ((< 6) . status)) orders

Name: Anonymous 2007-09-07 10:55 ID:r4gGgXpQ

FizzBuzz should be enough for detecting bullshitting. This test is too time-consuming for large groups of candidates and still too easy to let some serious asshatters through.

>>4
for(size_t ret = 0; *fuck; ret += *fuck++ == c);
return ret;

That particular interview would end with a brief ``GTFO''.

Name: Anonymous 2007-09-07 11:13 ID:uaFBb2M3

>>9
Last time I used it was to interview just five computer science graduates who all claimed to know VB and SQL. Only one of them answered the VB question correctly. She got most of the SQL ones right too. (However, we unfortunately didn't hire her because of work permit complications.)

As for the others, one of them could just about answer it in Java, and three didn't have any idea at all - couldn't even describe an algorithm. And none managed the SQL past the first question. Useless fuckers.

Name: Anonymous 2007-09-07 11:20 ID:r4gGgXpQ

>>10
``Computer science graduates''? Which ``college'' they went to?

I wouldn't care much about them not knowing VB. Picking up such a basic (no pun indended) language would take about two days for a decent programmer (though apparently the javafag wasn't that great).

Name: Anonymous 2007-09-07 11:30 ID:uaFBb2M3

>>11
This one: http://www.sunderland.ac.uk/

They all listed proficiency at VB and SQL on their CVs, so I expected them to be able to answer most of the questions.

Ok, most of them bullshitted about those particular skills - but the fact that they couldn't even describe a general algorithm for such a simple problem was the real shocker.

Also, after fucking up the test and being told the interview was over, one guy insisted on bringing out a laptop he'd brought with him and showing me that he could paint forms in Visual Studio, and make a message box say HELLO. I lol'd.

Name: Anonymous 2007-09-07 11:57 ID:zscjbnFu

Way too easy, but then I don't know what kind of EXPERT FAGGOTS might apply for your jobs.

Name: Anonymous 2007-09-07 11:58 ID:zscjbnFu

>>13
Oh lawd, I fail.

Name: Anonymous 2007-09-07 11:59 ID:Heaven

>>9
so you don't like good code? i feel sorry for ya.
infact, it's not pure C

pure C would be

size_t ret;
for(ret = 0; *fuck; ret += *fuck++ == c)
    ;
return ret;


infact, im tired of all ye wankers, i wouldn't work for a shitfuck that hands me over such `test' to `check' me.
I'd just laught at him and tell him to look for some CS major twat, not EXPERT PROGRAMMERS like myself

you fucking cunts

Name: Anonymous 2007-09-07 12:01 ID:bwdi6nja

1. select order_number from orders where status < 6 and year(date_required) = 2004 order by order_number
2. select count(*) from orders where status = 8
3. select * from machines where location = 'TOOL'
4. select * from jobs where partnumber like 'H%' and quantity = quantity_completed
5. select m.* from machines m join jobs j on m.current_job_id = j.job_id where j.partnumber = 'P15/125'
6. Public Function CharacterCount(S as String, C as String) As Integer
     For n = 1 to Len(S)
       If Mid(S, n, 1) = C Then
         CharacterCount = CharacterCount + 1
       End If
     Next
   End Function


JOB PLZ

Name: Anonymous 2007-09-07 12:03 ID:Heaven

>>15
lol, enjoy your unemployment

Name: Anonymous 2007-09-07 12:06 ID:Heaven

>>15
YOU LOSE!! YOU GET NOTHING!!

Name: Anonymous 2007-09-07 13:30 ID:O0uavPGW

Why the fuck is "order_number" defined as a varchar type? You've got a column name that says one thing and a type that says the other.

Also, varchar primary keys. WHAT. THE. FUCK.

Name: Anonymous 2007-09-07 13:34 ID:T0ADVJHe

>>19

Welcome to the world of enterprise scalable turnkey synergy

Name: Anonymous 2007-09-07 13:44 ID:dndMa7nI

>>10
Why don't you make it more language agnostic?

Most EXPERT PROGRAMMERS probably don't know VB but can learn easily and quickly. You are shooting yourself in the foot if you test applicants for VB experience -- only the true morons and DeVry graduates will come in with knowledge of how to program in VB.

Give them fizzbuzz and let them do it in whatever language they want. Make them step through designing an algorithm to solve some problem.

Fuck, I got hired on to my current job with absolutely no Java experience... I was able to convince them I'm a quick study. Don't advertise you want VB programmers or the morons will come out of the woodwork.

Name: Anonymous 2007-09-07 14:01 ID:Heaven

>>21
That's actually some pretty sound advice. Some blawger said a while ago something like: ``If you need a team of good Java programmers, ask for Smalltalk programmers.'' That actually makes sense: everyone `knows' Java, but when you meet someone who has used Smalltalk, you can be pretty sure that he really understands OOP, and the rest is just dragging him to the level of mental retardation necessary to write Java.

Name: Anonymous 2007-09-07 14:18 ID:uaFBb2M3

>>19
Common usage dictates that it's quite common for an "Order Number" to contain more than just numbers, just look at any random selection of invoices and delivery notes. Perhaps I should have called it order_code or something. But I was writing the test to determine their knowledge of basic SQL, not how needlessly pedantic they are on English usage.

And what's wrong with varchar primary keys? If it's the column that uniquely identifies a row, then of course I'm going to make it the primary key.

Name: Anonymous 2007-09-07 14:22 ID:bwdi6nja

>>19
lol, EXPERT ACCESS PROGRAMMER

Name: Anonymous 2007-09-07 14:38 ID:dndMa7nI

>>22
Yep. I have friends who "know" Java -- enough to perform whatever shitty tasks got them through their "CS classes"

If you are forced to use the lowest denominator, don't advertise it.

Name: Anonymous 2007-09-07 16:48 ID:saQl9h+Y

My friends who "know" Java actually know this: they have a vague idea of class and method names somewhat related to what they want to do, so they Google for them and copypasta it into their code. Occassionally, they write some "glue" (enterprise fap-word) which consists of some kind of Java java = new Java() type things.

Name: Anonymous 2007-09-07 16:51 ID:Heaven

>>26
That's why it's vitally important to administer tests like >>1, to weed out the EXPERT COPYPASTAFAGS

Name: Anonymous 2007-09-07 16:53 ID:E+hACWEt

>>19
General rule of thumb: "If you're not going to do math with it, make it a string/character/etc..."

Name: Anonymous 2007-09-07 17:57 ID:R/O7USTu

>>28
What? Do you even know what a primary key is?

Name: Anonymous 2007-09-07 19:12 ID:saQl9h+Y

>>19
Why the fuck is "order_number" defined as a varchar type?
"Web designer" programming there

Name: Anonymous 2007-09-07 23:18 ID:xzcB44I2

1.
select
  order_number
from
  orders
where
  status < 6
  and year(date_required) = 2004
order by order_number asc;

2.
select
  count(order_number)
from
  orders
where
  status = 8;

3.
select
  machine_id
from
  machines
where
  location = 'TOOL';

4.
select
  job_id
from
  jobs
where
  quantity_completed = quantity
  and partnumber like 'H%';

5.
select
  m.machine_id
from
  machine m,
  jobs j
where
  j.partnumber = 'P15/125'
  and j.quantity_completed = j.quantity;

6.
Public Function CharacterCount(S as String, C as String) as Integer
  Dim current_count as Integer
  current_count = 0

  Dim position as Integer
  For position = 0 to Len(S) - 1
    If Mid(S, position, 1) = C Then
      current_count = current_count + 1
    End If
  Next position

  CharacterCount = current_count
End Function


The reason the SQL is all split up like that is because back when I was writing some apps that used SQL, I found it was a lot easier to add columns, tables and conditions if they were all on separate lines.

And I haven't touched VB in years. I'm assuming Option Explicit because coding without it is a friggin' nightmare.

Name: Anonymous 2007-09-08 8:32 ID:Heaven

>>31
You only very slightly failed, and therefore passed the test.

5 - didn't specify the join condition between machines and jobs
6 - mid() function position parameter is offset from 1

Name: Anonymous 2009-09-17 15:18

Lain.

Name: Anonymous 2009-09-17 20:58

Lain.

Name: Anonymous 2009-09-17 20:58

Lain.

Name: Anonymous 2009-09-17 20:59

Lain.

Name: Anonymous 2009-09-17 20:59

Lain.

Name: Anonymous 2009-09-17 21:00

Lain.

Name: Anonymous 2009-09-17 21:01

Lain.

Name: Anonymous 2009-09-17 21:01

Lain.

Name: Anonymous 2009-09-17 21:02

Lain.

Name: Anonymous 2009-09-17 21:02

Lain.

Name: Anonymous 2009-09-17 21:03

Lain.

Name: Anonymous 2010-12-17 1:33

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2010-12-23 5:48

Name: Anonymous 2011-02-03 8:32


Don't change these.
Name: Email:
Entire Thread Thread List