Saturday, June 16, 2012

Problem
I'm working on a website by myself, and want to use version control. Version control repository on my local machine seems rather silly, so instead I wanted to get a version control that's capable of being stored online ("in the cloud"). There are free services out there, like github.com, but the problem is the free version is open source. What if you don't want to share your code, but still want an online version control for free? Here's how!

Solution
I will explain how I'm doing it, and from this you should be able to easily adapt it for your situation. I'm doing it with a WAMP website.
1. Sign up and get Dropbox - 2 GB for free, automatically syncs folders on your computer to their servers (i.e. the cloud)

2. In the Dropbox folder, which is D:/Dropbox on mine, create a subfolder(s) to put your source files. For example, mine is D:/Dropbox/Code/MyProject

3. (For wamp users only): Create an alias to point to D:/Dropbox/Code/MyProject

Click the Wamp icon -> Apache -> Alias directories -> Add an alias

Type the url alias, for example: http://localhost/MyProject

Type the project directory, for example: D:/Dropbox/Code/MyProject

Test by navigating to http://localhost/MyProject/ (notice the slash on the end)

4. Open Netbeans (IDE for people who don't use it)-> right-click the project -> Versioning -> initialize git repository -> leave the default

5. Commit all files

Congrats, your version controlled files are now in the cloud for free!!

Thursday, June 14, 2012

I went and watched Prometheus last night. I really really enjoyed it. This movie definitely reminded me of the Aliens movies. I don't want to give anything away, just that it the mechanics of things they encounter are very similar to that of the aliens in the Aliens movies.

Tuesday, June 5, 2012

Problem
I attempted to attach a database from SQL Server 2008 R2 into a SQL Server 2005 instance. This resulted in the "downgrade path is not supported" problem. This is because the databases are not backward compatible due to differences in the structure of the data file (MDF)Solution
From SQL Server 2008 R2 (or whatever you're using), you can use a script generation wizard that will automatically put all the schema and data into one script. This can then be executed on the older version of SQL Server.Steps
1. Open SSMS for SQL server 2k8 R2

2. Right-click on the database, chooses Tasks, then Generate Scripts

3. Click Next

4. Click Advanced

5. Change the server version to whichever version you're downgrading to. Then change it the types of data to script to "schema and data". Make any other changes to the defaults based on your situation, then click Ok

6. Click Next

7. Click Finished

8. Wait for the script generation to complete
9. Execute the script in the older version's SSMS

Note 1: In my case the database takes longer to move than it does to install a new instance, which means the generated script will be big too. So on the server where I ran into the problem I simply installed SQL server 2008 R2 side-by-side with SQL Server 2005, in order to generate the script on the server where it's to be executed. This saved a lot of time!