VMWare: Expand your Virtual Disk size

If you find you’re running out of space in your virtual disk with VMWare, here’s how to increase the size of it:

Prerequisites:

  • Virtual Machine must NOT be running.
  • You must NOT have the virtual disk mounted as a drive letter on the host.
  • You must not have any snapshots of your VM.
  • You should back up your VM!!!!

Here’s how:

  1. In one of these paths (depending on whether you’ve got a 64 bit host or a 32bit host):
    1. C:Program Files (x86)VMwareVMware Workstation
    2. C:Program FilesVMwareVMware Workstation
    3. There’s an executable:  vmware-vdiskmanager.exe
  2. Open a command prompt (a.k.a. “DOS Box”) and CD to the folder that contains the file: vmware-vdiskmanager.exe.
  3. Type this command (all on one line):

      vmware-vdiskmanager.exe –x 30GB “c:My VM FolderMyVirtualDisk.vmdk

      Don’t forget the quotes!

      “-x” (no quotes) tells it to resize the virtual disk.

      “30GB” tells it to resize it to 30GB.  Replace that number with the new size you want.  You can specify sizes in KB, MB, or GB.

  4. Start up your VM.
  5. Once inside your booted VM, use your guest OS’s partition utilities to use the extra space.
  6. You may need to reboot your VM.

Here’s a video demonstrating how to tell the VM to use the larger size (using Vista as the Guest OS).

[youtube=http://www.youtube.com/watch?v=2zZeb7ccer8]

Facebook Privacy & Security – What you need to know

Facebook is great for getting connected with old friends and maintaining relationships, but it leaves you bare naked on a lot of your privacy wishes, by default.  It also exposes both you AND your friends information to 3rd parties that probably should NOT have access to it.  YOU can actually leak your own friends private information to third parties, so using a site like Facebook puts a burden of responsibility on you not just for your own privacy and security, but for your friends too.

Here are my recommendations for privacy and security settings on Facebook and explanations of why to set them that way:

Let’s get to your account settings first.  Open the “Settings” menu in the upper right corner and choose: “Account Settings”:

image

Account Settings:

image

Your password should NOT have a word from the English language in it.  There are thousands of hackers out in the wild running software 24/7 trying to hack your account by trying all the words in the English dictionary.  I recommend thinking of a sentence that you won’t forget, then entering the first letter of every word.  Then, think of a number that’s relevant to that sentence… maybe a date?  Put that in there too (at the beginning or end).  Between the two, put a special character like “!” or “@” or anything else.  If you want, and if you can remember which, make some of your alphabetic characters uppercase and others lowercase.

Here’s an example.  Suppose your sentence is:  I really like pepperoni pizza.  Suppose you had pizza on your first date with your spouse.  Pick a date that’s important (the date you met, the date you first had pizza together, the date you got engaged or married).  Now, make a password out of it:

“I really like pepperoni pizza” becomes “irlpp”.  Suppose the important date was 2/3/1995.  Now, pick a special character, say “@”.  Now you’ve got a password that you can remember, but no one can crack:  “irlpp@1995”.

Remember, if someone hacks your account, not only do they get YOUR private information, but they have access to everything about your friends that YOU DO!!!  You’ve got a moral responsibility to protect your friends.  Change your password to a rock solid one.

Now, for linked accounts:

image

I recommend against this.  It’s not a good idea to provide a connection path from all of your online accounts.  It just makes it easier for hackers who’ve maybe successfully hacked one of your accounts, to then discover what other accounts you have and hack those too.

Privacy Settings:

image

Choose “Privacy Settings” from the menu above.

By default, I recommend setting everything to “Only Friends”, and escalate to higher publicity only if there’s a really good reason.

  • Profile:
    • Basic:
      • image
      • For Profile, I say go ahead and escalate this up to “Friends of Friends”.  It makes it easier for your friends that haven’t connected with you yet (whom the two of you may have mutual friends) to find you, but without exposing yourself to the entire public.
      • Basic Info:  You can click the little [?] next to it to see what it is.  It isn’t much, and I’d say it’s OK for you to escalate this up to your networks.  Be careful what networks you join though.  Don’t join a network unless there’s a good reason.  Every time you join one, you’re increasing your exposure of your personal information.
      • Educaton info:  Exposing this to networks allows potential friends to identify you by the school you went to, but without completely exposing it to the public.
      • Work Info:  I’m a strong believer of separating work and private life.  You really don’t want all your personal stuff being viewed by the people you work with, especially your supervisors and bosses.
      • Keeping your information hidden from the public helps prevent a LOT of uncomfortable situations.  Suppose your boss finds you on facebook and wants to friend you?  How do you say “no”?  If your information isn’t findable, you don’t have to be in that situation.
    • Contact Info:
      • image
      • There’s no reason to expose ANY of this information except to people you’ve already friended.  (The last one is my e-mail address, which I’ve erased for obvious reasons).
      • Website:  If this is a personal web site, you might not want it exposed.  If it’s a web site you want public traffic to (say it’s an online store, like www.MichaelsAttic.com (you like how I plugged my own site in this article? :), you may want to make it as public as possible).

Application Settings:

Go back to this menu:

image 

and choose “Application Settings”:

image

You should check this frequently.  I’m constantly finding applications here that I did not grant access to my stuff.  Every one that has an “X” beside it (on the right) is one that you can deny access by clicking the “X”.  When I grabbed this screen shot, I found “causes” and “vampire wars” showing up here, which I know I did not grant access.  They keep showing up and I have no idea why.  You’ll have to be vigilant here to continuously delete these applications.

Speaking of Facebook applications, did you know that none of them are actually on Facebook?  They’re written by just ordinary Joes, like you and me.  As a matter of fact, I have a facebook developer’s license.  I can write one too.  ANY facebook user can get a developer account and start making applications.  You simply CANNOT trust the publishers of these applications to keep your stuff private or to play fair, not even for very popular facebook applications.  Don’t believe me?  Watch this video of the creator of Mafia Wars and FarmVille (probably the two MOST POPULAR facebook applications):

Mafia Wars CEO Brags About Scamming Users From Day One

I don’t play either of those games, but I did sign up for FarmVille because so many of my friends and family have.  I’m now going to block it too, and I suggest you do too.

Now, onto your privacy/search options:

image

You need to strike a balance between letting your profile be public enough where friends can find you, but private enough so that you’re not totally exposed.  For “Search Visibility”, I recommend “Everyone” if you’re just getting started with Facebook, but make sure your “My friend list” is disabled.  That’s about the only way your initial set of friends are going to find you.  After you’ve got 20 or so friends, I recommend lowering this to “Friends of Friends” and turning back on “My friend list”.  Chances are pretty good that most of the rest of your friends will be able to find you through your existing friends.

I recommend against showing pages you’re a fan of to the public.  Maybe for friends of friends, at the most.  I go by the rule of: “Unless there’s a need for them to have the info, block it”.

Privacy/News Feed and Wall:

image

I recommend turning off notifications for changes in your relationship status.  Unless you really want to broadcast to everyone, “Hey!  I just broke up with XXXX!”, it’s probably a good idea to leave it off if you’re currently in a relationship.  If you’re not, not much harm in announcing that you just started a relationship (but that’s debatable.  You should seriously consider all the people that will see the announcement first).

If you’re removing information from your profile, you’re probably doing it for a reason and advertising to everyone that you’re doing it is probably a bad idea and counter to your reason for removing it, so disable “Remove profile info” so it doesn’t get broadcast.

A lot of people are involved in politics, but have friends on both sides of the aisle.  You probably don’t want your posts to political discussion boards broadcast to all of your friends.  Best to turn this off.

Advertisements:

Some facebook ads can get your personal info and display it to your friends in the ad.  That’s just not right.  Set it to “No one”.

image

When you become a fan of something, it gets broadcast to your friends in the advertisement sections.  Unless you want everyone to know you’re a fan of “flipping the pillow to find the cold side”, I recommend setting this to “no one”.

What others can see:  I recommend turning all this off except for the select few I have here:

image

image

This one’s a REALLY bad idea.  Check mark this to prevent it from happening.

image

Same here.  If you’re NOT on facebook, and are participating on some other website, some of them have the ability to post back to your newsfeed what you just did on that other web site.  This should be blocked unless you’re fully aware of each and every time it happens.

COM – Component Object Model

COM or Component Object Model, is a technology that’s part of Microsoft Windows.  It’s purpose is to allow objects (as in Object Oriented Programming) to be shared among any programs running on the computer on which they’re installed.  They’re a specialized type of DLL.

image COM is also referred to as “ActiveX”.  Internet Explorer add-ins are ActiveX components, which means they’re COM components.

The idea is to be able to write an object in any computer language, install it on the machine, and allow any other program, written in any other language, to make use of it.  COM components provide just about any kind of functionality imaginable.  There are COM components to let your program store and retrieve data from databases, to get the current weather from remote servers over the internet, to play music on your computer, to control external hardware… even to control robots.

This works to a certain level, but not all technologies can make full use of all of the capabilities of the COM specifications.  Additionally, there are severe problems with versioning.  In other words, when someone writes a program that expects a particular version of a COM component to be installed on the machine, but some other program installed a newer version of it (or worse yet, an older version of it), it can break the program(s) that expect(s) another version.  There are many times where it’s not possible for all programs that need a particular COM component to be able to all work, because they all expect a specific (and different) version and will fail if the one they need is not present.  This is not a fault of the programs that expect a particular version.  Sometimes the different versions of the COM component are different enough that no programs written for one version can possibly work with another version.

That versioning problem, along with many programs insisting on installing a particular version (which overwrites the one that was already installed) is a very unpopular concept dubbed “DLL Hell”.

Microsoft has come up with a newer technology that resolves the problem of having only ONE version of a DLL COM Component installed, yet still be shared among different programs.  That was resolved with the release of Microsoft .NET v1.0.  It doesn’t fix the prior COM components or any programs that rely on any COM components, nor does it prevent software providers from still writing old COM component technology.  It’s a technology that’s newer than COM and is an alternative to COM.  Programs must be written to use the new technology to take advantage of it.  With .NET, multiple versions of DLLs can reside on a machine at the same time and still be shared among different programs.  For a .NET DLL to be shared on a machine, it must be installed in what’s called the GAC (pronounced “gak”, “Globally Assembly Cache”).  Programs that use GAC objects can request to use a specific version, any version, or have a preference for a specific version, but still work if another is available, but the requested version isn’t.

Even though .NET is a newer technology that resolves a lot of the problems with COM and even though .NET has been around since February 2002, it doesn’t mean that COM is dead.  In fact, there are probably just as many new COM components coming out every day as there are .NET components.  Internet Explorer still supports ActiveX as the plug-in model.  COM may be antiquated, but that’s not stopping some software vendors from still creating new stuff with that technology, unfortunately.

JavaScript

JavaScript is the language used on web sites to control your browser.  It’s not to be confused with the similarly named language “Java”.  They’re two completely different animals.

JavaScript is an interpreted language, meaning there’s a JavaScript engine that reads the JavaScript source code at run time and interprets it, line by line, and takes action then.  This is unlike compiled languages like C or C++, which are converted from source code to machine code, for quick execution.  Since JavaScript is an interpreted language, it is fairly slow in comparison to compiled languages.

But, the fact that it isn’t compiled into machine code before it’s sent to your browser, means that it can run on just about any hardware and any operating system from Windows, to Mac, to Linux, to cell phones.  It sacrifices speed for portability.

JavaScript’s main purpose is to control the user interface of web pages.  JavaScript code can animate items across your browser, can switch focus to a specific control, can validate data you enter onto a web form before you submit it, can change colors of page elements, and a whole plethora of other things.

LINQ – Language Integrated Query

LINQ (pronounced “link”) is a new technology added to .NET in the v3.5 release and first made available via the C# language and later added to VB.NET.  The purpose of LINQ is to provide SQL like query syntax directly in the standard .NET programming languages to allow you to query against any data structure in .NET that supports the IQueryable interface.  In other words, arrays, collections, and generic lists.

LINQ is not a “database” feature.  It’s a language feature that lets you query in-memory objects.  These objects don’t need to be related to a database in any way, shape, or form.  Having said that, it works wonderfully with querying databases directly from C# code too, but that’s with the Linq To SQL technology.  There are other implementations for Linq such as Linq to XML and some 3rd party software providers have provided custom Linq capability to their own products.

The best way to learn it, from my experience, is to see examples of it and try it yourself.

Here are 101 Linq examples.

Here’s a nice GUI utility to practice your Linq queries in.

image

Linq Pad

Hexadecimal (Base 16 Numbers)

The base 10 numbering system is the numbering system we all know and love.  It’s called base “10” because there are 10 unique digits to represent all values.  Those digits are 1-9, plus the zero digit, for a total of 10.

There are other numbering systems with different amounts of digits.  For example, binary only has two digits (1 and 0), Octal has 8 digits (0-7), then there’s base 10 (0-9), and finally Hexadecimal (or just “Hex” for short), which is base 16, with 16 unique digits (0-9, A-F).

To count in hex, you start just like you do in decimal (“decimal” is another name for our familiar base 10 numbering system):

  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

But, in hex, you don’t carry a 1 once you pass 9, like you do in decimal.  Instead, you just keep counting with single digits.  Hex uses the letters A, B, C, D, E, & F as numerical digits.  So, to continue counting past 9…

  • A
  • B
  • C
  • D
  • E
  • F

Just like in decimal, when we reach our last digit, we carry a one and start over:

  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 1A
  • 1B
  • 1C
  • 1D
  • 1E
  • 1F
  • 20
  • 21

etc…

Note that 10 in decimal is “ten”, but 10 in hexadecimal is “sixteen”.  How do you determine whether someone means ten or sixteen when they write 10?  Well, if they don’t put any special symbols before or after the 10, then it’s assumed to be base 10 (or “decimal”).  If they intend for it to be hexadecimal, then they write it like this: $10  or like this: 10h  or like this: x10  or like this: #10.

What is hexadecimal used for?

It’s used primarily in computer programming.  It turns out that hex converts well from binary and back again.  We all know how computers like binary.  Though, binary is difficult to read, even for programmers, and binary numbers take up a lot of space.  For example, 100000000 in binary is the same as 256 in decimal.  To display that same value in hex, it’d be $100.  Just a side note:  If you subtract one from that number, here’s what it’d look like in binary, hex, and decimal:

  • 11111111% (binary)
  • 255 (decimal)
  • $FF (hex)

Every character in a hex number, equates directly to 4 binary digits.  This is what makes hexadecimal and binary such good bases to convert between.  Another thing that makes hex good for programming is that 2 hex digits represent 8 bits, which is a byte.  So, any byte value is simply 2 hex digits.

Have you ever looked at the HTML code that makes up a web page?  Just open your View menu in your browser right now and choose “Source” or “Page Source”.  Somewhere in that HTML code you’ll see something about color, then a 6 character hex number.  One common hex number in HTML code is #FFFFFF.  This is because most computer displays can display 16.7 million colors.  16.7 million happens to be the largest number than can be represented in 24 bits.  24 bits is 3 bytes.  3 bytes can be represented with 6 hex digits.  Color information is represented with 3 bytes.  Each byte being a value between 0 and 255 inclusive.  The 1st byte represents the shade of red.  The 2nd, green, the 3rd, blue.  Combinations of those 3 primary colors make up all the 16.7 million colors (256*256*256 = 16.7 million).  So, the color value represented by the hex number #FFFFFF says the red shade should be at it’s brightest (the first “FF”), as well as the green and the blue shades.  When all 3 primary colors are equal, you get a shade of gray.  When they’re all maxed out, you get white.  So, #FFFFFF represents the color white.  #FF0000 is red.  #00FF00 is green.  #0000FF is blue.  #FF00FF is purple (all red, all blue, no green), etc…

Open Source Software

Open Source Software is software that comes with the source code.  Sometimes, only the source code is provided.  The benefit to the person receiving the software is that they can make any changes they want at any time.  If they find a bug, they can fix it.  Also, if the source code is provided, it’s extremely unlikely that there’s any malicious code in the software because it would be blatantly obvious.  You can’t really hide malicious code if you provide the source code too.  This is only possible if the source code is provided.

There’s a common misconception though about open source software.  Not all of it is free.  There are many commercial products that charge for their software, but happily give the source code to their paying customers.

Then again, there is totally free open source software too.  There seems to be much more of this type of open source software.  There are open source software groups and organizations and web sites that do nothing but host or produce free and open source software.

The Linux Operating System is probably the largest example of Open Source software.  Linux is a completely free operating system and the source code to it is freely available.  Anyone can download and install Linux without having to pay anyone and anyone can get the source code to Linux and make whatever changes their hearts desire.

Here are some good online sources for Open Source software:

SQL – Structured Query Language

SQL (pronounced sequal) is a language used for retrieving data from a database.  There’s no hard and fast, universal standard of this language, but over the years, most database vendors have supported very similar variants.  If you learn SQL from one major database vendor, you won’t have much trouble applying your knowledge to another database.

How do you use SQL?

Consider the following database table and let’s assume the name of the table is “People”:

FirstName LastName Age
John Smith 30
Mary Jackson 24
James Martin 36
John Adams 72

If you wanted to retrieve all of the records (all 4 of them) from that table, you’d write a SQL query like this:


  1: SELECT
  2:     FirstName,
  3:     LastName,
  4:     Age
  5: FROM
  6:     People
  7: 

This tells the database which columns to retrieve data from and which table to retrieve it from.  The result would be:

FirstName LastName Age
John Smith 30
Mary Jackson 24
James Martin 36
John Adams 72

Now, suppose you just want to retrieve all people who’s first name is “John”:


  1: SELECT
  2:     FirstName,
  3:     LastName,
  4:     Age
  5: FROM
  6:     People
  7: WHERE
  8:     FirstName = 'John'

The “Where” clause stipulates that you only want records from the table whose value in the FirstName is ‘John’.  This results in the following:

FirstName LastName Age
John Smith 30
John Adams 72

There’s no limit to how complex a query you can write.  It’s not uncommon to have a query that’s hundreds of lines long, retrieving data from multiple tables in the database.

Any program that writes or reads data to or from a database, almost certainly does so with SQL queries.

Classic ASP – Active Server Pages

image Once called “ASP”, but now called “Classic ASP”, because it’s been replaced by ASP.NET, is Microsoft’s first implementation of a technology to let developers create web applications with code that runs on the server to provide actual functionality, as opposed to just static HTML that has no functionality.

Microsoft provided 2 languages that could be used on the server side:

  1. VBScript
  2. JScript

VBScript was a variant of Visual BASIC and was not object oriented at all.  JScript was a much better language, but almost no one used it.

To create a web page using classic ASP technology, a developer would write the HTML, then would embed snippets of VBScript code throughout the HTML.  Additionally, if the VBScript needed to read or write to a database, the programmer would also embed SQL (a database language) snippets throughout the file.  And, if the developer wanted any client side functionality (like changing focus on a text box or validating data before posting, for example), he would also embed JavaScript throughout the file.

This make one, gigantic, huge, ugly mess of 4 languages intermixed in ONE source file.  On top of that, variables were untyped, leading to programming errors, and the code was interpreted at run time, instead of compiled, reducing performance.

Fortunately, that technology was superseded in February of 2002 with the full release of v1.0 of the .NET Framework.

image Now, with ASP.NET, the server side code is in its own source file, is written in either C# or VB.NET (both fully object oriented languages), and the only thing in the HTML file is HTML and JavaScript.  The server side code is compiled (so it’s fast), and all variables are fully typed, leading to fewer errors and many errors being caught by the compiler before the application is even run.  A full debugger is also provided.