SEARCH KEYWORD -- java

Introduction
Why 37signals Doesn't Hire Programmers Based on Brainteasers and my comment on HN
generated a lot of responses, so much so that I'm writing this post to
properly explain the essence of a good (IMHO) interview programming
problem.
Pascal's Triangle
Pascal's Triangle is a shortcut for getting coefficients most often used binomial probability. The root element is 1. Every other element is the sum of the one or two above it (diagonally left and diagonally right).
There are severa...

IntroductionHash tables are a permutation of associative arrays (i.e. name => value pairs). If you use PHP, then you are very familiar with this type of data structure already since all PHP arrays are associative.The Javascript language implements very loose and somewhat limited support for associative arrays. Any JavaScript array can use other objects as keys, making it a hash, but there exists no formal constructor for initializing them and it is more or less unweildy to work with. A short ...

I read a rather interesting post yesterday called PHP: a fractal of bad design.
It's been getting a lot of traffic among the PHP community lately
because it's rather inflammatory. But to be honest, it does make a lot
of really good points. It also makes a lot of mistakes and misses a
bigger picture.
A Few Mistakes
The post makes quite a few mistakes and odd apples to oranges comparisons. Let me point out the major ones that I saw.
No Debugger - PHP has xdebug which works quite...

In a statically typed language, the compiler knows the data-type of a variable and how to represent that.
In a dynamically-typed language, it has to keep flag describing the
actual type of the value of the variable, and the program has to perform
a data-dependent branch on that value each time it manipulates a
variable. It also has to look up all methods and operators on it.
The knock-on effect of this on branching and data locality is lethal to general purpose runtime performance.
T...

Introduction
Why a re-introduction? Because JavaScript has a reasonable claim to being the world's most misunderstood programming language.
While often derided as a toy, beneath its deceptive simplicity lie some
powerful language features. 2005 saw the launch of a number of
high-profile JavaScript applications, showing that deeper knowledge of
this technology is an important skill for any web developer.
It's useful to start with an idea of the language's history.
JavaScript was created in 1...

One of the joys of programming is that no matter how simple a problem
may seem there are always tons of ways to solve it. It can be good
practice to go back and revisit fundamentals by solving simple problems
with as many implementations as you can think of. In this post we'll
explore approaches to basic iteration in JavaScript.
This style of exercise is a good interviewing technique, too, because
it's open ended and leads to good discussions. The focus isn't a
tricky, wacky problem you're...

Consider this user interface for a car:The goal of these interfaces is to make you operate something, and operate it efficiently and safely. The grooves and clicks and limits constrain the range of motion and the number of choices. The visual look heavily hints at how to actively use it. They are usually not hard to learn. More importantly, the learning curve plateaus. Once you learn how to drive a car, there’s not much progression after that. Boundedness is an im...

My last post
outlined some of the possibilities for integer semantics in programming
languages, and asked which option was correct. This post contains my
answers. Just to be clear: I want practical solutions, but I’m not very
interested by historical issues or backwards compatibility with any
existing language, and particularly not with C and C++.
We’ll start with:
Premise 1: Operations on default integer types return the mathematically correct result or else trap.
This is the same pre...