Adamo by Dell is out

by Jon Davis 20. March 2009 20:36

Adamo by Dell is out. Or at least, it’s orderable. I saw no press release. You can order online now.


Adamo is a pretty laptop that Dell put out to try to compete with MacBook Air. What’s unfortunate is that MacBook Air wasn’t the one to copy. The world has little need for 1.2 or 1.4 GHz CPUs no matter how thin, no, certainly not when the complete package starts at $3,212.

The Adamo is certainly beautiful. But sluggish beauty doesn’t bring about desire. Bring me a moderately thin (but not that thin) laptop with a 2.4 GHz multi-core processor that keeps cool and I might think $3,000-ish to be fair. On the other hand, most preppies and corporate execs don’t do much more than web surfing and Microsoft Office (oOooo .. PowerPoint ..) so for them who cares what speed it is. I guess.

This is clearly an Apple vs. Dell thing that we as consumers should hopefully be bored with.

I meanwhile am really bummed out that Toshiba’s hardcore laptop, the Qosmio X305, looks like a glossy, translucent, open box of cheap Valentine’s Day chocolates. My X205-S9359 was one of the best multi-purpose laptops on the market two years ago and it looks like it can handle either role of a professional corporate environment or a hardcore gamer. But Toshiba apparently changed their minds and want these things to appeal to gay little boys and spoiled rotten gamer girls.

Translucent colorful cases went away with the original iMac like dance floor rap music went the way of dorky memories of the 90s.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Unity 3D On Windows: It’s The Real Deal

by Jon Davis 19. March 2009 23:30

As curious as I am about all the exciting MIX09 announcements, I was equally curious if not more curious about the announcement from Unity Technologies that Unity 3D is now available on Windows (no longer beta). This is a major, major cross-platform game engine, world builder, and development IDE all in one, that builds 3D games for both Windows and Mac (PPC and Intel) and on the web as a browser plug-in (Silverlight/Flash style). (The Mac version supports deployment to iPhone as well, but the Windows version doesn’t.) The programming language is C#, using a tweaked out processor-natively compiled implementation of Mono (no this has absolutely NOTHING to do with Moonlight), and processor-natively compiled Javascript.

windows_gui This announcement is big because the development toolset has been available on the Mac for some time, but the reality is that there are far more potential game developers, particularly C# programmers, who prefer Windows over Mac for development. This is not to say that Mac isn’t the superior operating system or that Windows is, I’m just acknowledging the statistical fact that Windows has more users, whether those users are end-users or the MSDN crowd.

I downloaded Unity for Windows and yes, it’s pretty much the same thing as what I saw on the Mac a year or so ago, which was one of the two big motivators to buy a Mac Mini in the first place (this and the iPhone SDK), to dabble and discover.

In the end I ultimately shrugged off my Mac Mini because I mostly thrive on my Vista-based laptop. But now I can do this Unity stuff on my laptop, in the comfort of my living room. So while it still might be too late (I only have so much time in the evenings to screw around with these things) in that I might be just short of having sufficient curiosity to be willing to prioritize Unity over other pet projects, we’ll see. Unity won itself another chance.

A warm CONGRATULATIONS and THANK YOU to Unity Technologies for making the sensible move to support the Windows developer community.

Microsoft’s XNA team should be inspired. I’d love to see Unity-like tools added to the XNA Game Studio.

The one thing that keeps me hesitant to say that Unity is the end-all be-all or “this is the way things should be done” is simply the fact that, like GarageGames’ Torque and Epic Games’ UnrealED, Unity imposes a baseline game engine, an OpenGL-based virtual world engine, which makes things easier to work with but doesn’t give a programmer the opportunity to build a game’s core from scratch. Fortunately, at least Unity 3D’s virtual world engine doesn’t impose a landscape and physics like Torque does. But I just admire XNA’s true open-endedness.

I guess what I’m saying is that with Unity I’d like to see “Cornflower Blue mode”, so to speak. When I think of game development, I don’t think of 3D meshes and media assets and X/Y/Z coordinates so much as I think of ticks, vectors, and graphics programming. I’m a programmer.

And one type of game I keep wanting to get around to making is a Wing Commander / Freespace style space flight sim. Torque didn’t lend itself to that. XNA was fine for that, I suppose, I just didn’t have time, but Unity brings a lot of joy to game production in general, and so now I’m torn. (Meh.)

One other thing I’m curious about is whether there are technical limitations or ramifications of combining Silverlight and the Unity 3D browser plug-in in layers. Unity doesn’t have XAML support, and Silverlight doesn’t have rich 3D and audio support. XNA meanwhile is completely ignoring the web.

Mix09: Silverlight 3 Bitmap API and Bitmap Caching

by Jon Davis 19. March 2009 20:38

At MIX 08 (yes 2008) one of the sessions I watched on video discussed game development on Silverlight 2, and I after watching it I was scared of ever creating anything with Silverlight of that sort, because of a serious limitation. These people making this game were unable to create bitmap sprites. Tiling, animations and the like had to be created with vector brushes and storyboards. What an awful joke! I swore off Silverlight for tinkering with games until Microsoft would expose a bitmap API that would facilitate bitmap editing, bitmap-to-canvas, as well as canvas-elements-to-bitmap.

I’ve mentioned my concerns in this blog before, even again recently.

It looks like Silverlight 3 is going to deliver. It will be barebones—the bitmap API is strictly pixel-level bitmap tweaking (no inherent System.Drawing equivalence or PNG import/export). But it’s SOMETHING, and something is better than nothing. Microsoft threw us a bone. Meanwhile, the bitmap caching is described as such: “Silverlight 3 dramatically improves the rendering performance of applications by allowing users to cache vector content, text and controls into bitmaps. This feature is useful for background content and for content which needs to scale without making changes to its internal appearance.” This sounds a lot like a solution to the original problem I (and apparently they) observed. I don’t know, however, how carefully that text was written. Can we really export canvas objects, such as the canvas itself, to a bitmap? If so, theoretically one could easily use this create screenshots of Silverlight, or even video recordings of Silverlight usage. This could also be a printer solution, assuming you can also export a higher DPI than screen default.

It’s all way cool, regardless.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5



MIX09: Silverlight 3 Supports Offline Desktop Apps? Cool! .. Er .. Meh.

by Jon Davis 19. March 2009 20:21

Silverlight 3 will support being deployed offline as desktop apps. That’s cool. It’s official, now, Microsoft has an answer to Adobe AIR. Really cool, actually.

Then again, Silverlight doesn’t do windowing. You’re stuck in a single window. Meh. Silverlight doesn’t do rich menuing (outside of the window canvas, except for right-click context menus). Meh. Silverlight apps deployed to the desktop aren’t actually installed (no true “Application” treatment), just a shortcut on the desktop—a feature (called “simplicity”) as much as a loss. No HTML / Javascript support! Meh!

I’d be no less interested than before of the idea of taking Webkit and building a third party AIR-like solution for Silverlight today even after the Silverlight 3 announcement, if it wasn’t for the annoying fact that even if such a thing was made, people wouldn’t use it, because they’d settle for the half-baked solution from Microsoft.

Do my gladness and disappointment cancel each other out? Hm. Not really. I’m disappointed by the details (or lack thereof), but at the end of it all, if I forget about Adobe AIR for a moment, .. dude! I can deploy simple, User Experience enhanced .NET apps on Windows or Mac with no trouble at all!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5



C#: Type Inferences For Generic Methods

by Jon Davis 17. March 2009 12:40

C# 3.0 has a cool feature I didn’t realize existed until now. I already knew that you can create generic methods, like so:

protected static T CaseInsensitiveFindValue<T>(Dictionary<string, T> dic, string key)
    if (dic.ContainsKey(key)) return dic[key];
    foreach (var kvp in dic)
        if (kvp.Key.ToLower() == key.ToLower()) return kvp.Value;
    return default(T);

That goes back to 2.0. What I didn’t realize until now was that when you invoke this method, you don’t have to pass the type in as a type argument for T. The type can be inferred!

var value = CaseInsensitiveFindValue(myDictionary, myKey);

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


C# | Software Development

Running Out Of Resources (Even With Lots Of RAM Installed)

by Jon Davis 10. March 2009 13:33

“.. Ask yourself if you have ever encountered any of the following problems :-

    1. You try to open an application but it refuses to load or it starts to load and then it disappears!
    2. You try to open or use an application but you get an "Out Of Memory" error message!
    3. One of your running applications inexplicably quits!
    4. When you right-click on your application, nothing happens! The command menu refuses to pop-up!
    5. Your web browser simply refuses to load any more windows or tabs!
    6. Your application is missing some menus or toolbars!
    7. You get the following error messages :
               Initialization of the dynamic library <system>\system32\user32.dll failed. The process is terminating abnormally.
               Initialization of the dynamic library <system>\system32\kernel32.dll failed. The process is terminating abnormally.”

I’m shocked I never blogged this. Over at Coding Horror there was an article that was posted wherein in the comments section someone pointed me here:

It’s a 3-page article describing how to reconfigure your desktop heap so that you don’t keep running out of system resources. I’ve gone back to 32-bit XP w/ 4GB RAM at the office and needed to look this up again because I was still getting erratic behavior—more so, actually, because more RAM meant less hesitancy to open things up. A co-worker got the RAM, too, so I had to look it up yet again. It’s definitely worth looking at if you open lots of apps and/or web browser windows like I do.

In case that article goes down, it goes something like this:

Go to HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control -> Session Manager –> SubSystems -> Key: Windows

If you check the Value data for the Windows key, it should be something like this :-

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

The portion of interest is "SharedSection=1024,3072,512".
The three values under Shared Section determines how much memory in kilobytes (KB) is allocated to each component of the desktop heap.

The first value is the shared heap size, common to all desktops. It's used to store the global handle table and shared system settings.

By default, it's set to 1024KB. You generally do not need to modify this value.

The second value is the desktop heap size for each desktop associated with the "interactive" window station. It's used to store user objects like hooks, menus, strings and windows.

By default, it's set to 3072KB. The more users log into the system, the more desktops are created. Consequently, the total "interactive" desktop heap size will increase to reflect the number of desktops created. But each desktop will only have an "interactive" desktop heap of 3072KB.

The third value is the desktop heap size for each desktop associated with the "non-interactive" window station.

By default, it's set to 512KB. But if this value is not present, the size of the "non-interactive" window station will be the same as that of the "interactive" window station.

Every service process created under a user account will be given a new desktop in a "non-interactive" window station created by the Service Control Manager (SCM). Therefore, each of these services will consume the amount of desktop heap, as specified in the third SharedSection value.

I’m guessing here but it looks like the desktop heap size should only be limited if you’re using Windows Server and Terminal Services, as I’m not sure how you can measure “the more users that log onto the desktop” outside of Terminal Services. Even Remote Desktop is a single-desktop experience.

I have mine reconfigured to:

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,6144,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

Not sure if that’s right but the system does still boot and I haven’t run into problem much anymore.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Computers and Internet | Microsoft Windows

Stupid Visual Studio Tricks: Speak ‘N Code

by Jon Davis 7. March 2009 01:58

I got bored tonight and created a Visual Studio macro that reads my code to me as I type it. First I had it read the keys (“a”, “b”) like a Speak ‘N Spell, but then I realized it’s better if it actually just waits for me to spell out the words instead. It also correctly pronounces a few special characters.

I have absolutely no use for this but for “duhh huh huh huh” giggles.

If you care to play with it, just open Visual Studio, choose Tools –> Macros –> Macros IDE from the menu, double-click MyMacros on the left, double-click EnvironmentEvents, then paste the following code inside the module body.

Private Speech As Object
Private Sub TextDocumentKeyPressEvents_BeforeKeyPress(ByVal Keypress _
As String, ByVal Selection As EnvDTE.TextSelection, _
ByVal InStatementCompletion As Boolean, ByRef CancelKeyPress As Boolean) _
Handles TextDocumentKeyPressEvents.BeforeKeyPress
If Speech Is Nothing Then
Speech = Activator.CreateInstance(Type.GetTypeFromProgID("sapi.spvoice"))
Speech.Voice = Speech.GetVoices("gender=male")(0)
End If
Dim Key As String
Key = Keypress
If Key = vbBack Then Return
Select Case Keypress
Case "!"
Key = "not"
Case "%"
Key = "mod"
Case "@"
Key = "at"
Case "#"
Key = "pound"
Case "^"
Key = "caret"
Case "&"
Key = "and"
Case "*"
Key = "star"
Case "/"
Key = "slash"
Case "\"
Key = "backslash"
Case ","
Key = "comma"
Case "<"
Key = "less than"
Case ">"
Key = "greater than"
Case ":"
Key = "colon"
Case "("
Key = "" ' "pahrens"
Case ")"
Key = "" ' "close pahrens"
Case "."
Key = "dot"
Case "{"
Key = "" ' "begin brace"
Case "}"
Key = "" ' "close brace"
Case ";"
Key = "" ' "semicolon"
Case vbTab
Key = "" ' "tab"
Case " "
Key = "" ' "space"
Case "["
Key = "" ' "left bracket"
Case "]"
Key = "" ' "right bracket"
Case """"
Key = "" ' "double quotes"
Case "'"
Key = "single quote"
Case vbCr, vbLf, vbCrLf
Key = "" ' "line break"
End Select
Dim Say As String
Const a2z As String = "abcdefghijklmnopqrstuvwxyz"
If Not a2z.Contains(Keypress.ToLower()) Then
Say = Key
Dim editPoint = Selection.ActivePoint().CreateEditPoint()
If Not IsWhitespace(editPoint.GetText(1)) Then
Dim Word = editPoint.GetText(Selection.ActivePoint.AbsoluteCharOffset - editPoint.AbsoluteCharOffset)
Dim HasLetter As Boolean
For Each letter In Word
If a2z.Contains(letter) Then HasLetter = True
If HasLetter Then
If Not IsWhiteSpace(Keypress) Then
Say = Word & ", " & Say
Say = Word
End If
End If
End If
End If
If Say <> "" Then
Speech.Speak(Say, SpeechVoiceSpeakFlags.SVSFlagsAsync + SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak)
End If
End Sub
Function IsWhitespace(ByVal s As String)
Dim rgx As New System.Text.RegularExpressions.Regex("\s*")
Return rgx.Match(s).Length > 0
End Function
Enum SpeechVoiceSpeakFlags
'SpVoice Flags
SVSFDefault = 0
SVSFlagsAsync = 1
SVSFPurgeBeforeSpeak = 2
SVSFIsFilename = 4
SVSFPersistXML = 32
'Normalizer Flags
SVSFNLPSpeakPunc = 64
SVSFNLPMask = 64
SVSFVoiceMask = 127
SVSFUnusedFlags = -128
End Enum

Silverlight’s AIR Equivalent Has Been Here All Along.. At Least In Windows

by Jon Davis 5. March 2009 04:02

I think I know one more reason why Microsoft hasn’t pushed an AIR equivalent for Silverlight. It’s because it already exists in lightweight form, bundled with Internet Explorer, called HTAs, or HTML Applications.

HTAs are basically HTML files, renamed to .hta. Double-clicking an HTML file renamed to .hta opens it up in a form of Internet Explorer that has no status bar, no menu, no toolbar, just the content, and it runs in a desktop-accessible security context. You can even go chromeless (no border and no titlebar on the browser window) by setting the caption setting to false in the HTA header tag.

Of course, HTA is only usable on Windows, which, to many people, makes the comparison of HTAs to Adobe AIR fairly moot. I dunno, though, I’m not entirely inclined to agree. I just like the idea of producing Windows-installable RIAs in a portable codebase of my preferred architecture. On the other hand, cross-platform deployment of rich apps is the biggest selling point for AIR.

Technically, HTA is similar to Mozilla’s Prism (formerly “Webrunner”) in the Windows environment in that it is a way of accessing web content from a desktop icon without the bulk of the browser application. However, HTA is more like AIR in that it breaks out of the Internet Explorer security sandbox (sort of) and allows you to access the desktop environment from script.

Note: The reason why I added a “(sort of)” when saying HTA breaks out of the IE security sandbox above is because it seems there is a mis-trust that goes on when accessing some web content. I tried creating an HTA that redirected (window.location.href=) to a web page that had Silverlight content. It unexpectedly popped up a new window and then the Silverlight app failed to load due to “missing files”. I then tried referencing the web page in an IFRAME, and that worked without any problems. This was strange to me. These things said, I *am* using Windows 7 / IE 8, so it might’ve been a beta quirk. Dunno, really.

HTAs aren’t “marketed” as being very sexy. I don’t know why Microsoft stopped touting HTA as something interesting as of 2005; indeed, the Scripting Center makes HTAs seem somewhat geekish. And I never hear of HTA being compared with Adobe AIR, but I suspect that’s because AIR is presented in a sexy way and HTA is not.

There are some rough corners in HTA technology to make it awkward in its competition with Adobe AIR, here’s a quick list:

  • No app installer. You have to roll your own. HTAs are easy to produce, just take an .html file and rename it to .hta (and optionally add HTA tags to the file, etc.). The problem is that, as easy as that is, it’s not feasible for an end user, who typically won’t even be able to change the file extension (it’s hidden by default).

    Microsoft’s equivalent to AIR’s easy app installation process is ClickOnce Deployment, but once you’re using ClickOnce you’re not using HTAs, you’re using full-blown Windows binaries. Microsoft needs to produce a ClickOnce Lite that allows you to install HTAs and dependency files in something like a .docx, .xap, or .baml file (like, but not equal to, and certainly not being), maybe a new .htax file extension, being a ZIP file with all the CSS, scripts, .xaps, and other dependencies that a standalone rich HTA would need.
  • No app uninstaller, either. No app installer means it won’t get added to Add/Remove Programs, so if you rename an .html file to .hta and manually add it to your Start menu, well, good for you. But there is no realistic end user option for you.

    I think it’s time someone created a CodePlex solution for an HTA app installer/uninstaller if one hasn’t been started already. I’d be tempted to jump in myself if HTAs were cross-platform, but oh if I only had more free time ...
  • Not likely much in the way of special integration with Silverlight or other runtimes. It’s IE, so it all “just works”, just like with a normal web site. I haven’t really tinkered much with AIR so I don’t know but I’d be surprised if AIR didn’t have some special integration between Flash/ActionScript and the Webkit browser host runtime, such as alternative windowing or menuing APIs not normally available in a browser.
  • AFAIK, no transparency. I mentioned earlier that if you turn off the caption option in the HTA header tag, you end up with a chromeless window. (I’m not sure how you can drag windows around the desktop or resize without horribly painful hacks that work around security constraints that, frankly, suck.) But even if you drop the outer border, as far as I know, you can’t have transparency. Hence, no rounded corners. I could be wrong about that.
  • Not many tools out there for producing HTA apps. Adobe AIR comes with a full-blown SDK. There’s also Aptana Studio which provides an IDE for creating Adobe AIR applications. HTA, however, doesn’t really provide anything outside of MSDN documentation and “good luck”.
    This wouldn’t much matter since HTA truly builds on web technology (like AIR). The problem is that it’s more. The HTA SDK is the Windows Script (WScript.exe) COM server, exposing desktop objects like the file system to script, and Internet Explorer itself, which offers up extra rendering and transition filters and a script runtime that supports COM objects, alternate language support (VBScript), etc.

    So what HTA needs in order to compete in the area of tools support are
    • That HTA app installer I keep whining about for not currently existing.
    • A rich Javascript API that exposes common windowing and menuing programming options in an elegant manner, and that acts as an abstraction to WScript and other common Windows ActiveX controls that are accessible to HTAs and would be used in typical HTAs.
    • A fresh XHTML markup model, none of this all-caps HTML sample code. (And please, no more VBScript samples or ‘-o-matics’ unless side-by-side with JScript.)
    • First class support for HTA application development within Visual Studio, including:
      • Window (HTML) designer with all the HTA bells and whistles bundled into the editor and properties window (if it’s not already there??)
      • Debugger (already there, fortunately)
      • HTA installer package creation projects
    • A Silverlight and/or WPF/BAML integration API so that Silverlight / BAML code (C#/VB.NET/DLR) can “speak to” the HTA environment for such things as menus, windowing, etc. to the same extent as the “rich Javascript API” I mentioned above, and then some.
    • An icon exporter/integrator. (HTAs already support desktop icons.) 
    • Rolled into the Expression suite (export a Silverlight app from Blend to a desktop app, which can be edited further with Expression Web).
    • Some look-and-feel love on the above-mentioned, currently non-existent installer.

A fella can dream, can’t he?

Now for the money question. What would be the incentive for Microsoft to produce an AIR equivalent for Silverlight? I was always tempted to believe that there was a conflict of interest in the fact that introducing Silverlight in AIR-like form on non-Windows desktops like Mac or Linux introduced a competition problem with the primary competitive advantages of WPF, which is the XAML-based GUI environment for windowed apps, and which requires Windows. One might argue that giving Silverlight a windowing platform on the Mac or on Linux makes WPF, and thus Windows, less interesting. I used to claim this, now I’m not convinced, because I’ve seen how painfully limited Silverlight is compared to WPF. WPF has the whole of .NET available at its fingertips, as well as extra features like 3D.

That said, though, if Microsoft made HTAs a competitive AIR-like product that gave Silverlight apps a windowing and install-based platform, even if it would be exclusive to Windows, the sole argument I can think of that makes an AIR equivalent for Silverlight a competitive conflict of interest for Microsoft suddenly goes away. Now Silverlight becomes a Windows-favoring technology again, something Microsoft can use to its advantage.

And yes, I’m playing devil’s advocate with that previous paragraph. Meanwhile, you still have AIR and Prism, although, no, you can’t run Silverlight on AIR (apparently there’s some kind of security lock-down on plug-ins, although one wonders how hackable this is) and I don’t think you can access desktop objects such as COM objects from within Prism or AIR, although I believe Prism claims to have scriptable access to desktop files.

Looking at the simplicity of AIR—really, there are only a few key files, notably “Adobe AIR.dll” and “webkit.dll”—it surely can’t be hard to create a new AIR for Silverlight. The more I reconsider, the more I am back in my original agreement that AIR is all about being cross-platform, and that Silverlight needs something more. And certainly, Prism is looking more and more interesting as well.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Silverlight | Software Development


Powered by BlogEngine.NET
Theme by Mads Kristensen

About the author

Jon Davis (aka "stimpy77") has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps.
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."

Jon was previously employed as a senior .NET developer at a very well-known Internet services company whom you're more likely than not to have directly done business with. However, this blog and all of have no affiliation with, and are not representative of, his former employer in any way.

Contact Me 

Tag cloud


<<  May 2021  >>

View posts in large calendar