How many times have you heard "We do agile" or "We do SOA" or something similar? There is nothing wrong in doing agile or SOA or whatever is in fashion at a particular time, it is just that we so often lose sight of the purpose of what we do as software developers.
The purpose of any software development project is working software and the technologies and processes are but just enablers and are secondary. They are useful in building and delivering software but are not ends in themselves.
Those focused on delivering quality software usually deliver successful software projects. They are the deliverers rather than the loyalists.
Wednesday, August 19, 2015
Thursday, July 23, 2015
3 Things You Must Do for Successful Software Delivery
- Accept that there is never just 3 things!
- There is no recipe for successful delivery
- There is no silver bullet!
- Repeat the first 3 things to yourself perpetually
Sunday, September 28, 2014
My 2014 JavaOne
It has been fifteen years since I last attended JavaOne in San Francisco and I am quite excited. I spent 26 hours in an aeroplane to get to San francisco, I certainly have forgotten how torturous that is. Since fifteen years ago, Java has grown tremendously and the schedule shows it, there are 537 sessions with 572 speakers. Putting my schedule together was excruciatingly difficult, choosing what to miss out on. But with the help of many coin tosses I got to the following schedule:
Sunday 28 September
8:00 - 8:45 : Avatar.js
9:00 - 16:00 : Develop Java Embedded Applications Using a Raspberry Pi
Monday 29 September
:30 - 10:30 : Designing a Beautiful REST + JSON API
11:00 - 12:00 : Developing On-Device iOS and Android Apps with Java
12:30 - 13:30 : Introduction to Hotspot Internals
14:30 - 15:30 : Modular Architectures Using Microservices
16:00 - 17:00 : The Anatomy of a Secure Web Application Using Java
17:30 - 18:30 : Java Performance: Hardware, Structures, and Algorithms
19:00 - 19:45 : Real-World RESTful Service Development Problems and Solutions
20:00 - 20:45 : JAX-RS REST Services and Angular.js: Tools for an Even Better Experience
21:00 - 21:45 : Learning Scala: A Practical Approach
Tuesday 30 September
8:30 - 10:30 : Building Secure Applications with Java EE
11:00 - 12:00 : Creating elegant builds at scale with Gradle
12:30 - 13:30 : API Design Checklist
14:30 - 15:30 : Writing recommender system with Java
16:00 - 17:00 : Getting Started with MongoDB and Java
17:30 - 18:30 : Javascript across tiers with Nashorn And Avatar.js
19:00 - 19:45 : Making all client-side java secure
20:00 - 20:45 : Sumatra: The open JDK project
21:00 - 21:45 : Agent based cross platform middleware
Wednesday 01 October
8:30 - 9:30 : Java EE 7 Batch Processing in the Real World
10:00 - 11:00 : Unorthodox Enteprise practices
11:30 - 12:30 : Microservices on the JVM: A Practical Overview
13:00 - 14:00 : JPA Gotchas and Best Practices: Lessons from Overstock.com
15:00 - 16:00 : Building Custom JavaFX Controls
16:30 - 15:30 : Applying Java's Cryptography
Thursday 02 October
9:00 - 10:45 : Java Community Keynote
11:30 - 12:30 : With GC solved what else makes a JVM pause
13:00 - 14:00 : IntelliJ IDEA
14:30 - 15:30 : Transforming code to Java 8
16:00 - 17:00 : Do-It-Yourself Usability Design for Developers
I am exhausted, am off to bed now in preparation for my busy Sunday!!!!
Sunday 28 September
8:00 - 8:45 : Avatar.js
9:00 - 16:00 : Develop Java Embedded Applications Using a Raspberry Pi
Monday 29 September
:30 - 10:30 : Designing a Beautiful REST + JSON API
11:00 - 12:00 : Developing On-Device iOS and Android Apps with Java
12:30 - 13:30 : Introduction to Hotspot Internals
14:30 - 15:30 : Modular Architectures Using Microservices
16:00 - 17:00 : The Anatomy of a Secure Web Application Using Java
17:30 - 18:30 : Java Performance: Hardware, Structures, and Algorithms
19:00 - 19:45 : Real-World RESTful Service Development Problems and Solutions
20:00 - 20:45 : JAX-RS REST Services and Angular.js: Tools for an Even Better Experience
21:00 - 21:45 : Learning Scala: A Practical Approach
Tuesday 30 September
8:30 - 10:30 : Building Secure Applications with Java EE
11:00 - 12:00 : Creating elegant builds at scale with Gradle
12:30 - 13:30 : API Design Checklist
14:30 - 15:30 : Writing recommender system with Java
16:00 - 17:00 : Getting Started with MongoDB and Java
17:30 - 18:30 : Javascript across tiers with Nashorn And Avatar.js
19:00 - 19:45 : Making all client-side java secure
20:00 - 20:45 : Sumatra: The open JDK project
21:00 - 21:45 : Agent based cross platform middleware
Wednesday 01 October
8:30 - 9:30 : Java EE 7 Batch Processing in the Real World
10:00 - 11:00 : Unorthodox Enteprise practices
11:30 - 12:30 : Microservices on the JVM: A Practical Overview
13:00 - 14:00 : JPA Gotchas and Best Practices: Lessons from Overstock.com
15:00 - 16:00 : Building Custom JavaFX Controls
16:30 - 15:30 : Applying Java's Cryptography
Thursday 02 October
9:00 - 10:45 : Java Community Keynote
11:30 - 12:30 : With GC solved what else makes a JVM pause
13:00 - 14:00 : IntelliJ IDEA
14:30 - 15:30 : Transforming code to Java 8
16:00 - 17:00 : Do-It-Yourself Usability Design for Developers
I am exhausted, am off to bed now in preparation for my busy Sunday!!!!
Tuesday, January 14, 2014
JavaScript: Splicing an Array
This JavaScript blog series will be posted more regularly in 2014. To kick off, lets look at how to dynamically add and remove items anywhere in an array. Arrays in JavaScript have a splice function to do just that.
It has the following syntax
array.splice(index, quantity, item1, ..., itemX) returning an array
where the parameters are defined as:
index : it is required and specifies the position at which to add or remove items. If it is negative it will calculate from the end of the array.
quantity : it is optional and specifies the number of items to be removed from the index onwards. To not remove any items, set it to 0. If it is not specified it will remove all elements after the index.
itemX : it is optional and is the items to be added to the array at the specified index.
Lets define an array
Now lets remove all elements from index 4 onwards
This results in the following array
Now let us add some elements to our array starting at index 4,
This results in the following array
Now lets replace elements with values 4 and 5 with 11 and 12
This results in the following array
Now lets remove elements with values 11 and 12 from the back of the array
This results in the following array
Pretty cool hey, that's enough on splicing, its time for you to experiment with it. Till next time enjoy!!!
It has the following syntax
array.splice(index, quantity, item1, ..., itemX) returning an array
where the parameters are defined as:
index : it is required and specifies the position at which to add or remove items. If it is negative it will calculate from the end of the array.
quantity : it is optional and specifies the number of items to be removed from the index onwards. To not remove any items, set it to 0. If it is not specified it will remove all elements after the index.
itemX : it is optional and is the items to be added to the array at the specified index.
Lets define an array
var myArray = [1,2,3,4,5]
Now lets remove all elements from index 4 onwards
myArray.splice(4)
This results in the following array
[ 1, 2, 3, 4 ]
Now let us add some elements to our array starting at index 4,
myArray.splice(4,0,5,6,7,8,9,10)
This results in the following array
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
Now lets replace elements with values 4 and 5 with 11 and 12
myArray.splice(3,2,11,12) //remove 2 elements at index 3 and add 11 and 12 at index 3
This results in the following array
[ 1, 2, 3, 11, 12, 6, 7, 8, 9, 10 ]
Now lets remove elements with values 11 and 12 from the back of the array
myArray.splice(-7,2)
This results in the following array
[ 1, 2, 3, 6, 7, 8, 9, 10 ]
Pretty cool hey, that's enough on splicing, its time for you to experiment with it. Till next time enjoy!!!
Sunday, January 05, 2014
2013; break; 2014;
Year 2013 delivered Edward Snowden to the world, who single handedly confirmed that we live in an Orwellian world. All technology corporations, both hardware and software corporations cannot be trusted protecting simple basic human rights. More terrifyingly, most people could not be bothered and choose willingly to live in the matrix.
Year 2014 will be spent focused on looking for ways to protect my right to privacy. I have also resolved to blog at least once a week.
Happy New Year, may 2014 bring you safer technology and the restoration of basic freedoms......
Monday, September 09, 2013
JavaScript: Slicing an Array
Have you ever wanted just a sub section of an array? Well, with slicing an array you can do just that.
Suppose I have an array
and I want the first 3 elements, I can do the following
which return an array with the first 3 elements
[ 1, 2, 3 ]
This does not modify the original array in any way, it just returns a new array
The function slice has the following signature,
slice ( beginIndex, endIndex ) where the index is zero based i.e. the first element in a an array starts at index 0.
You could also access the array from the end using negatives indices for example,
returns
[ 3, 4 ]
Next we will look at splice......until next time!
Suppose I have an array
var myArray = [1,2,3,4,5];
and I want the first 3 elements, I can do the following
myArray.slice(0,3);
which return an array with the first 3 elements
[ 1, 2, 3 ]
This does not modify the original array in any way, it just returns a new array
The function slice has the following signature,
slice ( beginIndex, endIndex ) where the index is zero based i.e. the first element in a an array starts at index 0.
You could also access the array from the end using negatives indices for example,
myArray.slice(-3, -1);
returns
[ 3, 4 ]
Next we will look at splice......until next time!
Tuesday, July 23, 2013
Software Patents
I have always hated the patent system and think that it is abused and inhibits innovation. One of my favourite writers, Joel Spolsky has written a great blog on killing patents.
Monday, July 22, 2013
JavaScript: Length of Arrays
JavaScript arrays are dynamic and flexible with a few gotcha's. Today we will have an in-depth look at the length property, which is an unsigned 32 bit integer that specifies the number of elements in an array. Arrays have 0 based indices, therefore the length property will be the highest index + 1. Lets have a look at some examples
var a = [];
a.length //return 0, a is an empty array
var b = [2,4,6];
b.length //return 3
b[3] = 8;
b.length //returns 4
b['a'] = 5; //never a good idea to use an array as an associative array, instead use a plain object
b.length //returns 4, non numeric indices are ignored in the length property
b[10000] = 50;
b.length //returns 10001, the positions between 3 and 10000 are padded with undefined
Setting the length of an array will shorten it as well
b.length = 4
b.length //returns 4, shortened the array from 10001 to 4
The safest way to empty an array is to set the length to 0
b.length = 0; //empty's an array
Next, I will be looking at the slice and splice functions on an array, till next time.......
var a = [];
a.length //return 0, a is an empty array
var b = [2,4,6];
b.length //return 3
b[3] = 8;
b.length //returns 4
b['a'] = 5; //never a good idea to use an array as an associative array, instead use a plain object
b.length //returns 4, non numeric indices are ignored in the length property
b[10000] = 50;
b.length //returns 10001, the positions between 3 and 10000 are padded with undefined
Setting the length of an array will shorten it as well
b.length = 4
b.length //returns 4, shortened the array from 10001 to 4
The safest way to empty an array is to set the length to 0
b.length = 0; //empty's an array
Next, I will be looking at the slice and splice functions on an array, till next time.......
Tuesday, July 16, 2013
Friday, July 12, 2013
JavaScript: More on Arrays
So what else can you do with JavaScript Arrays? Arrays are like a swiss army knife, you can use it like an array, you can use it like an object, you can use it like a stack and like a collection, whatever suits your purposes. Arrays have the following functions available
- length - return the total number of elements in the array
- join - concatenates all the elements in the array into a single string separated by the parameter passed
- concat - concatenates an array to the array and returns a new array
- sort - sorts the array by character encoding by default or by a user defined function
- reverse - reverses the elements of the array
- slice - returns an array that is a subset of the original array
- splice - can insert, remove or replace one or more array elements
- push - adds an element to the end of an array
- pop - it removes and returns the last element of an array
- shift - it removes and returns the first element of the array shifting all other elements down
- unshift - inserts elements at the beginning of an array shifting all the other element up
- toString - converts all the elements to a string and concatenates them to a comma delimited string
- toLocaleString - converts all the elements to a localised string and concatenates them to a comma delimited string
Tuesday, July 02, 2013
JavaScript: Arrays
The JavaScript array construct is very flexible, and I especially love the fact that you can put anything into a JavaScript array. There is no type police breaking your code. Arrays in JavaScript are not true arrays, but an Object with special array like functionality. So how do we define an Array
var x = new Array (1, 5, "ten", "twenty");
or
var y = [1, 'a', true, 7.5, new Object()];
or
var z = [ [1, "hello"], [2, {name:"test"}]];
Array indexes are zero based and can be accessed as follows
var value = x[0] //value will be 1
var anotherValue = z[1][1]['name'] //anotherValue will be test
Array indexes are generally integers greater than or equal to 0 and less than 232 - 1, anything else would be converted to a string and looked up as a string.
Arrays can also act as a dictionary with ease, using the x variable defined above, you could do the following
x['a'] = 12345
Yip the power of arrays in Javascript is terrifying, but liberating. I will look at some other array functionality in the next instalment
var x = new Array (1, 5, "ten", "twenty");
or
var y = [1, 'a', true, 7.5, new Object()];
or
var z = [ [1, "hello"], [2, {name:"test"}]];
Array indexes are zero based and can be accessed as follows
var value = x[0] //value will be 1
var anotherValue = z[1][1]['name'] //anotherValue will be test
Array indexes are generally integers greater than or equal to 0 and less than 232 - 1, anything else would be converted to a string and looked up as a string.
Arrays can also act as a dictionary with ease, using the x variable defined above, you could do the following
x['a'] = 12345
Yip the power of arrays in Javascript is terrifying, but liberating. I will look at some other array functionality in the next instalment
Thursday, June 13, 2013
JavaScript Primitives, The Imposters!!!
Allegedly the JavaScript universe contains 5 primitive types:
- string - a sequence of unicode characters
- boolean - represents a truth value of true or false
- number - represents any number, even really big ones, between -253 and 253
- undefined - indicates that a property or variable is unknown, does not exist
- null - indicates no value
I say these primitives are imposters! They behave like objects but are not. JavaScript being a loosely typed language morphs the primitives into objects when used as objects. These primitives also have object wrappers.
var primitiveString = 'I am a primitive string';
var objectString = new String('I am a String object'); //using the object wrapper
primitiveString.length; // 23, will work and return the correct value like an object
You could even do this
primitiveString.myvalue = 'test' //like an object
which assigns the value 'test' to a hidden object property that you have no reference to, so you can't access the property from the primitive type thereafter.
null and undefined are also very strange, since they are just properties of the global object and can be redefined by you, but please, don't do that. More on this later.
Whether you use objects or their imposters, doesn't matter, just be consistent, so as to avoid hard to find bugs. Next, I play with JavaScript's awesome arrays, until then, may the code be with you.......
Part 3: JavaScript Object Oriented Fundamentals
Part 3: JavaScript Object Oriented Fundamentals
Monday, June 10, 2013
Javascript Object Oriented Fundamentals
Before I can answer the question about how object oriented is Javascript, maybe I need to dip my toe into the fundamentals of object orientation first. For something to be an object, it must combine data and behaviour into a coherent whole. Yes, it is as simple as that, but experience has shown me that simplicity is always more difficult than complexity. An object provides crisp abstractions with clear boundaries. Objects also support reusability through inheritance and/or composition of behaviour and data.
So Javascript is most certainly object oriented, but in my humble opinion, it's implementation is messy. The syntax and organisation have a very procedural feel about it, although it is not really possible to write procedurally, since all data and functions are combined within a global object.
Javascript implements inheritance using prototype objects. Every object contains a prototype object and when a message is received by an object, Javascript will look for the property/function in the object first, then look for it in it's prototype object, if still not found it will look at the prototype's prototype object till it ultimately gets to the global object's prototype object. I will delve deeper into this in a later blog.
Last but not least Javascript also has constructors which are implemented as functions, and they can be implicitly or explicitly defined.
Enough on object orientation for now, till next time when we look at the few primitives that pollute the Javascript universe.....
See Part 2 - Objects, objects everywhere Part 4: JavaScript Primitives, The Imposters!
So Javascript is most certainly object oriented, but in my humble opinion, it's implementation is messy. The syntax and organisation have a very procedural feel about it, although it is not really possible to write procedurally, since all data and functions are combined within a global object.
Javascript implements inheritance using prototype objects. Every object contains a prototype object and when a message is received by an object, Javascript will look for the property/function in the object first, then look for it in it's prototype object, if still not found it will look at the prototype's prototype object till it ultimately gets to the global object's prototype object. I will delve deeper into this in a later blog.
Last but not least Javascript also has constructors which are implemented as functions, and they can be implicitly or explicitly defined.
Enough on object orientation for now, till next time when we look at the few primitives that pollute the Javascript universe.....
See Part 2 - Objects, objects everywhere Part 4: JavaScript Primitives, The Imposters!
Subscribe to:
Posts (Atom)