Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Paul D. Murphy

Better Lemonade Mousetraps

  • My Take on WinFS and Vista

    The doctors and technicians called it at 1:00pm on June 23rd 2006. The critically acclaimed, technological marvel known as WinFS passed on. It was truly a sad day.

     

    I posted this link to an email forum that I’m on and it generated the obvious question ‘From a business perspective, why will a company want to upgrade from XP?  What business advantage does Vista offer?’

     

    I posted the response below and it generated an off list request for me to blog it. So let’s talk about the blogging thing.

     

    I just can’t get into it. Sorry. I tried. With the email lists, I can get back instant feedback on a topic and real, meaningful discussion will often occur. I find these discussions enlightening. Over a good number of years now, I have learned copious amounts of technical information, as well as political, cultural and various other ‘als’, in this format and I value it.

     

    Blogs and Forums just don’t deliver the same way email delivers. So any posts here (I took down my personal blog) will be informative stuff like this, and I suspect they will be rare occurrences.

     

    So that said, the answer I posted (with some minor edits).

     

    Business will upgrade because they are locked into software assurance licensing agreements. OEM will support it because they are obligated under contract to ship current Windows versions. There is no compelling reason to purchase outright a Windows Vista upgrade for almost all businesses and the majority of consumers.

     

    For the first time ever a company is releasing an operating system where the primary design goals benefit someone other than the computers owner. The only new technology in Windows Vista that survived the toppling of the three pillars is the secure kernel architecture designed to enable DRM.

     

    Windows Vista will ship with technologies called the 'protected process' and the 'trusted installer'. These two technologies are designed for the media industry. They create a segment of your computer that you cannot tamper with. The architectural changes left in Vista are the only 'features' of the Longhorn era to see the light of day.

     

    Vista, to be as blunt as possible, is not being built for consumers or businesses. It's being built so Microsoft and Verizon can make money selling you movies.

     

    For almost 2 years, I've asked every Microsoft employee that I can find involved with Vista the 'my mom' question. It goes like this, "In one simple statement tell me why my mom should run Windows Vista over Windows XP".

     

    I have never gotten a honest answer, which is fair; it's a loaded question.

    Anyone familiar with Vista knows that outside of some new eye candy and the DRM kernel mods there is no beef on the Vista bone. On a personal note, IMO the eye candy is pathetic compared to the now aging visuals included with Mac OS 10.x.

     

    Don't get me wrong. The work they did on the new video API and audio API is amazing stuff that really revolutionizes some things in OS architectures. But these changes are completely transparent to the end user and don't provide any immediate compelling benefit. Again, the only thing the changes enable is DRM - you need application specific audio and video channels if certain applications are going to be encrypted and will be required to run under a special process model.

     

    The 'benefit' to the end user that Microsoft is selling is "per-app mixing", the ability to set one applications volume different than another applications volume. Per-app mixing is weak. In fact it is an absurd reason to perform a major reimplementation of critical subsystems in an operating system of any scope, much less one as large as Windows. Now call me crazy, but I don't get the feeling the 'my mom' crowd is out there clamoring and begging to get per-app mixing onto their computer.

     

    The stock answers I get from Microsoft to the ‘my mom’ question are "it's more secure" and "it's a platform for future technologies". These are half truths.

     

    What Microsoft really means is Windows Vista is secure from the threats presented by the consumer to content owners and that it provides a platform for digital distribution.

     

    Microsoft really missed the mark. They had a innovated vision that would propel the next generation of personal computing technology into the mainstream. The three tier stack of Avalon, WinFS and Indigo were compelling and forward thinking. The watered down version of Indigo, the poorly performing and *unused by Vista* Avalon stack and the complete evisceration of the relational file system are a complete about face from that original vision.

     

    Why they 86'd that plan and decided to get into the movie distribution business is beyond me.

     

    So that's my nickels worth. IMO if you don't care about having licensed high definition audio and video running on your computer, then Vista doesn't provide you with any benefit; business or consumer.

     

    That was my post. Now for something else that is getting under my craw…

     

    It’s that friggen date. It just seems way to coincidental for a post like this to go live at 1:00pm without foresight and planning. Now go read the previous post.

     

    So as early as a few days prior Microsoft was hyping WinFS with sessions and classes at TechEd. They were energizing a base of hard core developers about a technology they knew would never see the light of day. It’s this behavior that has pitted me against myself when it comes to Microsoft.

     

    Our relationship is now love-hate. I love Office, Visual Studio, ASP.NET and Windows XP. I hate the company, the decisions they make and the way the conduct business. I hate the way they treat me as a developer and an enthusiast about their products.

     

    It is simply misleading and wrong, and it flies in the face of transparency (remember that MS buzzword) to do things like they have done. It’s sad really. That arrogance and disrespect for ethics and honesty will cripple a great company.

     

    I have no options. There are too many benefits to sticking with tools like Visual Studio and the CLR to do something radical like switch to Linux and start programming Java. But I would if they presented a viable option and I never thought I would make a statement like that.

     

    WinFS was the nail in the coffin for Microsoft and I. They are no longer a company I respect and revere. They are now someone I have to watch out for and be weary of. They have lied to me one too many times.

     

    Watch out Microsoft, Google understands the consumer whom you so arrogantly abuse.

     

     

     

  • Syntax Highlighter Server Control

    This blog post is an asp.net server control that wraps the syntax highlighter javascripts files found here: http://www.dreamprojections.com/syntaxhighlighter/Default.aspx
    I made some more notes on it here where i started to post it (couldn't 10,000 character limit *ouch*) http://support.webhosting.net/forum/showthread.php?t=26

    -------

    /// <license>

    /// /**

    /// * Code Syntax Highlighter.

    /// * Version 1.3.0

    /// * Copyright (C) 2004 Alex Gorbatchev.

    /// * http://www.dreamprojections.com/syntaxhighlighter/

    /// *

    /// *

    /// * ASP.NET SyntaxHighlighter Server Control

    /// * Version 0.2

    /// * Copyright (c) 2006 Paul D. Murphy

    ///

    /// TODO: Change this to a different url

    ///

    /// * http://blogs.aspadvice.com/pmurphy/

    /// *

    /// * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General

    /// * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)

    /// * any later version.

    /// *

    /// * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied

    /// * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more

    /// * details.

    /// *

    /// * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to

    /// * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    /// */

    /// </license>

    ///

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Text;

    using System.Web;

    using System.Web.UI;

    using System.Web.UI.HtmlControls;

    using System.Web.UI.WebControls;

    namespace Nimbus3.Sandbox

    {

    /// <summary>Provides syntax hightlighting for C#, VB.net, Delphi, JavaScript, PHP, Python, SQL and XML source code.</summary>

    /// <history>

    ///

    /// 0.2 --- Initial Iteration 2006.01.03

    ///

    /// * Developed basic runtime operations.

    /// * No features.

    /// * Not xhtml complaint.

    /// * Non performant

    ///

    /// 0.3 --- Clean up the mess 2006.01.04

    ///

    /// * Moved some strings into constants

    /// * Pushed the script directory path into a property

    /// * Added proper commenting (sorta)

    /// * Added field containment to mitigate bag access

    ///

    ///

    /// TODO: Move most of the stuff into controlstate.

    /// BUG: It eats content at design time...

    /// </history>

    [DefaultProperty("Text")]

    [ToolboxData("<{0}:SyntaxHighlighter runat=server></{0}:SyntaxHighlighter>")]

    public class SyntaxHighlighter : Control

    {

    /// client side class attribute value tags

    private const String _cvSeperator = ":";

    private const String _cvCollapse = _cvSeperator + "collapse";

    private const String _cvNoGutter = _cvSeperator + "nogutter";

    private const String _cvNoControls = _cvSeperator + "nocontrols";

    private const String _cvFirstLine = _cvSeperator + "firstline[{0}]";

    ///

    /// view state keys

    private const String _vskLanguage = "Language";

    private const String _vskNoGutter = "NoGutter";

    private const String _vskNoControls = "NoControls";

    private const String _vskCollapse = "Collapse";

    private const String _vskFirstLine = "FirstLine";

    private const String _vskRows = "Rows";

    private const String _vskColumns = "Columns";

    private const String _vskName = "Name";

    private const String _vskScriptPath = "ScriptPath";

    ///

    /// fields

    private String _controlBody = String.Empty;

    private String _name;

    private String _scriptPath;

    private Boolean? _noGutter;

    private Boolean? _noControls;

    private Boolean? _collapse;

    private Int32? _firstLine;

    private Int32? _rows;

    private Int32? _columns;

    private CodeLanguage? _language;

    public SyntaxHighlighter()

    : base()

    { }

    /// All these properties look alike. i smell abstraction

    public CodeLanguage Language

    {

    get

    {

    if (_language == null)

    {

    _language = new CodeLanguage?(CodeLanguage.Unknown);

    ViewStateHelper.Get(ViewState, _vskLanguage, ref _language);

    }

    return _language.Value;

    }

    set

    {

    _language = value;

    ViewState[_vskLanguage] = value;

    }

    }

    public Boolean NoGutter

    {

    get

    {

    if (_noGutter == null)

    {

    _noGutter = new Boolean?(false);

    ViewStateHelper.Get(ViewState, _vskNoGutter, ref _noGutter);

    }

    return _noGutter.Value;

    }

    set

    {

    _noGutter = value;

    ViewState[_vskNoGutter] = value;

    }

    }

    public Boolean NoControls

    {

    get

    {

    if (_noControls == null)

    {

    _noControls = new Boolean?(false);

    ViewStateHelper.Get(ViewState, _vskNoControls, ref _noControls);

    }

    return _noControls.Value;

    }

    set

    {

    _noControls = value;

    ViewState[_vskNoControls] = value;

    }

    }

    public Boolean Collapse

    {

    get

    {

    if (_collapse == null)

    {

    _collapse = new Boolean?(false);

    ViewStateHelper.Get(ViewState, _vskCollapse, ref _collapse);

    }

    return _collapse.Value;

    }

    set

    {

    _collapse = value;

    ViewState[_vskCollapse] = value;

    }

    }

    public Int32 FirstLine

    {

    get

    {

    if (_firstLine == null)

    {

    _firstLine = new Int32?(1);

    ViewStateHelper.Get(ViewState, _vskFirstLine, ref _firstLine);

    }

    return _firstLine.Value;

    }

    set

    {

    _firstLine = value;

    ViewState[_vskFirstLine] = value;

    }

    }

    public Int32 Rows

    {

    get

    {

    if (_rows == null)

    {

    _rows = new Int32?(20);

    ViewStateHelper.Get(ViewState, _vskRows, ref _rows);

    }

    return _rows.Value;

    }

    set

    {

    _rows = value;

    ViewState[_vskRows] = value;

    }

    }

    public Int32 Columns

    {

    get

    {

    if (_columns == null)

    {

    _columns = new Int32?(60);

    ViewStateHelper.Get(ViewState, _vskColumns, ref _columns);

    }

    return _columns.Value;

    }

    set

    {

    _columns = value;

    ViewState[_vskColumns] = value;

    }

    }

    public String Name

    {

    get

    {

    if (_name == null)

    {

    _name = ClientID;

    ViewStateHelper.Get(ViewState, _vskName, ref _name);

    }

    return _name;

    }

    set

    {

    _name = value;

    ViewState[_vskName] = value;

    }

    }

    public String ScriptPath

    {

    get

    {

    if (_scriptPath == null)

    {

    _scriptPath = "~/SyntaxHighlighter/";

    ViewStateHelper.Get(ViewState, _vskScriptPath, ref _scriptPath);

    }

    // TODO: Need to add path correction logic here.

    return _scriptPath;

    }

    set

    {

    _scriptPath = value;

    ViewState[_vskScriptPath] = value;

    }

    }

    /// <summary>i think i might want to push this out into a template.

    /// the vs code editor doesn't like the notion of xml code in a textarea at all.

    /// gonna need to look into some cdata magic or something</summary>

    protected override void AddParsedSubObject(Object obj)

    {

    if (obj is LiteralControl)

    {

    _controlBody = ((LiteralControl)obj).Text;

    }

    else

    {

    throw new InvalidOperationException("just code please.");

    }

    }

    /// i'll push these strings out later. this method won't last another iteration

    protected override void OnInit(EventArgs e)

    {

    base.OnInit(e);

    String url = Page.ResolveClientUrl(ScriptPath + "SyntaxHighlighter.css");

    String link = "<link type=\"text/css\" rel=\"stylesheet\" href=\"" + url + "\"></link>";

    LiteralControl cssLink = new LiteralControl(link);

    cssLink.ID = "_cssLink";

    HtmlHead pageHead = Page.Header;

    if (pageHead.FindControl("_cssLink") == null)

    pageHead.Controls.Add(cssLink);

    }

    /// i'll push these strings out later. this method won't last another iteration

    protected override void OnPreRender(EventArgs e)

    {

    base.OnPreRender(e);

    ClientScriptManager scripts = Page.ClientScript;

    CodeLanguage language = Language;

    String name = Name;

    if(!scripts.IsClientScriptIncludeRegistered("core"))

    scripts.RegisterClientScriptInclude("core", Page.ResolveClientUrl(ScriptPath + "shCore.js"));

    switch (language)

    {

    case CodeLanguage.csharp:

    if (!scripts.IsClientScriptIncludeRegistered("csharp"))

    scripts.RegisterClientScriptInclude("csharp", Page.ResolveClientUrl(ScriptPath + "shBrushCSharp.js"));

    break;

    case CodeLanguage.delphi:

    if (!scripts.IsClientScriptIncludeRegistered("delphi"))

    scripts.RegisterClientScriptInclude("delphi", Page.ResolveClientUrl(ScriptPath + "shBrushDelphi.js"));

    break;

    case CodeLanguage.BLOCKED SCRIPT

    if (!scripts.IsClientScriptIncludeRegistered("javascript"))

    scripts.RegisterClientScriptInclude("javascript", Page.ResolveClientUrl(ScriptPath + "shBrushJScript.js"));

    break;

    case CodeLanguage.php:

    if (!scripts.IsClientScriptIncludeRegistered("php"))

    scripts.RegisterClientScriptInclude("php", Page.ResolveClientUrl(ScriptPath + "shBrushPhp.js"));

    break;

    case CodeLanguage.python:

    if (!scripts.IsClientScriptIncludeRegistered("python"))

    scripts.RegisterClientScriptInclude("python", Page.ResolveClientUrl(ScriptPath + "shBrushPython.js"));

    break;

    case CodeLanguage.sql:

    if (!scripts.IsClientScriptIncludeRegistered("sql"))

    scripts.RegisterClientScriptInclude("sql", Page.ResolveClientUrl(ScriptPath + "shBrushSql.js"));

    break;

    case CodeLanguage.vbnet:

    if (!scripts.IsClientScriptIncludeRegistered("vb"))

    scripts.RegisterClientScriptInclude("vb", Page.ResolveClientUrl(ScriptPath + "shBrushVb.js"));

    break;

    case CodeLanguage.xml:

    if (!scripts.IsClientScriptIncludeRegistered("xml"))

    scripts.RegisterClientScriptInclude("xml", Page.ResolveClientUrl(ScriptPath + "shBrushXml.js"));

    break;

    default:

    break;

    }

    String script = String.Format(

    "<script language=\"javascript\">dp.SyntaxHighlighter.HighlightAll('{0}');</script>",

    name);

    if (!scripts.IsStartupScriptRegistered(typeof(SyntaxHighlighter), "init" + name))

    scripts.RegisterStartupScript(typeof(SyntaxHighlighter), "init" + name, script);

    }

    /// i'll push these strings out later. this method won't last another iteration

    protected override void Render(HtmlTextWriter writer)

    {

    writer.WriteBeginTag("textarea");

    writer.WriteAttribute("name", Name);

    writer.WriteAttribute("class", BuildClassValue());

    writer.WriteAttribute("rows", Rows.ToString());

    writer.WriteAttribute("columns", Columns.ToString());

    writer.Write(HtmlTextWriter.TagRightChar);

    writer.WriteLine();

    writer.Write(_controlBody);

    writer.WriteLine();

    writer.WriteEndTag("textarea");

    }

    /// <summary>builds the class attribute value for the rendered textarea</summary>

    private String BuildClassValue()

    {

    StringBuilder builder = new StringBuilder();

    Boolean exitEarly = false;

     

    switch (Language)

    {

    case CodeLanguage.csharp:

    builder.Append(CodeLanguage.csharp);

    break;

    case CodeLanguage.delphi:

    builder.Append(CodeLanguage.delphi);

    break;

    case CodeLanguage.BLOCKED SCRIPT

    builder.Append(CodeLanguage.javascript);

    break;

    case CodeLanguage.php:

    builder.Append(CodeLanguage.php);

    break;

    case CodeLanguage.python:

    builder.Append(CodeLanguage.python);

    break;

    case CodeLanguage.sql:

    builder.Append(CodeLanguage.sql);

    break;

    case CodeLanguage.vbnet:

    builder.Append(CodeLanguage.vbnet);

    break;

    case CodeLanguage.xml:

    builder.Append(CodeLanguage.xml);

    break;

    default:

    exitEarly = true;

    break;

    }

    if (exitEarly) return String.Empty;

    if (NoControls) builder.Append(_cvNoControls);

    if (NoGutter) builder.Append(_cvNoGutter);

    if (Collapse) builder.Append(_cvCollapse);

    builder.AppendFormat(_cvFirstLine, FirstLine);

    return builder.ToString();

    }

    }

    #region CodeLanguage Enumeration

    /// <summary>This enum will be replaced with a type tree.</summary>

    public enum CodeLanguage

    {

    csharp,

    vbnet,

    delphi,

    javascript,

    php,

    python,

    sql,

    xml,

    Unknown

    }

    #endregion

    #region ViewStateHelper Class

    internal static class ViewStateHelper

    {

    internal static void Get<T>(StateBag bag, String key, ref T defaultValue)

    {

    Object o = bag[key];

    if (o != null) defaultValue = (T)o;

    }

    }

    #endregion

    }

  • Outlook 12

    Please... Please... Please.... Microsoft PLEASE give us a way to

    1. create task dependecy chains
    2. link items together (entourage does this quite well)
  • Third Major Bug

    This *release* version of VS2005 is dog and I just can't take it anymore. Here is the 3rd bug I've found (I never found any at all in Everett)...

    1. Create a test project
    2. add an app.config file to the root of the project
    3. add another app.config file called reallyImportantFile.config to the root of the project
    4. set reallyImportantFile.config to BuildAction=Content and CopyToOutputDirectory=Copy Always
    5. compile the project and peek out /bin/debug (it is there)
    6. write a unit test that checks to see if the file exists Assert.IsTrue(File.Exists(fileName))
    7. watch the test fail BECAUSE TEAM SYSTEM DOESN'T MOVE THE 'COPY ALWAYS' FILES INTO THE OUT DIRECTORY!
    ----
    Update: 11/14/05 4:21pm EST
    You can work around this bug by manually including the files via the .testrunconfig deployment tab.
  • Another annoying bug...

    seriously guys... I found 0 bugs in the Everett tools product cycle. IIRC it *never* got a service pack. This dog isn't even 2 weeks old... booo... boooo... shame on you guys...

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=132716&SiteID=1&mode=1
  • Someone must get paid to think of everything....

    I'm in the middle of a CLR port for the RTG SNMP Poller and I stumbled across this spiffy little warning.

    http://aspadvice.com/photos/pmurphy/category1328/picture13544.aspx
  • SQL/CLR IPAddress UDT

    Here is a little class that I whipped up to store IP Addresses in a strongly types fashion in SQL Server. As a general rules of thumb, I'm against UDTs in the database because once you deploy one, it's there forever. That said, because the IP Address class will almost certianly never change (and the underlying long type is NEVER going to change) it's a safe bet.
    Historically we have stored IP Addresses in a char(15) column, but this requires a signifigant amount of validation to ensure proper formating. By delegating this validation to the underlying BCL we can ensure that IP Address data entered into our systems are always valid at the storage level.
    There are some not implemented methods down at the bottom that most people will never use, so I didn't include them (they are pretty long). In a nutshell there are certain IP Addresses in the space that are private (10.... 192.168... etc) and there is are some address that are reserved (anything that ends in 255.255, addresses that start with 254 iirc). If anyone needs this additional code shoot me a short note from the contact page and I'll mail it to you when I find the most performant way to run it. Currently I'm using string comparisons, however I'm pretty sure that bit comparisons will be faster.

    using System;

    using System.Data;

    using System.Data.SqlClient;

    using System.Data.SqlTypes;

    using System.IO;

    using Net=System.Net;

    using System.Net.Sockets;

    using Microsoft.SqlServer.Server;

     

    [Serializable]

    [SqlUserDefinedType(Format.UserDefined, MaxByteSize=sizeof(Int64))]

    public struct IPAddress : INullable, IBinarySerialize

    {

        #region Private Members

        private Net.IPAddress _ipAddress;

        #endregion

     

        #region Construction

        private IPAddress(Net.IPAddress ipAddress)

        {

            _ipAddress = ipAddress;

        }

        #endregion

     

        #region INullable and SQL UDT Required Members

        public override String ToString()

        {

            return _ipAddress.ToString();

        }

     

        public Boolean IsNull

        {

            get

            {

                if (null == _ipAddress) return true;

                else return false;

            }

        }

     

        public static IPAddress Null

        {

            get

            {

                IPAddress result = new IPAddress();

                return result;

            }

        }

     

        public static IPAddress Parse(SqlString s)

        {

            if (s.IsNull) return Null;

     

            //  create our result

            Net.IPAddress newIPAddress = null;

     

            //  attempt the parse

            if (Net.IPAddress.TryParse(s.ToString(), out newIPAddress))

            {

                IPAddress result = new IPAddress(newIPAddress);

                return result;

            }

            else { throw new ArgumentException("Invalid IPAddress String", "s"); }

        }

        #endregion

       

        #region IBinarySerialize Members (Required for user defined serialization)

     

        public void Read(BinaryReader reader)

        {

            Int32 byteLength = (Int32)reader.BaseStream.Length;

            Byte[] bytes = new Byte[byteLength];

            bytes = reader.ReadBytes(byteLength);

     

            _ipAddress = new System.Net.IPAddress(bytes);

        }

     

        public void Write(BinaryWriter writer)

        {

            writer.Write(_ipAddress.GetAddressBytes());

        }

     

        #endregion

     

        #region System.Net.IPAddress Public Member Wrappers

     

        public override Boolean Equals(object obj)

        {

            if (obj is IPAddress)

            {

                IPAddress ipAddress = (IPAddress)obj;

                return _ipAddress.Equals(ipAddress);

            }

     

            return false;

        }

     

        public override Int32 GetHashCode()

        {

            return _ipAddress.GetHashCode();

        }

     

        public AddressFamily AddressFamily

        {

            get { return _ipAddress.AddressFamily; }

        }

     

        public Boolean IsIPv6LinkLocal

        {

            get { return _ipAddress.IsIPv6LinkLocal; }

        }

     

        public Boolean IsIPv6Multicast

        {

            get { return _ipAddress.IsIPv6Multicast; }

        }

     

        public Boolean IsIPv6SiteLocal

        {

            get { return _ipAddress.IsIPv6SiteLocal; }

        }

     

        public Int64 ScopeId

        {

            get { return _ipAddress.ScopeId; }

            set { _ipAddress.ScopeId = value; }

        }

     

        public Boolean IsLoopback

        {

            get { return Net.IPAddress.IsLoopback(_ipAddress); }

        }

     

     

        #endregion

     

     

        #region TODO - Need to talk to some network nerds about the best way to do this

     

        public Boolean IsPrivateNetwork

        {

            get

            {

                throw new NotImplementedException();

            }

        }

     

        public Boolean IsReservedAddress

        {

            get { throw new NotImplementedException(); }

        }

     

        public Boolean IsPublicNetwork

        {

            get { return !IsPrivateNetwork && !IsReservedAddress; }

        }

     

     

        #endregion

    }

     

     

     


  • VS2005 RTM Concerns

    I have concerns about the quality of the VS2005 and SQL Server 2005 bits. Here are the steps to repro a bug that many people will find annoying. This bug *did not* exist in any build post beta2, which makes it a regression.
    ------
    1: create a connection to a sql database in the server explorer
    2: right click on a table and select ‘Show Table Data’
    3: click the command bar button to ‘Show Criteria Pane” – This should give you one row with a * for the column.
    4: via the drop down list select a column – This will create an alias for the column Expr1
    5: change the sort on the new column selection to ascending
    6: uncheck the output from the column
    7: attempt to run query with error – “invalid column name expr1”
  • short note

    It seems like the personal drama just won't end. I've been back in crisis mode over the last couple of days trying to put out some fires between a landlord and a friend. Long story short, I'm either gonna have to sue somone or lose a bunch of money I really can't afford to lose. Ugh...

    I've written a bit of code and a good chunk of the post about the Dollarville traffic light. It jumps right into threading code. I'm trying to present it in the context of dealing with the time line of the stop light from the time line of something else, but I'm not getting that far with the analogy.

    I was originally going to go with traffic, you know change the light to a regular light instead of a flasher and then incorporate traffic. But that's just friggen complicated. I'd have to write alot of code (which sucks); but even more importantly a traffic emulator is a really complex thing.

    I got a nifty stoplight built, but the analogy breaks down because there really are no interactions between the light and... exactly. It's just a light that hangs and runs. The only real interaction is has is with a driver or a pedestrian.

    haha. I've written myself into a corner. Whatever, I'm sure I'll find a balance when I sit back down to do the rest of the work. l8r... :)

  • Threading [2] - Dollarville

    I’d like to introduce you to Dollarville.

    Dollarville is a quant little town in the middle of nowhere. Like many old, small towns Dollarville has two main roads. There is Main Street and the state highway 9. These two roads intersect in the middle of town. There is a stop light that always flashes yellow for the state road and red for Main Street.

    Downtown Dollarville has a general store, a gas station, a fire station and a post office. Janet Dollar runs the general store. Her nephew Tommy Dollar owns the gas station. Chief Dollar works at the fire station and Aunt Dollar takes up shop at the post office.

    Life in Dollarville is serene and most days pass without anything exciting happening. This suits the Dollars just fine because every month on the 15th all hell breaks loose. On the 15th a caravan of travelers and merchants travel up the state highway 9 on their way to the big government auctions.

    The problem is that since Dollarville wasn’t designed to accommodate this much vehicle and foot traffic, on the 15th Dollarville turns to gridlock. The single stop light that always flashes becomes a crippling point for people trying to use Main Street to cross the state highway. The parking lot of the gas station becomes another large bottleneck.

    But these problems pale in comparison to the personal problems dumped upon the four members of the Dollar family this year. Mama Dollar is *really* sick and every hour one of the Dollars will need to close up their own shop and take 5 or 10 minutes to check up on mom. This is not a problem on every day except for the 15th.

    In order to solve this problem the Dollars have decided to hire a person who will move from store to store and help with the basic services for the 5 or 10 minutes while the proprietor is out looking in on Mama.

    Over the course of the next dozen or so entries we are going to use Dollarville, it’s people and their problems to look at common threading problems, techniques but more importantly concepts. In the last post I said that managing the intersection of timelines was the secret to threading and I can’t stress that enough.

    I’m off to write some code. It’s time to bring the Dollars to life. :)

  • Threading [I] - Get your head around it.

    Writing multithreaded code is just as easy as writing data access code or writing file IO code with .net. I believe that so long as you have a solid understanding of the threading object model, how that model is suppose to work and some common implementation techniques of the model it will be easy. I think this way about all object oriented code. Object oriented thread programming is no different than object oriented database programming. It’s just code.

    The difference is that threading presents a unique set of challenges that are a little more complicated to grasp up in the brain. Threading adds an additional dimension to your programming. It fundamentally changes the pallet from a linear 3D surface to a rich, non-linear 4D surface.

    Hmm… 3D, 4D… I might have just confused some people (we aren’t talking graphics :p ), so let’s get into the dimensions of programming.

    ·        Polymorphic Class

    ·        Interface

    ·        Type

    These dimensions are surfaces in object oriented programming that we use in conjunction with Boolean logical and flow control to make the computer do things. Most people have no trouble wrapping their mind around these baseline 3 dimension

    Things start to get complicated mentally when you add the fourth dimension, time; AKA threading. With the three ‘standard’ dimensions time is assumed at linear. This means that you can start walking through your code line by line and guarantee that on the time scale code will execute in order, one instruction after the next; statement by statement.

    Threading turns this linear operations mindset upside down. When you incorporate threading into an application you are creating multiple timelines of execution. The secret to threading is learning how to manage the intersection of these timelines.

    When you frame the issues of threading into the context of managing timelines, you can take a solid knowledge of the treading object model and develop incredibly effective solutions ‘easily’. Hopefully what follows will demystify the subject of threading.

  • Some Guys on the MSWebDev Lists Got Me Blogging Again...

    yup... threading. I think that's a good place to start.
  • team system marketing is just starting to piss me off

    i keep getting asked questions like, should i use team system. this question is absurd to me. :)
     
    the problems team system solves have nothing to do with the size and the scope of the team. hell if you ask me, even 1 guy needs team system. microsoft has really screwed the pooch by trying to bill this thing as an enterprise tool. It's not an enterprise tool, it's a software development tool. period.
     
    marketing dictates that this is an enterprise tool, not the reality of software development. i've secretly been pushing to try and deliver a hosted version of team system. it's currently being discussed inside of microsoft, but there are licensing issues. simply put if i want to host it, it has to run under the spla (service providers licensing agreement). currently, this isn't in the mix.
     
    i'm going to rant for a second here. when i first suggested hosted team system to a microsoft person, i got a response along the lines of why? who would need that? this answer shocked me. team system helps solve a myriad of problems, facilitating communication amongst a team is simply one aspect of it. issues like bug tracking are issues that teams of 200 or lone codeslingers have. issues like code churn, requirements tracking, associating a requirement with a scenraio, with an implementation, with a bug, with a fix are all software development issues, not team issues.
     
    i think everyone needs a team system. it's unfortuntate that microsoft doesn't... wake up redmond, teams of 1 have the same information and project management problems as teams of 1000. software development is no different with 1 or 1000. the issues are all the same. i'll conceed that communication becomes more difficult as the team size grows, but the fundamental problems of managing the information don't.
     
    arglefargle....
     
     
    Paul
  • x64 Registry Tree for 32bit software

    I really like 2 games. World of Warcraft and Unreal Tournament 2004. Because these games are so large and take so long to install and because I seem to blow away my workstation every couple of weeks. I have gotten into the habit of keeping them installed on a seperate drive and simply importing the registry setting to 'install' them when I reinstall my OS. This model has worked fine for a long time.

    However I recently moved to the release version of x64 XP and this didn't work. Unreal would not run at all and WoW would run but the performance was total crap. When I started investigating the performance I noticed that Wow.exe was showing in the task manager as wow.exe as opposied to wow.exe*32 like it should. This was perplexing.

    My first attempt at a fix was to move the game into the Program Files(x86) directory thinking this would tell Windows to load me up as x86. This wasn't the case. Second I tried to put the application into 'Windows XP' compatibility mode. No luck thier either.

    After spelunking around the registry, I noticed that there was a new subtree titled Wow6432node inside of HKLM\Software. Moving the registry keys into here fixed it.

    Interesting problem, so I figured I'd share.

     

    UPDATE:: I sat down to play WoW tonight and it loaded it up and ran it as x64 again. I'm not sure what is going on. If anyone knows how to force an app to run as x86, I'd love to know how.

    UPDATE:: I take that back. It must have had something to do with the 1.40 patch installer launching the game. Now it is working fine again. Disregard that last update.

  • Team System Install Complete; no issues, 1 concern

    I got team system installed today. It was a breeze.

    There are couple of things I'd like to point out about the install that might matter if you are running on x64 hardware. While the installation docs do claim you can install on x64, it does not mention an important fact about running x64 ASP.NET.

    IIS can only load one version of the framework at a time. When you install .net 2.0 it changes IIS to run .net 2.0. This will break an app tier install because the app tier, which is WSS based requires the 1.1 version of the framework. This means that you will need to tweak some registry keys to force the correct version of ASP.NET to load.

    I personally haven't experienced the problem first hand as I installed on 32bit Windows, but having some experience with the x64 ASP.NET modules leads me to believe that the foundation servers CAN NOT run on 64 hardware even though the docs claim that it can (see reporting services would need the 2.0 runtime, while WSS would need 1.1.

    I got a buddy on the Team System team who is looking into this, so expect something official from Microsoft at some point in the near future. My advice at this point in time would be to either use a 2 tier configuration with the data tier running on x64 and the app tier running on x86, or just use a single tier x86 configuration.

    Again, this is just me talking here and I haven't really tested it myself. It just seems like there isn't any logical way for it to work. Stay tuned for more information.

     

    UPDATE: 04/20/05 Yeah. this is confirmed. x64 is not currently supported for TFS for the reason outlined above. The docs are incorrect with regards to Opteron support.

More Posts Next page »