Main

September 12, 2005

Windows shell (aka Monad) Beta 2 is Public



I've been on the nexgen Windows command shell private beta for over a year now. Today Microsoft released Beta 2 of the new shell (code-named "Monad") publicly. Get it here.

More information as it comes in.... gone to try it out.

September 01, 2005

CMD.EXE - Continued...

To continue on my command line tools theme... to view the help files for all command line tools included in XP, go to "Help and Support Center" and search for "Command-line Reference". You'll be shown the A-Z reference.

Here are a few things to point out today:


  • Do you ever miss deltree? Frustrated trying to del a folder that contains files? Used to being able to rm -r / on unix? Well, rmdir now has a /s switch to delete folders that contain files and sub-folders. So try rmdir /s on the root of your drive sometime and be as cool as your unix friends.

  • fdisk is no longer included in XP. Now you have to use diskpart. I've never used this before, so I have no idea what's involved.

  • There are a bunch of new command-line tools on Windows Server 2003 that aren't on XP. A couple of note are choice for prompting the user for multiple options, and clip to redirect output to the Windows clipboard. Nice for doing something like dir | clip so you can paste into notepad or an email without having to use the silly console mark action.

August 31, 2005

CMD.EXE - New tools

Ok, that last post got me digging for some new command line tools. I'm going to point them out here so I'll remember them later.

  • getmac - quickly grab just the mac addresses of your NICs without having to use ipconfig /all

  • openfiles - list open files without having to hassle with creating a MMC console

  • schtasks - I just found this one a few days ago when configuring some SharePoint scripts. I previously used AT, but needed to specify the run-as account. schtasks creates a proper "Scheduled Task" from the command line.

  • shutdown - I found this one a while back. Nice for doing a shutdown and restart, but unfortunately doesn't support doing a suspend or hibernate. Still useful.

  • taskkill and tasklist - What the?? I didn't realize these were included in the base XP/Server 2003 install! I've been using pslist and pskill from SysInternals for a long time, but it's nice to know that there's a command line kill available on any base install.
  • CMD.EXE

    I'm a big fan of automation. I'll write a quick script or batch file for just about every task I encounter to ensure adherence to the DRY (Don't Repeat Yourself) principle. Windows has gotten much better over the last few years at including some more powerful command line tools in the base install, but they aren't talked about much.

    I'm going to attempt over the next while to point a few of the ones I use or have recently discovered. A lot of times I'll just jump to a command prompt and start looking at the .exe files in the Windows folder just to see what's there. Another good way to find interesting command line tools is to open Windows XP "Help and Support" and search for "command line". (Actually, I just did that now and found a cool tool called eventcreate that'll create an event log entry -- I'll be using that in my batch scripts to make logging easier!)

    Anyway, watch this space...

    May 19, 2004

    Upgrade Subversion - Security Issue

    If you're using Subversion - especially if you're hosting a publicly accessible repository - go download 1.0.3 immediately.

    Subversion versions up to and including 1.0.2 have a buffer overflow in the date parsing code. All users are advised to upgrade to 1.0.3.

    May 02, 2004

    Help! Can't open any VS.NET projects!

    I've tried everything.. repaired my VS.NET install, uninstalled, reinstalled, removed every plugin, it still gives the same message every time I open a C# project:

    ---------------------------
    Microsoft Development Environment
    ---------------------------
    The application for project 'C:\Source\SharePointFav_trunk\ClassLibrary\SharePointFav.ClassLibrary.csproj' is not installed.

    Make sure the application for the project type (.csproj) is installed.
    ---------------------------
    OK
    ---------------------------


    I've Googled extensively and in every case that I found a workable solution the reason for the error was that the user hadn't installed C# on the Visual Studio install. I definitely have C# installed here.

    I installed AnkhSVN 0.4.1 just before I started receiving this error. Uninstalling AnkhSVN didn't solve the problem.

    Please, if anyone has any information that can help me, leave a comment below or email me (steve@infotechcanada.com).

    April 17, 2004

    New Programming Tools

    I've been trying out Subversion version control system for a couple of days. What a beautiful system. I tried it on my local machine at first, but this morning got it running on my home domain controller running over Apache 2. Really quite a simple install. I love how easy it is to branch and tag. Since I've never really used CVS before - except to update FreeBSD - this is my first real exposure to using the Copy-Modify-Merge method as opposed to VSS and Vault's Lock-Modify-Unlock. I have to say that I like the SVN approach more than the VS.Net integrated source control providers. I really don't like using VS for managing files, so this allows me to use the IDE for the absolute minimum amount of file management that's required. I'm using TortoiseSVN for accessing the repository. Oh, and the Subversion documentation is great. Maybe we'll give it a try at the office.

    I've also been messing with the Microsoft Installer project in VS.Net on and off over the past couple of weeks. I decided this morning that I really don't like it. I'd heard of NSIS - the free installer from Nullsoft - but while researching NSIS, I came across Inno Setup. I heard that Inno is more mature so I downloaded it first (along with ISTool). Within an hour of installing I had a complete installer for my SharePointFav app up and running with all of the features and more that I was trying to include using Microsoft's installer - and without reading a line of Inno Setup documentation!

    This puts me almost in position to release my little SharePointFav app this weekend. All I have to do now is write up a simple readme and hack together an icon file.

    Update: Hmm.. I just realized that I never learned to spell Tortoise correctly. I've been spelling it wrong all these years. Link updated above.

    April 13, 2004

    Rename a SQL 2000 Computer

    Every time I rename a SQL 2000 computer (yes I do it often in Virtual PC test/demo installs) I lose about 15 minutes hunting for the stored procedure that needs to be run. I should know it off the top of my head now, but I don't. So I'll post it here for my future reference.

    sp_dropserver 'old_server_name'
    go
    sp_addserver 'new_server_name', 'local'

    Restart the SQL service and verify the name change:

    SELECT @@SERVERNAME

    and

    SELECT ServerProperty('ServerName')

    March 29, 2004

    Programming Is...

    Programming is like this:

    Beat your head on the keyboard for 6 hours straight...

    ...Problem solved! The documentation was wrong...

    Beat your head on the keyboard for another 4 hours...

    ...Wow, I FINALLY got that module working thanks to a combination of hints from 5 different Google queries...

    Beat your head on the keyboard for 3.5 hours...

    ...Drag yourself to bed at 2:00am completely pissed off that you couldn't figure out that piece of code...

    Toss and turn all night trying to figure out the solution...

    ...Wake up a few hours later (assuming that you got some sleep) and write the code that solves the problem...

    Beat your head on the keyboard for another 5 hours on the next part of the program...

    Repeat until you get a working program...


    Programmers are insane.

    March 22, 2004

    Test Driven Development with NUnit

    After having it appear again on my "technology radar" this weekend, I've finally decided to give Test Driven Development (TDD) a try with NUnit. I'm using my SharePointFav application as the guinea pig. So far, I'm finding it quite helpful. As promised, it's helping me take more time to think about my class design (and only implement the needed functionality) and refactor more vigorously. I've already completely refactored the basic architecture of this simple application and worked out a much cleaner class structure with more separation of code/GUI.

    I used the following resources to help me get started:

  • MSDN: TEST-DRIVEN C# - Improve the Design and Flexibility of Your Project with Extreme Programming Techniques
  • Peter Provost's Test-Driven Development in .NET
  • Roy Osherove's Introduction to Test-Driven development with NUnit and the NUnit-Add-in
  • Chapter 2 of Test Driven Development in Microsoft .NET by James W. Newkirk and Alexei A. Vorontsov
  • Darrell Norton's .NET Test Driven Development links

  • March 18, 2004

    support.microsoft.com sucks!

    It bites the big one... it's worse than useless...

    There, I got that off my chest.

    Microsoft needs a Chief Website Officer.

    November 25, 2003

    For my reference: Comprehensive list of Tablet PC Apps

    http://www.tabletpcbuzz.com/forum/topic.asp?TOPIC_ID=930

    November 03, 2003

    Visual SourceSafe Whidbey

    Microsoft employee Korby Parnell just confirmed that a new version of Visual SourceSafe is forthcoming with the Whidbey release of Visual Studio.

    October 29, 2003

    .NET Rocks Now Available on MSDN

    MSDN is now hosting the .NET Rocks! show here.

    October 28, 2003

    MSDN TV: Lap Around Longhorn

    Chris Anderson and Don Box provide a code-centric, high level walk through of the main pillars of Longhorn. Avalon, Indigo, and WinFS are all covered briefly.

    The PDC keynote excerpt is now available from MS Downloads.

    Update: Oops. Jumped the gun on that one. Seems the clip is a pre-recorded clip done on the MS campus, not the PDC "Lap Around Longhorn". Still some great Longhorn info though.

    September 18, 2003

    Windows Mobile Developer Power Toys

    The Windows Mobile Developer Power Toys demoed in this presentation from TechEd 2003 are now available for download here.

    Overview
    The Windows Mobile Developer Power Toys help you develop and test your Windows Mobile applications. N.B. These Power Toys are NOT supported..

    The Power Toys include:

  • Emulator ActiveSync Connection Tool - Allows Activesync to connect to your Emulator session from Visual Studio .NET 2003.
  • ActiveSync Remote Display - Display Pocket PC applications on your desktop or laptop without needing any device side configuration.
  • CECopy - Command line tool for copying files to the device currently connected to desktop ActiveSync.
  • Convert PPC DAT to SP XML - Command line tool for generating Smartphone CABWizSP XML docs from existing Pocket PC CAB files.
  • Hopper - User input stress simulator.
  • JShell - UI version of the Platform Builder Target Control Window.
  • PPC Command Shell - Command shell for the Pocket PC 2003 device.
  • RAPI Debug - Displays detailed information about currently running processes.
  • RAPI Start - Command line tool to remotely start an application on your Pocket PC from your desktop.
  • TypeIt - Send characters/strings to the Smartphone 2003 Emulator via ActiveSync.

  • July 21, 2003

    Efficiency

    I love this quote from Philip Rieck's weblog entry on evolutionary vs. revolutionary programming language changes:

    "For efficiency, we should all use the same language and tools" sounds like a manager I once had. I responded "For efficiency, we should all solve the same problems and develop the same applications, too."

    July 16, 2003

    Order the Visual Studio .NET Posters

    I mentioned last month that Microsoft had the Visual Studio .NET posters available for download. I haven't had time to figure out how to get them printed on poster size print, but I did find out that they can be ordered directly from Microsoft for $18 CAD. I went ahead and ordered because I'm sure it would cost more than $18 in printing and my time to have them printed locally.

    June 19, 2003

    Pocket PC Progress

    I've finally got my combo boxes binding to data pulled from SQL Server CE on the Pocket PC. Now for the tricky part of sync'ing SQL CE with the main SQL Server. I'm not quite sure yet if i'm supposed to be using RDA or Replication. Once I figure that part out, it should be relatively trivial to complete my timesheet entry program.

    Incidentally, if you're binding data to a control using the .NET Compact Framework, you shouldn't bind the data directly from the dataset to the control - it's insanely slow. Have a look at this article first for an alternate method that is much faster (yes, I hate the sample code layout in this article too).

    IBuySpy in COBOL

    If you think VB.NET is verbose, have a look at IBuySpy written in Fujitsu NetCOBOL. Source code files are viewable here. [from Kent Sharkey]

    [Listening to: U2 - Until The End Of The World (from Achtung Baby)]

    June 01, 2003

    MSDN Magazine Available In HTML Help Format

    S.B. Chatterjee points out that MSDN Magazine is available in HTML Help format. Nice.

    May 31, 2003

    Detention

    Put your own stuff on Bart's chalkboard.

    May 30, 2003

    Daisy.cs

    If you have the .NET SDK installed (specifically the C# compiler), copy this code and compile as described.

    The code and output reminds me of my old Commodore 64 programming days.

    [I don't recall where I found this, but it's not my creation.]


    // csc /o+ /t:exe /out:Daisy.exe Daisy.cs using System; using System.Threading; using System.Runtime.InteropServices; using System.Security; public sealed class Daisy { public static void Main() { Beep(2093, 769);Beep(1760, 769);Beep(1396, 769);Beep(1047, 769);Beep(1174, 192); Beep(1319, 192);Beep(1397, 192);Beep(1175, 385);Beep(1397, 192);Beep(1047, 962); Thread.Sleep(385);Beep(1568, 769);Beep(2093, 769);Beep(1760, 769);Beep(1397, 769); Beep(1175, 192);Beep(1319, 192);Beep(1397, 192);Beep(1568, 385);Beep(1760, 192); Beep(1568, 962);Thread.Sleep(385);Beep(1760, 192);Beep(1865, 192);Beep(1760, 192); Beep(1568, 192);Beep(2093, 385);Beep(1760, 192);Beep(1568, 192);Beep(1397, 962); Beep(1568, 192);Beep(1760, 385);Beep(1397, 192);Beep(1175, 385);Beep(1397, 192); Beep(1175, 192);Beep(1047, 962);Beep(1047, 192);Beep(1397, 385);Beep(1760, 192); Beep(1568, 385);Beep(1047, 192);Beep(1397, 385);Beep(1760, 192);Beep(1568, 192); Beep(1760, 192);Beep(1865, 192);Beep(2093, 192);Beep(1760, 192);Beep(1397, 192); Beep(1568, 385);Beep(1047, 192);Beep(1397, 962); } [DllImport("kernel32.dll"), SuppressUnmanagedCodeSecurity] public static extern Boolean Beep(Int32 frequency, Int32 duration); }
    [Listening to: The 77s - Ba-Ba-Ba-Ba (from All Fall Down)]

    May 20, 2003

    Attention Software Developers: Don't Call Your Download setup.exe

    It's just plain annoying. We've had long file names since 1995. How about naming your download my_program_v1_2_setup.exe or something? I have to rename it anyway when I download it, so why not take the extra few seconds to save us all the trouble. I don't like having to run setup.exe just to see what I downloaded 3 days ago but forgot to install.

    Binary People

    Quote from a T-Shirt you can buy from ThinkGeek:

    There are only 10 types of people in the world: Those who understand binary and those who don't.

    ...and if you gotta ask, you're not a geek.

    http://www.thinkgeek.com/tshirts/frustrations/5aa9/

    From Andres Aguiar's Weblog

    [Listening to: The 77s - I Could Laugh (from Eighty Eight)]

    May 09, 2003

    Microsoft Download Center RSS Feed

    Microsoft has started providing RSS feeds for content. Although they have several MSDN feeds, my favorite is the Microsoft Download Center RSS feed (actually I just realized that it's a third party site that's providing this feed). I get to see stuff here that I would never have come across otherwise.

    Today I found this download - a book called Enterprise Solution Patterns Using Microsoft .NET from the Patterns and Practices group. It's a 300+ page book in PDF format that covers a bunch of Design Patterns for ASP.NET applications. A very timely book for me right now.

    May 02, 2003

    Programming Refresher

    I've started a small personal programming project to keep my programming skills fresh. It's amazing how quickly your skills get rusty when you're out of the loop for a while due to being involved in the details of running a business and looking at things from an architecture/technology level.

    I won't tell you yet what the program is that I'm writing, but of course it's being done using the .NET Framework and C#. It's a Windows application, not a web app. The program is something that would only be useful to someone as unusual as me. Let's just leave it at that for now.

    As a side note, it's just as easy to get rusty on computer hardware specs - maybe moreso since hardware changes at such a fast pace. I'm constantly amazed at how many acquaintances still think I sell computers (which I once did many years ago). If you asked me today what kind of computer you should buy I don't have much to tell you, except to not consider running anything less than Windows XP with 512MB RAM.

    Come to mention it, I absolutely hate dealing with computer hardware. Give me a compter that just works, and some software to play with and I'm happy.

    [Listening to: Kansas - Mainstream (from Drastic Measures)]

    April 28, 2003

    Abstractions in Programming

    I read an interesting entry on .NET Abstractions from Eric Sink's weblog. He owns SourceGear, makers of SourceOffSite and most recently, SourceGear Vault - a promising-looking replacement for Visual SourceSafe. (Prediction: I think you'll see Microsoft buying them soon to replace the outdated VSS.)

    I noticed that Joel Spolsky linked to this article today as well, since it ties into his writings on Leaky Abstractions.

    [Listening to: Stevie Ray Vaughan - Pride And Joy]

    April 20, 2003

    FreeTextBox.NET 1.5

    Came across this cool looking DHTML text box editor that has the look of Office 2003.

    http://www.revjon.com/ftb/