Keep it simple!

Lorenzo Piombini
3 min readOct 31, 2020

I have been working on a project lately and I have taken some time to understand every topic that the project was about. I often want to challenge myself and do more than what I actually know, and I honestly think it is a really good practice to learn new topics and fix them in your brain, HOWEVER, I always exaggerate with this exercise and I find myself in troubles try to understand how to fix some bugs in my code created from code snips that I didn’t really understand in the very first place.

a piece of advice …

Since maybe you are like me and you are surfing the web looking into new info and data to improve faster and faster and getting better at writing code, there are really lots of articles and tons of good code examples out there, but I recommend you not to rush the learning process with something crazy, and learn step by step because every small things matters and sometimes it is all about a comma or a semicolon in the wrong place or missing, and the code is broken !I am writing this short article because I have been making this type of mistake since forever. DO NOT WASTE YOUR TIME IN DOING SO ! The Learning process is slow and long, even painful.

must have a teacher…

I though I could do it alone. I am going to learn by myself because I used to code 10 years ago in school. WRONG, you have to have a teacher who helps you when you get stuck with some topic within a particular subject. You can’t do it by your self. If you could join a community of developers, it helps too. you will receive advices from students like you of course more acknowledge than you, but that is totally okay because you are in the learning process and it is so helpful having people around who know more than you.

dive into the things you discover here and there…

In my project I wanted to put an automatic function defining a background color based on the average color of an Image:

see that Shoe ? I though: let’s calculate the average color and put a background color behind it accordingly. I had to do my research and how to implement this in my app. You have to get a pixel position within the image and then find the color in a Red Green Blue format. You will start work with CGFloat and Integer with pretty big numbers, and as you probably know working with Integers is “dangerous”, you will probably get an overflow error and your app will crash. As you noticed already, everything is getting smoky and complex, and this kind of function was not one of the requirements for the assignment. I am staring to understand the importance of know what you are doing and understand everything , on the other hand I have read more about Objective-C and I am understanding more about Swift too, and this is good because you broaden your knowledge, but my suggestion is KEEP IT SIMPLE, and develop the key points of the assignment or your project before, in this one, for instance, there were lots of new interesting topics, like working with dynamic data and Table View, Collection View, and they have their hard things to be understood.

keep it simple and do not rush the process!

Lorenzo Piombini

--

--