Windows 7 Windows Key Shortcuts

March 29th, 2010

Windows 7 comes with many new tools and features designed to make it the most robust and powerful operating system ever.  The intuitive design means that many people know how to use Windows, but there are numerous tips and tricks that you can master to make yourself a more efficient user, and in the next two updates, I’m going to talk about some of these.

Most people know how to use CTRL+C and CTRL+V to  copy and paste, but did you know that in addition to these and other commonly-known shortcut keys, there are numerous others that involve the Windows key? Take a look at this table and familiarize yourself with a few of these shortcuts and you’ll find yourself navigating Windows like an expert:

Key Combination

Result

Win+Up Arrow

Maximize window

Win+Down Arrow

Minimize / restore window

Win+Left Arrow

Snap window to left side

Win+Right Arrow

Snap window to right side

Win+Home

Minimize / restore all other windows

Win+Space

View desktop without minimizing any windows

Win+Tab  Win+Shift+Tab

Cycle through windows in 3D

Win+D

Minimize / restore all windows

Win+E

Open Windows Explorer at Computer node

Win+F

Open Windows Search

Win+L

Lock desktop

Win+R

Open Run window

Win+U

Open Ease of Access Center

Share

How to Create Custom Ringtones for your iPhone from Music Files in iTunes

March 29th, 2010

In iTunes, by default, you can only create ringtones from music you purchased from the iTunes Store. I personally have never bought any music from the iTunes store – I have a lot of music on CD that I legally own and have ripped to my computer in the form of MP3 files. It’s easy enough to add such files to your iTunes library and subsequently your iPhone (use the File -> Add File/Folder to Library option in iTunes).

So let’s say you’ve got a song you like and you want to create a ringtone out of it. Since you can’t make a ringtone out of an entire song, you need to identify which portion of the song you want to use as the ringtone. I try to find a catchy riff that’s easy to loop and is going to be loud enough to hear like you’d expect from a normal ringtone.

So for example, I have a song here that I want to make a ringtone out of. I’ve identified that if I just use the first two bars, or roughly the first eight seconds of the song, it should be about right.

clip_image002

So right-click on the song and then click Get Info. Then click the Options tab. Set the Start Time and End Time values using the x:xx.xxx format and then click OK. At this point you’re just giving it your best guess.

clip_image004

Now back in the music library screen in iTunes, I like to select the checkbox for ONLY the song I’m creating the ringtone from, like so:

clip_image006

Then, at the bottom of the screen, select the repeat button – the third one from the left:

clip_image008

This allows you to play and loop the snippet so that you can hear it just as you would if it were playing as a ringtone from your phone.

Most likely you’re going to find that your timing is a little off and you’ll need to go back into the song properties and adjust the start and stop times. Ideally you want it to play so that when it loops back to the beginning, it maintains the beat and blends seamlessly from end to start. Here’s what I came up with for this song after I was satisfied with the timing:

clip_image010

Once you’ve done that, the next step is to right-click the song and then click Create AAC Version. This creates a compact audio file that captures only the portion of the song that you specified based on the start and stop time values.

Next, right-click the AAC version and then click Copy.

clip_image012

Now on your computer, create a folder where you will store ringtone files. Right-click in this folder and then click Paste. You should see your file name with a .m4a extension. Rename this, changing the extension to .m4r.

Now, back in iTunes you can delete the AAC version of the song you created. Right-click it and then click Delete. Click Remove and then click Keep File. This removes it from your iTunes library without deleting the file itself from your computer.

Also, don’t forget to go back into the options for the original song and uncheck the start and stop times. If you don’t do this, then any time you try to play this song in iTunes, or on your iPhone or iPod once you’ve synced with iTunes, then it will play only the portion of the song between the start and stop times.

Now, in iTunes, click the Ringtones library. Then on the File menu, click Add File to Library. Browse to the folder where you copied the ringtone file to and then click Open.

Clearly, you can see that I think KMFDM songs make great ringtones.

clip_image014

Finally, click your iPhone device, and then on the Ringtones tab, select Sync ringtones and then click Apply.

clip_image016

Having done this, you can now go into your contacts on your phone and assign a custom ringtone that you’ve created as the default ringtone, or even to individual contacts.

Share

Sounding Off Part Three

March 29th, 2010

An internal paint job to avoid monotony and quality equipment completes the package.

With the anticipation of spending many hours in the studio, I took a creative approach to painting the walls. A darker base color with splashes of bright colors helped lighten the small space.

The Electro-Voice Cardinal microphone is the key to quality in the recordings. I started out with a USB headset microphone and found that it created a thin and often echoing sound quality. Changing to a cardioid condenser microphone eliminated many of the audio artifacts that I was struggling to process out of previous recordings.

A tube pre-amp from Behringer provides a warm, smooth sound that rounds out the dull sound of purely digital recordings. The amp also provides the phantom power required by the Cardinal microphone.

The Behringer MX602A low-noise mixer provides live control over basic EQ and gain settings. It also provides a headphone jack. Using the mixer’s headphone jack instead of the computer’s jack eliminated the distracting delay that sound cards are notorious for.

I also added a Vistablet digitizing tablet for more precise control over mouse and cursor movement while recording the video portion of projects. Using a mouse works fine. However, the mouse would not always register when I moved it. Not to mention that the mouse pad is rarely able to cover the entire space on the monitor resulting in a jerky recording from picking the mouse up and moving back to the other side of the pad so it would roll clear across the screen. The digitizing tablet represents the entire area of the monitor providing instant movement of the cursor without the typical trials of a mouse.

All of this is used with the new Camtasia version 7 for both audio and video recording. If any additional processing of audio is required, I can easily do that with Audacity 3.0.

The final touch was the strategic placement of baffling materials on the walls and ceiling. My first recordings were much too “live” with reverberation, even in this small space. Baffling hung from the ceiling and on the walls dampened that to a reasonable bright sound. Some additional wall hangings also cancelled out an annoying high frequency ring. I had no idea when I started that it would get that detailed and nitpicky to make everything work smoothly.

I have now spent nearly a week and a half recording both video and audio in the new studio. The difference it has made is indescribable in both the quality of the recordings and my ability to block out the daily distractions.

Share

Sounding Off Part Two

March 28th, 2010

The greatest challenge to building a room, or booth, suitable for recording quality audio is ambient noise. Simple walls and basic building materials are definitely not suitable for dampening the various sounds and frequencies that surround us. To solve this issue, walls were built with two by four construction overlayed with dense compressed wood. Inside the walls is standard insulation along with a specialized sound dampening board that looks like compressed dead grass and dirt.

Most of the wall studs and floor joists are offset instead of straight across to help capture various sound frequencies. My research indicated that the more consistently shaped the air spaces in the wall and floor, the easier it is for various frequencies to penetrate into the sound room.

The floor is elevated two inches off the office floor by commercial casters. This helps isolate the floor of the “studio” from the low end frequencies and vibrations that easily move through solids. Flooring is completely enclosed with the spaces filled with the same as the walls. A dense foam rubber gasket to further isolate the interior of the room from the exterior also isolates the top floor.

All cabling and wiring is also run with an offset. By this I mean that the entry location of any cabling or wiring is approximately 30 inches to the side, or below the location of the other end on the inside of the room. Any straight through access from the outside to the inside would allow sound to travel through the walls with very little if any dampening.

Ventilation is provided by an ultra-quiet bank of 12v fans. The fans are placed within a ventilation box that is composed of two sides. One side provides incoming air and the other provides a return. Within the box are randomly placed caches of baffling to quiet the sound of air movement within the ventilation box.

Lighting comes from a special fluorescent lighting fixture rated for extremely quiet operation. There is none of the typical buzz heard from standard fluorescent lights.

Flooring is simply low pile commercial carpeting over a six pound pad and stretched to keep it from bunching up.

Finally, the door is built with an outside layer that is about three quarters of an inch overlap similar to the way the walls are built. This helps eliminate sound penetration through any gaps along the sides of the door.

In the next blog, I will discuss the equipment used to create the audio recordings.

Share

Data-tier Applications

March 25th, 2010

SQL Server 2008 R2 provides an easy way to author, deploy, and manage data-tier objects as a single entity through data-tier applications. A data-tier application (DAC) is an entity that contains all of the database and instance objects used by an application.

You can create DACs using two methods. First, you can use the Extract Data-tier Application wizard to extract database and instance objects from a database in SQL Server Management Studio (SSMS). This wizard will take you through a couple simple steps and create the DAC for you.

After you have extracted the DAC, you can author it in Visual Studio 2010 or you can deploy it to an instance of SQL Server using the Deploy Data-tier Application wizard. The Deploy Data-tier Application wizard will guide you through several steps to deploy the DAC to the instance you select.

You can create a DAC in Visual Studio 2010 or author a DAC you extracted by starting a Data-Tier Application project. After a DAC has been imported, you can add several elements to the DAC project: DAC properties, definitions of all the database objects used by the application, definitions of the instance-level objects, a server selection policy that defines the pre-requisite conditions an instance of the Database Engine should have to host the DAC, and files and scripts that can be embedded in the DAC.

There are two ways to view DACs: through Object Explorer and through Utility Explorer. Object Explorer will let you see a list of DACs on the instance. Utility Explorer will give you a more detailed view of the DAC, and allows you to view utilization information just like managed instances.

Share

SQL Server Utility: Managing Multiple SQL Server Instances

March 25th, 2010

Have you ever wanted to be able to see a centralized view of Microsoft SQL Server instances and database applications? SQL Server 2008 R2 introduces a new way to view information about your SQL Server instances.  At a glance, you can see a snapshot of your instances including utilization information using the SQL Server Utility. This information is available in a new view called the Utility Explorer that you access through SQL Server Management Studio.

When you open the Utility Explorer, you are presented with the screen shown below. In this screen, you are given the steps you need to do in order to use SQL Server Utility. Each of these topics links to steps to complete the activity.

In order to use SQL Server Utility, you must create a Utility Control Point. The other steps are optional. A Utility Control Point, or UCP, is configured on a SQL Server instance. After configuring a UCP, you can enroll other SQL Server instances on the same UCP. The Utility Explorer displays information about each instance such as CPU utilization, file space utilization and volume space utilization. The display will look similar to the image below. The columns displayed are configurable by right-clicking the title bar and selecting the information you wish to view.

Notice the red arrow under volume space. This is indicating the instance is overutilized. If the instance were underutilized, there would be a green down arrow. The green checkmarks indicate the instance is well utilized. You can configure the values that will alert you when the instance is overutilized or underutilized. This allows you to customize these values best for your organization.

In addition to view information about SQL Server instances, you can view information about data-tier applications. My next post will discuss data-tier applications.

Share

Using Windows PowerShell as an IT Pro – Part 13

March 22nd, 2010

In my last post I looked at some basic variable types. Now I will examine arrays.
An array is a data structure for storing a collection of data elements of the same type. Basically this means that you can have a single variable that stores multiple values.
Assign multiple values to a variable to create and initialize an array. The values stored in the array are delimited with a comma and separated from the variable name by the assignment operator (=).
For example, to create an array named $a that contains the seven numeric (int) values of 22, 5, 10, 8, 12, 9, and 80, type:
$a = 20,4,11,3,1,9,60

When no data type is specified, Windows PowerShell creates each array as an object array (type: object[]). You can create a strongly typed array, that is, an array that can contain only values of a particular type, the same way you create a strongly typed variable. You specify a type, such as string[], long[], or int32[]. Precede the variable name with an array type enclosed in brackets to cast an array.
[int32[]]$ia = 1500,2230,3350,4000

Simply type the array name to display all the elements in the array. For example:
$ia

You can refer to the elements in an array by using an index, beginning at position 0. Enclose the index number in brackets. For example, to display the third element in the $a array, type:
$ia[2]

You can create arrays that are cast to any supported type in the Microsoft .NET Framework. For example, the objects that Get-Process retrieves to represent processes are of the System.Diagnostics.Process type. Enter the following command to create a strongly typed array of process objects.
[Diagnostics.Process[]]$gp = Get-Process

Then, display the contents of $gp to see a list of running processes.
$gp

In my next post we will review operators and expressions.

Share

Sounding Off Part One

March 21st, 2010

A big part of what we do at Aeshen is creating instructional and informational content. We painstakingly work to create PowerPoint presentations, demonstration scripts for instructors, and supporting documentation. After creating these materials, we are often called upon to create a complete set of video and audio recordings based on the new content.

Creating the video recordings is a simple task. Very few things in the surrounding environment force me to re-record video footage of the demonstrations or PowerPoint presentations.

Audio is a completely different story. The human brain is very sophisticated. Not only can it perform calculations and orchestrate the overall functioning of your body, it works as an extremely fine tuned filter for extraneous stimuli. I did not realize this until I began recording audio tracks for the content that I developed.

It quickly became evident that a silent office or home space is not quiet at all. The extra sounds were simply filtered out and ignored by my brain. When I played back some of my first recordings, they were filled with sounds of breathing, air moving through the ventilation system, vehicles passing by, airplanes overhead, birds, dogs, and even far off construction noises.

I started out by hanging carpet and other materials around me to absorb the sounds. When that did not work, I moved from location to location hoping to find a quieter spot to record in. What I really found out is that each location in the building presented a different collection of background noises to filter out.

The other frustration was the variety of reverberation experienced in each location. One location was a simple room that offered little reverberation, but was subject to a great deal of background noise. Another room had a vaulted ceiling set at odd angles. Definitely not the right place to record quality audio.

After trying every room I could, I finally resigned myself to finding an alternative place to record. Unfortunately, recording studios charge from $65 to well over $100 per hour of use. That put them out when I realized that I would need many hours to record the audio.

Some heavy research helped me to decide that the best thing to do was to create my own studio. I am now sitting in a six by eight foot sound isolating room writing this blog. Building the studio was definitely not without its challenges. However, the tighter control I now have over the environment is enabling me to record much higher quality audio than I had before.

In the second installment of this blog, I will discuss the building of the studio along with some of the challenges I faced.

Share

Better error messages (Part 2)

March 19th, 2010

…Continued from part 1

In part 1, I scolded you for showing error messages to users.  I suppose I should ‘fess up though and just admit that I’ve shown my share of error messages over the years!  The more I consider the problem though, the more I think that error messages are a bit of a lazy way out. 

In this part, let’s get to a more practical level and talk about when it might seem important to show messages.  Hopefully we can find ways to avoid most of them.  There may well be other classes of messages that seem to require message boxes, but I’ll start with these. 

Reasons to show a dialog:

  1. Fatal error such as an unhandled exception
  2. Environment problem like file missing, bad permissions, hardware disconnected
  3. Transient outage (network, file server, database)
  4. The user must take action (user mistake, conflict with existing record)
  5. Warning/info message like update available

Fatal errors

On the surface this might seem like a no-brainer.  If you catch an unhandled exception in your Application object, then there just isn’t much that you can do about it.  Clearly, the ideal would be to avoid it, but it’s too late.  On the other hand, this is very valuable information.  This is definitely when you want your users to let you know so you can prevent it from happening again.  Remember though, that your user clicked OK, the dialog disappeared, and then the whole app went away.  Totally unexpected!

If the user can restart the app and keep going, then you probably won’t ever hear about it.  Sometime, over lunch, you might hear people make a mention of “that one” problem that happens a few times each week.  Don’t bother getting annoyed that no one reported it.  Code defensively!

If you can send that exception, the current record, any temp files, or anything else that would be useful, then you’ll be in much better shape.  Write the data to a tracker database, open a help desk ticket, whatever you need to do.  Rather than trying to reproduce an error that might happen once in a thousand times, this give you hard data from the time that it did happen.

Environment problems

These can be tricky.  If a file is missing or has the wrong permissions then something important just isn’t going to happen.  If hardware is disconnected, then your bar code scanner will be useless.  The good thing about most of these errors is that you can check for the condition before anything goes wrong.

If hardware is missing, display a message (I never said dialogs are completely forbidden!).  The trick is to do the work on the user’s behalf as much as possible.  The user will need to reconnect the device, but your code can check periodically and “unlock” the application when it appears.  After all, if it’s required, then clicking OK doesn’t serve any purpose unless the device is back anyway.

You can check for files to exist or even read-write permissions before writing.  Instead of a generic unhandled exception since “that file won’t ever be set to read-only” just expect it.  Log and send the error, then let the user know that the application isn’t useable without help desk intervention.  The worst thing is for the user to get through four screens of data entry just to lose everything due to an “impossible error.”  Make it work every time for your users.  You’ll have a better reputation and better information about what needs attention.

Outage

Databases stop responding.  Network links go down.  File servers get rebooted during production hours.  There isn’t much that you can do about them, but you pretty much know that the issue won’t last forever.  Let the user know that there is an outage, and make it clear that retrying is happening automatically.  Users hate “please retry.”  They already attempted it and it failed.  They are starting out annoyed and this won’t help.

Required action

Clearly there are situations where you can’t do anything for the user.  Is a required field missing?  Did another user update the same record and cause a conflict?  I hate to admit it, but here’s a situation that can’t be avoided.  At the same time though, you can do a better job with it.  Is a field blank or formatted wrong?  Jump to the field and flash a bright red outline around it.  Did the update cause a conflict?  Create a region above or below your contents that only appears with critical information.  Just like a web application will often have an error message area, there’s no reason why a desktop application can’t do the same thing.  A dialog gets dismissed and forgotten.  Show the message until the update is successful so the user can actually benefit from the information.

Warning/Info messages

Now these are definitely the bane of any user.  A message that says “record saved” is just a stupid impediment to the work flow.  Flash an indicator somewhere, show a non-modal notification (balloon dialog), or use a status bar in the application.  Just don’t interrupt for something that has no business interrupting.  The user only cares when something goes wrong – otherwise stay out of the way!

Continued in part 3…

Share

Using Windows PowerShell as an IT Pro – Part 12

March 19th, 2010

In my last post I began looking at variables. Now I will go over types and how they function.
Windows PowerShell supports a number of different types such as strings, integers, arrays, etc. You can explicitly specify a type or allow Windows PowerShell to do it dynamically, which is sometimes referred to as automatic type conversion. Type conversions are used when an object of one type is assigned a value that requires another type (such as adding a string to a number). This conversion happens automatically as long as the type was not specified manually, and it is not destructive to the original object.
For example we can assign a new value to the $Loc variable which currently has the System.Management.Automation.PathInfo type, and then use the GetType method to show its new type.
$Loc = "Test"
$Loc.GetType().FullName

Then, assign it a numeric value and check the type again.
$Loc = 3
$Loc.GetType().FullName

$Loc was made an Int32 because the value wasn’t enclosed in quotes and because the value was composed solely of digits. Had it been in quotes, it would have been interpreted as a System.String.
In both cases, Windows PowerShell determined the data type that was the most appropriate for the value of the variable. This should work for most variables but there may be situations where you want the variable type to remain as it is. Suppose you are reading values out of a file and you always want the values to be treated as strings. Some of the values, however, might contain only digits, raising the possibility that Windows PowerShell would treat them as Int32 or another numeric type, which may create problems for your script. If Windows PowerShell does not recognize the value as a string, then all the methods of the System.String class are not available (and your script might rely on one of these unavailable methods).
Manually assigning a type is simple and is done when you create it. Assigning a string to a variable essentially forces the variable to be of the System.String class. Assigning a number to a variable, on the other hand, usually results in the variable becoming an Integer (or, more specifically, an Int32, which can store a specific range of values). For example, we can create a new variable and define it as a string.
[String]$var = 5
$Var.GetType().FullName

Normally, $Var would have been an Int32, but because we defined it as a String, it makes the numeric value we assigned to it a string.
Forcibly declaring variables does have repercussions, though they are not necessarily bad. In the next example, a new variable is created, defined as an integer, and assigned a numeric value. Then, it is assigned a string value.
[Int]$Num = 4
$Num = "test"

As shown above, when we tried to assign a string value to it, an error message was displayed. Because $Num was defined as a Int32, Windows PowerShell expected to convert the string “test” into an integer value. It was unable to do this, nor was it able to change the type of $Num to String.
In my next post we continue to look at types.

Share