Uncategorized

The Open Source Scare

As everyone knows there is this thing going around of people copying. They copy each other by the way they dress, what is fashionable to eat (I love sushi), and the codey they need to develop.

Some even say we have a right to copy: it’s called copyright

In coding this is a fairly complex thing… As seen in the article by Joel Spolsky, where he looks into those sideline projects, we can see some issues like: who really owns the code? In retalliation to many of this, the open source community was born.

Defining open source

Google defines open source as:

…denoting software for which the original source code is made freely available and may be redistributed and modified.

The idea here is that the source code is open, and anyone can go in and change it, or look what is going on inside. It DOESN’T mean free though, but many are free,

Open source concerns

Some of the concerns from the dev community has been things like:

  • we are telling students from universities to write code and give it away for free – thus we are giving away jobs and intelectual property.
  • But I want to do such a simple task, and now i need to reinvent the wheel.

But i need that component

And this is where the issue kicks in. The problem is that we ‘need’ to get that thing. And it is free when i hack it. Or, on the other hand, the component with the sourcecode is available for ‘free’ online.

It all sounds good and well, but we should not forget who owns the code, or what license if comes with. There has been quite a few cases where we have seen we need to be exceptionally careful on what code we use where.

As mentioned by slashdata.co:

n the Sitecom case (2004) Welte identified his own source code in the binaries for Sitecom´s Network routers, which Welte had licensed under the GNU GPL v2.0 but Sitecom had not made the source code available or referenced the GNU GPL v2.0, both of which are a requirements of the License. The District Court of Munich granted Welte an injunction against Sitecom Deutschland GmbH whereby Sitecom was prohibited to distribute the products, until they were compliant with the GPL terms. Sitecom appealed but lost and posted the terms for GPL on their Web FAQ for the router.

Some cases were reported where companies had to open source ALL their code for violating the terms and conditions of the source code!

Here are some information on the most common licenses:

A summary of some licenses

GNU General Public License GNU General Public License
  • Copy it as many times as you like, on as many machines as you like
  • If you want to SELL your software, you need to give the clients a copy of the license, saying they can find the open source piece somewhere else for free.
  • If you modify the open source code, go ahead! BUT the code needs to be RELEASED UNDER THE SAME LICENSE

An example would be if we use a dropdown with this license, that we give clients a link to the license, and tell them they are able to get the dropdown somewhere else for free – but obviously our software is not ALL free! But hold on, you also need to open source your code here! So be careful if you use a control code with this license.

GNU LESSER GENERAL PUBLIC LICENSE
  • This license is like the previous one, but allows people to use these libraries in proprietary

With this license you are able to use your dropdown comercially and in proprietary software… remember to let your client know that you are using it and give them the license (even if it is through a link)!

BSD
  • You can only attribute the contributers by explicit permission

The BSD license is similar to the GPL, but you need to make sure that the copyright notices are still in the final product.

MIT Licenses
  • Sell it, rent it, sub-license it, or do whatever with it
  • Change and modify it
  • Include the copyright license agreement of the MIT license

More reading

Smashing magazine

Choose a license

 

Behaviour Driven Development

I recently went to the developer usergroup at Microsoft in Bryanston, Johannesburg. Joshua Lewis (twitter account here, blog here). He was talking about a model in which we think about how to improve a system that is working. Hold on, if the thing is working, why do we need to improve it?

I personally see how behaviour driven development can help in making developers not do unecessary things the client or business do not require.

Defining the outcomes

The question is actually, is it working as expected?

The main question on this is: What do we expect?

What is it suppose to do?

Sometimes nobody actually knows how the thing should work in the first place.

It becomes important in pinning down what exactly this is. Once you know what the system should be doing, we can look at outcomes – what we expect.

An example:

I am currently busy with a a piece of code that needs the user to type in information. This is then saved and used as a contract of sorts between the parties involved.

I need to consider the following outcomes:

  • The user’s information is saved
  • The user is able to retrieve the information

Defining the process

The system can be seen as something like this:

Interaction > System > desired output

Meaning: I do something, the system does something, then i get a result.

An example:

Taking the above example a bit further:

  • The user clicks the save button > insert magic here > The user’s information is saved
  • The user clicks to see an existing contract > insert magic here >  The user is able to retrieve the information

Other factors

But it is never this simple, right? Sometimes we have other factors that could play a role. One of these is the state of the software. This means that the system might react differently depending on what it is busy with in some way.

An example:

A great example of this would be logged in permissions – someone is only able to see/edit/change/delete certain things at certain times. Yet this does complicate the scenario a bit, but following this model, we should have a good overview of all the things that our system needs to cover.

 

Scenario Name State Interaction Outcome
The user clicks the save button  Have permission Attempts to save The user’s information is saved
The user clicks the save button  Doesnt have full permission Attempts to save Error
The user clicks to see an existing contrac Have permission Attempts to get information
The user clicks to see an existing contract Have limited permissions Attempts to get information User can see only certain areas that they have access to – these needs to be specified and used as new inputs here
The user clicks to see an existing contract Doesnt have permission Attempts to get information Error, redirects to homepage
The user clicks to see an existing contract Have full permission Attempts to get information Sees everything

 

 

The user sees only things he has access to

The user logs in and goes to the page to setup the contract > insert magic here > The user sees only things he has access to