cs101

What are Early and Late Binding?

In the spirit of asking the questions that need to be asked . . . what is the difference between early and late binding? ...

Exception thrown inside catch block - will it be caught again?

This may seem like a programming 101 question and I had thought I knew the answer but now find myself needing to double check. In this piece of code below, will the exception thrown in the first catch block then be caught by the general Exception catch block below? try { // Do something } catch(IOException e) { throw new Application...

Base-2 (Binary) Representation Using Python

Building on How Do You Express Binary Literals in Python, I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form. This is the best I came up with, but I'd like to replace it with a better algorithm, or at least one that should have screaming-fast performance. def num_bi...