Stanford Classes on the Internet

October 26th, 2008 by comment

Stanford Engineering Everywhere is a great thing.

Stanford Engineering Everywhere

Currently, there are 10 classes one may take online for free from Stanford. Now, these classes are not for credit but the material is given out for free. The classes range from Intro to Computer Science, Artificial Intelligence, and Electrical Engineering. The only class that requires no prerequisites is the Introduction to Computer Science class. This class introduces java, object oriented design and was designed to appeal to social scientists as well as computer scientist majors. The introduction to robotics class requires matrix algebra. The other classes usually require that you know some math and some programming already. Each class comes with lectures, video, assignments, and handouts.

This is just an amazing offering from Stanford. The content is protected under the Creative Commons License so content can be reused in non-commercial offerings.

This project is being funded by Sequoia Capital in Silicon Valley. Sequoia is a venture capital firm.

There is no communication between the professors and you as you are reading the material so you would need to find another outlet for questions on the material.

Lastly, they are thinking of putting more classes online depending on the success of this pilot program.

Wow. This is great.

ˆ Back to top

C#.NET Data Binding Basics

October 17th, 2007 by comment

Binding data from windows controls to objects is easy in C#.NET.  Here is a basic introduction: 

Step one:

Create a class named Employee in C# and add a get property for each field you want to bind to a windows control.

public string getLastName {

      get { return mStrLastName; }

} 

Add a set property for any fields that you want two-way binding to occur. For example:

public string firstName {

      get { return mStrFirstName; }

      set { mStrFirstName = value; }

} 

Step two:

Add a form to your project and throw some controls on the form.  For this example, add a list box and a textbox. Also, create an array of objects that you want to bind to this list box.

arrayOfEmployees = new ArrayList();

arrayOfEmpoyees.Add(new Employee(“Doe”,”John”,”SoftwareEngineer”,”ServerTeam”));

arrayOfEmployees.Add(new Employee(“Smith”,”Jane”,”SoftwareEngieer”,”ClientTeam”));

Step three:

Bind the data from the object to the list box and textbox

listBoxLastName.DataSource = arrayOfEmployees;

listBoxLastName.DisplayMember = “getLastName”;

txtBoxForFirstName.DataBindings.Add(“Text”, arrayOfEmployees, “getFirstName”);

Step four:

Run the project and notice that the data is bound to the list box and the textbox. 

First, notice that the textbox is an example of two-way binding.  If a user changes the values in the textbox then the object is updated with a new first name.  To change this to one-way binding, just remove the set property from the object bound to the textbox.

Secondly, simple binding is done to controls like textboxes that only have one possible value.  Complex binding is done to controls like list boxes, that have multiple values to display at once. 

This example shows both simple and complex binding as well as one-way and two-way binding. More advanced data binding topics in C#.Net Visual Studio 2005 would cover the DataGridView class.

Cheers,

alex

ˆ Back to top

FIX Protocol

April 20th, 2007 by comment

There are a lot of jobs out there right now for programmers who know Fix, but what is it and how do you learn it? Fix is short for: Financial Information Exchange Protocol

Step one, get a fix engine and load it on your computer. I recommend the QuickFix engine because it’s free and open source. QuickFixEngine

Step two, download the fix protocol specifications. There are different versions of the specification.
Fix Protocol Specifications

Fix is broken up into two layers. First, there is the session layer. Session layer messages are going to handle things like Logon, Logout, Message Recovery, Heartbeats, Test Requests, Resend Requests, Rejects, Sequence Resets (Gap Fills), and more. Secondly, there is the Application layer. Since Fix deals with trade information for the stock market and futures market, the application layer messages will be along the lines of sending an order, getting a fill, changing an order, and more.

The fix messages themselves are broken up into Tags.
Tag = Value Delimiter
So, and example would look like this: 35=D |
35 is the Tag
D is the value
| is the delimiter
A fix messages is made up of many tags. Here is an example:

{code wrapped}

Send(12/06/2006-10:23:43.175)|8
=FIX.4.2|9=00060|35=0|49
=Alex|56=orders|34=99|52=20041206-10:23:43.175|10=080|

Understanding the tags is key. For example, Tag 34 is the sequence number. All Fix messages will have a sequence number. Sequence numbers ensure that the data is delivered in sequential order. If the sequence numbers fall out of sync with one another then your application must recover. In the message above, the sequence number is 99 because tag 34=99. Tag 34 is the sequence number and 99 is the value. All of the tags can be found documented in the fix specification document.
Tag 35 is the type of fix message being sent. 35=0 shows us that this message is a heartbeat message. Heartbeats will flow from fix machines every 30 seconds or so. This is configurable typically.
Here are some other important values for tag 35:
TAG 35 = A Log on
TAG 35 = 8 Execution Report
TAG 35 = 0 Heartbeat
TAG 35 = D New Order
TAG 35 = d Security Definition

The entire idea behind fix is that you send a fix message, say a 35=c which is a request for security definitions. Security definitions are the details on the contracts for sale or for purchase at an exchange. If you send a request for security definition then a fix machine that is setup to listen for these requests will start sending your all security definitions listed on the exchange it connects too. A security definition will have tag 35=d

As a FIX programmer, you will need to get the fix engine talking to your business logic application layer. You will use the Fix engine API to send your business messages to whatever other fix party you are talking to in the system architecture of your project. An example of a typical architecture would be creating a Fix Client Front End Trading System. So, you would download Quick Fix and use its API to send messages both for the Session Layer and the Application Layer to another fix machine that would talk to a Futures exchange or an Equities exchange to place orders and get fills.

All communication that I am aware of in FIX is TCP/IP. It is all about sending and receiving fix messages like the example above. If a programmer wants to learn fix to get a job programming a fix trading system then following these steps to learn more about fix makes them very marketable in the financial industry at this time.

ˆ Back to top

Knuth Award goes to Nancy Lynch

April 11th, 2007 by comment

For anyone one interested in the theory of computer science, Nancy Lynch will be awarded the Knuth Award.

The press release is here and you can also visit Nancy Lynch’s Homepage

Her work is in distributed computing.

ˆ Back to top

cheap research papers