Test post to see is comments are working with spam detection.
Please add a comment or two with or without spammy content.
A quick computer hardware post to report I have upgraded my Mac mini Hard drive to a Solid State Drive (SSD). With a spinning magnetic drive it would take 148 seconds to boot up and open system preferences.
Opening Photoshop CS5 and creating a 5000×500 image and applying a color gradient would take 115 seconds. I had already upgraded the memory from 4GB to 8GB but I found an adapter to add a second hard drive to a mac mini http://www.ifixit.com/Apple-Parts/Mac-Mini-Dual-Hard-Drive-Kit/IF171-005
A mac Mini (http://www.apple.com/au/macmini/) is the cheapest way to access OSX to do development as your BYO your own monitor/keyboard and mouse. I ended up going for a 256GB Crucial M4 SSD.
Opening the hard drive was a breeze with the iFixit tools and video (http://www.youtube.com/watch?v=2NORZR0BbZs). The only problem was the video stopped giving advice right where I needed it (how to place the cables in between the two drives (instead of wrapping around them). After a few hours I figured it out.
1. Open the Mac Mini
2. Install the SSD Drive
4. Boot OSX from the old HDD
5. Clone the drive with Carbon Copy Cloner
6. Boot off the SSD (hold option during boot up). Set SSD and default boot.
7. Delete the old drive and re-partition.
8. Enable TRIM with this utility http://www.groths.org/?page_id=322
9. Enjoy the benefits of a SSD.
Boot Time Time:
Boot Time + Login + Open System Preferences:
Open Photoshop CS5 + Create 5000x500px image + Apply Colour Gradient
Most of my demos are going to use Visual Basic 2010 Express (a free development studio from Microsoft). This download is about 600MB.
Visual Studio Express 2012 requires Windows XP, Vista or Windows 7 with 2GB minimum of memory with 3GB hard drive space and a 1.6Ghz processor or more.
How to download and Installing Visual Studio Express 2010.
Future posts will show you how to develop programs in Visual Studio Express (Visual Basic) 2010. If you are a Mac user I will get into Apple’s Objective C with XCode but for now you can install Visual Studio in a Virtual Machine on OSX.
If you are keen read some of these guides.
Programming logic is a quick description of the flow of your program.
A very simple program logic may be
IF ITEM_PRICE < BANK_BALANCE THEN
Before we write the program above we need to identify what is data and what is language associated with the programming language.
Data would be BANK_BALANCE (that is a number) and ITEM_PRICE is a number too.
“IF” and “END IF” are commands available in this program. When dealing with data you can assign the data to a variable name, for example your bank balance (a number) can be saved in the variable MyBankBalance and your credit card balance can be saved in a variable called MyCreditCardBalance.
There are different types of variables used in Visual Studio 2010 – Visual Basic.
There are other types but you can read about them here: http://msdn.microsoft.com/en-us/library/ae55hdtk.aspxIf you have to choose one type of variable choose a string as it can hold almost anything.
With numbers try and use the variable with the smallest maximum to save using too much memory (e.g. If you were creating a variable to hold ones age use a Byte, if you were creating a variable to hold a bank balance use a Decimal over an integer mostly because Decimals allow decimal points where Integers round off anything after a decimal point.
Now what we have our programming logic decided our programming variables how can we optimize my program. Let’s say we want to check our primary bank balance then our secondary bank balance if the primary bank balance does not have enough money. If we duplicated the code that checks the bank balance that would work but the code would get twice as big. What we need to do is move the code that checks the bank balance into a FUNCTION called “CHECK_BANK_BALANCE” and pass in the name of the bank account to check. No we can check 1, 2 or 2000 bank balances without duplicating code.
The new code might look like
IF ITEM_PRICE < CHECK_BANK_BALANCE(BANK_ACCOUNT_NUMBER) THEN
The code above is not perfect, we do not have a breakdown of the check price function but pseudo code allows you to flesh out the structure of your program before you start coding.
Another alternative to using a function may be to use a “Sub” (Subroutine), A subroutine is like a function but it does not return any data. You could use a sub routine to deduct an amount from a bank balance and not return the bank balance when done.