Friday, July 11, 2008

Apple Installs MobileMe Without Your Consent.

If you are on Windows and have installed iTunes 7.7 check your control panel and see if this has happened to you too.

Sunday, April 6, 2008

Code Caddy: Source Code Storage Utility

One day I was sitting around trying to think of a cool idea for a website. I started off thinking of what tasks are a hassle in my day to day computer use. I found that making my computer science projects available to all of the computers I use on a daily basis a real hassle. There was no real easy way to transfer my projects between my desktop, work computer, computer lab, and girlfriend's computer. I could have used a thumbdrive, but I am constantly losing them which makes this solution not a very good one. I have emailed myself projects before, but this clutters up my inbox, and there is no way to neatly organize all of my files. I never really cared if anyone else would use it as long as I found it useful.

I decided to call my website Code Caddy. Like a golf caddy carries golf clubs, Code Caddy carries your code for you wherever you go. Code Caddy does more than hold your source code. It also enables you to organize your projects, and preview your code with syntax highlighting.

Give Code Caddy a shot and tell me what you think.

Sunday, March 16, 2008

Bianchi Pista

EDIT: New Pictures.
This is with flash:

Without Flash:

Tuesday, February 26, 2008

Thursday, February 14, 2008

How To: Compile and Run Basic C++ Programs in Xcode

This tutorial is to help out anyone that wants to create a terminal based c++ program using Xcode for Mac OS X. This is mainly for the people in CS 150 at ODU, but I think many can benefit from this as a getting started guide. If you know some basic C++ already this guide will be easier to you, but no prior knowledge is required for this how-to.

1. Download Xcode

The program that Mac users need to develop their programs is called Xcode. Xcode is an IDE that is built specifically for OS X users. Other IDEs that you may be familiar with are Visual Studio, and Dev-C++ both of which are for Windows. To download Xcode go here and click the link on the right labeled "Tools Downloads". Next, you will need to select a version of Xcode that is supported by your version of OS X. 10.4 Tiger users should use Xcode 2.5 and 10.5 Leopard users should use Xcode 3.0. If you have not done so already you will need to register for Apple Developer Connection site in order to download (registration is free). This is a somewhat large download, so grab a coffee or something and then come back to step 2.

2. Installing Xcode

Now that we have downloaded Xcode we will need to install it. The file that you downloaded should be a DMG file. Double click the file to mount the disk image, and a new icon on your desktop should appear. Double click the new icon, and then double click the Xcode installer which should be called something like xcodetools.mpkg. Go through the options like you were installing a normal piece of software, and then when it is all done click finished. Hooray! Xcode is installed.

3. Starting a New Project

This is where it gets interesting. When I first started to try Xcode out this is where I got confused and hopefully you will not go through what I did. I am using Xcode 3.0 with Leopard, so if you are a Tiger user things may be a bit different. First, you will want to open Xcode. The Xcode application is not located in your applications folder, but in the Developer directory. Its location is Macintosh HD/Developer/Applications/Xcode. Double click the Xcode icon to open the application, and you will be greeted by a startup assistant. I just went through with the default options, but if you are picky about where you projects are saved etc. then feel free to change the options. When the welcome window pops up just close it by clicking the "x" at the top left of the window. Then, go to File in the menu bar and then select "New Project". Now the intuitive thing to do would be to select the "Application" drop down, but for us we actually want to select the "Command Line Utility" drop down item. From there you should select "C++ Tool" and click next. Give your project a name and specify a place to save your project. I will call mine "hello" and leave the Project Directory as it is. Now click finish and you project window should appear. Now we will start the coding of our project.

4. Coding Compiling and Running

One of the files in the window should jump out at you right away and that is main.cpp. Double click it to open it in the editor. As you can see it has a very simple Hello World application in it, and this is where you will put your project's code. Now lets compile and run our Hello World program. Click on the build button at the top left of the editor window. If it asks you to save just click save all and it will compile. Now go to your "Project Organizer" window and then double click the executable file which in this case is just "hello" without any file extension. A terminal window should now open and your program should run. Now you know how to program in C++ on a Mac!

5. Notes

There are a few things about coding in C++ on a Mac that are different than a PC. For example the command:

does not work on a mac, and there is no easy way around it.

Secondly, you may have noticed that the example program used the command:

std::cout<<"Hello World";
instead of just
cout<<"Hello World";
this is because the example is not using the std namespace. So you can code in 2 different ways. Either option A:

#include <iostream>
using namespace std;
int main (int argc, char * const argv[]) {

     // insert code here...
     cout << "Hello, World!\n";
     return 0;

Or option B:

#include <iostream>

int main (int argc, char * const argv[]) {

     // insert code here...
     std::cout << "Hello, World!\n";
     return 0;

Note that the "\n" after Hello World is an indicator to start a new line after Hello World.