Sunday, November 30, 2008
Intel launches new online dev magazine
Leading component and software vendor Intel has launched a brand new digital magazine targeting the games development sector.
Entitled Intel Visual Adrenaline, the mag is free to those who sign up to the Intel Software Dispatch news service. The digital publication covers the use of multi-threading and code optimisation in the rendering of games and apps, as well as information on the latest tools and development products.
The mag will be released once per quarter and takes the form of a downloadable PDF.
Resource - Develop
Friday, November 21, 2008
It's Jam time
We're pleased to announce that after three hours of furious typing, debugging and problem-solving at the onsite finals in Mountain View. this afternoon, Tiancheng Lou of China took home the $10,000 Grand Prize. Zeyuan Zhu from China won second place, Bruce Merry from the UK came in third, and cash prizes went to the other finalists. Overall, the 100 finalists represented 23 different countries.
Congratulations to all the Code Jammers. We hope to see you at the next Jam. It's never too early to start practicing!
Resource - Official Google Blog
Tuesday, October 21, 2008
Dynamic programming futures
What will the world of dynamic programming languages and Web applications look like in five years? This is one of those highly personal and deeply philosophical questions best saved for after dessert is served, the drinks are poured, and the sidearms are safely locked away.
At the simplest level, the debate seems crucial. Choose the right language and new libraries magically appear because, well, the coolest programmers use the right language. The hottest languages attract the most developer energy, which usually turns into new libraries with the latest ideas.
Choosing the wrong language means filling your brains with semantic cruft that must be paged out to make room for yet another way of writing a loop. No one will be able to make sense of your code, and no one but you will care.
Most programmers who've been around long enough to survive the rise and fall of programming languages such as Cobol and Fortran recognize that the problem isn't a life-or-death matter. There won't be one winner, and backing the wrong horse won't be fatal. These stable old hands point out that Cobol continues to run strong. At this writing, more than 1 percent of the listings on Dice.com include Cobol. By comparison, JavaScript draws a bit more than 7 percent!
Still, choosing poorly saps one's energy. Some languages will be the dominant choice in certain niches. Choosing poorly means duplicating effort and looking longingly at the fast progress of others.
Commons or craft
Rob Malda, one of the founders of Slashdot, says that he chose Perl for the site because there were so many good libraries available in the CPAN (Comprehensive Perl Archive Network).
"I think Perl's primary advantage in 1997 when I original selected it was the active development occurring on CPAN," Malda explained. "There was a library for everything useful, and usually very quickly. This was critical because new technologies and versions for core functions were updating constantly."
But today, he added, "We have a much better idea of what you need for Web site building, and the tools and libraries have stabilized. All languages can handle the obvious things nice enough now."
This is a nice, politically neutral statement, but it doesn't solve the problem that in many shops, there must be only one Highlander. Only a kindergarten teacher would smile and say that all are equally good.
When a decision must be made, some believe it makes sense to go with popularity. The rich will get richer. PHP is the first language that many people learn after mastering HTML, and it will always be as comfortable as a childhood home. PHP server platforms from Zend Technologies offer better performance, making it possible to write a serious application in the language.
But will PHP be able to shake the casual structure that encourages beginners to whip up spaghetti code? Will it be able to continue to mix the presentation layer and the application layer without driving everyone insane? Will Zend's collection of server optimizations provide enough performance to overcome any limitations of the language?
Some want to place their bets on Ruby on Rails, a striking and elegant solution that produces sophisticated results in no time. A few lines of code produce a full interface with all of the pages necessary to create, update, and delete records.
This simplicity often turns into shackles when the programmers reach the edge of the framework's capabilities. Changing little details or producing slightly unorthodox output can be maddening.
There are many other options. Some developers love Groovy, the dynamic language integrated with the Java API. A programmer gets the rock-solid foundation of compiled Java code mixed with the flexibility to diddle with the Java objects in real time.
And then there are others who see languages such as JavaScript rising from the browser and colonizing the server. A unified platform makes everything simpler. Yes, Netscape wanted this to happen years ago, but thanks to the lightning performance of the new JavaScript semi-compilers, the language is bound to look even more attractive.
All of the languages mentioned above have enough of critical mass behind them to succeed and even flourish in the future. The right answer for you will depend more on the nature of your business and the structure of your data than on whether one platform becomes cooler than yours.
Evolutionary forces
Toward that end, here are 10 principles that will guide the evolution of scripting languages in the future. None of these will offer the definitive answer and save you from a long evening of dessert, liquid refreshment, and debate, but they will provide some guidance that may make the answer appear with more clarity.
1. The semantic barriers won't be as important as the languages rush to steal good ideas from one and other. The dynamic languages are blurring together faster than they're distinguishing themselves.
Larry Wall nabbed Python's object system for Perl, and he and his acolytes are committed to making sure that there are many ways to do anything you want to do in Perl. Language committees are always debating how to weld a great idea from another language into the current one, and this will continue to happen. In five years, there's a good chance you'll be able to imagine you're writing Python while the code is interpreted by something called JavaScript.
3. Applications are becoming their own worlds. There are 23 job listings for WordPress developers. While the WordPress plug-ins will be written in PHP, the programmers will rely heavily on the standard set of libraries included in WordPress. Is it fair to say that the coders are working in PHP, or are they really working in WordPress?
The power of the dominant applications is apparent to everyone. Facebook even calls its scripting language FBJS (Facebook JavaScript) because it's so site-specific.
But there are limits to this cross-pollination. "I don't see this lasting because it's so specific," said David Goodger, a director of Python Software Foundation. "A lot of graphics packages had their own proprietary language for scripting. But then it's this static thing. You don't have the advantage of this vibrant community. If you take this language like Python, you have the advantage of this well-developed tool with the well-developed libraries. You've got the best of all possible worlds."
Still, even if the applications embrace a 100 percent pure version of a language, all of the code will be dominated by the application's API. Look for languages and their syntax to remain relatively pure while the libraries define another language built on top of the first.
4. Communities will be more important. As Goodger notes, Python is especially popular in a few niches, such as the world of bioinformatics and graphics. People who work with synthetic images or DNA results learn Python to do their job. Even if Python dies everywhere else, biochemists are probably still going to be learning Python.
The power of these communities is phenomenal. When Steve Jobs introduced the iPhone, everyone began looking for Cocoa programmers again. Mike Hendrickson, the publisher at O'Reilly Books, said, "We've seen a huge turnaround for Cocoa. It was all but gone a couple of years ago. Now, there's a huge, huge increase in Cocoa because a lot of people want to develop their cool apps for the iPhone."
If Steve Jobs decides that some unary lambda calculus is the language of choice for the iPhone 4.0, the developer community is going to find a way to rationalize his selection and talk about how much they love the language.
5. The Web and the cloud are the ultimate platform. Google's App Engine sparked a huge burst of interest in Python. Perl and PHP were early favorites because they were so well integrated with Apache, a Web server that was both free and easy to configure. Tomorrow's scripting languages of choice will be determined more by the simplicity, cost, and scalability of the hosting platform, not by the purity of the syntactic sugar. Look for such tools as AppJet and Coghead by selling a cloud with a simple scripting language for building the application.
InfoWorld Podcast
Top storage trends and IT consolidation strategies
Sponsored by Sony
6. Better language technology will make a difference. The battle for supremacy between Mozilla's Firefox ("JavaScript, I am your father") and Google's Chrome ("Come live in thread harmony, Luke") is good for everyone. The performance gains these browsers have brought to JavaScript have been dramatic, and they're already making some other scripting languages jealous.
At the end of 2007, Larry Wall wrote, perhaps puckishly, that JavaScript "has some issues, but in the long run JavaScript might actually turn out to be a decent platform for running Perl 6 on."
Sophisticated engines such as SpiderMonkey and V8 show that scripting languages can begin to compete with full compiled code because a smart just-in-time compiler can make guesses about the data that are often good enough.
The stunning performance is bound to attract the attention of folks who dream of running JavaScript on the server. While Netscape tried this idea a long time ago, there's some merit in letting both the server and the client speak the same language. Now the only problem is figuring out which version of JavaScript to use. If history is any indication, it will be just a bit different from all of the browsers.
7. Emulation and cross-compilation will extend the life of dynamic code. Java programmers can use Jython to let Python code control Java objects. Groovy burrows deeply into the Java stack. Google's Web Toolkit converts Java into JavaScript. Watch for the virtual machines from Java and .Net to become even friendlier to changes that come along at runtime.
8. All of the embedding makes it simpler for programming to escape the command line and start appearing in Web applications themselves. Some of the highly customizable platforms, such as WordPress and some Drupal plug-ins, let you add custom code in a Web form.
Uploading JavaScript or Python on the fly to customize a Web application is still only for real programmers, but it will become easier and easier for casual users to avoid bugging the IT staff by writing their own code. Some WordPress plug-ins let users edit the JavaScript that controls the ads. The bloggers may be changing only a few colors and details for Google AdSense, but these Turing-complete mini-sandboxes are going to bring programming to the masses (see "Application builders in the sky").
Watch clouds like AppJet, a Web site that lets you build a Web application with one file filled with JavaScript. AppJet's Web site is the IDE: You just go to a Web page and edit the code, and voila, the code is tested right in your browser.
9. The rise of the amateurs may make much of dynamic programming irrelevant. Web sites such as Coghead (see my review), Caspio, and Microsoft's Popfly let the world do much of the programming without typing any characters at all -- unless they want to put a label on some Web form. All of the instructions for the server are communicated by mouse clicks, lines, and flowcharts. This democratization will create graphical languages that may flourish -- if the creators can make them simple enough for the average human.
InfoWorld Podcast
Top storage trends and IT consolidation strategies
Sponsored by Sony
10. Adaptability for modern architectures is key. David Goodger says that the Python team invests a great deal of time in improving multicore performance. Earlier versions of Pythons could handle threads, but threads were still bound to a single core. That changed after researchers with big data sets pushed for better performance that can take advantage of the hardware.
If your applications are naturally multithreaded, then watch the development of core-savvy languages such as Python and Groovy. If the work you do is limited to a single thread, well, look elsewhere for performance.
The one Highlander
These principles don't lead to one clear answer for the path of dynamic languages and Web development. The real answer may be that anyone can choose any of the languages as long as they make sure they track and navigate these 10 themes.
For instance, simplicity is an important theme as developers move toward elegant solutions. Ruby on Rails is quite popular because of the straightforward syntax and the tight integration with the database. The best frameworks that speed the development of complex, database-driven applications will triumph. But then, we already knew that.
Many other dynamic languages are already borrowing some of the best concepts from Rails. The Java programmers, for instance, can turn to Grails, a simple framework built on top of Groovy and a JVM.
Speed will always matter. For this reason, JavaScript will become more and more useful as the high-powered competition on the Web influences other uses of the language. Other languages will need to either borrow many of the ideas from the JavaScript core or find a way to benefit from them through emulation.
Slashdot co-founder Rob Malda, who chose to build the site on Perl because of all the good libraries in the CPAN repository, sees the features that attracted him to Perl in nearly every dynamic language today.
"Down the road it seems unlikely that we'd rewrite in Perl, but I have no real guess as to what we would rewrite in," he said. "I suspect Rails would be fast enough in five years to consider it, but who knows?"
Resource - InfoWorld
6 Scripting Languages Your Developers Wish You'd Let Them Use
However, while we've covered several in depth, those five dynamic languages are not the only ones developers use. Since every programming language is a tool suited to solve a particular problem, it behooves each IT shop to use the best tool for the job. So in this article, I share a few up-and-coming scripting languages that really ought to be on your company's radar, with a few passionate arguments from developers who have adopted them.
Scala
Scala is particularly attractive to Java developers. Per its website: "Scala... is both object-oriented (think inheritance, methods, ...) and functional (think closures). It blends a number of modern language features, while maintaining close compatibility with Java."
Dean Wampler, senior consultant at Object Mentor, is currently co-writing a book on Scala for O'Reilly. "Scala is the best language I have seen that meets the 'one size fits all' goal," he says. "Scala fixes problems with Java, like verbosity and limitations in Java's support for object-oriented programming. In addition, Scala supports functional programming—an approach that has been around for a long time in academic computer science, but is now proving to be very useful for writing robust concurrent software. Concurrency is very important for scaling up software at large websites and enterprises."
For David Ritchie MacIver, a developer at Trampoline Systems, Scala's primary benefit is that he can avoid Java. "I can match [Java] in terms of library support, performance and ease of deployment," he says. Many Java tools carry over to Scala, too. MacIver says his company is adopting Scala for some of their visualization software as the software is updated, and reducing its use of Java and Ruby.
MacIver doesn't recommend Scala for everything, though. "People will push Scala for concurrency advantages. Please don't succumb to the temptation. It doesn't particularly have any. Any more than Java does, that is."
Groovy
Another language gaining ground in the Java community is Groovy. According to its website, Groovy is an agile and dynamic language for the Java Virtual Machine (JVM). It builds on Java's strengths but has additional power features inspired by languages like Python, Ruby and Smalltalk.
So, what's Groovy's compelling feature? According to the slashdot commenter who first brought it up (and inspired this entire project... see what he or she started?), "I was surprised that Groovy didn't appear anywhere in the article. If there's a dynamic language poised to convert the enterprise crowd, it's Groovy. [It's] able to compile into Java bytecode, compile Java code and directly exploit the huge base of Java, but without the cumbersome Java syntax. I wouldn't be surprised to see Python and Ruby supplanted by Groovy in a couple of years."
Java developer Chris Broadfoot agrees. "Groovy lets Java developers code in an effective, expressive manner, while maintaining cross-compatibility with legacy Java code," he says.
Clojure
Your company may be adopting the latest hardware, but can your software take advantage of its multithreading capabilities? You might want to look at Clojure, a dynamic programming language that targets the JVM. Explains its website, Clojure is "designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language—it compiles directly to JVM bytecode, yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection."
Small? Powerful? Java? Can those three co-exist? Chris Houser, member of the technical staff at Four D Development in Fort Wayne says, "Clojure is a small, powerful language that compiles and runs on the JVM, so no new infrastructure [is needed]. Plus it lets you get more done with less code, which is good for development schedules and maintenance. It's particularly good at taking advantage of multicore hardware without as much programmer overhead as Java."
"The most pressing issue in software development today is how to better take advantage of multicore CPUs to increase performance and reduce energy costs," explains J. McConnell, founder of Übermensch Consulting. "Clojure provides a fundamentally better approach (in terms of ease and safety) to concurrency than other languages out there. Its Lisp heritage gives it the power to greatly increase programmer productivity in a way that grows over time and to enable easy DSL creation to allow business owners to verify the correctness of programs. The fact that it runs on the JVM and can smoothly integrate with the millions of lines of legacy Java code are just icing on a very tall cake."
Lua
Formally, Lua is "a powerful, fast, light-weight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping."
Less formally: "It's just a really slick little language overall," says Evan DeMond, a junior software engineer at a Midwest custom software development shop. "I enjoy programming in it, and I get things done in it quickly." DeMond has been using Lua for scripts and small tools. He has also experimented with writing larger apps in it lately, which "has been going pretty well so far," he says.
Developer Ralph Hempel describes Lua as "one of the best little secrets in programming languages, and I've been through a lot of them in the last 30 years." While it lacks a formally approved library distribution mechanism, Hempel says, there are plenty of de facto standard libraries for file system access, network connectivity, database access and so on. "For me, the best part of the Lua system is the rock-solid language core and the carefully considered upgrades and patches. The releases of Lua are controlled by the 'three amigos' that have been involved with the language from the start." Hempel has ported Lua to the LEGO Mindstorms NXT.
Matthew Wild, director of software consultancy Heavy Horse Ltd., sees Lua's advantages in terms of rapid Agile development, exceeding what is possible with more traditional languages. Lua doesn't try to do too much, Wild says. "Instead, it gives you the required building blocks out of which it is possible to build anything you want, in any way you want. The key benefits unique to Lua are the fact that it is amazingly small, fast, and on a technical level a masterpiece. Not every project manages to achieve so much with so little of the dreaded 'bloat.'"
Wild adds, "I've become so hopelessly in love with Lua, I've incorporated it into nearly all my recent projects, and yet it fits in nicely every time." Wild is starting to use Lua as a standalone, rather than embedded, language. "It is still fitting the job perfectly. Thanks to Lua, I'm now looking at weeks, rather than months, in our development schedule."
F#
The .NET development community is not without its set of scripting language enhancements. Among the most prominent is F#, which began as a Microsoft research programming language "to provide the much sought-after combination of type safety, succinctness, performance, expressivity and scripting, with all the advantages of running on a high-quality, well-supported modern runtime system." Microsoft is now turning F# into a fully-supported language on the .NET platform.
C# MVP Tomas Petricek, author of Real-world Functional Programming in .NET is working on a book about F#. Petrick says F# encourages the functional immutable style of programming, which is suitable for writing concurrent and distributed programs that can be easily tested. Moreover, it supports the declarative style of programming. "The way I like to talk about declarative style is that it allows you to divide the work between senior programmers that develop some 'smart' library for solving problems and junior programmers that use it to solve daily problems," he says. "An example of this may be List module in F#, but the LINQ libraries in .NET 3.5 follow the same functional principles."
Many programming languages make it easy to write something small that grows into a larger app, but they present problems when the software needs to turn into a real library with a strong logical structure. "F# gives you an excellent way for doing this," says Petricek. "You can start with simplicity (just as in dynamically-typed languages such as Python or Ruby), but end up with a very robust program (just as in C# or Java). The key benefit of F# is that the transition is completely fluent without having to do any painful steps in between. In fact, you don't need to rewrite any code that you wrote at the beginning."
Bulgarian ASP.NET developer Mihail Kochanov sees additional benefits for F#. "I believe learning F# makes me a better C# programmer," he says, explaining that F# made it easier to understand LINQ. He's also interested in F# for its parallel library context. "If you have stuff you might want to run parallel in the future, it might be good to be ready," he says.
Boo
Boo proclaims on its home page that it is "a new object oriented statically typed programming language for the Common Language Infrastructure (CLI) with a Python-inspired syntax and a special focus on language and compiler extensibility."
Josh Coffman, lead developer and founder of Computerist Solutions, would lobby for Boo particularly if he were to implement a domain-specific language (DSL). "It's not an interpreted language because it's compiled to CLI," he says. "Because it runs on .Net, you have all the power of .Net—only it's more flexible, and you can use it as a script or a compiled program." Boo has plenty of technical advantages, too, he says, such as being able to manipulate the compiler output during compilation. "The space indented syntax is kinda fun," he adds.
Matthew Fowle, software developer at Useful Networks, says "A computer language is a tool for making software; Boo as a computer language plays well with existing tools (the .Net ecosystem), but it goes further by allowing developers unprecedented power in developing their own language tooling. Most languages work around a fixed set of concepts; Boo works by giving developers the ability to craft and shape their own language concepts. Further, Boo syntax is wonderfully wrist-friendly, and comes with a variety of interpreters to accelerate rapid development."
I don't mean to imply that these up-and-coming languages are the only ones worth paying attention to. There are several others that IT managers should be aware of—and proponents are invited to add their suggestions in the article comments. Here's a few bonus languages.
Among the interesting languages are Factor, which MacIver described as "modernized Forth, with better support for functional programming."
Software engineer Anthony Cook would prefer to use REBOL, a language that gains its advantage through lightweight domain-specific sublanguages and micro-formats. Cook appreciates Rebol's "dialects" which let you create your own domain-specific languages. "One guy even built a virtual machine Assembly language interpreter as a Rebol dialect to teach it to his students," says Cook. It's also tiny, self-contained and cross platform, so code written for Windows runs exactly the same on Linux or Mac OS X. "It has a built in GUI library, the ability to send e-mails and access Web resources built in, with no includes, in only a couple of simple lines." The size of the executable program is small too, he says. "To do the same thing in Java would take hundreds of megabytes; in C it would take tons of includes and many lines of code to do the same thing."
It's fast, too. Cook says, "I'm used to using Ruby all day, and it's one of the slowest languages out there. REBOL is a Forth-stack based yet dynamic prototype-based language that runs almost as fast as native C code."
Software architect David Brabant would try to convince the boss to let him use Lisp. "Lisp is elegant, Lisp is compact, Lisp is powerful, Lisp is reflexive, Lisp allows me to write my DSL in a snap, using a few macros." But, he sighs, "In the end, I would be forced to use PHP like anybody else."
Resource - CIO.com