2011 Wells Fargo IV

Q: from vi, how do you import output from a command?
A: cmd | vi –

Q: what thread libraries did you use?
%A: the java thread uses different thread libs on Win32, Linux or Solaris; boost threads; perl thread; pthreads

Q: how do you create a socket in java or c?

%A: syscall socket() returns (ptr??) to the new (yes!) socket object? Wrong!!!!! A socket file _descriptor_ is returned.

Q: const ptr vs a reference?
A: you can cast away the constness
A: dynamic_cast the reference either succeeds or triggers exception

Q: 100,000,000-row table. efficiently select first 5 rows?
%A: cursor or resultSet processing minimizes disk I/O
%A: order-by is often bad as it must read all rows from disk before finding the first 5. Exception: if you order by (“front portion” of) an
index then you only read a small part of the index tree and only the data pages holding those 5 rows
%A if table is a heap, then no order-by can help.
A: set row count

Q: how do you find out number of processors in Unix?
%A: top, psrinfo, startup messages. Perhaps uptime

Q: if an off-the-run bond is lightly traded, how do you know if you have missed some update?
%%A: I just hope the exchange has a refresh/snapshot channel to send periodic snapshots
%%A: some exchanges may have a query service to request per-symbol snapshots.
%%A: we monitor all sequence number gaps

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s