Software Development

Programming news: Code Contracts for .NET, Appcelerator's latest Titanium release, the dangers of OOP

Read news stories about Code Contracts, Titanium, object-oriented programming, Visual Studio 2010's UI, support for universities to teach COBOL, Serena Software's sweepstakes, and more. Also, get details about three free Webinars about Agile.

This has been an insanely crazy week for me. Let's just say that concepts like sleep and schedules no longer exist for the moment. Part of the insanity is the amazing flood of news that came in this past week. Some of these stories got me reading about a lot of areas, and I learned some very cool stuff along the way.

Code Contracts for .NET released

I have literally been waiting years for this news item. A while back, I stumbled across Microsoft Research's Spec# project. At the time, all I could say about it was, "I love the idea, but when will it be a shipping product?" Well, Code Contracts for .NET has just been released.

Code Contracts is a system that allows you to put assertations directly in your methods that define what the input and output of the method should look like. (Code Contracts took a lot of influence from the Spec# project.) The method signature includes the types of the input and output but not the content. With Code Contracts, you can precisely define things like "not null" or "between 1 and 100" and so on for your conditions.

The Code Contracts system is language neutral, and as a result, it can be used with any compiled .NET language, even F#. It is also slated to be built directly into .NET 4.0 and Visual Studio 2010.

If this sounds a lot like unit testing, you're on target. Code Contracts means that the compiler can perform static analysis and verify that the input going through a call chain will or will not meet the contract. Code Contracts can also be used to automatically derive unit tests; you could use a tool such as Pex for this purpose. This means that, instead of having to maintain your unit tests as separate entities, the unit tests are driven by the code itself, essentially turning "test-driven development" on its head (and in a direction that I much prefer). It also frees you from having to write tedious input validation checking routines, and instead, keep the contracts up to date.

If I sound bullish on this technology... well, I am. When Microsoft does stuff like this, I get excited about working with its products. I feel like .NET is shaping up to be a great system, despite my frequent disagreements with its fundamental premises.

Appcelerator's latest release of Titanium opens up some intriguing possibilities

Late last year, I was introduced to Appcelerator and wrote about its Web control library. The company has just released Public Release 2 (PR2) of its Titanium system, and it looks super slick.

Titanium looks like an open source alternative to Adobe's AIR or Microsoft's Silverlight. The system provides tools for doing some really well integrated Web-based apps with AJAX (as well as third-party libraries); also, it can support Flash and Silverlight. Additionally, Appcelerator has a development tool (Titanium Developer) that combines a development environment and social networking type stuff. I am not so sure how adding Twitter to the IDE improves productivity, but who knows? What I find really interesting is that they say I can now use Python or Ruby (in addition to JavaScript) to do my client-side and server-side work. In addition, C++ can now be used for server-side work as well.

If you are looking for an open alternative for these kinds of rich client, Web-based applications, take a look at Titanium.

AccuRev makes it cheaper to transition from ClearCase than to stick with it

AccuRev has a new offer: purchase AccuRev for less than the cost of an IBM Rational maintenance agreement. AccuRev can also be integrated into existing ClearCase and ClearQuest infrastructures, which should help make the transition smoother. In addition to the lower price point, AccuRev claims better performance and more flexibility than ClearCase. It looks like this deal has an expiration date of June 30, 2009.

From what I saw of AccuRev last year, it looked pretty nice. I can't talk about modern incarnations of ClearCase, but when I last used it about seven years ago, I was not a huge fan. Indeed, I don't know anyone who really likes ClearCase; it seems to be up there with Source Safe on the "dislike-o-meter."

Three free events to learn more about Agile

Speaking of AccuRev, the company CTO Damon Poole will be speaking at three online Webinars about Agile in conjunction with VersionOne. The first is "Breaking the Major Release Habit" (March 11, 2009 12:00 PM - 1:00 PM EST), which will be about iterative development. The second (which is in partnership with ReleaseTEAM) is "'Right Sizing' Your SCM Strategy and Development Processes for Heterogeneous Environments" (March 12, 2009 1:00 PM - 2:00 PM EST). The third is "The Algorithms and Architecture of Agile vs. Traditional Software Development" (April 1, 2009 12:00 PM - 1:00 PM EST).

Micro Focus provides support for universities to teach COBOL

One of the buried stories in the IT world is COBOL. Regardless of the numbers and percentages you may have heard, it cannot be denied that COBOL applications practically run the financial and insurance industries -- and that's just the beginning. It's also a fact that COBOL has a particular reputation that discourages people from learning it. In addition, colleges and universities have been phasing out COBOL courses over the last 10 - 20 years, due to the perception that COBOL is not relevant anymore.

This has put a lot of companies in a real bind. Their existing workforce is retiring, but college graduates do not have the COBOL skills (or would rather do other kinds of work), and it is very difficult to convince existing developers to move to COBOL. To address this situation, Micro Focus started its ACTION Program in May 2007. The ACTION Program provides support to universities to help them teach COBOL. It provides software, course modules, and reference books. It now has 87 participants in 15 countries, mostly in the United States.

As someone for whom COBOL was their second language, I can tell you that COBOL is not the worst thing on the planet; it is very specific in its scope and does it pretty well. If I was looking to make a long-term career, becoming a COBOL developer and staying at the same company for a long time would be in my top five career plans. Those applications are millions of lines large, and the developers who stay in one place and get to really know that code are worth gold to their employers.

Serena Software gives away Visa gift cards and 90 days' worth of usage

Serena Software is holding a sweepstakes; the winners will get $50 Visa gift cards and 90 days' usage of the company's Agile On Demand service. This looks like a neat system to manage Agile projects, and Serena has a long history with Agile development techniques. Fill out the survey and enter the sweepstakes. Let me know if you win!

Conference on making software to meet global demand

The Worldware Conference will be held March 17 -19, 2009 in Santa Clara, CA. This conference is all about making and managing software that can be used on a global basis. It's something that most developers rarely think about, but you can definitely expand your market by thinking globally. If you get a chance to attend the conference, I bet you'll enjoy it and learn something new, based on what I saw on the site.

Google provides good tips to detect hacking

Google provides useful information to see if someone has hacked, splogged, or otherwise gotten undesirable information onto your Web site. This is some excellent advice, and I think that anyone running or maintaining a Web site should consider following it. (Thanks to Search Engine Land for the Google link.)

Visual Studio 2010's new WPFed UI is unveiled

Microsoft's Jason Zander has posted screenshots of the new Visual Studio 2010 UI. I've seen the CTP of Visual Studio 2010, and it looks just like Visual Studio 2008. This new UI is a major overhaul, and it looks good. (Thanks to Chris Eargle for the heads up on this one.)

Do you do a ton of RNG in parallel?

Stephen Toub over at Microsoft offers good advice for folks who do a lot of random number generation (RNG) in parallel. I was a bit baffled at first, but then it occurred to me that a lot of people doing heavy parallel processing often work in cryptography or odd types of mathematical analysis that needs random numbers to work right.

It's an interesting read, because it highlights some of the things I've never liked about OO, particularly when dealing with someone else's framework: If the side effects and underlying mechanisms are not obvious to me upfront, how can I make a good decision about using them? In this case, simply saying, "Oh, this isn't thread safe" is not good enough; the documentation needs to clearly enunciate the ramifications in the same manner as Stephen's article. In an odd way, stuff like this is a good argument for open source (although it could be argued that almost no one would read the source, but that's another issue entirely).

Great, simple explanations of the dangers of OOP

TechRepublic blogger Chad Perrin wrote on his personal blog some well thought out, not-so-kind words to say about object-oriented programming (OOP). I feel roughly the same way, and I know a lot of the readers here do too.

OOP in and of itself is not the problem. The problem is when OOP runs out of control. Some OOPers spend so much more effort and lines of code on the modeling rather than the actual application. Those folks will (hopefully) learn one day. There's another issue at play here, which is that the typical "enterprise application" is too complex, period. It doesn't matter what methodology you are using, some aspect of that application will be too dense or obscure or obfuscated for any one developer to really be able to understand it. The only "solution" (the quotes indicate sarcasm) is to either stop writing such complex applications, or to have all of the people working on a project in perfect sync with one another in such a way that no one will ever do something unexpected. Until either of those things happen (look for Wilbur and Babe to be in the sky with wings on their backs), we'll have to live with applications that inherently stink.

Write code like a Klingon

From Fake Steve Ballmer comes "The Ten Klingon Developer Rules," which he claims guide Windows 7 development. It's funny.

J.Ja

Disclosure of Justin's industry affiliations: Justin James has a working arrangement with Microsoft to write an article for MSDN Magazine. He also has a contract with Spiceworks to write product buying guides. ---------------------------------------------------------------------------------------------------------------- Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Justin James is the Lead Architect for Conigent.

7 comments
jslarochelle
jslarochelle

The dynamic language with the flattest learning curve for Java programmers. There is a nice overview on InfoQ. JS

tbahri
tbahri

It was hard to read this article (not a smooth language to write an article for people who simply want to read fast), I think some issues also are not worthy to mention.

Sterling chip Camden
Sterling chip Camden

I thought Chad's post was right on. The Klingon rules are what I live by.

Justin James
Justin James

Do you have any news for us? Send it in! J.Ja

Justin James
Justin James

It's nice to see a good intro to Grrovy at the same time. I've been reading a bit about it, and it interests me. It unfortunately relies upon the Java ecosystem, which I get very lost in very quickly. Someone who write a "tour guide of Java" to explain what Struts, Spring, Grails, Hibernate, etc. are! J.Ja

jslarochelle
jslarochelle

It is essentially the Groovy version of Ruby Rails. Hibernate is an object relational mapping and persistence framework. Struts is an Apache Web application framwework Spring is another application framework. This one has its own AOP module. Except for Hibernate I have not used any of those so I cannot elaborat too much on them. You don't need them to enjoy Groovy. Some people see Groovy as a better Java. It certainly is more expressive and cuts down on the number of lines very much. If you download it there is a nice shell that you can use to play with it. One particularly interesting feature is the AntBuilder class. This lets you build Ant task without using XML and lets you use conditional logic in your AntBuilder scripts very easily and effectively. JS

Editor's Picks