December 21st, 2010
admin
Recently, I have been thinking about Java and Moving Beyond Java. I ruminated aloud in a couple of Audioboos and so here are a summarised listable version of these thoughts and ideas.
Java
- The Mother Language – Lingua franca of the Java Virtual Machine platform
- Java SE 7
- Java SE 8
- Work related. Programming language is risk-averse, it changes slowly and carefully. Oracle steward ensure that it is safe. Business owners and web site owners will be able hire or contract.
- A de-facto programming language for new learners, students of computer science
- Die-hard stalwarts can stick with Java the programming language, because eventually some of the benefits of the other languages could make it into Java ecosystem as frameworks and libraries
- Performance-related Java programming: There is a native-like programming approach for writing Java applications like they do C++ / Speed performance
Beyond Java on the JVM
- Neil Ford, Ted Newark and Myself are examples of external luminaries (the forces) that are telling you why you should be thinking about moving beyond Java
- Continued learning
- Reduction of Boilerplate (Almost all)
- Declarative programming (JavaFX Script)
- Ease-of-Development
- Dynamic typing (Groovy)
- Scripting language approach
- Closures (Almost all)
- Control abstractions (Scala)
- Improved concurrency models parallel algorithms, actor, CSP and software transactional memory
- Better simple abstract data types (case classes and objects in Scala)
- Better language support for immutable object (@Immutable in Groovy)
- Better annotations (Groovy has loads)
- Some languages support an object functional approach (Scala, Groovy, Fantom)
- Other object functional languages may support Higher order functions (Scala, Clojure)
General behaviour, psychology within the movement of herds "staying up to date and getting good".The decision is yours in 2011
Categories: alternative, beyond, Communication, future, Java, jvm, language, Leaders, Policy, programming, progress Tags:
December 15th, 2010
admin
Hello Everyone
Here is a Scala application example that demonstrate how to reverse a singularly linked list.
/* Written by Peter Pilgrim 10th December 2010 */
package uk.co.xenonique.scalaexercises
import scala.collection.mutable.StringBuilder
import java.lang.System
abstract class LinkedList { }
case object EmptyLinked extends LinkedList
case class LinkedNode( var value: Int, var next:LinkedList ) extends LinkedList
/**
* Example Scala program that demonstrates an algorithm to reverse a singularly linked list of elements.
*/
object NodeApp {
def traverse( node: LinkedList ): String = {
def _traverse( node: LinkedList, buf: StringBuilder ): Unit = {
node match {
case b: LinkedNode => {
buf.append( "%d, ".format( b.value ))
_traverse( b.next, buf )
}
case _ =>
}
}
val buf = new StringBuilder("[");
_traverse( node, buf );
buf.append("]")
buf.toString
}
def reverse( current: LinkedList ): LinkedList = {
def _reverse( current: LinkedList, parent: LinkedList ): LinkedList = {
println("::>> current="+current+", parent="+parent)
current match {
case b: LinkedNode => {
val revHead = _reverse( b.next, current )
printf( "<<:: b.value=%d, b.next=0x%-8X,
current=0x%-8X, parent=0x%-8X\n",
b.value,
System.identityHashCode(b.next),
System.identityHashCode(current),
System.identityHashCode(parent) )
b.next = parent
revHead
}
case _ => parent
}
}
_reverse( current, null)
}
def main( args: Array[String]) {
val s = LinkedNode( 1,
LinkedNode( 2,
LinkedNode(3,
LinkedNode( 4, EmptyLinked ))))
print("s="+traverse(s))
val t = reverse(s)
print("t="+traverse(t))
}
}
The example program above demonstrates the following salient points:
- Scala’s syntax for use of case instance classes that reduce the boiler plate and add syntax sugar to ordinary object classes. (LinkedNode)
- One can declare case object class (EmptyNode)
- Case classes can extend other classes or traits or other case classes
- Scala’s ability to nest a function declaration inside another function declaration
- a recursive traversal algorithm to traverse a singularly linked node data structure
- a recursive algorithm to reverse the sequence of elements in the singularly linked node data structure
Merry Xmas
December 15th, 2010
admin
I, hereby, declare that these statements below are, now, my own personal “corporate” values:
- In any new organisation that I work with or be involved with, I will work inside a team of people that heavily influence the engineering, the broad scope and design quality of the products.
- Any new organisation,which could quite be possibly in the financial services sector, must be able to demonstrate proactive changes to technology change including tangible innovation, that is not only invested in Java, the technology, the platform and language, but is also looking to move Beyond Java as a programming language.
- As a certified SCRUM master (circa May 2010) the only organisations that I will even consider, from now, are those which are working with a well known Agile methodology (such as Iterative Driven Development, SCRUM, Lean/Kanban,etc) or moving towards it in the extreme short-term.
- I realise that we are all in an era where people skills are of paramount importance. To that end, I want to improve my business domain knowledge. Being part of a solid development team, I would like to listen and learn too; and be educated by other talented team members.
- In any new organisation that I might consider, now or in the not too distant future, they shall be moving to or actually already practising sustainable software architecture.
Peter Pilgrim
Wednesday 15th December 2010