Scott Hanselman

Upgrading my Blackberry's Software and getting the Hotkeys to work

October 17, '05 Comments [5] Posted in Reviews
Sponsored By

I just updated my older Blackberry 7280's software from version 3.7.0.76 [Platform 1.6.0.114 - 2003] to version 4.0.2.49 [Platform 1.6.1.53].

It was a pretty big jump, updating the firmware/software on the crackberry from a version 2 years old to the latest one. It's the same version the newer color ones use, I think.

I love it when just updating the software of a device like this gives me lots of new features. This upgrade gave me:

  • Alphanumeric Speed Dial from the Phone Screen. "H" for home and the like.
  • Whole new Phone Screen with a direct dialing box with LARGE NUMBERS. YAY!
  • All new Alerts and Ringing Phone dialog boxes. Yes, of course! Fill the whole screen with the name of who's calling. Brilliant. Only took 4 versions to get that right. :)
  • All new calculator with on-screen keyboard map. Best phone calculator I've used.
  • Updated Tasklist with icons indicating level of completion.

Believe me, I'd love to get a Windows Mobile phone - if only it could keep up with my Blackberry. I've got wireless calendar syncing, global Active Directory lookup, "rightclick" equivalent context menus for phone numbers anywhere, instant email delivery, speed speed speed, battery life for a week, and no stylus. I kept watching folks take out there tiny stylii and tapping away on their phones. Seemed odd to me. If the interface to a phone is so obtuse that I have to use a stylus, it's time to re-explore the UI metaphor, no?

One thing that was an irritant that you, as a newer blackberry user, may not realize you're missing:

TIP: BlackberryOS 4.0 turned OFF the home screen hotkeys by default. That means you don't have the quick hotkeys like "C" for Compose or "A" for Address Book that I used all the time on previous versions. I have been told, by many newer Blackberry folks that this feature isn't available on the new version. However, if you go to the main Phone screen, click the scroll wheel, select Options, then General Options, then turn "Dial From Home Screen" to OFF you'll get all these hotkeys back.

TIP: I've experimented with all the different Blackberry fonts, and I find "BBMillback Tall 10 Bold AntiAliased" to be the best balance of size and clarity.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Maxivista Undocumented Registry Tweaks

October 16, '05 Comments [4] Posted in NDoc
Sponsored By

Mv2_registry_tweakBy now, you know I love Maxivista (Buy it here). I use it on a TabletPC, turning my Tablet into a 3rd monitor, using only software drivers and the network.

Here's some (as of yet) undocumented registry hacks from a Maxivista Insider:

MaxiVista adds two registry entries of note, specifically "fps" and "checktime" to the following registry key:

My Computer\HKEY_CURRENT_USER\Software\MaxiVista\A2\(YourUserName)

Checktime
Checktime determines the time interval when new picture updates are being sent. Smaller values, increase the responsiveness of the viewer screen for the cost of higher CPU load and presumably more network traffic. If the mouse cursor is laggy then users should play around with this setting. Ordinarily I don't notice the difference between my machine's attached monitors, but if you do, try this switch to speed up the refresh a bit.

Recommended value range: 5..20ms (default: 20ms)

fps
Determines the maximum frame rate per second. Decreasing this value reduces the network load. May be useful for slow wireless network connections. Sometimes I use Maxivista over wireless and lowering to 20 fps definitely takes the load off an 11Mbs network, while still keeping the monitor totally usable.

Recommended value range: 20..33 fps (default: 33fps)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

All the world abuzz about Sudoku

October 14, '05 Comments [12] Posted in Gaming | Tools
Sponsored By

Sudoku1At a conference recently, I asked a delegate from Japan about Sudoku (??, sudoku) presuming that he, being from the originating country, would have some insights I didn't. Oddly enough he hadn't heard of it. Is this Japanese game sweeping the world, save Japan?

From WebSudoku.com: The rules of Sudoku are simple. Enter digits from 1 to 9 into the blank spaces. Every row must contain one of each digit. So must every column, as must every 3x3 square.

Folks seem obsessed with it. When I came upon the puzzle I figured it was a fluke, a curiosity, but then I noticed that American Airlines had Sudoku proudly displayed next to their Crossword Puzzles in the in-flight magazine. It's big in the UK. Some are 'unsolvable' (really hard, no logic applies). PocketMod includes pages with generated Sudoku puzzles.

Personally, I did a few, found it hard, found it interesting, but not that engaging. I mean, it doesn't tickle the nice parts of my brain like Crosswords. I feel that Crosswords require thinking, while Sudoku requires processing. Maybe that's not phrased well, but I think that since most programmers first instinct is to write a solver, and some write the solver faster than they can solve the puzzle just proves my point. Computers are a tool, my brain is not a computer. But, my brain can use a computer to solve a Soduku better than by itself. Trying to make my brain work like a computer just makes it ache.

BTW, don't mis-spell it, because Soduku is rat-bite fever!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Resetting Microsoft Update - Error 0x8024001D

October 13, '05 Comments [10] Posted in Musings
Sponsored By

Started getting Error 0x8024001D on Microsoft Update last week. Ended up renaming C:\windows\softwaredistribution\DataStore to C:\windows\softwaredistribution\DataStore.poo and that reset Microosft Update. Installed again and I'm back in business. Astonishing lame.

UPDATE: If you're getting error 0x80070057, you can rename c:\windows\SoftwareDistribution\Download to c:\WINDOXP\SoftwareDistribution\Download.poo and all updates will be downloaded and applied again.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Moving ViewState to the Bottom of the Page

October 13, '05 Comments [7] Posted in ASP.NET | ViewState
Sponsored By

I was working on some ASP.NET hacks and wanted to move the ViewState to the bottom of the page in order to get Google to pay more attention to my page and less to the wad of Base64'ed ViewState.

First I tried this because it's the closest to the way my mind works:

static readonly Regex viewStateRegex = new Regex(@"(<input type=""hidden"" name=""__VIEWSTATE"" 
value=""[a-zA-Z0-9\+=\\/]+"" />)",
RegexOptions.Multiline|RegexOptions.Compiled);
static readonly Regex endFormRegex = new Regex(@"</form>",
RegexOptions.Multiline|RegexOptions.Compiled);
 
protected override void Render(HtmlTextWriter writer)
{
    //Defensive coding checks removed for speed and simplicity. 
    // If these don't work out, you've likely got bigger problems.
    System.IO.StringWriter stringWriter = new System.IO.StringWriter();
    HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
    base.Render(htmlWriter);
    string html = stringWriter.ToString();
    Match viewStateMatch = viewStateRegex.Match(html);
    string viewStateString = viewStateMatch.Captures[0].Value;
    html = html.Remove(viewStateMatch.Index,viewStateMatch.Length);
    // This will only work if you have only one </form> on the page
    Match endFormMatch = endFormRegex.Match(html,viewStateMatch.Index);
    html = html.Insert(endFormMatch.Index,viewStateString);
    writer.Write(html);
}

However, it was taking 1 thousanth of a second (~0.001230s) to do the work and that didn't feel right. Of course, by taking over the HtmlTextWriter and spitting it out as a string I've boogered up all the benefits of buffering and the whole streaming thing, but it still felt wrong.

So, against my better judgement, I did it again like this:

protected override void Render(System.Web.UI.HtmlTextWriter writer) 
{
    System.IO.StringWriter stringWriter = new System.IO.StringWriter();
    HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
    base.Render(htmlWriter);
    string html = stringWriter.ToString();
    int StartPoint = html.IndexOf("<input type=\"hidden\" name=\"__VIEWSTATE\"");
    if (StartPoint >= 0) 
    {
        int EndPoint = html.IndexOf("/>", StartPoint) + 2;
        string viewstateInput = html.Substring(StartPoint, EndPoint - StartPoint);
        html = html.Remove(StartPoint, EndPoint - StartPoint);
        int FormEndStart = html.IndexOf("</form>") - 1;
        if (FormEndStart >= 0) 
        {
            html = html.Insert(FormEndStart, viewstateInput);
        }
    }
    writer.Write(html);
}

I always assumed (mistake #1) that IndexOf was pretty expensive, particularly on larger strings. However, this method averaged out at 0.000995s. It consistently beat the Regex one, even though the Regex one was very simple, the Regexes were precompiled and (I think) simple.

Now, to be clear, I'm just playing here, and I know it's microperf and premature optimization. The really interesting thing would be to do a matrix of page size vs. viewstate size. You know, large page, small viewstate against small page, large viewstate and all points in between, then try it with both techniques and see which is better for these different scenarios. But, I'm tired and have other things to do, so if you like, there's some homework for you. What does this data set look like: viewstate size vs. page size vs. technique?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.