My code is… hard to understand???

Hey everyone,

Ever had this one time when a person comes on a project and merges in your code, but at the same time he or she doesn’t exactly understand why something is written that way?

For example, you’re preserving a variable to use it in other methods since only one method gives you some parameter that you can use?

To an extent, we all do it all the time. However, it has to be done with good purpose. Otherwise if there’s no point, then don’t do something that’s extra and unnecessary.

It’s fine to make quick fixes, but at the same time minimize with diverging what an API gives you out of the box.

Therefore, being smart about doing something is not enough to go about solving problems. If there’s a way to do it via an API, then it should be done that way.

I’ve been told times that things should be done the way they need to be done, and the constraint should follow with the system.

Another example: there’s an Android design that you’ve been given, however it is not something viable via the Material Design guidelines.

Just like Apple, Google will frown upon doing something entirely outside of the specs given. Therefore, if you want your app to be featured, then make sure it is strictly within specs.

People who have iOS experience strictly enforce the rule of following the specs, and therefore coming to Android they’ll follow what is given in its API at the same time.

This makes sense for the next developer to also follow along with your code so that everybody can be productive at the same time.

I’m not saying don’t make the app outside of the specs if there’s some difference of about 15%. There are exceptions to this rule, but if you’re out of bounds, then it’s best to start rethinking how you’re writing your app.

That’s all I have and I hope this helped you to write something better. Leave comments below for questions or suggestions.

Until next time!

Brian.