DT-X / IPExpo Recap

Digital Transformation Expo Europe

On Wednesday the 9th of October, a member of the n-Coders remote team was sent to attend DT-X (formerly IPExpo Europe) on behalf of the company to gain valuable insights into the world of cybersecurity and cloud computing.

Please be aware that we will briefly cover some of the events going on at DT-X and the areas in which n-Coders is most interested. If you’re looking to learn information or in-depth details about the event, we recommend that the best way to do that is by simply attending the event in 2020! It’s free to attend and should be necessary for business professionals working with IT services to attend to gain insights and information.

The day for the n-Coders rep started by attending the main keynote, presented by Sir John Sawers, former chief of the secret intelligence agency (MI6). Sir John gave a talk covering security, intelligence and threats have been and will be developing through the continuous improvement of technology. The topic of state-sponsored hacking and IoT threats were also identified, in addition to how threats can harm businesses operating within the United Kingdom, even those that were not the original or intended target of an attack.

Another talk that the n-Coders rep attended during the day was given by a representative of Extreme Networks, Mathew Edwards. Mathew’s talk covered a vast range of data and statistics that had been collected by his company while providing a variety of security and network-related services to all sizes of businesses. The statistics shared will be used internally here at n-Coders to ensure the areas where faults most commonly occur have measures put in place to secure them up as much as possible.

Other than attending talks, the rep was also able to visit and network with a range of businesses at the expo. The connections made during this time will be invaluable in the future of n-Coders as we expand, improve and develop as a business. If you’re at the event next year, we’ll see you there!

n-Coders Office Move

The office is the beating heart of the company, it is where the business decisions are made, and the company direction realised. Though some businesses can operate independent of a central office or via the utilisation of a virtualised environment, a business location provides an area for clients to relate to as your company base and an area where your employees can feel is their environment for work; as a result the outward appearance and inward condition of an office is paramount to the presentation and perception of the business.

When siting your business in a location there are numerous factors that may impact your eventual choice, examples of these are listed below:

  • How large is your business? This should be coupled with the question, how likely are you to grow and in what time period? When starting a business, cost is key and a large amount of paid for, unoccupied space, will only negatively impact the financials of the company and prevent investment in impactful growth.
  • What are your business needs? – It is imperative that the accommodation meets your company requirements, for example is your business stock heavy? If you hold stock on behalf of a client or as part of sales this needs to be stored in a manner that is accessible and neat, this means space. As an extension to this you may be a business that needs space to meet its obligations generally, such as a vehicle repair company or hot-tub sales, where your managed stock is generally large, meaning your location options are restricted.
  • Location – This is key as it raises four core questions, where is your business located in terms of your clients? where is your business located in terms of your (or potential) employees? What does your business location say about your business and how much can you stretch to afford (indeed should you stretch)? Though it would appear tempting to keep costs of accommodation as low as possible, this may have an impact to company earning potential. If your company is difficult to find, if it is unpalatable to talented candidate employees or if it’s overly expensive, this must be considered. This is a balancing act, rent a huge, impressive headquarters could look good, but if you can’t offer a good salary to potential staff and you are in a difficult place. Alternatively, rent a cheap location that is difficult to find or in disrepair and both clients and staff may prove difficult to obtain.
  • Building support and costs – What are the conditions of your rental contract, is there a service charge or management fees? What are the “exit” clauses of your rental contract? Are there restraints that are prohibitive to business operations (for example no signage)? Are you sharing the building or the utilities with another business? Will (when) rates or rent increase and buy how much?
  • How is your area viewed or considered (generally)? – If you are adopting a professional technology business or consultation practice, it would not be expected to see that business operating from a warehouse or garage. Similarly, a high-end garage could not be expected to sell cars worth tens of thousands from a rusty shack on a housing estate. The expectation your office creates is paramount to your sales position, if a client is dealing with a start-up company, they will expect start-up prices.
Our final office at the Pool Innovation Centre

It was considering these points that enabled n-Coders to move to effect positive change in both its business operation and its status.

As a Company, n-Coders began as a one-man operation working from a desk in the Pool Innovation Centre (PIC) in Pool, however as the project responsibilities grew and the staff increased, the need for additional space was recognised and so the company expanded into additional offices, covering the growth needed and the growth expected. This growth came at a cost and n-Coders saw its accommodation bill grow from £450 per calendar month to £2100, but what did n-Coders get for that? What was the business value? Was expansion in the Pool Innovation Centre the right move?

The Pool Innovation Centre

The Pool Innovation Centre (PIC) began life as a European/Tax funded enterprise to support and foster small business in Cornwall, providing centrally administered office facilities such as meeting rooms, internet and network connectivity, postal services, parking, kitchen and toilets as well as catering. This was enhanced further by providing free networking events to allow businesses to be introduced to clients as well as partner with related fields of business, all for the relatively low cost of business accommodation (for example business rates were excluded).

As with all things, time fostered change and as the n-Coders business grew in maturity it recognised that the hire of such large space was a luxury that afforded no benefit to the Company. The additional space was not needed for its developers to work and yet could not be levied to an advantage (as client space) as the geography of the PIC meant that rooms were (obviously) separated and halls were busy with other companies on phones or chatting. This issue of space was compounded as, not only did n-Coders mature, but so did the PIC, realising that its position could be profitable, it became less concerned with the support to growing companies and more about the financial return from established companies as a multi-business landlord operating a business HMO. As a result of the desire for profit growth, the management of the PIC needlessly grew, services that were once considered optional were pressed onto businesses and networking events for the businesses became presentations and training courses for outside groups, reducing the space for paying members, while all the time raising rents. Of course, the managers of the innovation centres are entitled to do this, it is financially making the most of their own business assets, but where does that leave a growing company such as n-Coders?

Following an increase in rent and a recognition that the space occupied by n-Coders employees was not be utilised effectively, two key points were identified by n-Coders directorship. The first was that the business could not operate utilising third-party meeting rooms and equipment. This gave clients the impression that the control in business operation rested outside the company, its infrastructure, meeting rooms, accesses, parking and facilities all being controlled by another business. How damaging to a view of professionalism is being unable to book a meeting room or having to stand in a long line of other companies while getting a client a coffee. The second was that the lack of infrastructure control would always give the impression that the n-Coders was starting up, preventing access to larger clients, rather than supporting business growth. This issue was compounded by the fact that any small to medium clients that did enter the business were immediately faced with competitors and rivals, ensuring that you remained in a constant bidding war, preventing a simple price being presented in a setting that showcased the quality of the company’s work.

So how to solve the difficulty?

Though the solution may seem to present itself, the idea of “just moving” is an over-simplification, after all licenses were in place, current clients knew where n-Coders was, telephone services would change and moving costs would be introduced. So, what do you do?

Stage 1 was recognising that the rooms occupied were not of business interest and so had to be handed back to the PIC, reducing cost burden. This was a withdrawal conducted over 2-3 months moving from 3 rooms down to 2 and then 2 down to 1. This left developers in an operational environment that was someone less spacious than was used to:

The Office Move

The decision was clear that a move had to take place that allowed n-Coders to expand and manage its own facilities. The directorship knew that the company had to take the data realised by its assessment of the PIC and the considerations of what a company location means to a business and find the right space in the right spot in order to maximise the company potential.

Selecting the location

The location identified was Threemilestone Industrial Estate, Truro. This gave a perfect location for access to the industrial heartland of Cornwall, without increasing the burden of traffic into the central part of the city. It allowed the best location for clients travelling into the office, being more central to Cornwall and provided the best location to access employee talent as well as student talent. This location was only half the advantage however, the other part of the advantage came in the form of an opportunity to reinvent systems and processes as n-Coders is setup at the new location. By assessing the office prior to the office being established, the redundant processes could be removed and improved where possible; thus, applying our craft of optimisation to our own business practice.

The new offices were approximately 2.5 times the size of n-Coders previous offices with dedicated meeting rooms, kitchen and toilet facilities, an entire floor (and entry) dedicated to n-Coders operations. This allowed n-Coders to arrange its business into managed sections.

Cost-Benefit Analysis of Office Move

So what did n-Coders pay for this advantage? Surely the cost increased the risk to the company immeasureably and delayed project delivery? Well, no.

The cost of the new office was less expensive that the room shown in Fig 2 by circa £50, however the company incur the recurring costs of electric, water, internet and buildings insurance and the one off costs (in terms of money and time) of the move. The additional recurring costs added £90 to the rent, placing n-Coders at a +£40 a month bill compared to its previous location. One off costs for the move totalled circa £200, however as the move was carried out over a weekend and a lot of the arrangements made  prior to leaving the previous offices, little to no impact was made to project progression.

In contrast, the additional £40 a month and one off expense of £200 bought the company the flexibility to manage its services, control over its parking and access, a dedicated meeting room, a presentation room and its own kitchen and toilet facilities. Further to this it gave the company a single point of approach for its customers on an industrial estate that suited the business genre as well as placing the business in an area that gave it access to the through traffic into the City and placing n-Coder nearer to the businesses it supports in North Cornwall.

In all, the move placed the company in a stronger position, breaking the shackles of third-party control and allowing it to thrive as a provider of business optimisation solutions.

The Dangers of Waterfall for SME

Multiple different development approach are used within the software development industry, the two most common being Agile and Waterfall. In this article, we will breakdown some of the dangers that we’ve experienced during our operation for projects that we’ve performed using the waterfall method so that you can seriously consider the risks. 

A brief overview of the waterfall method, the process is generally linear, and once each of the five steps (Planning, Design, Development, Testing, Deployment) has been completed the project moves forward. This makes it critical that each stage of the project is meticulously planned and executed; otherwise, it can spell catastrophe for both the client and the development company. While staying strictly to the AGILE method can resolve some of the following faults that we’ve identified, if the customer becomes disengaged or otherwise disinterested in the project (which is common) then even an AGILE project can either ground to a halt or begin sliding into a waterfall method. 

Post-Development Feature Requests – ‘Obvious’ Features 

We’re going to start by breaking down the most common issue for us at n-Coders whenever a project is required to go down the waterfall route instead of AGILE. 

To be able to get the initial planning step right the first attempt, time has to be allocated to systems analysis. Unfortunately, time costs money. While most customers that are looking for custom software solutions have a reasonable budget of £50K or more, typically customers that prefer the waterfall method are those that have an unrealistic budget of under £10k and wish to push the process through as quickly as possible to get a result. 

A simple fact that most people can understand; software developers carry out the tasks that are assigned to them but can’t develop features not assigned to them just in case the customer may wish to have them later on. As proficient as software developers are, mind-reading or future telling isn’t within their skill sets currently. While that seems like it should be common sense, it is often not considered in software development projects by the customer. 

Failure in the initial planning process of a piece of software means that when the specification is broken down, and developers are assigned to complete each job, the project ends up following a spec that is extremely lacking in detail. If the customer fails to provide enough information initially or fails to detail exactly what they want, the frequent excuse is that it is “I obviously meant…”, “it is obvious that feature should exist” or “that is a common feature in X software, so I expected it to be in mine”. 

Lousy planning will almost always result with the customer will expecting features added for free that were never quoted for or paid for on the basis that they’re “obvious” or “standard”. 

Endless Support – Perfective Maintenance, Reality vs Expectation

Constant perfective maintenance strongly links to the previous issue that we highlighted and can also be connected to the failure in project planning. 

Customers with lower-end budgets when it comes to software development most frequently have the highest expectations, hoping to get a piece of software as perfected as Microsoft Word without the millions in investments, years of work or hundreds of developers. 

If a piece of software is not carefully planned and designed, the customer can and will request continual perfective maintenance to make adjustments to their software for free. As a software development company, the tricky part comes when you have to inform the customer that in fact, the software is how it was designed and that future changes will be billed further. This often faces considerable backlash from the customer that will insist that the software isn’t up to their expectations, not worth their investment or still needs lots of changes (that weren’t included in the initial specification). 

Our game continues…

As a training project for new starters we get them to work on a game where the objective is for a character (provisionally named Roland), to escape a mine which for excitement, is home to a prehistoric pterodactyl. The development is partitioned into two area, game mechanics and character modelling.

Two models have now been completed: the player character, and the enemy pterodactyl.

The player character

Below is both the player, animated as it will appear in game. The game is intended to be a modern take on an 80’s classic, so we want to initially appear to be 2D, but with the lighting and movement benefits we get from a 3D model.

The enemy!

Here is a screenshot of the pterodactyl in Blender with a coloured render.

Planning the pterodactyl movement…

The intention is that pterodactyl is to fly around the cave, protecting it’s eggs and hunting the game character (which it sees as a threat).

There are five external states for the pterodactyl :

  1. Sitting
  2. Walking / crawling
  3. Taking off
  4. Flying to destination
  5. Landing
The state transition diagram for the birds external states

It seems natural that a real bird would spend the majority of it’s time at the nest, only leaving it to hunt. Also, that it would prefer not to be in the air flying unless there was a reason to be. This might be modelled with two timers:

  1. Time spent away from the nest
  2. Time spent in the air without rest

It maybe realistic for the birds simulated intelligence to try to minimise both of these times.

The bird (internally) has five states:

  1. Guarding the nest
  2. Patrolling the cave (exploring)
  3. Aware that prey is close
  4. Actively hunting
  5. Returning to nest
The state transition diagram for the birds internal states

How, and when does the pterodactyl select a destination?

It seems reasonable to assume that the pterodactyl has to select a destination that is first in its line of site. We therefore have to determine what the line of site is.

IoT Development

So, you want to create an IoT Device?

At n-Coders we help companies to create Internet of Things devices, from proof of concept through to manufacture and post development maintenance, we can guide you through the journey beginning to end. We have a lot of experience when it comes to creating Internet of Things devices. With such devices the starting point can be a proof of concept prototype, and creating a prototype can be easy, but taking that prototype through to a commercial product is often challenging. Bad choices made early on can accumulate into an unmanageable amount of technical debt at the point you need it least, when the product becomes a success. All too often a Raspberry Pi is assumed to the best starting point, and it is excellent for prototyping but not always the best choice for a commercial product.

Step 1: Plan

What appears obvious at the start may not be the best solution, and the Agile development process does not always suit embedded projects. It is important to choose the technologies you will be using, time spent getting these technologies right can save a great deal of money in the future. Some of the questions you will need to answer are:

What are the price constraints on the system?

This question will drive everything as it will restrict the hardware available. If the price point of the final product is to be < £20 then there would little point in prototyping on a system that has a relatively fast processor and gigabytes of RAM. Should the price point be < £10 then we may be forced to have a very tightly integrated system.

What are the power constraints on the system?

This is something that is very important, but all too often overlooked. Some of the obvious questions are:

  • What is the power source?
  • How many different voltages are required, and at what current demands?
  • Will the power supply cope as you add more features?
  • Is the equipment required to work outdoors?

What networking technologies will be used?

By it’s nature an IoT device will be on the network, but again there are questions:

  • Will it be wireless?
  • What network range is required?
  • How will the system function when the network is lost?
  • Will it be possible to remotely upgrade the system?
  • Will it be possible to remotely login to the system?

The network technologies used can have a big impact on both cost and user experience, and therefore need to be carefully selected.

Will the system have a Graphical User Interface?

If the system has a web browser then the interface can be built using web technologies. The limitations here are browser compatibility issues and potentially speed. If the UI is required to be very quick and responsive then having it in a browser would not be the best choice, but if speed of development and flexibility is key, then a web browser would be attractive.

How will the system interface with peripherals?

The system may integrate with external displays, switches or sensors. The communication method will depend on factors such as data rates, distance between controller and device, and factors relating to the enviroment it’s in. Again, selecting the right communication technologies at the outset can make the system much more scalable in the future.

What are the real time performance requirements?

Real-time performance is something that is often assumed to happen with electronics, but is not always the case. If there are hard real time requirements on the system, such as the system must do something in under 20mS of an event happening, then a real-time operating system is required. These requirements should be established at the start of the project.

What are the memory requirements of the system?

In the case of a system being very low cost, there may only be 64K of memory available for code and data which maybe sufficient, but that is something that can only be established through careful planning. There is often a trade-off between amount of memory, performance and development effort.

How reliable does the system need to be?

Of course you want the system to be completely reliable and to never fail, but that can be difficult to achieve, especially as the system grows in complexity. If the system draws a lot of current then components can get hot leading to failure, and if the system has any form of disc for storing information then this can fail over time.

Step 2: Create a prototype

Choose the platform to prototype the system.

The Raspberry Pi is often the first choice for prototyping low cost internet enabled devices as it’s a small, low cost single board computer.

  • Easy to use
  • Ideal for when a graphical user interface is required
  • Supports a wide range of languages
  • Linux operating system
  • Lots of I/O
  • Very good networking support

However, because it’s so easy to start using, it can find it’s way into prototypes when it’s not the ideal solution. It’s relatively expensive and overkill for a lot of IoT projects. Not all projects can tolerate the relatively long startup time of the Pi, and a corrupted SD card can kill the system.

There are many variants of the Arduino board, and in many cases they are more suited to IoT projects than a Pi as the system is based around relatively simple micro-controller that is used for controlling the I/O.

  • Used for single program I/O control
  • Very simple to use
  • Low power

Don’t expect to be able to do much more than control I/O pins, but expansion boards can add lots of functionality.

PIC micro-controllers are an excellent choice for a lot of IoT projects. They are very low cost and have considerable built in functionality.

  • Low cost
  • Low power
  • Lots of inbuilt functionality

The PIC is a popular first choice for many projects, because of its low cost, capabilities, and the low effort required to put it into a commercial quality product.

Step 3: Start developing software

As with all software projects, getting the fundamentals including the architecture, build and deployment process right at the start can save a lot of time in the future.

Work Experience At n-Coders

A first week at n-Coders

I chose to come to n-Coders for work experience as I have had an interest in the production IT related products, such as software and games, for a large portion of my life.

The first project I was given was to make a simulator for a cardiowall where games could be easily designed and tested before being programmed into the real thing. Due to the fact that I had already had at least 2 years prior experience in games design, it wasn’t too difficult to start helping with the first stages of programming. After 2 days of of this, I moved to the making and animating of the objects which would be needed for the final product. This was a good experience as this is a skill I have never worked on seriously before, and it showed me the requirements necessary to produce assets which can be easily loaded into a game engine and then manipulated with code.

After we had finished that, I spent my last 3 days on a similar project. This was also meant to be a simulator which could be used to test games, but this time it was for a product designed exclusively for a trampoline park. This meant more modelling and the use of Unity’s physics engine. For this I was working only on the models, then the importing of them. The short time frame meant that this could not be finalized and polished unlike the previous project, but I did learn a lot more, again, about animations as well as the management of their different states and the textures for them.

Overall, the experience offered at n-Coders was very helpful. It gave a proper insight into how a commission in IT is made into a product, and how this is done in the industry. Everything I gained from this will definitely support me in the future when I, hopefully, have a profession in IT.

Intellectual Property & Bespoke Software

Intellectual Property & Software

This blog looks at Intellectual Property (IP) within software and its surrounding material. The discussion regarding software protection is vast and has been raging on for years, furthermore, the discussion of how to monetise this protection is not a simple one. In short if all the issues were to be looked at and explained in one blog, it would be a tome and so here we will introduce some of the concepts and issues only.

The problem with Intellectual Property and Software Protection

It is an issue that has been at the core of software production since its inception, how to protect what you or your Company has produced? What protection is available? What is to be achieved by protecting your software or even, should you even protect it?

All software production starts with an idea related to an effect to be achieved, whether it is to improve the integrity, efficiency or reliability of a process, to entertain or inform (such as with games and television), or to solve an issue between technologies. It is at this point when a design of a software solution begins and the creative process is undertaken.

Though it would be factually incorrect to say that IP is a modern concept, having a history reaching back as far as the infamous “Statute of Anne (Copyright Act 1710)”, It is correct to say that the management and exploitation of IP within commercial enterprise is a relatively modern idea. Indeed, as a concept it continues to inform an ever growing area of the legal system and commercial strategy. Though the most well known of IP discussions are dominated by Copyright cases (generally), the Patent and Trademark areas of law have grown significantly over the past 50 years and it is nestled between the protection afforded by Patents and those arising from Copyright that software sits.

Clearly it would be understood that the history of protecting software doesn’t stretch back much beyond the 1980s, but as software has seen its impact move from giant server-rooms and the single machines, to the palm of everyone’s hand, the growth in innovation and expression has been significant and therefore the need to protect IP has been increasingly presented.

Taking the broadest look at the forms of protection available for IP, they generally fall into the divisions of registered and unregistered rights with registered rights being those that must be claimed and assessed to be valid and unregistered rights arising from the creation of the works. Registered rights tend to be made up of Patents, Trademarks and Registered Design Rights, whereas unregistered rights subsist in Copyright.

Protection generally

Due to the nature of registered rights, it is often the case that they are simpler to enforce. This is because the concept being protected is clear, having been through a checking procedure before the right is allowed. With unregistered rights the question to whether an infringement of rights has taken place may need to be argued and the consequential expense can be high. Unfortunately it is within Copyright works where the most literal and common protection is realised for software as Copyright works are broken down (generally) into Literary, Dramatic, Musical and Artistic works, as well as Database Designs. All of which may form part of software.

Though it is important to recognise that the rights to unregistered works arise by the nature of their creation, registration may still be possible and may support future operations such as sale, assignment or litigation.    

Software and Protection

As previously stated, the protection for software falls within the bounds of both patents and copyright (though primarily copyright), though due to how the legal protection for IP was formed, the rights do not overlap.

A patent protects a realised idea, though the idea must me novel, inventive and have an industrial application to be considered able to be patented. Specifically excluded from the ability to obtain a patent, alongside mathematical methods and methods of doing business are computer programs, “as such”. Generally, this means that the written computer program cannot be protected by patent and is split out, however a patent is still potentially available where an idea is, realised using software.

The idea of excluding a computer program “as such” from patent protection is to prevent layers of protection over a single article and in this case the written code that forms the computer program is protected under Copyright law (see Copyright Designs and Patents Act 1988), specifically literary works, though will also cover the artistic works in the User Interface (UI), the Databases used (if any) and the supporting documentation. In this regard the Copyright arises as soon as the tests for Copyright in the UK are met, in that the article created is original (not copied) and the author has used some judgement or skill to create the article. Once the criteria is met, the right in the works is present and belongs to the author (unless assigned to another party such as through employment), this right protects the “whole or substantial part of the work” being copied (ignoring the legal exclusionary conditions e.g. experimentation, critic etc.), and absent the permission of the rights owner. The idea of infringement is extended to a person, whom, without the consent of the rights owner, imports or sells a copy of the protected article (where s/he knows or has reason to believe it is an infringing copy).

We are therefore presented with two ways to protect the works generated in software, we look for novel and inventive achievements that have a technical effect and we identify what literary or artistic works are present.

The Copyright born in the works from construction of the software design, the written code that forms the classes, the database arrangement (if one is used) and the images that make up the UI or the guides that explain how the software works, are but a few examples.

Commercialisation and points of Conflict  

The commercialisation of IP can be difficult and should always be considered carefully as it may not actually be where the value of the IP lies. It may be that the sale of the IP would cut your business off from future revenue streams, it may be a short term monetary gain that would cause your business additional effort in the future (for example through rework)? When the issues are considered, if there is still a desire to monetise IP, it can be done through the act of Licensing or by Sale.

Licensing generally falls into a contracted license, which will allow a party or parties to utilise the IP in question for an agreed period in either a sole, exclusive or non-exclusive capacity. Sole, as the name suggests, means that the person licensing the IP may be the only person to exploit the IP covered by the license, excluding the actual owner of the IP from any act that would be considered infringing (see CDPA 1988 S.60) from the date agreed in the license. An exclusive license allows the owner of the IP and the party named in the license the use of the IP covered in the license and, as the name suggests,  a non-exclusive license allows the IP to be used by a particular party but additional licenses may be issued to further parties. The sale of IP transfers the ownership and rights to the purchasing party, preventing the use of that IP without the new party’s permission.

The idea of sale and licensing is significant in software as, although licensing is fairly common in software the sale of IP in software refers to the materials that created the software, not simply the software itself.

This raises an important question of ownership in regards to software that is part of commissioned works. Surely if you produce software on behalf of a person or company, isn’t it theirs? Well, absent any declaration of the assignment of IP rights from the outset of working together, the answer is yes and no, it depends how you consider software.

In a field such as automotive production, if a consumer requested the construction of a bespoke car, they would naturally expect the car to be produced as they described and for them to drive off in their brand new car, but what about the Company who built the car? Can they build more of them to sell? Does the person who commissioned the car build get to take all the components of the design with their car? Does the fact that the person paid for a car to be produced, mean that they own the Intellectual Property behind the car? Well no is the short answer (absent assignment). The person in this case owns what was to be produced, they own the car.

The example above is somewhat of an oversimplification and gets more complex when discussing issues surrounding the assumption of or implied ownership. What thought was given to “what happens after” before the work of design and construction had taken place? Did the charge for the work seem fair for a one-off design or did the car manufacturer clearly price intending to acquire future revenue from the works? This of course does not impact the default legal position, but may inform an argument.

In software this is the same, the product is the software, but the source code and design materials are your factories, moulds, presses or robotic arms (to extend the analogy to breaking point). So, by not giving the IP away as part of a sale, significant portions can be reused later by helping to speeding up the instantiation of future functionality (building software repositories), the resale of the software or the provision of licenses.

Unlike the field of manufacture, the IP that arises in software can cause points of conflict as assumptions are often made absent the clear understanding of software boundaries. Therefore, it is the responsibility of all parties to understand their position from an IP perspective, make it clear to all parties, protect it and understand the consequential commercial impact, before entering into an engagement of works, especially where that engagement is lengthy.

ChatBots to Automate Business

Way back in 1986 when I was 10 years old, and the proud owner of an Amstrad CPC-464 I found a book in the local library on a computer program with listings called ‘Eliza’. It was an attempt to simulate a natural conversation with a computer. Whilst interesting, it definitely had its limitations, and whilst clever, it wasn’t intelligent because it couldn’t learn or adapt. It simply scanned the user input for keywords, potentially prioritising them, and constructing an output based on that input.

There is now a rapid transformation in the way computers interact with people, and more and more it is done with voice and natural language. With software integrations to chatbots, it’s possible to build powerful virtual assistants that can perform complex operations.

Building a chatbot

The first step is to choose a chatbot engine. The engine will do all of the hard work of parsing input, and understanding meaning and context. Also the engine will typically have a graphical interface to allow bots to be built without programming language (and ideally they wouldn’t be built by programmers!).

Popular Chatbot Engines
  1. IBM Watson
  2. Microsoft Bot Framework
  3. Facebook Messenger Platform

In this case, let’s use IBM Watson, but before we do it’s worth knowing some of the terminologies.

“Intent”: An Intent is what the user is trying to do. 
“Entity”: An Entity refers to something physical. 
“Dialog”: A response to the user based on recognised Intents and Entities. 
“Context”: A memory of what we are talking about. 
“Variable”: A way of holding and referring to information supplied by the user.

It’s also important to know what the purpose of your chatbot is going to be before you start to build it. It’s not going to be possible to build something that you can have a conversation with about anything, but it is certainly possible to make something that provides specialist help and information.

For this example, I am going to create a chatbot called Marvin that provides help and information to our customers with the aim that finds out what a customer is looking for, and provides them with high-level information and puts them in contact with the right person.

  1. Go to the IBM Watson Assistant IBM Watson Assistant page.
  2. Press ‘Create’ at the bottom of the page.
  3. Press the ‘Launch Tool’ button.
  4. Create a Workspace

I’ve already created one called Marvin, but IBM have provided an excellent example called “Customer Service Sample”.

There is a ‘try it out’ button in the top right of the page which opens a window that allows you to test the chatbot, and to retrain it if its responses are not quite right.

I created an number of Intents, that I thought people who are enquiring about our business would use.

In the case of careers, I have provided Watson with the following examples of what I think someone enquiring about a career with us might ask:

And configured the Dialog to prompt the user to send their CV when it detects a question about careers:

Now if we provide it with input it’s not seen before, but relating to careers, such as “What vacancies do you have at your company?”

We can see that it thinks I am asking about the company. So within this window i’ll retrain it to recognise it as a career enquiry.

And after the training has completed:

Now that we have built the chat bot, it remains to interface it with the outside world, so there is some technical work to do.

Setting up a chatbot server

As a starting point I have a fresh Ubuntu server with Python 3 installed. We want to make use of the various Watson API services, so we install:

pip install --upgrade watson-developer-cloud  

The following simple Python script will send the message ‘Hello’ to the Marvin chatbot, and display the JSON response.

from watson_developer_cloud import AssistantV1  
import json  
import os

# constants
WORKSPACE_ID = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'

assistant = AssistantV1(  
    username='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
    password='XXXXXXXXXXXX',
    version='2017-04-21')

assistant.set_http_config({'timeout': 100})

def processInput(input):  
    response = assistant.message(workspace_id=WORKSPACE_ID, input={'text': input})
    print(json.dumps(response, indent=2))

processInput('hello')  

After running it in the command line, the JSON response is:

  "entities": [],
  "intents": [
    {
      "confidence": 1,
      "intent": "Hello"
    }
  ],
  "output": {
    "text": [
      "Hi, i'm Marvin, what's your name?"
    ],
    "log_messages": [],
    "nodes_visited": [
      "node_1_xxxxxxxxxxxxxxxx",
      "handler_10_xxxxxxxxxxxxxxxx",
      "slot_8_xxxxxxxxxxxxxxxx"
    ]
  },
  "context": {
    "conversation_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "system": {
      "dialog_turn_counter": 1,
      "dialog_stack": [
        {
          "state": "in_progress",
          "dialog_node": "slot_8_xxxxxxxxxxxxxxx"
        }
      ],
      "_node_output_map": {},
      "dialog_request_counter": 1
    }
  },
  "input": {
    "text": "hello"
  }
}

Whilst I’m sure that all of this information is useful, right now I am only interested in the output. So I’m going to change the processInput function to just return the text response.

def processInput(input):  
    response = assistant.message(workspace_id=WORKSPACE_ID, input={'text': input})
    return response['output']['text']

So nearly there, the final step is to integrate this with a slackbot. 
The first step here is to configure a Slackbot within Slack. That is done here.

Make a note of the Bot User OAuth Access Token. We will need that later. 

Now we have a Slackbot, the next job is to write some code that links it to our Watson chatbot.

The official slackclient API helper library built by Slack can be used to send and receive messages from a Slack channel. Install the slackclient library with the pip command:

pip install slackclient  

The following Python script communicates with the chatbot via the Slack RTM (real-time messaging) API.

import os  
import time  
import re  
from slackclient import SlackClient

# instantiate Slack client
slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN'))  
# starterbot's user ID in Slack: value is assigned after the bot starts up
starterbot_id = None

# constants
RTM_READ_DELAY = 1 # 1 second delay between reading from RTM  
EXAMPLE_COMMAND = "do"  
MENTION_REGEX = "^<@(|[WU].+?)>(.*)"

def parse_bot_commands(slack_events):  
    """
        Parses a list of events coming from the Slack RTM API to find bot commands.
        If a bot command is found, this function returns a tuple of command and channel.
        If its not found, then this function returns None, None.
    """
    for event in slack_events:
        if event["type"] == "message" and not "subtype" in event:
            user_id, message = parse_direct_mention(event["text"])
            if user_id == starterbot_id:
                return message, event["channel"]
    return None, None

def parse_direct_mention(message_text):  
    """
        Finds a direct mention (a mention that is at the beginning) in message text
        and returns the user ID which was mentioned. If there is no direct mention, returns None
    """
    matches = re.search(MENTION_REGEX, message_text)
    # the first group contains the username, the second group contains the remaining message
    return (matches.group(1), matches.group(2).strip()) if matches else (None, None)

def handle_command(command, channel):  
    """
        Executes bot command if the command is known
    """
    # Default response is help text for the user
    default_response = "Not sure what you mean. Try *{}*.".format(EXAMPLE_COMMAND)

    # Finds and executes the given command, filling in response
    response = None
    # This is where you start to implement more commands!
    if command.startswith(EXAMPLE_COMMAND):
        response = "Sure...write some more code then I can do that!"

    # Sends the response back to the channel
    slack_client.api_call(
        "chat.postMessage",
        channel=channel,
        text=response or default_response
    )

And then it’s just a matter of merging the two scripts! 
Testing is very easy because it’s just a matter of talking to Marvin via Slack.

Next Steps

Marvin the support chatbot at the moment is just a quick proof of concept. Much more fleshing out is required in the areas of context recognition and integrating with the rest of our systems. It does however show how quickly useful chatbots can be built!

What makes a good software developer?

At n-Coders we are always looking for top quality software developers to complement our existing team.

So what makes a good software developer?

Creative problem solving

People that take pride in their work are more likely to get the buzz of satisfaction when they solve a challenging problem, perhaps creatively thinking outside the box to find an elegant solution. A benefit is that an efficient piece of functionality can be reused between products to make them all consistent and benefit from the improvements.

Attention to detail

A good software developer will carefully consider the details as well as the big picture. The ability to forsee problems that might occur in the future or spot issues early on results in less back-tracking to correct these issues and improved quality. This quality will show through from seamless deployment of the application through to the user experience. With a proven software development process in place, developers can work more efficiently and have confidence that their code is robust and reliable.

Flexibility

Having the ability to quickly learn new systems and switch between languages is very valuable for companies who may have many simultaneous projects in development at any time (we especially like the Yii framework, and PHP, C#, and Javascript langauges). Each day may bring new opportunities to learn!

Communication skills

Where there are close relationships with clients, a good software developer needs strong written and verbal communication skills. These can bring huge benefits to both the career development of the developer and the quality of the software they produce. Communication skills also aid in knowledge transfer, building the overall skill level of the team.

Software developers at n-Coders get the chance to be involved with the client during the entire lifecycle of a project, from requirements definition to deployment, and this improves understanding of the business needs of the client.

Are you a good developer?

Software development is creative and logical; to some it is an art, to some it’s engineering! A good software developer balances these two aspects; the engineering process and the discipline to follow it is essential to produce quality software on a timescale, as well as the creativity to solve problems and adapt to different languages and projects easily.

If you consider yourself a good developer, why not join n-Coders and have the opportunity to work on a wide range of bespoke software applications? For more information, call: 01209 705160.

Augmented Reality Updates

With recent news about the Microsoft HoloLens which was released back in March, progression is being made rapidly within the holographic world. Previous products such as the HTC VIVE, Samsung Gear, Google Cardboard (More on that later) and the Oculus Rift have been recently outshone by Microsoft, which creates speculation that they are all going to have to kick start their VR programs to get the lead in soon to be VR Headset Wars. 

Projects from smaller companies are always continuing. However, the tech giants behind these products are almost certainly going to be expanding their research over the following years to ensure that if you buy a VR Headset, it is their product you pick up. With these advancements, comes a lot more possibilities and opportunities to make applications to run on them. Currently, existing programs are being ported to these gadgets, with new creators soon jumping on the band waggon to join in.

The Microsoft HoloLens, even though has a limited field of view, and the development version costs $3,000, has what others don’t, almost perfect tracking. During the development, Microsoft focused primarily on getting the tracking as close to perfect as possible, and this makes up for the fact that it lacks a few features, and that it is a lot more pricey than it’s competitors. Microsoft has also has created some pretty neat features, such as, you can open a browser tab, and leave it in a particular place in the room for you to come back to later, which can majorly increase multitasking and organisation.

Google Cardboard, isn’t technically a VR Headset, as all you are doing is placing your phone in some cardboard. Nevertheless, if you want to get an experience of what VR could be like or want to have some fun, the Google Cardboard would be a nice cheap gift.

So, what does the development of these VR products mean for the business world? Currently, these products are just delightful fun gifts for family members and colleagues to mess around with. The progress over the last year in the field indicates that it may not be too long though until these headsets are being mass produced for companies and individuals to use in everyday life.

Presently, a large section of the industry is gaming; you can’t escape it if you are on the internet. Gaming is a huge part of the web, which is why game developers jumped at the chance to create games for these virtual reality environments. Pair that with the bonus that YouTube Content Creators showcase these games, it allows these companies to get a tremendous amount of feedback and publicity very quickly, which will lead to better quality games for the future when a larger number of people own one. Here at n-Coders, we don’t tend to develop game applications, but things can always change, only time will tell with the continuation of evolution. Playstation accepted change, and developed a headset for their console, making their games more immersive.

Other applications include Google Street View (just imagine being able to explore a city from your living room!), classroom activities, vehicle dealership showcases from your home, and of course activity emulation. People can use motion, sound and touch to trick people into thinking, and feeling; they are actually in the place being shown to them. Projects are currently being run where you can feel that you can fly like a bird, drive a car around a rally course and cycle or ski around mountains.

With development libraries being created by companies to allow the development of games, apps and video creation, but not general applications or programs, there isn’t the ability to be able to jump in instantly to create software for these devices. VR Headsets are, for the present, mainly targeted at the gaming community and the VR travel industry. Shortly, however, expect to see libraries being released for program development, which will allow companies, like ourselves to be able to create software for these products with ease. Just imagine having a business panel which you can control every aspect of your business from just one place – billing, invoicing, product monitoring and customer support – which you can either take with you on the go or put somewhere in the room to come back to. You could set up a wall in your office to monitor every aspect of your business at a glance, or turn your desk into a Sci-Fi control panel to manage factory robots.

This could mean a whole new chapter to n-Coders, developing VR applications. The possibilities for programs in VR are endless, but won’t be for a few years to come. The progression of the industry is expanding and growing daily, so the technology for these applications become more and more advanced.

Thank you very much for reading, stay posted for more content soon!