All posts by onlyconnect

Visual Studio 6 on Vista

Why would you want to run Visual Studio 6 on Vista? Two reasons. First, because it includes Visual Basic 6.0, the last version not based on .NET. Second, because Visual C++ 6.0 is still widely used to avoid issues with the C runtime library. There is little point in installing the other products in Visual Studio 6.0.

Visual Basic 6.0 is supported on Vista, but Visual Studio 6 is not. One reason is that it includes the Microsoft Java Virtual Machine which Microsoft promised Sun it would withdraw. This is the stated reason why Visual Studio 6.0 is no longer available for download, even for MSDN Universal subscribers. Fortunately I still have some old MSDN DVDs, so I dug these out and ran setup for the Enterprise edition of Visual Studio 6.0, installing on Vista Professional.

I can’t pretend it went smoothly. First there were compatibility warnings, which I ignored. I deselected applications other then Visual C++ and Visual Basic. Then setup appeared to hang on the screen where it detects installation components, and Vista popped up its “Program not responding” dialog. I believe this is just a matter of patience. My tip is to run task manager and see if the ACMSETUP process is taking up CPU time. If it is, give it more time.

So setup completed, but with an error towards the end:

RegCreateKey failed for \Interface\OLEViewerIViewerCLSID. Access is denied

followed by a DLLREgisterServer failure. I was informed that setup had failed, but nevertheless VB 6 and VC++ were installed and seemed to run OK.

Naturally I wanted to apply the service pack – SP5 or SP6. This is where I had the biggest problems. I could run SETUPSP6.EXE, but the install always failed. If I logged the install, I found this entertaining error:

Do not ship. Error message to log function that detects what VS products are installed in what language unable to function.

Hmmm. I Googled to no avail, though I found this thread where several others report the same problem. Then I tried removing Visual Studio 6.0 for a reinstall, but got the same error from add/remove programs. I finally twigged. The problem was that the first install never completed. Although the product was mostly installed, some part of the Microsoft Installer database had not been updated. The error message actually makes sense: the products were not installed.

Therefore I re-ran the original setup. This time I went into the Tools part of custom setup, clicked Change Option, and deselected the OLE/COM object viewer. Setup now completed without error; so too did SP6. Success.

The apps seem to work OK too – so far so good, though I’m resigned to having to use Run as administrator.

Try this at your own risk; as I mentioned above, Visual C++ 6.0 is not supported on Vista; in fact, I don’t think it is supported at all.

 

Thawte promotes security, insecurity

I recently headed over to Thawte to purchase a digital certificate for code-signing. According to Thawte, it:

Promotes the Internet as a secure and viable platform for content distribution

I agree with the value of signed code. However I had problems making the purchase, which involves a web form and some ActiveX stuff. Here’s what Thawte tech support advised me to do:

  • Switch off the personal firewall.
  • Add the url to the trusted sites store.
  • Set all the activex controls and plug-ins to prompt or enable.
  • Set the privacy security level to low.

It is not quite as bad as it looks at first. You only need to do the ActiveX changes for trusted sites. Further, I’m not convinced all the steps are needed in all circumstances.

Still, asking someone to connect to the Internet with a disabled firewall is, on the face of it, irresponsible. In mitigation, if you are trying to purchase a digital cert you are probably clueful enough not to disable a personal firewall unless there is some other protection in place; most users have at least a NAT router between their PC and the Internet.

There is a generic problem here. Support departments confronted with users who “just want it to work” may resort to scattergun disabling of security software, never mind the risks. Of course it is better to figure out exactly what is not working and find the minimal relaxation of security needed to solve it, but this is harder to do.

Nevertheless I’m disappointed that Thawte can’t find a more secure technique for delivering its certificates; and that these technical issues are not spelt out more clearly on its site (perhaps it is embarrassed?).

 

Technorati tags: , ,

Semi-documented APIs in Windows

There have long been complaints about undocumented functions in the Windows API which give Microsoft’s internal developers an advantage over third-party software developers. Perhaps even more frustrating are those that are semi-documented. An example was found recently by a user of the htmleditor, a .NET wrapper for the HTML editor built into Internet Explorer. If you write an editor you might want to support undo and redo; there are simple undo and redo commands available but they are crude. The API also provides more advanced functions, including a change log and the ability to undo or redo entries in the log. You can find the documentation here; the relevant interfaces are IHTMLChangeLog, IHTMLChangePlayback and IHTMLChangeSink.

All looks good on a brief inspection; but note the lack of any sample code. Then think about how you might want to use this API. What exactly does an item in the change log represent – a single character, an HTML element, a paste operation, or what? How can you inspect the items (they seem to be a binary black box, understood only by an API function called ExecChange)? There is only one function for iterating through a change log, called GetNextChange – are you intended to cache the entries somewhere, since there is no GetPreviousChange or GetFirstChange? The API allows for notification of changes, but the Notify event has no arguments: presumably you are meant to call GetNextChange and do something or other with the log entry.

Of course developers have shrugged their shoulders and experimented a bit. Some have found Notify failing to fire, particularly with MFC. Others have just been puzzled. I tried it with my C# wrapper and got strange results; I think the only way forward would be to reverse-engineer the log entries to work out what it is they represent.

But what about Microsoft’s developer support? There are managed newsgroups, which are meant to guarantee a response for developers with MSDN subscriptions, as well as other online forums supposedly monitored by Microsoft developers – like Senior Program Manager Dave Massy, who says in his welcome:

Welcome to the MSDN forum for Internet Explorer Addon Development. If you have questions around development of extensions for Internet Explorer then this is the place to ask them.

Perhaps it is; but Massy is strangely silent on the intricacies of IHTMLChangeSink. I have seen this often: easy questions get a ready reponse either from Microsoft or from community members, but the tough ones, where only Microsoft has the answer, are simply ignored; or else there is a request for further information which looks promising at first but leads nowhere. Try Googling on this API; you will find questions but few answers.

My question is this: why bother publishing the API at all if it is so poorly documented and badly supported that nobody can figure out how to use it?

I would guess that this API is or has been used internally, by other Microsoft products that use the IE editor, and that somewhere in the bowels of Redmond there is proper documentation or sample code, perhaps not in sufficiently polished form for general release.

It’s time Microsoft either stopped pretending to offer developer support through these online forums, or put in the effort required to make them work.

 

Salesforce.com hints at Adobe Flex support

Salesforce.com announced its Spring 07 release yesterday, including what it calls an Business version of MySpace: a portal where organizations can share of their data or applications with their customers and collaborate with them. During a briefing, I talked to Adam Gross, vice president of developer marketing. Salesforce.com has a SOAP web services API, and apparently more than half of the platform traffic is via the API rather than through direct visits to the Salesforce.com site. Would it make sense for Salesforce.com to use Adobe’s Flex Data Services to support rich internet applications created with Flex or Apollo?

“Stay tuned,” was his response. “Flex makes so much sense for us. I can build those experiences, just like I can in AJAX,but I can build richer experiences that are easy to build, they plug right in and I can upload them to Salesforce, it’s hand in glove to our model.”

Of course it is already possible to use Flex with Salesforce.com, since Flex supports SOAP web services. On the other hand, if Saleforce.com exposed a Flex Data Services API using AMF (Action Message Format), that would make for smoother, faster and easier development of Flex clients, which use the Flash player as a runtime.

Technorati tags: , , , , , ,

Delphi 2007 is done

CodeGear says it has completed Delphi 2007, its RAD development tool for Windows. What’s notable about Delphi 2007? First, it’s Win32 only. Borland CodeGear hasn’t yet won over many .NET developers, so it took the decision to concentrate on native code in this release, although CodeGear is not abandoning .NET completely.

Second, it builds apps that work right on Windows Vista.

Third, there’s a new database API (CodeGear calls it an “architecture”) called DBX4; I’ve not investigated this yet. 

Fourth, it’s mostly binary-compatible with Delphi 2006 so that existing add-ins should work.

Fifth, it uses MSBuild (same as Visual Studio 2005), which is good news for anyone with a non-trivial build process.

Delphi 2006 was a huge improvement over the two previous versions (Delphi 8 and Delphi 2005). Version 8 was for .NET only, bypassed by most Delphi developers. 2005 brought .NET and Win32 together, but the IDE was barely usable. 2006 is pretty good; it looks as if 2007 may be better still. Although the feature set is not particularly exciting, the product is said to be faster and more reliable, which is what Delphi developers care about most. I will be reviewing the release shortly and will post links when available.

 

Technorati tags: , , ,

Why software projects fail

Martin Fowler and Dan North from ThoughtWorks gave a keynote at QCon entitled The yawning crevasse of doom; this refers to the tendency of those who develop software not to communicate with the beneficiaries of the software – users, business people etc. This was a recurrent theme at QCon; addressing this problem strikes me as a primary characteristic of agile methods such as Scrum. It helped me to understand that most software failures are caused not by technical issues but rather by communication problems. Of course communication failures can occur within the development team as well as between developers and other stakeholders; Kevlin Henney and James Coplien mentioned the perils of “throwing architecture over the wall” in their session on Agile Architecture is not Fragile Architecture. If architecture is divorced from coding it is likely to fail. It further follows that improving the software development process is more to do with improving how teams function than it is about tools or even procedures.

I find this a healthy corrective to the reams of PR I receive from vendors implying that their tools can prevent project failures. They love to quote figures from the Standish Group which allege that most software projects fail. This is the cue for a marketing pitch explaining the benefits of their application lifecycle tools. I am not against application lifecycle tools; one of their purposes is to enable better communication. However, it’s unlikely that landing new tools on dysfunctional teams will bring about improvement. It’s better to fix the team, which is a management issue, and only then to resource it with the right tools.

What is the team? In reality, the team is everyone with an interest in the outcome of the project, not just developers.

The snag is that it is much easier to buy new tools, or indulge in other forms of deckchair rearrangement, than it is to address the real issues that are preventing the team from functioning – maybe issues of personality, geography, or inappropriate management structures.

 

Microsoft attempts to buy search share

Microsoft is giving enterprises incentives to use Live Search instead of Google or Yahoo, according to a ComputerWorld report; John Battelle has more details.

Buying search share is nothing new; the Mozilla Foundation apparently gets a ton of money from Google for making it the default in FireFox. This is just another skirmish in the search/toolbar/gadget wars; the stakes are high, because search is the user interface of the web.

I doubt the strategy will have much impact, unless Microsoft fixes what really matters: the quality of its search engine.

It’s hard to overstate the importance of search today. I was reminded of this during a recent presentation on software usability. Speaker Larry Constantine made an example of a feature in Word: how to insert a caption for an image.

Problems like this are easier than they were in the pre-Google era, for the simple reason that users are now able to search for the answer. Try it: Google for “word insert caption” (without the quotes) and up come dozens of postings on the subject. Quicker and better than online help.

Since the ability to search efficiently is now a key productivity factor, it follows that businesses should think twice before allowing themselves to be bribed into enforcing search preferences. Better to evaluate the search engines, and maybe give some training in how to use them.

 

Technorati tags: , ,

Farewell to the Times Reader

Fired up the New York Times Reader today, to be greeted by a message:

This note is to let you know that the beta period will be ending in two weeks. Times Reader will launch as a subscription service on March 27. It will cost $14.95 a month or $165 a year.

Times Reader, you will recall, is a fantastic WPF (Windows Presentation Foundation) application for reading online content. It works offline and nicely demonstrates how rich Internet applications can improve on web browsers.

In one sense I have no quibble with the price. I believe journalism is worth paying for; and $15.00 a month is not excessive.

Unfortunately it’s not good value for me, nor I suspect for many others who have tried the beta. For starters, I’m in the UK which makes much of what is in the NYT of less interest. Second, I have access to a ton of free content – starting perhaps with bbc.co.uk along with innumerable blogs – and I don’t have time to read as much of that as I would like. The subscription model makes no sense for this kind of general content.

The NYT would do better to continue providing free Reader content. Give subscribers some extras like premium content, or earlier access to articles, or less intrusive advertising.

I understand the pressures though. It’s an unsolved problem.

 

Technorati tags: , ,

Scrum: good but not that good

Jeff Sutherland, co-creator of the Scrum development methodology, gave a talk at QCon on Agile Project Management: Lessons learned at Google. The session was packed; I’m realising that this is as much an Agile crowd as it is a Java crowd.

This was a fascinating session though not in the way that I’d expected. There was a fair amount about Google but not that much about how it uses Scrum, more about the overall characteristics of the company, its flat, team-based management structure, and of course how much money it makes. There is plenty of good sense in Scrum; it facilitates communication, surfaces problems, and promotes sane prioritisation. A key insight is that software development is not just about technology; it is also about people. “Scrum is the only process that makes personal issues as important as technical issues,” says Sutherland.

That said, I didn’t much enjoy this talk. It came over more as a Scrum marketing pitch than what I’d hoped for, which was a real-world account of a Scrum implementation. Listening to Sutherland you get the impression that Scrum is the One True Way; nothing else will do. Adopt Scrum and succeed; do anything else and (if you have competition) your company will fail.

Sutherland is a master motivator. We hear a lot about success. There are little anecdotes about soldiers climbing ridges. Along with Google, we learn about another company Sutherland admires, Toyota, and its secret of success which he calls The Toyota Way.

I don’t doubt the value of Scrum as a process; but I question whether it is only right way to develop software.

 

Technorati tags: , ,

Getting to grips with LINQ 2.0

Microsoft’s Eric Meijer spoke at QCon about “LINQ 2.0” in his keynote. So what on earth is LINQ 2.0? The name is probably inappropriate; he explained to me later that it is just a convenient tag for “what comes after LINQ 1.0”. Meijer started by talking about integrating relational concepts into languages; he didn’t say exactly what this would look like, but the idea is that you could specify relationships between objects, independent of the objects themselves. This is not LINQ 2.0 though; perhaps it is LINQ 1.1. LINQ 2.0 is about simplifying multi-tier, cross-platform web applications- hence the title of the talk, “Democratizing the cloud.”

So how do we do that? The starting point is that users want the same experience everywhere, irrespective of computer platform or device. Meijer’s idea is programmers should be able to code for the easiest case, which is an application running directly on the client, and be able to transmute it into a cross-platform, multi-tier application with very little change to the code.

That means a cross-platform runtime, right? Sort-of, but Meijer doesn’t envisage having to distribute a runtime engine such as .NET, the JVM (Java Virtual Machine) or Flash. Rather, he wants to use what is already available. Therefore he envisages .NET IL (intermediate language) binaries becoming a universally executable format. The runtime could be the CLR (Common Language Runtime), or the JVM, or the Flash player, or the browser. This would be transparent to the developer, because some intermediate piece would translate the .NET IL to JavaScript, or Java, or  a Flash SWF. or somehing else.

This is a little similar to the concept behind the Google Web Toolkit, which lets you code in Java but translates your code to JavaScript. The idea is that you code in whatever language you like, provided that it compiles to IL. For deployment, some sort of cross-compiler does whatever is needed to run it. Maybe it gets converted to JavaScript, or a SWF, or WPF, or WPF/E; you are not meant to care. He calls this late-binding against the client runtime. Note that this is different from implementing the CLR on multiple platforms, though Microsoft is beginning to do this as well (WPF/E).

So that’s the cross-platform runtime sorted. What about the programming side? How do we make our single-tier VB.NET application into a multi-tier web application?

Meijer talks about growing the application organically using refactoring. His use of the term “refactoring” is wrong I think; refactoring is meant to leave functionality unchanged. He means something more like re-purposing. You would take a method and add an attribute to convert it to a web service. Of course ASP.NET already has this (WebMethod attribute), but Meijer’s idea seems to include greater intelligence about the plumbing behind the exposed method. He believes programmers should only need to think sequentially, even though in reality web applications may have multiple entry-points and users may do things like clicking the Back button.

Meijer applies the same thinking to concurrent programming; developers should be able to do this with simple attributes, rather than struggling with synchronization statements and the like. Similar logic applies to state handling: Meijer reckons programmers should be able to program statefully, and have the infrastructure deal with the problems.

We should give programmers the illusion that their servers are stateful, while we can implement that in some scaleable way. That should be done once instead of all programmers trying to solve that problem.

No roadmap

I chatted to Meijer after his session. He emphasised that there is no roadmap for implementing “LINQ 2.0”; he is merely sharing some research thinking. What I’ve described above may never be implemented, or may evolve into something very different. Some parts sound fanciful to me. Will the idea of compiling IL for different runtimes really fly? Is it feasible to reduce multi-tier programming to a few attributes? Will this be any better than DCOM, which was meant to make distributed objects easy, but proved more complex and less robust than had been hoped?

That said, there’s little doubt that advances in programming will be about introducing new levels of abstraction, which may well provoke scepticism among old-school developers. This has happened before. I respect Meijer for what strikes me as good work in LINQ 1.0, so I’m paying attention.

 

Technorati tags: , ,