Fork me on GitHub

Other articles


  1. FizzBuzz

    The Question

    This has become a famous problem across many programming blogs for being notoriously hard to solve, despite being very easy! Supposedly many people fail this problem so don't become discouraged if it's' not obvious to you. Many interviewers give this question as a warm-up expecting it ...

    read more

    View comments.

  2. All About Threads

    What Are They?

    Threads allow your program to "multitask". Imagine you are designing a program that has a GUI (Graphical User Interface) and also accepts user input. The user clicks a button which then tells your program to perform a long running task. In a single-thread programming model, the user ...

    read more

    View comments.

  3. Nested Classes

    What Are They?

    Nested and inner classes are synonomous depending on where you read about them. There are two types of inner classes: static and non-static.

    Non-static inner classes are treated just like a normal member variable in a class and have full access to other member variables and methods ...

    read more

    View comments.

  4. Callbacks Explained

    What Is A Callback?

    Callbacks are very common in event-driven code, or executing code based on some sort of event. This includes user interaction with a GUI, network requests, and even parsers.

    A callback is a piece of executable code that is sent as an argument to other code, which ...

    read more

    View comments.

  5. Separating Negatives, Positives, and Zeroes

    The question

    Given an array of integers, return an array that is formatted as such: Negatives / Zeroes / Positives

    The numbers in each section do not need to be sorted.

    A naive approach

    A slow approach would be to loop through the input array three times, once for each category. The ...

    read more

    View comments.

  6. Create a Queue With Stacks

    What is a queue?

    If you have forgotten, a queue is a data structure that handles objects on a FIFO (first in, first out) basis. The first element added will also be the first element removed. Think of it like a queue for checking out at a store. The person ...

    read more

    View comments.

  7. The Abstract Keyword

    This is a long tutorial so you may have to read everything through a couple times. :)

    What is an abstract class or method?

    A class that is abstract is one that cannot be instantiated, only subclassed, which means that trying to create an object for an abstract class will generate ...

    read more

    View comments.

  8. The Basics of Encapsulation

    Encapsulation

    Encapsulation is a key concept to learn because it helps maintain separation for different sections of your code. Having code protected from other code can be very useful for debugging your program. It also aids in readability where another programmer can quickly figure out how to interact with your ...

    read more

    View comments.

  9. The Ternary Operator

    Writing Cleaner Code

    As a programmer, you should strive to write the cleanest code possible. Any number of people may need to read through your code at some point, and spending just a little time to make things a bit neater can be extremely valuable. One trick I like to ...

    read more

    View comments.

Page 1 / 2 »

social