10 Proven C++ Interview Questions

C++ Interview Questions

Introduction

We all know how hard it is to find good programmers to hire.

This is doubly true in the case of C++ programmers, for one simple reason:

The age, scope and complexity of the C++ language make it one of the hardest mainstream programming languages to learn. Thus, it takes a significant amount of C++ knowledge and experience to even be able to assess the expertise of candidate on interview. This is why it’s helpful to have a canned set of interview questions to turn to.

If you are hiring developers you might ask the questions below on real-life interview. Also we suggest to use our C++ test as pre-interview step. This way you can save a lot of time by avoiding incompetent programmers.

The article has unusual format. C++ programming interview questions have been wrapped into two interview stories.

C++ Interview Story #1

My first interview candidate today is Rami. Rami started out as a Java programmer working for a major bank, but taught himself C++ in order to get a job in the game industry.
Continue reading…

Ruby on Rails Tutorial (Simple Forum Example)

anonyforum

One of Ruby on Rails’ main appeals is its plethora of helpers that allow for easy app development. You can build an entire (albeit simplistic) CRUD app with only a few lines of generator code! But understanding how Rails is configured will help you become much a much more proficient developer. In this tutorial, we’ll examine how to the different parts of a Rails applications work together by building a simple anonymous forum with minimal use of generators. We’ll assume that you have a basic understanding of Ruby, and some minimal SQL knowledge.

The code can be found here.

Rails uses a software design paradigm called “convention over configuration”, which simply means that it prefers to do things a certain standardized way. How this plays out in its model-view-controller (MVC) implementation will become more clear as we build out the app.

To begin, let’s instantiate an application. Instructions on how to do so can be found here. Let’s call it anony-forum.

Continue reading…

OAuth2 JavaScript Tutorial

When building modern and socially-aware web applications, the related problems of user authorization and authentication arise repeatedly. The rich API ecosystem offered by the Web to developers is to some extent complicated by questions of security: How do we make sure our users are who they say they are? How do we ensure they have authority to access a particular resource, like a profile or a photo album?

OAuth2 is an authorization protocol that solves these problems, enabling secure access to third-party APIs (like Google Maps’ or Twitter’s) in your own applications. This tutorial discusses the use of OAuth2 in a small example application that will make use of a Google+ API.

The Running Example

Throughout this tutorial we will be referring to a tiny demo application called “Logonoff”. The only things we can do with it are log in, look at some data, and log out, and it looks like this:

logonoff
The application makes use of a JavaScript library called hello.js that presents a unified API for interacting with a number of OAuth providers, such as Google, Facebook, Twitter, Github, and more. We chose to use hello.js because it is popular, versatile, and simple.

If you want to run Logonoff on your system, you can download the code and follow the instructions on Github.
Continue reading…

Angular 2 Tutorial – Simple “Hello World” App Example

Angular 2 reached release candidate status a couple of weeks ago. As Angular 2 is making its way to a final release, now is a good time to take a look at the framework, what it does and what the main differences with Angular 1 are. In this tutorial, we will go through different examples and build a small sample traffic light application using Angular 2 to illustrate some of those new concepts. Let’s get started with components.

Recording #1

Continue reading…

Python & MongoDB Tutorial (Pymongo, Mongokat)

Interacting with MongoDB in your Python projects can be a pleasantly straightforward process if you have the right tools. In this tutorial we will learn how to simplify our MongoDB database operations by using the Object Document Mapper (ODM) package called mongokat. We will also make light use the officially supported MongoDB Python API called pymongo.

bkmkr: An Example Bookmarking App

bkmkr

Continue reading…

ElasticSearch Tutorial: Creating an Index and Querying

Elasticsearch is a highly-scalable document storage engine that specializes in search. Elasticsearch comes with reasonable default settings, but it will also easily scale to being able to search hundreds of millions of documents with sub-second latency. As you’ll see in this tutorial, the JSON-based nature of Elasticsearch, along with its simple REST API, make it easy to learn.

Installation

Elasticsearch is written in Java, so it should work on any operating system that can run Java. If you don’t have Java installed on your machine already, click here to download and install it. We’re going to do this tutorial with version 2.3.1 of Elasticsearch.

Elasticsearch is really simple to get up and running – you can have a one-node cluster running in just a few minutes with the following steps:

  1. Download and unzip Elasticsearch 2.3.1 found here.
  2. Navigate to the directory you unzipped it to, and run bin/elasticsearch if you are using Linux or OS X or bin/elasticsearch.bat if you are using Windows.
  3. In your browser, navigate to http://localhost:9200/, you should see a page that looks something like this:

elastic-ss-1

Continue reading…

Using AJAX in a Ruby on Rails App

AJAX is an important part of many Rails applications. It allows for making client-side changes without the need to reload the page. In this tutorial, you’ll see a very simple example of how to send a JavaScript response from the server and some of the more interesting things that can be done.

For this tutorial, we’ll be using AJAX to toggle between showing and hiding a menu of download options, which prevents them from cluttering up your screen when they aren’t needed. To get the code on GitHub, click here.

AJAX Demo V4.5

First, let’s outline what the mini app should do.

  • The home page needs to have a Show Options button which when clicked to reveal the download options.
  • With the download options revealed we should see:
    • Options for downloading data, a sample, or a demo.
    • A button to hide the download options.
  • Clicking the Hide Options button should return things back to how they were.

Continue reading…

Python Celery & RabbitMQ Tutorial

Celery is an asynchronous task queue. It can be used for anything that needs to be run asynchronously. For example, background computation of expensive queries. RabbitMQ is a message broker widely used with Celery. In this tutorial, we are going to have an introduction to basic concepts of Celery with RabbitMQ and then set up Celery for a small demo project. At the end of this tutorial, you will be able to setup a Celery web console monitoring your tasks.

celery-flower

Basic Concepts

Let’s use the below graphic to explain the foundations:celery_architecture_final

Broker

The Broker (RabbitMQ) is responsible for the creation of task queues, dispatching tasks to task queues according to some routing rules, and then delivering tasks from task queues to workers.

Consumer (Celery Workers)

The Consumer is the one or multiple Celery workers executing the tasks. You could start many workers depending on your use case.

Result Backend

The Result Backend is used for storing the results of your tasks. However, it is not a required element, so if you do not include it in your settings, you cannot access the results of your tasks.
Continue reading…