Monday, January 28, 2013

(For Unattended Sysprep, read this)When using VMware Workstation in testing, sometimes you need to have your environments prepared quickly. In those cases, it is completely annoying to have to install a new machine all over again. To solve this problem, we can consider some options:

Cloning a machine: The problem with it is that a machine is cloned with its IP number and the SID, unique identifies for every machine. Thus, when you have cloned some machines and have them in a network, you may have problems, specially if you are working with Active Directory Domains, because 2 or more machines are recognized as if they were just one machine.

Copying a machine: The same problem than cloning.

Sysprep: In my opinion, this is the best option to have environments ready to deploy. Basically, Sysprep prepares the machine to be deployed in other hardware. For example, lets say I have a Windows XP machine. It is a clean environment and I'll need it in the future. What I can do is make a Sysprep and then compress the virtual machine files. Every time I need a new Windows XP machine, I just extract the files to another folder prepared for a new virtual machine and start the VM (virtual machine). What I'm going to see is a new machine deploying, and in a couple of minutes I'll have a new machine. I can do this every time I need it.

The method to make a Sysprep is different with each version of Windows. What I’m going to show now is how to make a Sysprep for Windows 8.

Configure the dialog that is displayed as specified in the following picture

After that, the machine will be shutdown. Just wait for it, and then compress all the files of the VM. Now, every time you need a clean Windows 8 machine, you can extract the Sysprep to another folder and you will have a new machine.Hyper Smash

Friday, January 25, 2013

I din't know if I should publish this, because there's a lot of info sources for this topic in Internet. Nevertheless, I realized that there's always something missing. I always have to consult more than one source of information. Thus I decided to write a guide with all the things you should do from the beginning. I hope this encourage you to try Ubuntu. Since I live in the real world, I can't recommend you to switch completely from Windows to Ubuntu. There's still too many applications for Windows that don't have their counterpart in Ubuntu, so you couldn't have the required tools for some important jobs. Anyway, Ubuntu is a great piece of software, and it's free! So it's worth giving it a chance.

I'm going to show how to install Ubuntu in a Windows machine without having to erase Windows. Now, I know very well that sometimes you don't have enough space in you'r C: partition. I know that you may want to install Ubuntu in a partition where you have more space. Taking that into account, I will set the following environment:

A machine with Windows XP.

2 partitions, C and D.

Ubuntu installed in a disk different than C. In this case we will use E (it could be D, it depends on you configuration). We're not going to use all the space available in E, assuming that we have data there.

Boot configured to start with Windows.

Ubuntu installed from a USB Flash Drive.

Requirements:

Mini Partition Tool installed. Download it here: This tools will let you make the required partitions on the disk.

UNetbootin. Download it here: This tool will allow you to install Ubuntu from a USB Flash Drive.

Steps:

Make the bootable USB Flash Drive

1. Open unetbootin-windows-583.exe. Set the options as shown in the following image and press Ok:

Modify the disk

1. Open Mini Partition Tool.
2. Select E:
3. Click on Move/Resize
4. Shrink the disk. I'll shrink the disk to half its current size. The idea is to create free space for everything you need in Ubuntu. Then press Ok.

5. Press Apply

Now you have space for Ubuntu in E.

Install Ubuntu
1. Restart the machine. The USB drive should be connected by now.
2. Enter the Bios and configure it to boot from the USB drive. This depends on your machine. You usually can enter you Bios by pressing F2 or Del in the first moments when the machine is starting.
3. If it boots from the USB drive, you will see a screen with "Default" selected; that is to start Ubuntu from the USB. Just the time pass or press Enter.
4. After that, Ubuntu will be started. You will see something like this:

6. I recommend to install the third party stuff with Ubuntu. It's bothering to install things like the mp3 plugins afterwards, so check "Install this third-party software" an press Continue.

7. In the Installation Type dialog, you could select "Install Ubuntu alongside Microsoft Windows XP Professional", but here you don't have enough control of what's happening. Remember, we want to install Ubuntu in the space we created for it in E:. Select "Something Else" and press Continue.

8. As you can see, the next screen shows the disk with the free space we just created. Select "free space".

Now, it's time to make the partitions for Ubuntu. This OS usually needs the following partitions:

/ Just that symbol. It's the root path. Ubuntu will be installed here. Any programs you install in Ubuntu will be installed here as well. So, think for a moment how much of the space is needed. In this case, I'll use about 40% of the available space for Ubuntu.

/home All the documents, photos and data will be stored. It's like "My Documents" for Windows, but this is more general. The logic is a little dfferent for Ubuntu. You are not supposed to worry about C: or D: units to store data.

swap area This is like the virtual memory for Windows. The OS uses it when it's out of memory. The general rule for the size of the swap area is to double the size of the memory. If you have a RAM of 512, put 1GB. Nevertheless, with 2GB or more of memory, 2GB should be enough. In this case, I have a machine with 512 of RAM, so the swap area will have 1GB.

9. To add each partition, select the "+" sign after selecting "free space".

To create / : Configure the "Create partition" dialog like the following picture (remember, I'm using 40% for this partition):

To create swap area : Configure the "Create partition" dialog like the following picure:

To create a /home : Configure the "Create partition" dialog like the following picure. I'll leave the rest of the free space for this:

Every time I installed Ubuntu alongside with Windows I had this problem: Grub (the Ubuntu boot loader) doesn't work. It's like it was never installed. When I rebooted my computer, Windows initiated without giving me any chance to enter Ubuntu. In case you have the same problem, here are the steps to restore Grub, and how to configure it to have Windows as the default OS.

1. Boot from the USB drive.
2. When you see the Ubuntu desktop, open the Terminal.
3. Enter the following commands. Just press Enter when you are asked to.

sudo add-apt-repository ppa:yannubuntu/boot-repair(note that you have to enter your root password)

sudo apt-get update

sudo apt-get install -y boot-repair

This will install a boot repair app.

4. Go to Dash Home and write "Boot Repair". Open it.

5. Click on "Recommended repair" and wait.

6. Press Ok in the windows that is opened after the process ends. Your will have to restart your computer.

Set Windows as Default OS in Grub
1. Open the Terminal and open Grub: gksu gedit /etc/default/grub
2. A text file will be opened. Change "GRUB_DEFAULT=0" to "GRUB_DEFAULT=4". If you saw the Grub menu when the system is starting, you will see that there are some options to select. The first is the regular Ubuntu, so it corresponds to 0. If Windows is in position 5 (which is very likely), it corresponds to number 4.

3. You can change the Grub timeout as well. This is useful if you want to enter quickly to Windows, but you want to select Ubuntu in special cases.

Sunday, January 20, 2013

I already wrote about one of these apps: MDBPlus, a database viewer, very useful and well done. I really liked it, so I want to share the rest of the software by the same author. The main characteristic o the apps is that they are free, portable, and don't need to be installed. They don't use too much space, so you should download and try them just for fun! The apps I liked the best are:

System Utilities

CD Key Sizer: This is just a simple app to get the Windows Installation key. It could be useful to make a re installation Download it here.

Database Tools

MDB Viewer Plus: I already wrote about this application. You can read the post here.

Development ToolsColor Seizer: This is pretty cool. Have you ever needed the number of a color you have to use designing a web page? You don't have to browse for it. This program provides the code for color in HTML, Delphi, Visual Basic and C++. Download it here.

Miscellaneous Utilities

Photo Data Explorer: This program detects the data of a particular photo. With this, you can know who took a photo, when she did it, where, and so on. Download it here.

Today I was in a big trouble. I had to compare 2 databases to test an upgrade, but I wasn't able to fin any program to help me, since some of the views of one of the databases were encrypted. Red Gate's solution, despite it's popularity, was useless for my problem. So, I found this program. It's very simple and easy to use. Plus, I'm going to show how to make all the process with SQL Server 2005 (just as an example, this program works with earlier and later versions of SQL Server):

1. Back up a database
2. Restore it
3. Use SQL Server Comparison Tool

This is what I did today: I had to compare 2 databases. I had a backup of one of the databases. I got it before upgrading the application I was testing. So, after upgrading, I had a database called QDB and a backup called QDBBackup.bak. I stored it on C:\.

1. Open SQL Server Management Studio (in the case you are using SQL Server 2005)
2. Select Windows Authentication and press Connect or select SQL Server authentication and enter a valid user name and password and press Connect.
3. Expand [Server Name]>Databases>Right click on the database to backup>Tasks. In this case, I'm using a database called "QDB"

4. In Backupset, in Name, enter database Backup. In Destination, click Add.
5. Select a destination and a name for the backup. In my case, the destination will be the desktop. The name of the backup will be databaseBackup.bak.

6. Press Ok three times.
7. A dialog will be displayed indicating that the database was successfully backed up. Press Ok.
8. Go to the path you selected to save the backup.

5. Press Add.
6. Go to the path you chose for saving the database and select it. Press Ok twice.

7. Since I'm restoring a backup with the name of an existing database, I'll type "QDB2" in the "To database" field. Check the Restore checkbox in the lower pane and press Ok.

8. A message will be displayed indicating that the database has been successfully restored will be displayed. Press Ok. Now you can see the new database restored.

Compare both databases

1. Open SQL Server Comparison Tool
2. Press Ok
3. Press Ok in the Tips dialog. A message will be displayed saying that there is no SQL Server. Just press Ok.
4. In SQL Server, enter the name of the server and select Windows Authentication or use SQL Server authenticationt. Press Ok.

5. In the Source side, select QDB. In the Target side select QDB2.

6. Lets compare the views. Press Compare All, in the center-upper part of the screen. Select Views and press Compare.

Wednesday, January 16, 2013

Have you ever thought that Facebook is the whole Internet nowadays? I haven't. That's why I write a blog. But most of my friends do. They spend so much time in Facebook that they started looking for useful things inside the social network. Mark Zuckerberg, one of the most incredible entrepreneurs in this planet, realized the fact that is getting harder to find thing in the new universe that Facebook is, and recently announced Facebook Graph Search, which is a search tool within Facebook. It's not finished yet, and you have to wait in line to test it. If you want to do so, enter here. Go to the end of the web page and click on the "Wait in line" button.

I've been reading some articles related to this, like this, this, and this. What take from one of them, is that, in some point, Facebook is "oversocializing" us, in the words of the infamous Unabomber (don't see his manifesto). Facebook is going to live as long as we have more connections every time. I know some people in the technology business that has tiny networks in Facebook, and I don't see them using Graph Search properly. Not even to get the minimum information one expects in internet. But of course this is not like any other tool in the social network. What I think is that Facebook is expanding, less aggressively than Google, but they are doing it. They are very confident in penetrating internet outside Facebook, maybe through the like buttons or something, but that's the way I think they are following.

The negative side is, again, privacy. I don't know the future features of Graph Search, but users will eventually have a hard time to manage the privacy setting to their own photos. Maybe even new tools will come up just to help users manage their privacy settings in general. You can see something here if you are concerned about privacy.

In conclusion, I like Facebook, but sometimes I wonder if we overrate it. I think sometimes it's not worth it. We are giving super-valuable information for a network of people that we don't really know, just for the sake of a false popularity.

Sunday, January 13, 2013

At this point, everybody knows about the suicide of Aaron Swartz, a hacker who was arrested for mass-downloading articles from JSTOR. He was facing charges and penalties up to 30 years in jail. I'm not going to mention how unfair was all this (because it is obvious), but I want rethink a couple of things.

This guy was a genius. And he had a value I hold against all the opposition it has in my country: liberty. This is the Third World, so a lot of things are not quite right around here. Maybe, the only reason I can write this is because we don't have very detailed laws for censorship in Internet, and that's just because only a minimum percentage of the population here has access to computers and Internet regularly. But I'm sure that in time I'll have to face the government when the rulers of the country realize of the power of information.

This has to be a calling for all the people concerned with freedom in internet. Don't wait until we a have Internet like they have in North Korea.

Saturday, January 12, 2013

Although internet is full of free course for almost everything, one can think that the Net is a virtual University. Unfortunately, that's not true. In a place so full of information, it is essential to discriminate what is worth giving a change and what is not.

Java is not my favorite, but it is definitively one of the most versatile and useful programming languages out there. Also, it is a great choice for beginners who want to enter the world of development. If you take a course in the "real world" it is very probable that your first step will be Java.

One of the best courses I ever heard about is Mehran Sahami's Programming Methodology. Mehran Sahami is an expert in programming, and he's a great, great teacher. This course is intuitive and interesting, and I'm sure most of you will enjoy it, event the ones that don't have anything to do with the technology world.

You can find the course in iTunes U, a program that you can find for your iPad, iPhone or iPod. However, it is available in YouTube as well. Watch it here.

In the official web site, you can find all the software and documents.

I really recommend this, because it helped me. I can assure you that you'll be able to learn anything from Object Oriented Programming after this. Just to give you a little example, here is the first class:

Some recommendations:

Download and install the files provided in the official site. If you try to do all the exercises with other software, it is probably that it doesn't work as intended.

Listen to every class carefully. There are a lot of key hints in the classes.

If you ever tried to program, like myself, you may have found out very amusing and free. When you get to work formally for a real company, things change a little bit. There are schedules to follow and products to deliver, and you have to learn to work with other people. This was a surprise for me. I always thought of software companies like anarchy territory, but I was obviously wrong.

As any other company, a software one has its own rules and methods of organization. Nowadays, a popular framework for software development is Agile. I was studying this for a while, so I want to share it with everyone!

I want this article to be helpful to students and new workers in this business. Lets begin.

Agile

There are many sites on the web that has definitions of Agile, but they always say very general things that doesn't make much sense in the end. Here is a simple definition of Agile that I found clear:

Agile is a project management method based on iterative methodology, most typically used in Software, Website, Technology, Creative and Marketing industries. As the name implies, it aims to allow a high level flexibility. It also empowers individuals involved in the project and requires close collaboration with the customer or stakeholder. (http://www.planbox.com/resources)

Also, it could be said that Agile is a framework for different methodologies that are based in the Agile principles.
To understand Agile better, it is necessary to know the Agile principal value:

Apart of the Value of Agile, the 12 principles of Agile are essential to understand what is this all about:

1. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software: Here the focus is on delivering software that works, at first with the principal requirement of the costumer, and getting better afterwards.

2. Welcome changing requirements, even late in development. Agile processes control change for the customer's competitive advantage: This refers to the customer making changes in any part of the project. An example of this could be: Another company has recently released a software very similar to ours. It doesn't make sense to release our software now, unless the requirements are changed to turn the product into something better or different.

3. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter time scale:This is similar to the first principle. It consists on delivering software that constitutes real value to the customer.

4. Business people and developers must work together daily throughout the project: This has to be with the coordination between sellers, administrators, and other people from different areas of the company working along with the development team (which includes the Quality Engineers).

5. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done: This point is about motivation for the teams. This is usually achieved by giving the teams a certain portion of freedom to organize themselves.

6. The most efficient and effective method of handing over information to and within a development team is face-to-face conversation: The most important way of communication is face to face, before mail, phone conversations, etc.

7. Working software is the primary measure of progress: The primary way of knowing of the work done is to see the actual functional software. Remember that Agile woks in cycles, and in every cycle there must be a functional version of the product.

8. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely: This point is about the constant rhythm that all the people involved in the development process should have. Everybody should be at a similar pace.

10. Simplicity—the art of maximizing the amount of work not done—is essential: This is a little puzzling. "The art of maximizing the amount of work not done" means that there should be always the tendency of discriminate what can be left out of work. For example, if you don't need to put a blue background to the web page you are programming, just leave it with the white background and save time and effort.

11. The best architectures, requirements, and designs emerge from self-organizing teams: Teamwork is one of the main points for Agile. These teams have to know how to organize themselves.

12. At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly: This means that the team evaluates itself in a regular basis to improve what has to be improve.

Agile is easy to understand, but it is very difficult to implement. Remember, it is just a framework, it can be implemented with different methodologies. The most popular is Scrum, which I'll be writing about in future posts.