PowerShell: Remove Blank Lines from Command Output

Mark Berry March 8, 2011

For some reason, when you run some shell commands in a PowerShell script, the output has an extra blank line after each line. It doesn’t seem to affect commands run in the console, but it is evident using the command line in the PowerGUI Script Editor. Examples are ipconfig and tracert.

The thing to keep in mind is that when you run a shell command, you are actually getting back an array of objects, one item per line.

More...

Set up Windows Authentication in IE8

Mark Berry December 21, 2010

If you have a web site that requires logging on with Windows Authentication, you can set Internet Explorer 8 to pass through your current credentials, thus bypassing the logon prompt. Vernon gives short and sweet instructions on how to set your Internet Options in this thread:

  1. On the Security tab, make sure the site is added under “Trusted Sites” and set the Security levels for this zone to Low. (Actually, I would try Medium first.)
  2. Click on the Custom level… button and go right down to the bottom, under User Authentication make sure the radio button is in “Automatic logon with current user name and password”.
  3. On the Advanced tab, under Security, make sure “Enable Integrated Windows Authentication *” (requires restart) is checked.
More...

Accessing a Button in a Visual WebGui ListView

Mark Berry December 3, 2010

I’ve developed a Visual WebGui 6.4 RC1 form that uses a ListView control with a button in each row. The button opens a custom control when pressed. It’s very similar to the “Custom ListView with control” demo in the CompanionKit.

At one point I need to be able to change the text of the button from “outside” the ListView, i.e. with no reference to the button. It took me a while to figure out how to get to the control. Here’s what I found.

More...

Run-time Error 48 Loading DLL

Mark Berry July 23, 2010

I maintain a Visual Basic 6 application that connects to the server using ADO. Recently a Windows XP SP3 computer started throwing this error when first connecting to the server component:

Run-time error 48:
Error in loading DLL

More...

Multiple Controllers Found with the Name ‘HomeController’

Mark Berry July 3, 2008

I’ve been playing with Billy McCafferty’s S#arpArchitecture. I decided to strip the Northwind references out of the sample so I could try the framework on my own project. After removing the Northwind-specific files and renaming the remaining files and namespaces to “MyProject,” I kept getting this error when I started the application:  “Multiple controllers found with the name ‘HomeController’”: 

More...

Virtualization, Source Control, and Bug Tracking

Mark Berry June 6, 2008

I attended the San Diego .NET Developer Group on Tuesday. Nick Pearce gave a great presentation on how to use virtual machines as a developer. I jotted down a few notes on topics he and others mentioned.

Virtualization

Some random notes: 

  • Nick is moving from Virutal PC to VMWare for the dual-monitor support.
  • Remember to turn on hardware virtualization support in your computer's BIOS. Some (like my Thinkpad) disable that by default. 
  • A quad-core processor might help performance with multiple virtual machines.
  • Use a separate disk drive for a differencing volume to reduce contention.
  • You can clone a PC image, but use SysPrep or (XP only) NewSID to fix the SID in the clone.

Source Control

Several products were mentioned:  SourceGear Vault, PerForce, Subversion.

Bug Tracking

More products here:  FogBugz (integrates wtih PerForce), Trac, BugTrac, Mingle

More...

Storming the Castle

Mark Berry October 21, 2007

I've been learning about so many development strategies in the last few months that my head is spinning! My journey has taken me in two main directions:

  1. Learning about concepts like object-oriented programming (OOP), design patterns, test-driven development, and agile development.
  2. Learning about tools that support #1.

This article makes no attempt to be comprehensive about either point; it's mostly just a list of resources that I'm using and may need to refer to again.

Concepts

New books on my bookshelf:

Relevant articles and blogs:

  • Billy McCafferty's NHibernate Best Practices with ASP.NET. According to reader rankings, this is the #1 article in the CodePlex Design and Architecture section. I didn't learn much about NHibernate in this article, but I learned a lot about architecting web applications. He goes into great detail about separation of concerns, keeping the data layer from depending on the domain (business) layer, etc. Downloadable files include a basic sample and an enterprise sample. It's rare to come across someone who knows his stuff and knows how to explain it in writing. McCafferty has both. Tons of links to other resources, as well as over 700 follow-up comments with lots of helpful answers.
  • Billy McCafferty's blog. Maybe I should have started here. It sounds like McCafferty's group has decided to abandon the (somewhat complex) techniques laid out in the preceding article and convert their current development to Castle MonoRail. I've been considering MonoRail; I must say that McCafferty's enthusiastic endorsement after several months of use is encouraging.

Tools 

As usual, Microsoft is doing a great job of promoting upcoming technologies like LINQ and Silverlight, and I've spent some time researching those. But I need something I can work with now, not something in beta. So my attention has turned towards more established technologies, even though they are not from Microsoft.

Object-Relational Mapping (ORM)

It didn't take me long to realize that I did not want to hand-code all the data access logic for my program. It turns out that linking classes to database objects has developed into quite an industry. There are dozens of Object-Relational Mappers (ORMs) out there (Wilson's O/R Mapper and Entity Spaces, for example), but the one I heard about most often was NHibernate. NHibernate is the .NET version of Hibernate, a “persistence engine” for Java. Unlike many free open-source tools, this one seems to have a wide following and to have proven itself in many large, real-world applications.

Built on NHibernate is Castle ActiveRecord, which hides a lot of the complexity of NHibernate but supposedly lets you get to it if you need it.

Web Development Frameworks

Visual Web GUI is a really fascinating framework that lets you build a web app that looks almost exactly like a WinForms app. It's tempting to go down this road, as I would like to do something of a Rich Internet Application (RIA). However, this is a fairly new framework, and seems to be lacking integration experience with ActiveRecord, for example, so I'm currently leaning towards the more established MonoRail.

Castle MonoRail is a .NET approach to Rails(TM) development, popularized by the Linux-based Ruby on Rails. The main benefit here seems to be a pre-built framework that simplifies developing with the Model-View-Controller (MVC) design pattern. It integrates with Castle ActiveRecord, and it supports test-driven development. And, well, Bill McAfferty thinks that the Castle Project is cooler than Jerry Springer

The Castle

So in short, it's starting to look like the Castle Project is my new best friend…unless of course I come across the next great thing tomorrow!  

More...

SoCal Code Camp Rocks!

Mark Berry July 7, 2007

This past weekend I attended the SoCal Rock & Roll Code Camp, held at the UCSD Extension campus. This really is a cool idea–let anybody who wants to give a talk, get a few corporate sponsors to pay for dinner and a band, then offer the whole weekend free to anyone. Thanks for all the swag! (now what am I going to do with a lime green backpack?)

It turned out that a lot of smart people signed up to talk. I'm noting here the sessions that I attended, more or less in the order in which I attended them, along with blogs and other references to session materials.

Using SubSonic to built (sic) ASP.NET applications that are good, fast, and cheap

I didn't actually attend this session, but I heard some good things about it as a potential Object-Relational Modeling (ORM) platform.

subsonicproject.com

Overview of the ASP.NET AJAX client libraries

Calling “Web Services” with ASP.NET AJAX

Rob Bagby is a Microsoft evangelist from Phoenix and an able speaker. He gave these two sessions on the nitty-gritty of AJAX:  the stuff that lets you communicate directly between a web page and the server without refreshing the whole page.

robbagby.com links to Rob's MSDN blog, where there are lots of webcasts, including Latest ASP.NET Client Libraries Webcast Sample Code And Links To All Sessions.

The Next Leap:  Software Factories and the Microsoft DSL Tools

Modeling and Testing with the Class Designer and Object Test Bench

Kevin McNeish is President and Chief Software Architect of Oak Leaf Enterprises, Inc. Kevin helped bring some pretty esoteric concepts down to earth.

The first session covered the Domain Specific Language (DSL) tools available as part of the Microsoft Visual Studio SDK 4.0. He recommended getting the book just released by the Microsoft team, which must be Domain-Specific Development with Visual Studio DSL Tools, ISBN 0321398203.

The second session went into detail about how to use the class designer that is built into Visual Studio, along with the PowerToys for the Visual Studio 2005 Class Designer. Unfortunately, Microsoft has killed GotDotNet.com, so there is currently no place to download these PowerToys (MSDN forum gripe). Edit:  the PowerToys are now available on CodePlex.

Object Modeling 101

Eric Kaufmann hosted a great session on the basics of object modeling. The audience (myself included) kind of got him off track by peppering him with questions about the real-world CRM example that he was kind enough to show. Finally! a presenter with a similar (database-driven) background, showing actual code for an application I can relate to. Of particular interest was the way his data layer was built using NHibernate for .NET. Eric's follow-up blog entry includes a link to the book Head First Object-Oriented Analysis and Design: A Brain Friendly Guide to OOA&D, ISBN 0596008678.

Architecting ASP.NET Applications

Paul Sheriff is the President of PDSA, Inc. This talk focused on his methodology for creating ASP.NET applications, offering lots of practical tips for creating a WebBasePage class, user controls, session variables, exception handling, etc. He referred to a sample application, but I'm not clear where to get it. Paul's other site is Paul Sheriff's Inner Circle, a paid membership site for developers.

Building Rich & Interactive Web Applications with ASP.NET AJAX
Why You Need .NET Coding Standards

David McCarter's AJAX session focused on several of the controls in the Microsoft AJAX toolkit. This talk presented a nice complement to Rob Bagby's sessions on the more behind-the-scenes use of client libraries (see above).

Although David gave the .NET Coding Standards talk at Code Camp, I didn't actually hear this talk until Tuesday, when he presented it again at the San Diego .NET Developers Group meeting. This is David's specialty, the subject of his book VSDN Tips & Tricks .NET Coding Standards, and it was great to hear him talk on it. 

David blogs at blog.davidmccarter.net

More...

About

Welcome to MCB Systems!

MCB Systems is a San Diego-based provider of software and information technology services.

Our software services include customization and programming to make software work for you.

Our proactive I.T. services help businesses control costs by providing a fixed monthly bill for routine I.T. services.

We take a consulting approach that listens first and provides solutions tailored to your business.

This Tech Blog is geared towards programmers and I.T. professionals, but end users may be interested to glimpse what goes on "behind the scenes" in developing software and keeping their computing environments stable and secure. Also visit the main Company Blog.

Mark Berry Blog author Mark Berry owns MCB Systems.

Contact MCB Systems today to discuss your technology needs!

Archive

Copyright © 2012 MCB Systems. All rights reserved.
Terms of Use - Privacy Policy
Created in WordPress using the Afterburner theme by RocketTheme.