How Do You Marry Java and .NET? April 13, 2012
Posted by Peter Varhol in Software development, Software platforms, Software tools.1 comment so far
Years ago, I did some work for Mainsoft, which had a technically cool way of running .NET code on Java application servers. This involved dynamically cross-compiling .NET into Java. The idea was that you could create your application (typically a web application) using Visual Studio, then with a minimum of effort, configure it to run on a JVM and application server.
I would provide a link for Mainsoft, except that the company has changed names and markets (www.harmon.ie). Apparently it wasn’t a good enough idea for a company to make money from. Part of the problem was that there were two paths to getting .NET to run on Java – you either did byte code translation, or your implemented some or all of the .NET Common Language Runtime in Java. Mainsoft did mostly the first, but also found that it was easier to use Mono classes for a lot of the CLR.
But now there seems to be a way to do it in the opposite direction; that is, running a Java application in .NET.
Mainsoft’s strategy was easily comprehendible but rather niche – developers were experienced in .NET and wanted to use the best .NET development tools possible, but the enterprise wanted flexibility in deployment.
IKVM, an open source project, uses some of the Mono classes to enable Java code to run on .NET. It also includes a .NET implementation of some Java classes. I’m not sure why Mono is needed in this case (and in fact, it’s likely that the Mono project has largely run its course). IKVM lists three components to the project:
• A Java Virtual Machine implemented in .NET
• A .NET implementation of the Java class libraries
• Tools that enable Java and .NET interoperability
Microsoft was promoting IKVM during its language conference, obviously as an existence proof for the concept that there may be people who are interested in porting from Java to .NET in this manner.
Still, as a practical matter, it doesn’t seem worthwhile doing. There are plenty of JVMs for Windows (I realize that .NET is a subset of Windows, but as a practical matter is pretty well tied to it). The distinction of running on .NET is one that most won’t bother to make. Perhaps someone out there can offer an explanation.
Thanks to HP, the Itanium Still Lives March 27, 2012
Posted by Peter Varhol in Architectures, Software development, Software platforms.add a comment
When PC software development meant working in MS DOS, programmers had to make a choice between using the small, medium, or large (and later huge) memory models. These models required the use of different structures and pointers, and added an additional layer into architecting an application. They had to do with the fact that Intel 80XXX processors segmented memory addressing into 64KB chunks. Crossing a segment extracted a performance penalty, so you wanted to minimize the number of times you had to do that. In time, it made software design more convoluted than it needed to be.
Fast-forward about ten years or so. Intel 32-bit processors were able to abstract over this legacy structure, but the fundamental segmented architecture still exists under the covers. Intel recognizes that it’s messy, and could possibly limit processor designs in the future.
So it starts over again, with a 64-bit processor called the Itanium (and later, Itanium 2). I had a dog in this hunt; around 2000 Intel contracted with Compuware’s NuMega Lab, where I was a product manager, to make Itanium versions of its acclaimed SoftICE and BoundsChecker developer tools. The Itanium used a completely different instruction set, but Intel implemented the x86 instruction set in microcode on top of it for the sake of backward compatibility.
It should also be noted at HP, shedding itself of its PA-RISC and DEC Alpha processor families, needed a high-performance replacement architecture, and invested heavily in Itanium systems and software.
As it turned out, there was no real business reason for reengineering the industry standard processor architecture. It was an engineering decision, to make a better design, rather than to rally users around. Intel spent billions of dollars over several years because its chip designers wanted something better than they had.
The Itanium was actually slower running x86 code than the best x86 processors at the time. Other than HP, few system manufacturers adopted it. And when AMD showed the way to 64-bit extensions to the x86, Intel made the same leap with the legacy processor architecture.
I’m reminded of this story by an ongoing lawsuit between HP and Oracle surrounding the availability of the latter’s flagship database on HP’s Itanium systems. Oracle would like to cease supporting the Itanium, and cites HP’s substantial financial support to Intel to keep the Itanium alive.
I have no opinion on the lawsuit, except that it seems like a waste of good time and money. But the story of the Itanium is of a project in which engineering triumphed over market requirements. And it turned out badly for Intel, as well as HP and others. If you build it, they won’t necessarily come.
Face Recognition is Closer than You Think March 3, 2012
Posted by Peter Varhol in Software platforms, Technology and Culture.add a comment
Over the last year I’ve switched from Snapfish to Google Picasa to place my photos online. Snapfish was becoming increasingly difficult for some of my contacts to view, and some were reluctant to sign up for an account required for viewing.
Picasa, on the other hand, offered a granularity of viewing options (I don’t make my photos totally public; however, I do make them readily viewable to anyone who has the link to the relevant folder).
Picasa is interesting in that it includes an application on your computer for collecting and managing photos. I recently discovered a photo category on the Picasa application called People. When I first clicked on it, a disclaimer/policy message appeared. I glanced at it before continuing, and only later realized that it wanted me to associate names with the facial images it had pulled from my photos.
Here’s what Google says about the Picasa name tags:
•Name tags help you organize your photos by what matters most: the people in them.
•Picasa identifies similar faces in your photos and puts these into the “Unnamed people” album. To add a name tag, just click “Add a name” and type the person’s name.
•After you’ve tagged some pictures, you can do creative things with your name tags, like finding all the photos with the same two people in them or creating a face collage.
I’m personally ambiguous about privacy. I’ve adapted to many of the changes in expectations we’ve experienced over the last twenty years, while also declining to participate in some of them. There is little of my persona that I wish to remain hidden, but there is danger in knowing too much about others.
Face recognition sounds like a bridge too far. It’s not even every possible scenario, because face recognition has the potential to do a lot of good, such as finding criminals or missing persons. But if I can take your photo, and within seconds know your name and all searchable details, then I know too much about you.
I am not a stalker.
Where My World Phone Leaves the US November 23, 2011
Posted by Peter Varhol in Software platforms.1 comment so far
My last phone purchase was an HTC Merge running Android. I purposely got a world phone, even though my carrier is CDMA-only. I purchased a GSM SIM through Telestial, along with some prepaid calling minutes.
I confess to some trepidation in communicating with this approach. I read the reviews on Telestial, and they were generally positive, but people did have occasional problems. The biggest problem seemed to be data services, which left on can quickly drain the prepaid minutes. Android doesn’t seem to have a way of turning off data services altogether, but you can turn off data roaming, which seems to serve the same purpose.
So I arrived in Amsterdam after my eight-hour flight, and while in the KLM Crown Room club I pulled off the back of the phone and looked for the spot to insert the SIM. First problem – while I found the slot, it didn’t seem to go in exactly as the documentation illustrated. I inserted anyway, figuring that no harm would be done, and there didn’t seem to be any other way of inserting it.
The phone booted, and asked for my PIN to unlock the SIM, so I figured it was correct. But five minutes later, I still didn’t have a signal. So I shut the phone down and rebooted. Still no signal. But half an hour later, before I left the club, I had a signal. I couldn’t reasonably make a call yet, because it was about 2AM on the US east coast, so I shut off the phone to get ready for my next flight.
I acquired a signal in Berlin, too, and had one while there and in Frankfort coming home, and was easily able to make high-quality phone calls to the US, at $.50 a minute. I kept data roaming off (but was able to connect on wifi for part of the time), and didn’t incur any data charges.
I realize that people have been doing this sort of thing for years, and that a native GSM phone in the US (through AT&T or T-Mobile) offers similar benefits (although connectivity worldwide depends on both wireless company partnerships and signal frequencies), but it demonstrates how easy it is to communicate across natural and political boundaries these days.
A New Internet Connection Strategy November 21, 2011
Posted by Peter Varhol in Software platforms, Technology and Culture.add a comment
Three weeks ago New England was hit by a very early winter snowstorm. I estimated a foot of snow in my neighborhood, and totals were much higher elsewhere. Power went out early, and didn’t come back on again for five full days. I have a generator, which made life tolerable, but the real loss was broadband Internet, which came on only a few hours before electricity (if broadband is working, I can power the cable modem and wireless router with the generator).
Because I work primarily from home, the loss of broadband Internet was potentially a catastrophe. I used to maintain a dial-up account as a backup (the power in the phone lines never goes down), but my ISP went out of business earlier this year. Besides, I was paying too much for what was really an inadequate backup.
A couple of months ago I bought a new Android phone. Among its features was the ability to turn it into a wireless hotspot. Simply turn on this feature, access the hotspot with your computer, and you have your onramp to the Internet.
Of course, I’m using data, which is a costly commodity. For most phones today, the calls are cheap, but the surfing is expensive. My plan limits me to 1GB of data a month, but I usually don’t use a lot of data. My bill for the days in question just arrived, and I incurred no additional data expense.
My reception isn’t good in my home, which is why I still have two landlines. I was concerned about my ability to do just about anything on the Internet through my phone, but it performed like a champ. In fact, I successfully conducted a webinar using the phone as my data connection to my slides.
Working this way on an ongoing basis would get expensive. But it’s nice to know that phone-based wifi hotspots can fill in when you need them, even if you need them for several days.
In Memory of Dennis Ritchie October 14, 2011
Posted by Peter Varhol in Software development, Software platforms, Software tools.1 comment so far
I woke up this morning to the news of the passing of Dennis Ritchie, computer science researcher at AT&T Bell Labs and inventor of the C programming language (he actually passed away last weekend). The C Programming Language, a language manual by Brian Kernighan and Dennis Ritchie, was the bible for several generations of professional programmers.
The early 1970s saw the rise of multiprocessing, where multiple users shared the same computer in a timesharing arrangement. The research state of the art at that time was MULTICS, an MIT research project. Bell Labs took those concepts and Ken Thompson developed the Unix operating system (with Ritchie’s assistance). Ritchie then designed the C language as a high-level language married closely to Unix and its underlying API and commands.
However, C was also created as a platform-independent language, a nod to the fact that Unix would eventually be ported to dozens (probably more like hundreds) of different processors and hardware architectures. For example, it lacks a string library, because strings are implemented differently on different OSs. So C programmers got used to doing an array of char to represent a string (third parties eventually came out with custom string libraries for different computers).
C has elements of both a high-level language and a systems programming language. It had high-level constructs, but could also directly access memory locations through pointers. It does no automatic allocation or deallocation of memory; malloc and free are among the first constructs learned by aspiring C programmers. Further, C does essentially no type-checking; programmers could essentially copy data from one type to another, irrespective of the type size, at their own risk.
Functions are generally called by reference, by establishing the memory location of the function (called a pointer), and are called by referring the calling function to that location (called dereferencing the pointer). This can make possible some extremely convoluted programming constructs.
These characteristics and others made C extremely flexible, but also extremely prone to programming errors. When I was the BoundsChecker product manager at Compuware NuMega Labs, we determined that a large majority of C (and its object-oriented extension C++) programming errors were memory errors. It is simply too complex for most C/C++ developers to fully understand and control how they are using memory.
C programs eventually became so unmanageable that many development teams now use managed languages such as Java or C#. Both languages (as well as niche languages like Lisp and Smalltalk) automatically allocate memory when you define and use a variable, and reclaim that memory when there are no longer any links to it through a technique called garbage collection. But many commercial applications still use C/C++, either for legacy or performance reasons.
I was a C programmer for a brief period of my career, and occasionally taught C++ as an academic. During my time as an academic, I wrote a discrete event simulation application in Pascal (invented by Swiss computer scientist Nicolas Wirth), a similar language that provided much stricter type checking. Despite the popularity (and to large extent necessity) of managed languages today, I still firmly believe that you can’t truly understand how to program a computer unless you have a clear picture of how your code is using memory. And we owe that view of memory to Dennis Ritchie and C.
I Still Own My Original 128K Mac October 6, 2011
Posted by Peter Varhol in Software platforms, Technology and Culture.add a comment
My first computer was an original 128KB Apple Macintosh, purchased in 1984. I still have it. It still boots.
There, I got that bit of history out of the way. As the news of the passing of Steve Jobs before his time crosses the planet, I can tell my own story of Apple. Circa 1984, I had access to an academic discount, and had a choice between a Mac or a DEC PC, the latter of which might have been the smarter choice for someone hoping to latch on with the preeminent technology employer in New England at the time.
Of course, the so-called PC standard was already well on its way to becoming a mess, and DEC left the PC business and, in terminal decline, was acquired by first Compaq, then HP.
But who couldn’t look at the Mac and know that its graphical, mouse-driven user interface wasn’t the future of computing? Bill Gates, for one, who even as he struggled to come out with a lame, barely-graphical Windows product still insisted that businesses demanded command line operation. Later revisionist explanations insist that Gates also saw the future correctly, and simply obfuscated the discussion until Windows was more mature, but I’m not so sure.
So I chose wisely, and used my Mac productively for years. With a developer discount available, I almost bought a Lisa for $5000, half the list price, which was the only way Apple had to develop Mac software. But third party providers came out with very nice integrated development environments that enabled me to continue working on Macs.
(The Lisa and to an even greater extent these third party tools (THINK!, for example, which was acquired by Symantec) radically changed software development, but that’s a story for another day.)
Despite the hoopla and steady if lackluster sales, the future of Apple and the Mac wasn’t assured until the arrival of the laser printer. Married to the Mac’s WYSIWYG interface, the combination became the de facto publishing standard almost overnight.
Still, the Mac was largely a niche product, not highly used outside of publishing and similar creative industries. I don’t have creative skills, so by the mid-1990s it became clear that I couldn’t make a living by being a Mac expert. Today I have a Windows Server network in my basement with about half a dozen PCs.
Jobs was eventually forced out of Apple, and the decline continued under a succession of uninspiring leaders. He went on to found two companies, the wildly successful Pixar and the barely surviving NeXT. Salesman and promoter that he was, he was able to convince Apple to acquire NeXt for an incredible $400 million, and the NextStep operating system became the basis for today’s OS X.
During his time outside of Apple, I had the uneven pleasure of working with one of his better known unauthorized biographers, Jeffrey Young, who authored The Journey is the Reward. He was able to meet with Jobs only once, at the end of his writing. Nonetheless, it was a compelling an instructive book, even though it encompassed his life only through circa 1990.
Under Jobs, Apple made highly successful forays into the consumer market, with the iPod and iPhone. It may even be true that Apple more or less single-handedly made consumer electronics relevant and even important to every facet of our lives, including our business lives.
It should also be noted that there were failures galore along the way – the clunky Newton and Apple TV come immediately to mind. But failure serves the important purpose of learning from our mistakes and directing our efforts to more productive pursuits.
There are certainly events in Jobs life of which he was probably not proud, and I think his infamous dichotomy between his public and private lives was driven by his desire to be known for his results, rather than how he led his life. It’s an understandable sentiment, although it has perhaps led to part of the cult of unquestioned worship that exists. None of us are perfect, but I think it’s better to be known as a whole person rather than the persona we choose to project.
It’s not clear the Jobs or Apple truly invented any breakthrough. The Mac UI was based on work done by Alan Kay and Xerox PARC years earlier, and the technologies that comprised the iPhone were already well-established. But both man and company had the unique ability to bring together different technologies into a package that truly pushed the boundaries of product design and implementation. Of all of the possible creative and business skills, that may be the most highly valued.
Microsoft Lays Out the Realities of Computer Security September 6, 2011
Posted by Peter Varhol in Software platforms.1 comment so far
I don’t care much for the burdens placed on me by the requirements of computer security. I don’t do stupid things online, but there is a part of me that relies on “security through obscurity”. Above all, I simply hope that I don’t get noticed by those seeking to wreak havoc on people’s computers or online finances.
Someone pointed out to me Microsoft’s published Ten Immutable Laws of Security, published on TechNet. I’m sure these have been online for a while, but I wanted to point them out. In general, they’re pretty good, although they are entirely too wordy.
I like to describe security as a continuum, with most secure to least secure at opposite ends. Better security puts higher demands on the user, through more complex passwords or more steps to accomplish a specific task. At the most security end is a computer without I/O, locked in a vault that doesn’t permit entry. As such, it’s completely unusable for any task involving a user. The most user-friendly computer, on the other hand, is likely to be the least secure.
So you really only need one law – Any computer intended to be used has security flaws. Deal with it.
Microsoft has always taken its share of criticism over the sheer number of viruses and other hacks that target Windows. A part of that criticism is deserved, in large part because Microsoft insists on keeping large amounts of old code in the OS for backward compatibility purposes. But another part is simply that Windows is such a big target. Hack Windows, or write a successful Windows virus, and many will be feeling the pain.
But there are no absolutes in life, and that goes double for security. It’s impossible to build a system that is provably secure from all possible attacks (formal methods do permit the building of systems with some provable aspects, but those methods can’t take the human factor into account). Whatever we are doing online, it behooves us to exercise due restraint.
