Javascript: eval() and window.eval() Are Not The Same Thing

by Jon Davis 9. March 2010 03:32

I’ve been waiting for quite some time for my using.js project to pass all of its tests on Webkit and Opera. The last issue was the “retain context” issue, which wasn’t a using.js issue so much as a scenario issue, where if you declare a using block with using.js, the target object context for the “this” object was being retained in IE and in Firefox but not in Webkit nor in Opera. This issue revolved around the use of window.eval(), and I filed a bug report here:

https://bugs.webkit.org/show_bug.cgi?id=35722

.. as well as on Opera’s web site (no URL available as bug reports there are not public).

As is clearly observable in the history of the bug (bug title was changed by an Apple engineer) and in the comments of the bug, the scope and cause of the bug turned out to be more innocent than the browsers merely treating window.eval() differently. Although that remained true, it was irrelevant; I should have been using eval(), not window.eval().

The window.eval() function was the only eval() function I knew of. I had always assumed that eval() came about by way of the global window scope. But it appears that eval() is actually a standalone ECMAScript 5 operator now. This is interesting news! Who knew?!

So, note to self. From now on, never use window.eval()! Always use just eval().

And I’ve updated the using.js manual tests accordingly.

Be the first to rate this post

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

Tags:

Restore Sanity In Windows 7

by Jon Davis 8. March 2010 01:45

I really love Windows 7, but there are a few “features” that really annoy the living crap out of me.

1. Get your shared files back!

Microsoft apparently thought they were doing us a favor with “HomeGroups”, but for those of us who are able to comprehend the concepts of “yew-en-see file paths” and “aDvANcEd Sharing” (really just sharing), HomeGroups proved to be a genuine nuisance. First, HomeGroups flat disables traditional Windows sharing so that you can’t even access one home computer from another home computer using admin-rights-exposed UNC \\COMPUTERNAME\C$. It just doesn’t connect at all.

To bring back traditional file sharing, open up Network and Sharing Center, open up the HomeGroup section, and kill it. I also found in “Change advanced sharing settings…”

HomeGroup connections

Typically, Windows manages the connections to other homegroup computers. But if you have the same user accounts and passwords on all of your computers, you can have HomeGroup use your account instead.

[ ] Allow Windows to manage homegroup connections (recommended)
[X] Use user accounts and passwords to connect to other computers

Generally, both here and in Windows Explorer View Settings, if you are a Windows veteran, you can pretty much always avoid the “recommended” option. Thanks Microsoft. *sigh*

2. Get rid of pesky background apps that want to stay in the taskbar.

The new Windows 7 taskbar is nice, but it should not take the place of the Quick Launch nor does it do away with the value of the system notification area (“sys tray”). Instant messaging apps whose windows have been closed but are still running in the background have no business filling up the task bar. They belong in the system tray, with icons no bigger than 16x16 so that they are not filling up the screen.

So, for both Live Messenger and for Skype, the simple solution to get around this ridiculously stupid new feature and bring back the old behavior of these IM clients running in the system notification area instead of filling up the taskbar is to navigate to the EXE file (in the program files directory), right-click on it, choose Properties, then click on the Compatibility tab, and select the option to run the program as if running on Windows Vista Service Pack 2.

Be the first to rate this post

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

Tags:

SLCanvas: Now Canvas Tag Support

by Jon Davis 21. February 2010 01:24

In a previous post, I mentioned that I snagged the HTML5Canvas on Silverlight code from delay’s blog [1, 2] and put it up on CodePlex. I’ve been hoping others would join in on some cooperative interest to evolve what “delay” (the original author) did, but I’m completely unsurprised that no one did. Meanwhile, I took a couple evenings—one a couple weeks ago plus tonight—to finally evolve the script a bit.

  • It’s now called slcanvas.js with a Javascript hashtable namespace of, appropriately, slcanvas.
  • You can now use HTML markup of <canvas>, no conversion/initialization scripting required! The only caveats are:
    1. You must add the attribute of renderMethod=”Silverlight” or renderMethod=”auto” to the <canvas> tag. Specifying “auto” will allow the loader to use the native canvas functionality if it’s available and use Silverlight if it’s not, while specifying “silverlight” will more or less replace the <canvas> tag with a Silverlight instance outright. (I’m thinking about changing this attribute to renderer=”..” or something else. I was going to seek feedback on the official canvas developers group list but I’m still waiting for my membership to be approved by the moderator. Feel free to post a comment about your preference here.)
    2. Any canvas-executing code must execute after window.load has occurred, or you can populate an onload attribute on the <canvas> tag which will allow script to be executed after slcanvas.js has converted the tag properly.

With these important changes, I posted the original test page, with a few tweaks such as the second Silverlight test replaced with a <canvas renderMethod=”Silverlight”></canvas> tag, at the following URL:

http://www.jondavis.net/codeprojects/slcanvas/

The changes I made to allow for the <canvas renderMethod=”Silverlight”> tag execution have been tested in IE6, IE8, Firefox 3.6, Google Chrome 4.0.249.89 (beta), Opera 10, and Safari 4.

I have not yet created a release of these changes yet on CodePlex, you can access everything from trunk. It's now released.

The project is maintained here, and anyone else is welcome to get involved: http://slcanvas.codeplex.com/

 

kick it on DotNetKicks.com

 

Be the first to rate this post

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

Tags:

HTML 5 Canvas via Silverlight now on CodePlex

by Jon Davis 25. January 2010 19:48

Somehow I missed the memo that David Anson (“Delay”), an employee at Microsoft, successfully created a Silverlight bridge for the HTML 5 canvas specification. Or that is to say, he implemented 100% support for several very important runtime tests for the HTML 5 canvas. And the great news is that it’s pretty fast, and from the vantage point of a couple comparison tests it renders a lot better (more accurately) than excanvas which runs at Google Code.

I was surprised further, however, that this fella’s released code was only accessible via his blog. I was shocked that this wasn’t a big open-source project—that is, it’s open source, and it’s a project, but it wasn’t on a source code repository system of any kind, at least not publicly.

So I asked him for permission to create a project for it on CodePlex so that it can be hosted there and continue growing with the efforts of the community. He gave me his blessing, so here it is:

http://slcanvas.codeplex.com/

David’s approach to implementing this was quite good, and actually very well-timed, because by waiting a couple years for canvas to mature he got his hands on some great canvas demos to build around. I am very impressed by David’s tenacity to implement this bridge with apparently 100% test conformance. People (particularly the IE team at Microsoft) just don’t push forward to 100% passing enough, what an example this guy made both to Microsoft and to the rest of us.

He told me it “was really just a learning exercise and proof-of-concept for me, I’d love to see someone go somewhere with it!” Me, too, David.

By the way, I was once told of a former co-worker who disassembled a Hummer down to its basic parts, and put it back together again, just for the learning exercise. To each his own, I guess. But then, in David’s case, we all benefit!

Be the first to rate this post

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

Tags:

Still Stuck In Dell Hell

by Jon Davis 7. December 2009 19:37

Just sent this off to Dell tonight.

So I placed an order (Purchase # ------------ [for a Studio 16 XPS Intel i7 laptop]) back in September, the order was delayed to October, it was then re-ordered behind my back to be delivered in November, then it was delayed again behind my back to be delivered in December, and then finally, behind my back, my order was cancelled.

That was weeks ago. I have still not been reimbursed for this cancelled order.

Look, you can ship the order (NOW!!) and keep the money, or you can cancel the order and return the money. You may not have both. Shame on you guys for trying to pull a scam like this off!

Please resolve this, now.

Thank you,
Jon Davis

Be the first to rate this post

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

Tags:

Computer Hardware | Computers and Internet

Silverlight 4 Sounds Very Promising

by Jon Davis 18. November 2009 23:05

News from PDC 2009 is trickling in, and this is an amazing year for PDC goers. Office 2010 beta was released to MSDN subscribers. SharePoint 2010 beta was released to MSDN subscribers. The attendees even got a tablet PC notebook computer with Windows 7—all of the attendees got one, this was not a raffle—all except Microsoft employees.

Silverlight 4 beta was also released. Judging from its feature list, I have high hopes for this version. Microsoft is clearly listening to us, and that makes me very, very glad—I mean, the only reason why we bother to blog, tweet, and elsewhere whine about missing features is because we want our dependence upon Microsoft to succeed.

The big highlights (“big” cause I threw in my own feedback for these) include print support, right mouse button support, webcam/microphone support, mouse wheel support, and COM frickin interop. Some interesting highlights I didn’t give feedback for but really appreciate include RichText, network authentication, Silverlight as a drop target, and keyboard access in full-screen mode. I’m kind of sitting here pale-faced right now, it’s like Microsoft picked up a sledgehammer and pounded out the big gaping holes that we all felt about Silverlight all in one shot. Kinda makes Silverlight 3 seem almost meaningless because of both the timeframe between Silverlight 3’s beta and Silverlight 4’s beta, and the depth of the featureset revealed in v4 versus v3. I look forward to seeing Silverlight 4 in action, and I now feel almost motivated and nearly excuseless to dig in and really develop some Silverlight chops.

I do think there are two missing features that are still painfully missing. Both of them are related to the offline app support.

The first missing feature is windowing. I’ve already complained about this. Confining Silverlight to a single OS window is painfully limiting. I understand that the lack of windowing support enforces a sort of UI sandbox that retains both security and UIX consistency which is important for a web site. But my interest is more in the offline app support. I really want to use Silverlight to do stuff developers would normally use Adobe AIR for. Using Silverlight instead of AIR would keep me using the Microsoft toolset I’ve already invested in and would make it much easier to harness the power of IIS 7 & ASP.NET XML services from a Mac client. I can already do that using what’s there, but absent OS windowing it’s just a lot more confining than AIR.

The other missing feature, again this being also related to offline app support, is either system notification tray support for Windows clients. I bring this up because it’s my understanding that Seesmic for Windows, developed on Silverlight, is the new replacement for twhirl (twhirl is an Adobe AIR app and I’m a heavy twhirl user) but the reasons why I liked twhirl is because it doesn’t make a mess on my taskbar, I can forget about it until I get an alert at which point if I want to I can track it down my system notification tray and click on it. This in fact was why I didn’t care for TweetDeck (another Adobe AIR app) because, at least at the time I was using it, I didn’t see this option there to keep it tucked away as a small 16x16 icon in the bottom right of my screen, it has to fill a big taskbar slot and I hate that crap because at the end of every day I already have about 100 taskbar-consuming windows open.

But I’m otherwise very impressed with the progress that’s been made for Silverlight, and I’m very, very excited for Microsoft and look forward to what this will mean to the future of software development.

Be the first to rate this post

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

Tags:

Dell: Wow. Just Wow. I Really Liked You. This Is Saddening.

by Jon Davis 9. November 2009 03:42

I'm trying to figure out if I should be extremely mad. But I'm really very sad, and amazed. And annoyed.

I always admired Dell, especially for some of their higher-end laptops and some of the innovations they’ve made. And I always figured that made-to-order meant made-upon-order, moderately efficiently, considering how long they’ve been in business and how successful they’ve been as the #1 PC vendor in the world. McDonald’s wouldn’t survive, after all, if their food took an hour to prepare.

I placed an initial order way back in early September, taking advantage of my Dell Financing available credit, but splitting my payment between Dell Financial and a credit card. The order was submitted online and received, and all was well, but that night/morning I received an e-mail saying that the order had been "rejected". Excuse me? I wasn't sure what to think. I called them up to find out what was going on. Half an hour later, after getting forwarded over and over again, I was finally told that I placed my order with one cent ($0.01) more than my available credit with Dell Financial. Huh?!! The order form figured that bit out. If that's what happened, it wasn't my doing, it was the order form. Anyway, I cancelled that order, after repeating my order number and security information at least five more times.

A week or two later, in the latter half of September, I placed another order, for the same computer (the Studio XPS 16 with the Intel i7), and this time while splitting payments I made very sure I was very careful to round down the Dell Financing part by $10 (for example $1259 would become $1250), so that there would be no "one penny" too much being overcharged like last time, with the rest on my credit card. I submitted that order, it was received and accepted. That night I got another rejection e-mail, and a day or two after that I received a phone call from a Dell customer service rep saying that my order had been declined because too much was charged on my Dell Financing account again. I asked how much had been charged on it. He quoted a number that was waaay over what I had manually entered on the order form, and I knew it couldn't have been a mistake on my part because it wasn't rounded down, and I triple checked while producing that order that it was rounded down.

I stayed on the phone with that customer service rep to be sure that this order was fixed. But they had to produce another order (cancelling the original order) and make another charge to another credit card because they couldn't make an instant release on the card they already charged. I registered a complaint with him and by the time the call was finished I'd been talking with him for a good 45 minutes or so. Then I went online and saw that the new order was not accessible to my profile's order history. I sent an e-mail to that same CS rep and he assisted me on how to merge that order with my online profile. Kudos to that fella, Rajesh_R-AT-Dell.com.

So now that my order was associated with my online profile--it was now the end of September--I could not get a delivery date, as it was listed as N/A. I e-mailed Rajesh R again about that, and received no reply, but then the next time I checked the delivery estimate was showing up as end of October, a FULL FRIGGIN MONTH out, which I thought was absolutely ridiculous, but survivable. I am, fortunately, getting by with my existing non-Dell gear, I was just looking forward to using the newer hardware which I had already "paid" for.

Well, that estimated delivery date came and went. When I looked online shortly before that date, I was shocked to see that it had been bumped out to around November 7--another week and a half out!! What gives?!

So I waited on that. If you look at the calendar, it's November 9. And what does my order status say?

Oh, apparently I'm only just getting started!! My order was CANCELLED AND REMADE ("Changed"), without my permission or involvement, with a new order date (not mine!) of 10/29/2009 and a new estimated delivery date of December 2, 2009. The order status is also no longer "In Production", it has been rolled back to "Order Processing" which means it's waiting for payment, and it's been there for a week. (Guess who's not placing any bets I'll get my September order by Christmas?!) No explanation. I think I could maintain some sanity if Dell would just say that critical parts were backordered. But they don't show me anything like that. No e-mails, either. Just *shrug* "Changed". As if they'll ship it when they feel like it.

Had this been an oddball personal experience, I would have a bit of hope that this will "just work itself out", but after scouring these forums both here and elsewhere for similar testimonies, I'm realizing that this seems to be standard practice with Dell.

The problem is, not only is this bad customer service, it's very close to illegal. It is certainly unlawful to collect money and not deliver on goods purchased, but it might be unlawful, if perhaps in civil court, to collect money without producing any clear expectations as to a deliverable timeline and a reasonable effort to meet that timeline or provide a reasonable explanation. When I purchase from Amazon I receive delivery within a week. When I purchase from strangers on eBay, I normally receive delivery within a couple weeks. In all cases, a rough estimate with reasonable accuracy is provided. However, in Dell's case, it seems clear that they are intentionally stalling, I suspect perhaps their Dell Financing is under-funded, I don't know, and I don't care, but for Dell to make copping out on an order this frequently is clearly unacceptable and should not be tolerated by its customer base, nor for that matter by Dell management.

It's for this reason that I feel that it may be responsible for fellow customers to see about instigating change--starting with online pressuring with the likes of http://ihatedell.org and perhaps going so far as a class action suit. I really don't know what to think. I just think that all of this is startlingly evil and wrong.

Be the first to rate this post

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

Tags:

Computer Hardware | Computers and Internet

Media Center Uses Flash For Some Internet TV Video Playback

by Jon Davis 24. October 2009 19:14

With Windows 7 installed, the Media Center desktop showed “Star Trek” (the original series) as something I could watch. I clicked on it (as something to laugh at), Media Center came up, it asked me to agree to the terms of Internet TV, and then it showed me three seasons of Star Trek to choose from. I selected an episode, and it showed me another dialog, asking me to agree to the terms of installing the Internet TV Update for Adobe Flash! So apparently the show runs on Flash video.

image

Why is this a big deal? Because Microsoft already has a lot already invested in video streaming and their own technologies compete with Flash. Why would they use Flash on their own Media Center? Was it because CBS refused to reencode their videos to WMV? Or does this mean that Microsoft has already caved?

Be the first to rate this post

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

Tags:

Visual Studio’s and .NET’s Most Overlooked Want Items

by Jon Davis 24. October 2009 17:19

There are some features gone missing in Visual Studio and .NET whose absence frankly tick me off at times and make me go looking around for alternative IDEs and toolsets or plan on building my own tooling. I’ve done an initial evaluation of VS 2010 Beta 2 for each of these and confirmed that the issues remain. I am going to be appending this with occasional tweaks as time goes on, so feel free to post comments and I’ll add them to my “prayer list”. :)

Keep in mind, this is not a “most wanted” list, but a “most overlooked” list. That is, I think the demand is a lot greater than people seem to appreciate, perhaps because they’ve gone on all these years living with the way things are and being numb.

  1. Javascript brace matching (FB 340268) – Anyone who spends more than a few occasional hours writing Javascript within Visual Studio has no doubt been frustrated by the fact that, despite IntelliSense’s best (yet usually broken) effort to auto-indent on line breaks—a feature, by the way, I’m constantly fighting with when writing JSON and the bodies of closures—it completely fails when it comes to transitioning from C# and we’ve been spoiled with simple brace matching. The fact is, there is absolutely no brace matching in the Javascript editor.
     
    By “brace matching” I’m referring to the feature in C#’s editor where typing a “}” will highlight both the “{” and the “}” momentarily to help you keep track of your context so as to help you ensure all of your braces have been properly closed. Unlike typical C# code, Javascript code with all its deep-nested closures can get pretty hairy when it comes to nested brace blocks. Put the two problems together—a broken auto-indent feature and no brace matching, and the best you can do sometimes is fire up the WHOLE FREAKING APPLICATION being developed, navigate to the page or context you’re working on, and see if the browser’s Javascript parser pukes on entry.
     
    Seriously, Microsoft, where’s the Javascript love? Your half-hearted IntelliSense support for jQuery was nice (too bad there’s STILL no auto-completion in VS 2010 for summary documentation, nor IntelliSense while writing the XML documentation or references nor even color coding / syntax highlighting of XML documentation) but it’s not even meeting us at halfway to our needs for an IDE that identifies Javascript as one of the most critical programming languages for all web development.
     
    We want you, Microsoft, to treat Javascript as a first-class language, not as an afterthought, because Javascript is the web’s programming language as much as HTML is. If you have to abandon Active Scripting as your IntelliSense provider and rewrite from scratch using JScript.NET or or Jint or somesuch in order to give Javascript IntelliSense greater functionality, so be it, do what it takes, but this is clearly quite broken as it is.
     
    However, brace matching is hardly treating Javascript as a first class language. It’s a simple feature, and we need it.
     
    I haven’t yet checked to see if Aptana Studio—for which I do personally have a professional license I don’t use—does any better in this department, but I’m getting close to desperate and should follow up on that. Unfortunately, then the problem becomes integration with a .NET-oriented codebase. Time to switch away from .NET just for that? No, but the question does come up in my mind. Seriously.
     
  2. Configureless Entities – I’ll let my Gemli.Data subproject do the talking on this one. I’ve already done all my whining and complaining by way of starting to take some action so I’d rather not repeat myself yet again. I’ve seen the blog articles highlighting the new POCO support for LINQ-to-Entities 4.0 and it looks as verbose and awkward as Fluent NHibernate.
     
  3. Configureless Routing – I haven’t said much about this, but another sub-project I’ve added to Gemli’s road map is fixing the ASP.NET MVC routing engine by replacing it altogether with one that actually works. I understand where ASP.NET MVC’s URL Routing engine came from. It came from copying Ruby on Rails. And everyone loves Ruby on Rails, so it must be good, right? Ruby on Rails is one of the big sources for pushing the whole “Convention Over Configuration”, so if we just copy everything that makes RoR tick we’ll have our CoC right? Am I the only one who is puzzled by the nonsense of the realities of the routing engine NOT conforming to CoC? In order to have a URL get routed to a controller’s action and parameters, you HAVE TO open up global.asax.cs and drum up a mapping—yes, a MAPPING!—of that URL to your controller’s method. Visual Studio starts you off with a default one with a parameter mapping of “id” to get you started. I honestly don’t think I’ve ever used that mapping. There is regex-based wildcarding and pattern-matching support, which is I guess where Microsoft gets off saying, “see? it’s config-free!”, but you still have to declare your mappings.
     
    It gets worse; not only do you have to add your route mappings manually, for me, when I declare them, half the time they simply don’t work. Just yesterday I came across a declared route where MyMethod(string myParam) was explicitly routed as such, yet when it executed it ended up going to MyOtherMethod() by way of the “wonderful” wildcarding feature. I don’t recall how I fixed this, but there’s another broken piece in this routing mess: the order in which you declare your mappings matters a great deal, so you *must* move the wildcarded declarations down to the bottom of your declarations.
     
    We shouldn’t even be talking about manual mappings. MVC routing should automatically map to controllers, their actions, and their parameters, using reflection, in the same way as old-school web paradigms classically mapped the file system and file names directly to slash-delimited URL naming structure.
     
    The Gemli sub-project will, on the application’s initialization, scan for all classes that inherit controllers, assume that all their public methods are action names, and regex-pattern match all primitive types to parsable strings. Any parameter on a method that has a complex type or struct will be disqualified as an MVC action at least as far as this auto-mapping is concerned. Route customizations via C# attributes as well as other means will also be added. Honestly, this sort of routing engine is not very hard to write. I’ll get around to working on it within the next week or two or three, and expect to have it out there in working order in a week or two after I get started. (Keep in mind I only do this stuff on weekends and occasional evenings.)
     
  4. Deploy-as-Windows-App Web Deployment – Long, long ago, in a galaxy far, far away, there was a web server created called Cassini that allowed you to execute ASP.NET without running IIS. A few people adopted and even extended Cassini, but it was always Cassini. Cassini was then bundled in with Visual Studio itself for Visual Studio localhost debugging, but deployment of web applications continued to target IIS, and thus ends the story of Cassini.
      
    Remember ClickOnce? That technology that Firefox users hated until this week because Microsoft snuck its ClickOnce support add-in onto Firefox without users’ permission, until this week when Mozilla banned it from the browser? Yeah, .. that ClickOnce technology was actually a brilliant idea, but it didn’t work too well because users had too little control. But what about the inverse? ClickOnce allowed for installing desktop applications as Windows Forms and WPF applications straight from the web. But what about a technology that auto-packages a locally-running (for localhost-only access) web app that can be shrink-wrapped distributed, executed as an EXE, and accessible from the Start menu?
     
    It’s really quite silly that we can’t create web applications and deploy them as standalone EXEs that run in a web browser. I mean, we can. But we have to track down that old Cassini codebase or find one of the third party distributions of it such as UltiDev. Then you still have a bunch of moving parts that you have to manually figure out how to package and distribute your solution in a self-starting thing. IIS 7.5 supports standalone instances but that requires Windows 7 and feature activation .. and, well, IIS.
     
    Requiring IIS or even auto-rigging a standalone web server to run a simple web app seems like a configuration burden to me. The new WebPI paradigm is nice but it’s really more for web dev experts/admins and developers and for Internet web app discovery, and not useful for software vendors writing software for people who just want to use a simple application at home with or without Internet access and without any knowledge of web dev. Using ASP.NET as a Windows desktop app view engine would be huge, I think, because it would give software vendors a transition path from a preexisting Internet web site already built to a Windows desktop application. Not to mention a transition path for individual web developers who would like to know more about desktop solutions. 
      
    I don’t know, maybe the feature isn’t hotly requested because there isn’t much demand, but I think there’s little demand because there’s been too little innovation in this area on Microsoft’s side; the practice has been used for over a decade but it’s almost always people outside of Redmond doing it. Do I have an immediate need for this? Admittedly, no, I don’t; however, the more I think about it the more my mind wanders into creative ideas of what ASP.NET MVC could introduce to the desktop publishing crowd (the original desktop weblog engine, Userland Radio, from which blogging was invented, used a self-running web hosting engine to run), the PowerShell crowd (yeah hey look at this), social networking (did anyone else notice that Opera 10’s Unite is now proxying media and file sharing from the Opera Windows app itself using Internet-accessible, sharable URLs?), the reporting and finance crowds (remember Microsoft Money? it was built on DHTML), and more.

This is a small list. There was at least one other thing I wanted to mention in a blog like this but I forgot what it was. As I said, I’m going to grow my list over time as I continue to recall the things I always wanted but never bothered to mention.

Be the first to rate this post

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

Tags:

Why Am I Scared Of C# 4.0?

by Jon Davis 21. October 2009 23:21

Microsoft is doing a good thing, and I should be excited to be tinkering with the new Visual Studio 2010 Beta 2 that just came out this week. Fact is, I haven’t prioritized time enough to do much of anything of any beta of VS 2010 yet. Limited energy levels caused by sloppy living habits and everyday work stress might have a bit to do with it, but I also must admit that, while I greatly look forward to the future, I’m simply not prepared to make it the present. I, like so many people in this field, am limited significantly by the constraints of my employer’s best interests and the limited availability of my time (or in my case the juggling of free time prioritization between Gemli, Stargate Universe, StumbleUpon surfing, and other geeky activities).

With respect to Gemli, much of what that project (including tons of wishlist scoped details) was about is based on the limitations of current RTM’d offerings from Microsoft. Visual Studio 2010 and .NET 4.0 address a lot of things I wanted, making parts of future-scoped bits of Gemli more or less moot. On the other hand, the parts that .NET 4.0 doesn’t address will likely become greatly enhanced by some of the new features of .NET 4.0, things like the dynamic object.

And in any case, the objectives of Gemli or any other open source project for that matter is to have the tooling needed to produce and maintain software in an efficient and stable manner, and so there’s nothing wrong with continuous improvement and evolution of the tools we use. I should, then, be excited about what Visual Studio 2010 and .NET 4.0 bring to do the table in the contexts of everything I’m doing, and not be holding back.

Yet, I do hold back. It could be fear, but it’s not that simple.

Perhaps the biggest problem that keeps me from tinkering is that one cannot tinker with “legacy” (RTM-based) projects in the new tooling environments without permanently upgrading the projects/solutions. It would be really neat if I could check out Gemli from TFS into VS 2010 and dabble in C# 4.0 features using #ifdef-like directives to isolate “legacy” (C# 3.0) and “modern” (C# 4.0) features and code sets. In this way, producing a .NET 3.5 flavor and a separate .NET 4.0 flavor of the framework would be as easy as recompiling with the selected solution configuration. And indeed I could do that, if I want to switch to VS 2010. But I can’t do that given that it’s an open source solution that I want other people to open up in a current RTM version of Visual Studio (2008), nor do I want to cut off that version of Visual Studio the moment VS 2010 is released.

But since VS 2010 cannot open a VS 2008 solution without upgrading it – or at least I assume it can’t, such was the behavior of VS 2005->VS 2008 – the benefits of VS 2010 / .NET 4.0 tooling are limited for the most part to greenfield projects and self-education of future technology. Neither of these are particularly practical in the absence of an employer who is willing and indeed desirous to stay on the cutting edge of a future-scoped product/project release. And believe me, this is not a complaint of my current employer. Few employers want to take such risks; they exist, but unless you’re talking about an innovative startup company, they’re really quite rare.

On the other hand, Visual Studio 2010 Beta 2 comes with a go-live license. If that’s not a sign that the core functionality of the toolsets is stable, I don’t know what a better sign would look like. Technically, anyone can start on Visual Studio 2010 Beta 2 projects with the intent to deploy at any time, if indeed they want to (it is technically still a beta), and if they’re looking at a long-term development process, RTM of .NET 4 / VS 2010 will come before they release. Otherwise, they can release anyway.

So really, making the switch right now, once and for all, might even make sense. The only catch or down side is the abandonment of last year’s tech. Such would be the downfall for an open source project. But this doesn’t have to be the case for everything I’m working on; if there’s no intent for the project to be shared with unknown outsiders, making the switch might as well be considered safe, even. Would you be able to place that bet? If so, how do you categorize yourself and where you work?

Be the first to rate this post

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

Tags:


 

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Jon Davis 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." 

Amazon Collection

Most Recent of Many Library Investments

Tag cloud

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar