Using the new iPad as a Mobile/Personal Hotspot

by Joe Havelick 16. March 2012 15:31

Since it took me a bit of shuffling to figure it out, I figured I'd write some instructions for hot to enable your new iPad as a mobile hotspot.

  1. You need an iPad with Verizon 4G. (AT&T plans do not support mobile hotspot at this time).
  2. You need to sign up for a data plan. You can do this through Settings > Cellular Data. Currently, all Verizon data plans support mobile hotspot.
  3. Finally, and this was the part I had to find, you can enable the Personal Hotspot feature through Settings > General > Network.

Update:

It seems like after enabling the Personal Hotspot for the first time, or after a reboot (I'm not sure), the Personal Hotspot menu item appeared off the root of the settings menu. I'm not sure why this is, but I hope this helps anyway.

Tags: , , , ,

Tech Tips

The purpose of this meeting is...

by Joe Havelick 14. March 2012 15:58

If you're like me, then you find yourself in too many meetings which you need to ask "what is the purpose of this meeting?" partway through it.

Every meeting should start with the phrase "The purpose of this meeting is...". Even better, every meeting invitation should include that statment.

To be clear, a good description doesn't fit in a meeting title field, like "Customer Issues". It's a full sentence that says something like "The purpose of this meeting is to review the list of active customer issues, assign relative priorities, and use the remaining time to discuss solutions to the highest prioritiy issues." The same goes for periodic meetings. Instead of just "Monthly staff meeting", include a description like "The purpose of this meeting is to discuss progress on long term priorities, review the schedule, and present the latest prototype of the product."

Why?

  • Meetings are expensive. Rather, gathering a group of resources together in a forum that really only allows one of them to actively particpate at a time is a hell of a way to spend salaries.
  • If someone has nothing to do with the purpose, it gives them the chance to opt out. It's like getting on a plane and the pilot saying "This flight goes to Dallas." If you're not sure why you're there, then ask the organizaer why you were invited.
  • It keeps the meeting on task. Again, these things are expensive. If you have a bunch of people in a room for one purpose and you tangent, you're potentially wasting the time of a fraction of that group. Being able to suggest that the tangental discussion be noted and brought "offline" to focus on the purpose is a valuable tool.
  • It helps people focus on the most important thing. Going into a meeting where people just start talking and eventually indicate their question or problem causes people to have to go back and rethink about what they heard. Being able to state the purpose upfront allows people to take in all information in the correct context.
  • By stating it ahead of time, it lets people collect their thoughts and resources to be prepared for the discussion.
  • It's a courtasy. Depending on your situation, you may or may not be able to opt out of certain meetings. If you are, woudn't it be nice to have the information about whether you can contribute before you book the time? If you can't wouldn't you expect that the organizer at least takes the time to clue you in on the purpose, rather than just demanding that you appear?
  • It forces the organizer to... organize. Why am I having this meeting? Do all invitiees need to be there? Can I achieve the same results asyncronously, like over email?

This is something that I try to practice regularly and hope that other people catch on. It's a small habit that can make a major impact.

Tags:

Discourse

Five Hows and Barriers to Implementing Change

by Joe Havelick 21. November 2011 12:43

Envisioning change, whether it is in our personal or business plans, is often the first step to making it happen. But what I find is that many changes don't materialize because we fail to go beyond that. Many significant changes, whether tangible, like banking $4 mil., or intangible, like changing a company culture, need to be broken down into smaller discrete steps. This seems totally obvious when we talk about it outside the context of a problem, but how many times have you tried to implement change simply by building a vision, possibly sharing it, and then "working hard" at it without direct and measurable plans?

The concept of Five Whys has been popularized as a problem solving technique used by lean processes. If you have not heard of this, it essentially involves asking why a problem exists, which derives a new problem, and repeating that process 5 times. The theoretical advantage of this is that it helps persons determine the root cause of an issue, so that it can be dealt with, rather than just the symptom.

But what if we were to use this for planning? What if we made it the Five Hows? Let's take an example from above. How am I going to make $4 mil.? Well, I might decide that I am going to make it through investing. How? Well, I need to learn a whole lot about investing. How? Well, you get the idea.

Now, this brings to light a couple issues. First, do I even have a good plan here, since I don't even know enough about investing to know whether my plan is reasonable. Well great. it's better to acknowledge and address these issues before you spend time going down a path with no map. Second, there is a major problem with the Five Whys that also applies to the Five Hows. It doesn't address the complex nature of the problem at hand. Just as you cannot predictably cause a tsunami by flapping a butterfly wing, a effect rarely boils down to a single cause.

There is a solution. Instead of looking at the Five Whys or the Five Hows as a chain relationship (one-to-one), look at them as a tree (one to many). There is one trunk (the problem), that leads up to many branches (hows), and each branch has many sub branches, etc. The same is true with the roots (whys). Again, this seems obvious, but how many times, when problem solving, do you just take the first solution and run with it. So, the technique I use is to simply say "Okay, we have one solution, but what if that wasn't an option. What would we do then?" For each Why or How, expect to come up with three to five answers before moving on. Don't discount options that seem less valuable at that point in time, because you may find out, further down the chain, that your preferred option may not be as feasible as you think.

Tags:

Discourse

Having Fun with the Netduino

by Joe Havelick 29. October 2011 09:48

Thanks to those that came to see our presentation Having Fun with the Netduino at New England Code Camp 16.

There were a number of requests for additional resources which I will attempt to fulfill here.

Again, thanks, and please leave a comment with any feedback, questions, comments, or concerns.

Tags:

Migrate Libraries and Playlists from Rhapsody to Spotify

by Joe Havelick 24. August 2011 18:58
UPDATE:  I have created a tool to automate most of this process. Please see Rhapsody2Spotify

If you're a Rhapsody user looking to try out Spotify, one of the frustrating things will be the lack of your historical playlists. Rhapsody appears to have done everything it can to prevent you from easily sharing out a library or playlist in a portable format, but there is a fairly simple approach to migrate a playlist or library.

Step 1: Export your library

Option 1:

You're going to want to export the contents of the database table which stores your track information. It's a SQL Lite database, and basic instructions on accessing it can be gathered here. I would suggest using the following SQL command, which will exclude tracks you have deleted:

SELECT ARTIST_NAME, TRACK_NAME
FROM TRACK
WHERE In_Library = 1

Alternately, you could just generate a list for a single playlist using the following:

SELECT ARTIST_NAME, TRACK_NAME
FROM Track
INNER JOIN Playlist_Track ON  Playlist_Track .Track_ID = Track.Track_ID
INNER JOIN Playlist ON  Playlist_Track .Playlist_ID = Playlist.Playlist_ID
WHERE In_Library = 1
AND Playlist_Name = 'Blues'

Save the results to a CSV file.

Option 2:

Right click on a playlist, and select share. Email the playlist to yourself. Copy and paste just the artists and tracks to Excel

Step 2: Remove the quotes

It appears that there is no way to export to CSV from SQLit without double quote qualifiers. The tool that we will use doesn't like that. Simply open the CSV in Excel and save it as a CSV. Alternately, you could do a Replace in notepad.

Step 3: Migrate

The tool we will use is located at http://www.ivyishere.org/. Insomuch as it might be tempting to upload our file, it did not work for me. However, if you open the CSV as a text file, then use the copy/paste mode, I had very good success.

Step 4: Paste into Spotify

Copy the results as instructed. Load the Spotify desktop all, create a new playlist, select it, then click on Paste from the edit menu.

Note: Ivy only imports by Artist and Track name. Although we could export a lot more, it would only consume extra space :-/

Happy listening.

Tags:

Tech Tips

Restore All SQL Databases from a Backup File

by Joe Havelick 5. July 2011 09:22

As part of a  disaster recovery plan, I recently needed to have a script to restore all the databases, from all the backups (Full and Differential) from a single backup file. Here's how I did it:

 

SET NOCOUNT ON;

DECLARE @DBName nvarchar(256)
DECLARE @BackupFile nvarchar(256) = N'\\SERVER\PATH\FILE.bak' 
DECLARE @FileID int

DECLARE @BackupHeaders TABLE
      (
      BackupName nvarchar(128) NULL,
      BackupDescription  nvarchar(255) NULL,
      BackupType smallint NULL,
      ExpirationDate datetime NULL,
      Compressed tinyint NULL,
      Position smallint NULL,
      DeviceType tinyint NULL,
      UserName nvarchar(128) NULL,
      ServerName nvarchar(128) NULL,
      DatabaseName nvarchar(128) NULL,
      DatabaseVersion int NULL,
      DatabaseCreationDate  datetime NULL,
      BackupSize numeric(20,0) NULL,
      FirstLSN numeric(25,0) NULL,
      LastLSN numeric(25,0) NULL,
      CheckpointLSN  numeric(25,0) NULL,
      DatabaseBackupLSN  numeric(25,0) NULL,
      BackupStartDate  datetime NULL,
      BackupFinishDate  datetime NULL,
      SortOrder smallint NULL,
      CodePage smallint NULL,
      UnicodeLocaleId int NULL,
      UnicodeComparisonStyle int NULL,
      CompatibilityLevel  tinyint NULL,
      SoftwareVendorId int NULL,
      SoftwareVersionMajor int NULL,
      SoftwareVersionMinor int NULL,
      SoftwareVersionBuild int NULL,
      MachineName nvarchar(128) NULL,
      Flags int NULL,
      BindingID uniqueidentifier NULL,
      RecoveryForkID uniqueidentifier NULL,
      Collation nvarchar(128) NULL,
      FamilyGUID uniqueidentifier NULL,
      HasBulkLoggedData bit NULL,
      IsSnapshot bit NULL,
      IsReadOnly bit NULL,
      IsSingleUser bit NULL,
      HasBackupChecksums bit NULL,
      IsDamaged bit NULL,
      BeginsLogChain bit NULL,
      HasIncompleteMetaData bit NULL,
      IsForceOffline bit NULL,
      IsCopyOnly bit NULL,
      FirstRecoveryForkID uniqueidentifier NULL,
      ForkPointLSN decimal(25, 0) NULL,
      RecoveryModel nvarchar(60) NULL,
      DifferentialBaseLSN decimal(25, 0) NULL,
      DifferentialBaseGUID uniqueidentifier NULL,
      BackupTypeDescription  nvarchar(60) NULL,
      BackupSetGUID uniqueidentifier NULL,
      CompressedBackupSize binary(8) NULL
);

DECLARE @FileList TABLE
      (
      LogicalName nvarchar(128) NOT NULL,
      PhysicalName nvarchar(260) NOT NULL,
      [Type] char(1) NOT NULL,
      FileGroupName nvarchar(120) NULL,
      Size numeric(20, 0) NOT NULL,
      MaxSize numeric(20, 0) NOT NULL,
      FileID bigint NULL,
      CreateLSN numeric(25,0) NULL,
      DropLSN numeric(25,0) NULL,
      UniqueID uniqueidentifier NULL,
      ReadOnlyLSN numeric(25,0) NULL ,
      ReadWriteLSN numeric(25,0) NULL,
      BackupSizeInBytes bigint NULL,
      SourceBlockSize int NULL,
      FileGroupID int NULL,
      LogGroupGUID uniqueidentifier NULL,
      DifferentialBaseLSN numeric(25,0)NULL,
      DifferentialBaseGUID uniqueidentifier NULL,
      IsReadOnly bit NULL,
      IsPresent bit NULL,
      TDEThumbprint varbinary(32) NULL
 );

DECLARE @DataFilePath nvarchar(256) = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\';
DECLARE @LogFilePath nvarchar(256)  = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\';

--Load backup headers (Backup level Information)
DECLARE @RestoreStatement nvarchar(256);
SET @RestoreStatement = N'RESTORE HEADERONLY FROM DISK=N''' + @BackupFile + '''' ;
INSERT INTO @BackupHeaders
      EXEC(@RestoreStatement);

DECLARE iDB CURSOR FOR SELECT DISTINCT DatabaseName FROM @BackupHeaders 
--For each DB
OPEN iDB
FETCH NEXT FROM iDB INTO @DBName
WHILE @@FETCH_STATUS = 0
BEGIN 
	IF @DBName IN ('master','msdb','model','tempdb') GOTO NextDB;	

	PRINT '';
	PRINT '';
	PRINT '-- Restoring :' + @DBName ;
	
	DECLARE @DBNewName nvarchar(256) = N'Restored_' + @dbName ;
	PRINT '--- Destination Database Name: ' + @DBNewName;
	
	--Get the file list for this DB
	SET @RestoreStatement = N'RESTORE FILELISTONLY
		 FROM DISK=N''' + @BackupFile + ''' WITH FILE=' + CAST((SELECT TOP 1 Position from @BackupHeaders WHERE DatabaseName = @DBName) as nvarchar(10));;
	DELETE FROM @FileList;
	INSERT INTO @FileList
		EXEC(@RestoreStatement);
	--SELECT * FROM @FileList;
	
	--Get the physical file names
	DECLARE @DataFileName nvarchar(256) = REPLACE((SELECT LTRIM(RTRIM(RIGHT(PhysicalName,CHARINDEX('\',REVERSE(PhysicalName)) - 1))) AS DataFileName FROM @FileList WHERE Type = 'D' ), '.mdf', '');
	DECLARE @LogFileName nvarchar(256)  = REPLACE((SELECT LTRIM(RTRIM(RIGHT(PhysicalName,CHARINDEX('\',REVERSE(PhysicalName)) - 1))) AS DataFileName FROM @FileList WHERE Type = 'L' ), '.ldf', '');
	PRINT '--- Destination DataFileName: ' + @DBNewName;
	PRINT '--- Destination LogFileName: ' + @DBNewName;

	DECLARE @LogicalDataFileName nvarchar(256) = (SELECT LogicalName FROM @FileList WHERE Type = 'D');
	DECLARE @LogicalLogFileName nvarchar(256)  = (SELECT LogicalName FROM @FileList WHERE Type = 'L');
	PRINT '--- LogicalDestination DataFileName: ' + @DBNewName;
	PRINT '--- LogicalDestination LogFileName: ' + @DBNewName;

	
	DECLARE iBackup CURSOR FOR SELECT Position FROM @BackupHeaders WHERE DatabaseName = @DBName ORDER BY Position ASC 
	--For each backup, in sequence
	OPEN iBackup
	FETCH NEXT FROM iBackup INTO @FileID
	WHILE @@FETCH_STATUS = 0
	BEGIN 
		
		--Restore the file
		PRINT '---- Restoring FileID: ' + CONVERT(nvarchar(5),@FileID)
			
		DECLARE @RestoreSQL nvarchar(max)= N'
		RESTORE DATABASE 
			[' + @dbNewName + ']
			FROM  DISK = N''' + @BackupFile + '''
			WITH  FILE = ' + CONVERT(nvarchar(5),@FileID) + ',
			MOVE N''' + @LogicalDataFileName + ''' TO N''' + @DataFilePath + @DataFileName + ''',
			MOVE N''' + @LogicalLogFileName + ''' TO N''' + @LogFilePath + @LogFileName + ''',
			NORECOVERY,  
			NOUNLOAD,  
			REPLACE'
		--PRINT @RestoreSQL

		EXEC(@RestoreSQL)
		
		PRINT '';
	NextFile:
	FETCH NEXT FROM iBackup INTO @FileID
	END 
	CLOSE iBackup
	DEALLOCATE iBackup
	
	--Recover the database
	PRINT '--- Recovering ' + @DBNewName
	RESTORE Database @DBNewName WITH RECOVERY
	

NextDB:
FETCH NEXT FROM iDB INTO @DBName
END 
CLOSE iDB
DEALLOCATE iDB

 

Note:

  • This was not engineered to handle incrementals, but I believe it should be easily accomidated with a couple small changes (if any)
  • This excludes the system databases via the 'IF @DBName IN...' statement.

Tags:

Tech Tips

About Me

Joe Havelick is a reasonable facsimile of this photo.


profile for Joe on Stack Exchange, a network of free, community-driven Q&A sites

Recommendations