an obj ref = a remote control

each rcontrol is programmed to a target.
u can program your rcontrol to an Animal, or a Mammal, or a Dog, or erase all programming.

When your rcontrol is programmed for an Animal, bark() method is not available — the “bark” button is in a detachable extension and removed from the rcontrol. You need to cast.

Q: objects are passed by…?
A: well, u duplicate the rcontrol. A method receiving an arg need to duplicate the rcontrol and can’t reprogram the original rcontrol

Q: FINAL var (of a ref type) means?
A: non-reprogramable

interviewers’ favorite topics (2007

See also “halo”.
xp: These areas have received disproportional attention from interviewers. ranked.

* threading
* collections
Study iterator, comparator, hashCode()
Study load factor and capacity — asked by multiple financial giants

* outer join@@ not much depth
study join order, subquery

* interface, abstract@@ not much depth
* GC including finalize()
study generational GC, mem leak and jvm profilers

* deadlock
* servlet life cycle
* singleton, mvc, dao,
* vector ^ arraylist, or hashtable^hashmap
* list 1.5 features

roti [[oracle sql tun`]]

cost-based optimizer vs rule-based optimizer
optimizer modes — choose, rule, first_rows, all_rows
diminishing return, most significant queries to target
4 areas of ora tuning — instance, norm/denorm(with triggers), OS, SQL
self-join examples
oracle implementations of joining, in relation with subqueries
function-based index
what can disable an index
optimizer hints
sql cache
hash storage for often-joined tables
essential table-access methods
essential index-access methods
reading execution plans

java ServerSocket.accept()

I think this should be one of the first important yet tricky socket methods to study and /internalize/. Memorize it’s extended signature and you will understand how it relates to other things.

See P221 [[ java threads ]].

A real server jvm always creates and uses 2 *types* of sockets — a single well-known listening socket, which on demand creates a “private socket” (aka data socket) for each incoming client request.

The new socket manufactured by accept() has the remote address:port set to the client’s address:port and is already connected to it.

I think the new socket initiates the connection, therefore this socket is considered a “socket” and not a ServerSocket. Nothing found online to confirm this.

NY iview — meetup

q: with and without sub queries, write sql to show employees not assigned any project, given employee (id, name), employee_project (eid, pid)
%%A: outer join with count() = 0 ? Yes see post on payment history contains actors not casted

select count(name) from actor left outer join casting on where casting.actorid is null

Based on IBM webpage: “The following query returns only rows in which customers have not made any calls

SELECT c.customer_num, c.lname,,, u.call_dtime, u.call_descr
FROM customer c LEFT OUTER JOIN cust_calls u
ON c.customer_num = u.customer_num
WHERE u.customer_num IS NULL “

This is a case of a normal “unmatched prikey”. No referential integrity violation.

q: xp with mysql replication? (programmers need to know mysql replication.)

q: describe an xq java web project

q: difference btw spring mvc vs struts

q: java 5 features? generic, enum

q: describe a personal pet project (“side project”)

q: why do u say smarty is cleaner separation of presentation and logic than jsp or asp?

q: name a technology that excites u now and name one feature

q: php caching

q: php connection pool

q: unit testing?

q: ajax xp?

q: web services xp?

q: state sync between 2 instances of php?

%%q: important technical skills for this job
a: mysql cluster, fast sql queries, core java, junit,

hurix IV – web java + JMS

q: can an interface define member variables?
q: spring: how do u configure a spring mvc system?
q: struts: did u use validator, struts tags or tiles? How do u configure your struts app to use tiles?
q: if an abstract class defines a constructor, does the derived class constructor need to make an explicit call to it?
q: how does a web app in 1.war forward to a web app in 2.war? Is requestDispatcher used across web apps?
q: what’s the significance of hash value of an object
q: how do u implement a customized hash value based on the data encapsulated?
q: how do u make an arrayList of person objects sortable by birth date? How Can I sort this ArrayList?
q: what’s the traditional solution to the problem enum is designed to solve?
q: from the definition of home and remote interface, can u tell the difference between a slsb and a sfsb?
q: for a mdb, which method must u write? which interface/base-class is it part of?
q: if a jms requester sends requests about person 1, 2 and 3 to a queue, and need the server to reply on the same person 1, 2 and 3, how does JMS support it? (I think the reply must specify “this is for Person X”)

feel good despite insensitivity ]office

) Not a moral issue, even when you hurt someone’s feelings.
) xp: less of a problem in a cross-cultural team. Look at 2006 and later
) Hopefully Americans are more direct
) much less insensitive in writing.
) saving grace — pure heart, fairness, equality, integrity
) saving grace — am sensitive to most essential needs of a corporate worker, universal themes, well-understood
) habit @ reflection, which has caught countless “mismatched” and lost signals between colleagues and me
) constantly learning and paying conscious attention to this area
) This is one of the areas I’m likely to get better, not worse. Once you trip over a stumbling block, you will spot it next time.

java ServerSocket HAS-A queue

Default queue of 50 waiting “patrons” to our restaurant. If a patron arrives when the queue is full, the connection is refused.

Each “successful” patron would be allocated a dining table ie an address:port on the server-side.

The operating system stores incoming connection requests addressed to a particular port in a first-in, first-out queue. The default length of the queue is normally 50, though this can vary from operating system to operating system. Some operating systems (though not Solaris) have a maximum queue length, typically five. On these systems, the queue length will be the largest possible value less than or equal to 50. After the queue fills to capacity with unprocessed connections, the host refuses additional connections on that port until slots in the queue open up. Many (though not all) clients will try to make a connection multiple times if their initial attempt is refused. Managing incoming connections and the queue is a service provided by the operating system; your program does not need to worry about it. Several ServerSocket constructors allow you to change the length of the queue if its default length isn’t large enough; however, you won’t be able to increase the queue beyond the maximum size that the operating system supports.