PowerShell to the rescue

Jun28

PowerShell Recently, while working on a new module installer I needed to be able to roll back my test environment as I went through the various iterations.  This was not a trivial installation and therefore I knew that I would likely have to take several stabs at this before I got it right.

Normally, I would turn to either Virtual PC or VMWare in this case.  Unfortunately Vista and Virtual PC were not cooperating today and it was taking forever just to do simple file copies between the VPC and host machine.  Installing the module which clocked in at just over 4Mb took forever.  All of my time savings was being eaten up by a finicky Vista install.  Since I re-paved my machine a few months back I did not currently have a VMWare installation running on this machine so that was not really an option.

 Lucky for me, my friendly neighborhood superhero just happened to be in the area and heard my calls for help.  Whipping out my trusty copy of Windows PowerShell in Action I was able to quickly craft a function to handle this daunting task.  Since I am a relative newbie at PowerShell it was a good learning excercise.  Once I got past dot sourcing my script file, I was off and running.

function RestoreDNN ($user, $password) {
    "Restoring website..."
    $dnnDir = 'D:\Websites\DNNTest'
    Copy-Item "$dnnDir\config\web.Config" $dnnDir
    Copy-Item "$dnnDir\config\siteurls.Config" $dnnDir
    Remove-Item "$dnnDir\app_code\MyModule" -recurse -force
    Remove-Item "$dnnDir\desktopmodules\MyModule_*" -recurse -force

    "Stopping web service..."
    Get-Process w3wp |Stop-Process

    "Restoring database..."
    osql -U $user-P $password -Q "RESTORE DATABASE DNNTest FROM DISK = 
            'c:\MSSQL\Backup\dnntest.bak'"

    "Done"
}

With the script written and run in my console, I am now able to restore my environment by a simple command "RestoreDNN myUser myPassword", 10-15 seconds later my DNN environment is back to where it was before I installed the module, and ready for another round of testing.

This script is a sample for illustrative purposes and is not intended to be production code.  I have cut out some repetitive code and removed specific project references.  I am sure that over time I will make it a little more generic and more robust, but for now it does what I needed, and took me less time to write than it would have taken to install and setup a VMWare environment.

If you are interested in PowerShell, then I highly recommend you read the blogs by the PowerShell team or ThePowerShellGuy as they contain a lot of valuable information for both newbie's and experience PowerShell gurus.



Three Things I thought I learned about Software in College

Jun28

Dare Obasanjo posted about Three Things I Learned About Software in College, which Scott Hanselman followed up with Three Things I Learned About Software WHILE NOT in College.  So here are my lists:

Things I learned about software in college

  1. Never close your eyes to learning.  The world of software is constantly evolving and if you don't stay in a learning mode, you will fall behind.  I started college writing code on mainframes and left college coding on PCs.
  2. There is no one perfect language.  There are the languages you know, the languages you don't know, and the languages that have yet to be created.  If you are following rule number 1, then the language you use today is likely not going to be the same as the one you use 5 years from now.  Get used to it.
  3. Programming is primarily about problem solving.  Improve your logical thinking skills and you will improve your programming skills.

Things I learned about software WHILE NOT in college

  1. No matter how good of a programmer you think you are, there is always someone better and faster:  Unless your name is Scott Hanselman.
  2. You are not as good a programmer as you think you are.
  3. Often, "good enough" is "perfect".

Things I THOUGHT I learned about software in college (but which I apparently need to keep re-learning)

  1. Some of my most brilliant code was written in the wee hours of the morning, the night before it was due.
  2. Some of my buggiest code was written in the wee hours of the morning, the night before it was due.
  3. Good code rarely happens in a vacuum.

 



DotNetNuke 4.5.4 has entered release testing

Jun24

starburst_rc1 This weekend, DotNetNuke 4.5.4 was released to benefactors for final release testing.  4.5.4 is primarily a stabilization release with just a few key enhancements and one new feature.

The final release date has not been announced pending the results of testing by the benefactors and core team.  As part of this release we have started implementing new processes to help improve the stability of each release.  We still have a lot of work to do, but this marks the first step in refining the process.

 

 

 

Component Issue Type Issue ID Summary
Admin / Host Functions Bug DNN-4634 User Accounts manager page can crash if not all user fields present.
Admin / Host Functions Bug DNN-5075 Adding/deleting security roles - notification/date format.
Admin / Host Functions Bug DNN-5239 Issue with "required" profile properties.
Admin / Host Functions Bug DNN-5433 Redirect after login
Admin / Host Functions Bug DNN-5616 Core code should not reference external images...
Admin / Host Functions Bug DNN-5646 last lock-out date incorrect
Admin / Host Functions Bug DNN-5765 Sitemap.aspx Including Link to DotNetNuke.com
Admin / Host Functions Bug DNN-5614 Page Quota Not Working in Demo Portals
Admin / Host Functions Bug DNN-5771 Profile Definition Required Needs to be Tied to Visibility
Admin / Host Functions Bug DNN-5715 Install wizard runs when database is missing
Admin / Host Functions Bug DNN-5727 Can't delete default home page after installation/yellow screen of death
Admin / Host Functions Bug DNN-5787 Account Login module is not visible to logged in users
Admin / Host Functions Enhancement DNN-5805 short circuit check for known account defaults
Control Panel Bug DNN-1579 Misleading Tooltips
General Bug DNN-5754 Profile Property Names that contain spaces raise js errors
Installation / Upgrade Bug DNN-5605 Password length error string
Installation / Upgrade Bug DNN-5606 Possible incorrect description text
Localization / ML Bug DNN-2612 XML Error in Resource Verifier
Localization / ML Bug DNN-5835 typo in manage users localization file
Localization / ML Enhancement DNN-5778 Inconsistent on page help text on the Account Login module Help buttons
Performance Task DNN-5714 unneccesary call in BuildDiv method of FieldEditorControl
Security Bug DNN-5829 DNN Membership Preventing Active Directory Login
Security Bug DNN-5802 ReturnUrl - Cross Site Request Forgery Vector
Security Bug DNN-5746 New user registration not working if specific page defined
Security Bug DNN-5734 Roles duplicated on "Global Roles" due to list values
Security Bug DNN-2593 Custom module permissions not deleted
Security New Feature DNN-678 SSL Support
Skinning Bug DNN-4590 DNN not rendering link to skins CSS file
Skinning Bug DNN-5672 Pagingtable class made ineffective by hard-coded styles
Skinning Bug DNN-5618 FixImagePath routine trashing APPIMAGEPATH
Templates Bug DNN-5549 CS1010: Newline in constant error after creating new CS module using template
UI / Usability Bug DNN-5708 Wrong CSS class specified for "Manage User Credentials" tab
UI / Usability Bug DNN-5628 Assignment issue in HelpButtonControl

 



It doesn't get much clearer than this...

Jun16

bad_pc I recently installed the Pinnacle Studio version 11 upgrade and found this while while going through the ReadMe file:

7. Windows XP: Switching User During Capture.
Never do this. Very bad things will happen.

Sometimes though I think that being a little too succinct with warning messages can have just the opposite effect of the one intended.  When I saw that I immediately thought...  Maybe I should give it a try just to see what happens.  To me, this warning is about the equivalent of you mom telling you not to do something and when pressed for a reason says "Because I said so that's why!"  That answer just made me all the more determined to do whatever it was I had been told not to do.

Even now, as I sit here, my mind is wandering through all the possibilities of how bad could it truly be.  Maybe I could try this in a VM.. just in case?  Is it so bad that even a VM couldn't protect me?  Would it be one of those spectacular crashes resulting in a blue screen and an unbootable system...  or would it be one of those really subtle bugs that slowly saps the energy from your system until it runs extremely slow (in other words would it make my XP system run like Windows Vista).



OpenForce '07 Speakers and Sessions

Jun14

OpenForce400x131

The official list of Speakers and Sessions have been posted on the DotNetNuke OpenForce '07 website.  We are really excited about the list of speakers for the conference.  We have a few additional special guests that we are still finalizing and we'll keep you posted once we have confirmed their attendance.

As we started putting the conference together, we thought that it would be a good idea to include the broader .Net Open Source community in the conference.  This first conference still primarily focuses on DotNetNuke, but assuming we are succesful with this first event, we plan to increase participation of the OS community for future events, even to the point of having additional tracks dedicated to non-DNN OS projects.

Below is a breakdown of the speakers for OpenForce '07

Core TeamDNN CommunityOpen Source SpeakersGuest Speakers
Phil Beadle Jim Bonnie Rob Connery Scott Guthrie
Joe Brinkman Peter Donker Jay Flowers Mark Trenchard
Cathal Connolly Patrick Santry Jon Galloway ***More to come***
Chris Hammond Peter Schotman Phil Haack  
Jon Henning Mitchel Sellers Charlie Poole  
Nik Kalyani Lee Sykes    
Sebastian Leupold Tracy Wittenkeller    
Vicenç Masanas      
Charles Nurse      
Erik Van Ballegoij      
Shaun Walker      
Scott Willhite      


I've moved

Jun12

I've Moved After posting for a couple of years on my DotNetNuke.com blog, I have decided that it was time to start hosting my blog on a dedicated site.  There are a couple of reasons for this decision.  I have felt a bit constrained on DotNetNuke.com. 

Like much of the online world, the blogosphere is a fast moving environment.  There are dozens of tools aimed at making blogging a much richer experience and that simplify the blogging process.  Social networking sites like Digg and DotNetKicks that are aimed at bloggers have been popping up like crazy.  The DotNetNuke blogging module has generally lagged behind the rest of the blogosphere in supporting recent blogging advances.  I always felt like I was fighting with the module just to get a blog posted much less to take advantage of other blogging features.

In addition to the lack of tool support, the policies we put in place on DotNetNuke.com limited the topics that I was free to discuss.  For the most part, this was not a huge deal, but I was constantly wondering if my posts about woodworking or other personal activities were appropriate.  I do not plan to shift the primary focus of my blog, but I have more interests than just DotNetNuke and I don't want to feel constrained.  I want to blog about my passions, whether it is DotNetNuke, .Net, woodworking or even my weekend bike outings.

I also feel that if I am blogging, that I want to get the most out of the experience.  I want to be able to track my subscribers, to include standard articles, to more fully explore webcasting and podcasting, and in general to have more control and visibility over my blogging experience.

Does this mean that I will no longer blog on DotNetNuke.com?  No.  My plan is to blog to my home blog (http://blog.theaccidentalgeek.com) and then cross post to DotNetNuke.com.  This will allow me to create my blog using a rich blog editor and then just post the resulting HTML on DotNetNuke.com as well.  This will allow me to easily syndicate my entire feed while also making it easy for DotNetNuke visitors to still get to the content.

I asked Scott Hanselman (DasBlog) and Phil Haack (SubText) for recommendations as to which platform would best suit my needs.  As a result I have chosen SubText as my blogging platform of choice moving forward.  Phil and his project team have done a great job of keeping SubText current with most of the features that I really care about and if there is something missing, I am not afraid to jump in and add my custom feature.  Because I am hosting the site myself, I can do that without impacting anyone else.



"The Accidental Geek"

Joe Brinkman

Joe Brinkman

I am a long-time geek who is lucky enough to work on DotNetNuke full-time. You will also see the occassional post on my other passion - woodworking.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

TextBox

Microsoft Store

Artisteer - DNN Skin Generator