Jumping into another developer’s code can sometimes be daunting, but it’s a whole new ball game when that code no longer looks or behaves like native code. How does this happen and what can we do to minimise this?
Can you still call a Ferrari a Ferrari if the only original piece left of the car is the badge? I’d argue you can’t as what makes a car isn’t the badge but everything that was used to build the car. The same goes for development and native development specifically.
So, what is native development?
There are a few descriptions for native development depending on your background but they all mostly come down to one of the following.
- Native development is a system that is developed using the coding language native to the system you’re developing it for.
- Native development is a system that is built for only one platform.
So, using a car as an example; they are made up of a few core parts. The engine, chassis, wheels, gearbox, interior, etc. We have the same concept for development, we have frameworks, user interface layouts and then all of the main code (Classes, views, services and more). So if we start to replace these core concepts with non-native code or concepts then we’re fundamentally changing the concept of native development. This comes along with a few implications.
Using third-parties to do things that the original can’t or won’t do easily is almost always necessary. Using existing frameworks is necessary for many projects because of the specialised nature of integrating with third-party sources, but there is always a limit on the number of third party integrations you can add to your system before it becomes hard to follow. If you Frankenstein your project together with frameworks from all over, the project you’re creating will no longer be ‘native’. Developers will not only need to be native developers, they will also need to know how to use all of the frameworks that have been used which is a challenge in itself.
Youtube can fix everything
No one knows how to do everything, but there’s a big difference in understanding what’s going on and just blindly following someone’s instructions. Using other peoples code is a massive pitfall, to copy and paste someone’s code without actually understanding what it’s doing and tailoring it to your own code is all too common. Often people will use someone’s code but not alter it to work for their own project. This type of code adds up very quickly and even more so when it comes to making changes to the code or tweaking it to your requirements.
So, if you’re continually adding somebody else’s code to your project, and that code doesn’t match up with your system, then how do you know what it’s doing? How will you know where to make the required changes? Yes, this is still native development but it lacks structure, it’s akin to getting your mate to fix your Ferrari rather than a certified Ferrari mechanic.
Next, there is the structure and recommended practices and frameworks that are available for all development on a platform. This means that anyone picking up the code knows the general structure of the code and where most things can be found. If you start messing with this and not following the coding guidelines set out by the development platform then you’re getting into custom territory that once again requires extensive research and learning to even begin working on. If you take your Ferrari to a mechanic after modifying the chassis, they may not even be able to work with it.
Messy work and an untuned machine
Having code that does nothing or repeats the same thing multiple times is a nightmare for others to understand. Imagine opening the hood of a car to be present with a tangled mess of wires and pipes with no rhyme or reason. Then turning that car on and it sounds like it’s about to break down. We need to keep things tidy and easy to read. We also need to make sure that what’s been written is efficient in what it does and doesn’t waste valuable resources that would be better used elsewhere.
Is it still native coding or can you say that it was coded in a specific language when there’s nothing left of the original language due to all the plugins, modules and repositories added to the project? If you need to be specifically taught in all of those new pieces of work to even begin development then you probably have a Frankenstein on your hands.
Want more like this?
Check out David’s other blogs for more inside development knowledge!