This blog is written by Dan Rosenfeld, a Software Engineering Consultant and Microsoft Certified Professional. I post articles here that I think would be of value to others of the same ilk. I encourage you to add value to this resource by sharing your own thoughts in the comments.

ACHTUNG!

June 27th, 2010 haXX No comments

This post is just for fun.  I first saw this Notice, printed out and affixed to an IBM mainframe computer back in 1981.  I recently stumbled upon it again, and thought I’d pass it along for your enjoyment.

Achtung!

Alles turisten und nonteknischen lookenpeepers!

Das komputermaschine ist nicht für der gefingerpoken und mittengraben! Oderwise ist easy to schnappen der springenwerk, blowenfusen und poppencorken mit spitzensparksen.

Ist nicht für gewerken bei dummkopfen. Der rubbernecken sightseeren keepen das cottonpicken händer in das pockets muss.

Zo relaxen und watschen der blinkenlichten.

Categories: Uncategorized Tags:

    Tablet Computing in the Wild

    June 27th, 2010 haXX No comments

    So it wasn’t an iPad, but it was a Tablet Computer I saw in use recently.  I’ve predicted that we’re going to see this appliance used more and more in our daily lives, and I want to share a quick look at how this one was being used.

    First, let me elaborate on how the day started…

    I have a 17 year old son.  (And a daughter, but that’s another story.)  For those of you that have teenage children you know the three words “Dad, watch this!” can swiftly move you from backyard shenanigans to Emergency Room visits in a matter of minutes.  While this recent experience didn’t necessarily start that way, it certainly did end that way.  What began as a stump removal project involving large, heavy tools and a winch, culminated in several hours in the ER, twelve stitches on the knee and a $75 hit to the wallet.  I’ll leave the gory details to your imagination, but will say that it was only a flesh wound and the kid is doing fine.

    Now, to the ‘Tablets in the Wild’ part of the story.  Read more…

    Categories: Uncategorized Tags:

      ASP.NET – Miss the Reset Button?

      June 24th, 2010 haXX No comments

      Since all my recent web coding has been in ASP.NET 2.0 (at a minimum), I’ve been using the server-side controls almost exclusively. This means that almost all of the controls on a page are using the new ASP.NET syntax.

      Do you still use a reset button on your web forms? I do, and I do not like the idea of doing a postback just to reset my input controls.

      If you’ve coded a reset button on your page using ASP syntax, you’ve undoubtedly coded something like this…

      <input type="reset" id="ResetButton" value="Reset">
      

      … to show a button to reset all the input form values to what they originally were when the page was first loaded. With ASP.NET you’ve now realized that there is no type=”reset” for an ASP.NET button. Of course, you can just code it using the old ASP syntax as shown, and it will work fine. But I wanted an all-ASP.NET solution.

      What I wanted was the traditional behavior of the reset button that returned my input fields to their original values, and didn’t require a postback (like the ASP.NET button will do).

      If you investigate how ASP.NET creates the main form for your page, you’ll see that it always names it aspnetForm. While I can’t be sure this will always remain true, it’s working for me now, and I hope Microsoft doesn’t change it with a maintenance release. Because of that, I have to stress that this suggestion be used at your own risk, and don’t be surprised if something gets broken in a future release of ASP.NET.

      I use a JavaScript function on my page that actually performs the reset. I’ll link to this function in the OnClientClick event for my reset button. Here’s what the function looks like.

      function ResetChanges() {
         var theForm = document.forms['aspnetForm'];
         if (!theForm) {
            theForm = document.aspnetForm;
         }
         theForm.reset();
         return (false);
      }
      

      This is how I’ve coded the actual ASP.NET button to call the ResetChanges() method at runtime, without a callback.

      <asp:Button ID="ResetButton" Text="Reset" runat="server" OnClientClick="return ResetChanges();" />
      

      This is working fine for me, and I hope it solves the same issue you may be having, trying to keep your code all ASP.NET. If you have any comments or run in to any troubles, please let me know in the comments sections.

      Categories: Programming Tags: ,

        From Virtual to Actual Reality – Meeting my End Users

        June 18th, 2010 haXX No comments

        I’m sitting in the airport in Ft. Lauderdale, Florida, waiting to board my plane back to DC. I’ve been here for a few days at a conference hosted by my client in Philadelphia. They host a food conference that’s attended by the food vendors and DoD buyers from around the world. It was a couple of days of general sessions and breakout sessions, followed by a very large show from the vendors displaying their wares.

        I’ve been working with this client for many years, but have never attended this yearly convention. It was very enlightening and inspiring to hear the Generals talk about feeding the warfighters, and to hear from those in the field about how challenging the process can be. It makes me proud to know I’m part of this huge effort that may be just another coding job for me, but is such a significant part of the daily lives of many people.

        I attended at least two sessions where the online food ordering process was demoed, and saw my own work on the big screen. Of course I know that many people use my software, but to see it in action in front of a large crowd left me feeling a little giddy. Even though I get a lot of satisfaction out of a technically elegant piece of code, I now know a higher level of satisfaction seeing and hearing the actual end users that I’ve only ever virtualized.

        Just to be clear… I work with a team to design, develop, test and maintain this large application.  While I may be the senior engineer, we have (and need) several other engineers and analysts to keep this behemoth afloat.

        So, in a nutshell, attending the conference in Florida felt like a little pat on the back for me.  I don’t rely on getting accolades for my work to feed my ego (heck, it’s big enough as it is), but I left the conference feeling pretty darn good about myself and my team.

        Categories: Uncategorized Tags:

          The Next Step – No Pun Intended

          April 30th, 2010 haXX 1 comment

          Moving right along.  It’s not as if I don’t already compose software in enough different languages already.  I’m taking on a new one.  And a new platform.  And in my spare time.

          Sheesh.

          For my current job I code in HTML, JavaScript, VBScript, VB6, ASP.NET, C# and toss in a little SQL.  All on Microsoft and Oracle platforms.  Previous jobs have had me coding in Python, PHP, ANSI C, Assembly Language, CList, SAS, Cobol, PL/1 and others, on platforms ranging from IBM mainframes and Prime, Wang and Amdahl computers to various flavors of Unix boxes.

          Now I’m adding Objective-C and the Mac/iPhone/iTouch/iPad platform.     Read more…

          Categories: About Tags:

            Programming in C# – Using the ?? Operator on Strings

            April 21st, 2010 haXX No comments

            In a previous post, I showed a single line IF statement to make things a little neater for true/false operations.  It looks like this…

            string2 = string.IsNullOrEmpty(string1) ? "string1 is null" : string1;
            

            This line of code can be understood as “If string1 is null or empty, then set string2 equal to ‘string1 is null’ else set string2 equal to the value of string1″

            Here’s another way of writing this line of code assuming you’re checking only for a null condition…

            string2 = string1 ?? "string1 is null";
            

            This line of code can be understood as “If string1 is null, then set string2 equal to ‘string1 is null’ else set string2 equal to the value of string1″.  The real difference here is that the ?? operator only returns true for null, not empty.

            Categories: Programming Tags:

              The Apple iPad – The Appliance I Never Thought I Needed

              April 7th, 2010 haXX 1 comment

              Apple iPad 3G

              Apple has introduced a new piece of hardware to their lineup. You’ve certainly heard about it. I’ve been hearing about it nonstop for weeks. It’s called the iPad and was released on April 3rd. It’s a tablet computer with a screen roughly the same size as a sheet of paper. For all the technical details check out the Apple site or just Google around a bit.

              I haven’t held one in my hands yet, so I can’t really give a hands on review of it. I have read a number of articles and quite a bit of comments relating to those articles. What I find interesting is the haters seem to outnumber the fanboys on most every comment thread except on the Apple site itself. Why is this? Are the haters just that much more vocal, or are the newest iPad owners just too busy to comment?

              Analysis of the Public Reaction

              On a few of my favorite blog sites, like Gizmodo, Lifehacker and even Tom’s Hardware, they’ve had quite a few posts per day about the iPad. Before release, the posts were speculative, then reviews started pouring in on release day, then we started getting tips/tricks, app reviews, articles about accessories, etc. There’s been a ton of coverage and I could understand feeling inundated. If that’s the case, then I think the average reader would probably just scroll past the post, like I do for LoLcat articles.

              Read more…

              Categories: Gadgets Tags:

                ASP – Using a Signon Manager to Limit Concurrent Signons

                April 5th, 2010 haXX 1 comment

                The SignonManager process is used to limit concurrent logons to the website to only one per user.  This will prevent users from starting multiple sessions simultaneously, as could happen if multiple users were sharing a User ID.  The control mechanism is the User ID and the Session ID.  If the user is able to connect a second time with identical credentials, then they will be allowed to continue.  If the Session ID is different, then the original user is considered to be superseded and will be redirected to a ‘forced off’ page on the next server request.

                This version of the SignonManager is written in VBScript, and intended to be used in an Active Server Pages (ASP) environment. See my other post for a version of this utility for use in an ASP.NET, C# environment.

                Read more…

                Categories: Programming Tags: ,