How to Create the Symfony2 Database Schema

Category: Software Development

Yesterday I tried my hand at setting up the NetworkingInitCms bundle for Symfony2. I decided to start with the sandbox to first learn how it works and then go from there.

I followed the steps in the installation instructions file but soon I hit a road-block.

After I ran the composer install script to ensure that all necessary packages were downloaded and installed and ran and fixed all issues reported by the app/check.php script I noticed that I wasn't able to progress with the installation because the following error was popping up in the dev.log.

  request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[42000] [1049] Unknown database 'symfony')

I was using a MySQL database engine so I checked the server to see if a symfony database existed and quickly realized that no there was no such database on the server.

In order to create the database I used the Doctrine create database command, followed by create schema:

    sudo php app/console doctrine:database:create
    sudo php app/console doctrine:schema:create

Once I did that, the database was created and initialized with the correct schema.


Category: Software Development

The following is a list of questions (and answers) that should help as a refresher about topics related to programming languages in general; and to compilation, code execution, programming language internals, run-time program management, in particular.

  1. What is the difference between machine language and assembly language?
  2. What is generally considered the first high-level programming language?
  3. In what way are high-level languages an improvement on assembly language?
  4. Under what circumstances does it still make sense to program in assembler?
  5. What makes a programming language successful?
  6.

Breadth-First Search on Graphs

Category: Software Development

Searching On Graphs

Many times, when given a graph, one might have to find whether a specific vertex is reachable from another. Or, to explore all vertices that are reachable from a start vertex (possible with an additional constraint such as limiting the maximum distance to a certain value). These are all search problems on a graph, and techniques for searching graphs lie at the heart of the field of graph algorithms. Many algorithms on graphs start out by searching their input graph to obtain structural information about the graph.

Searching a graph means systematically following the edges of the graph so as to visit the vertices of the graph.

What is Breadth-First Search?

Breadth-First Search (BFS) is one of the most basic algorithms for searching a graph and constitutes the building-block of many important graph algorithms. As stated above, Breadth-First Search is a method for finding all vertices reachable from a given start vertex, s.


Online sorting of incoming streams of data

Category: Software Development

The other day I came across an interesting problem.  The idea goes something like this:

There are a number of input streams that produce data, in order (each stream produces data with a timestamp; and the data in each stream are always reported in order). The task is to design an efficient algorithm to aggregate the values from all streams, and record, or display, them in the correct order.

One possible real-life scenario where this might be required would be a system of sensors recording data points and submitting them to a centralized server for processing. Each sensor would be recording the data points regularly but when transmitting the information, the timestamps of the events from the different sources will not be ordered in any way.


6 Questions To Ask When Interviewing For a Software Developer Job?

Category: Software Development

When a friend of mine recently changed her job she was really excited. She had two weeks of time off between jobs and was really looking forward to moving on from the crappy old company and into the shiny new work environment with increased compensation and a more interesting job description. Then reality hit her and after a few days at the new gig she was really disappointed. It turned out that the increased compensation barely accounted for a lesser benefits plan, and the cooler job description said nothing about the policies of the new work environment. She could have avoided most of the trouble by asking some questions upfront, during her interview.


Design copyright (c) Miky Dinescu