DEV Community

Cover image for Lessons Learned In Building A Small Project
David Dante Frank
David Dante Frank

Posted on

Lessons Learned In Building A Small Project

So I realized that I didn't grasp a lot concepts when learning PHP and programming in general and part of that was not learning to build some projects and little apps that help you grab the basics. I just run towards a big project or something. It took a failed interview for me to realize that I had to go back to the drawing board, a lot of things I figured I needed to learn how to do right. One of them is also blogging, hence I'm writing this article.

I started out by just going through the basics again and this time with PHP where I decided to build a simple calculator after following an exercise and no, I did not do a code along. When using tutorials to learn, it's important that you try to do what you have learnt without the assistance of the instructor and repeat out loud to your self the reason why each piece of code exists. You must be able to explain your code to yourself first before you able to explain it to someone else.

In this particular pet project, I built a simple calculator in PHP to understand how to use Object Oriented Programming and not just have it as a concept in my head. So even in my sleep, I think I can code it all over again, at least redid the whole thing twice. Initially, I never knew you could write a piece of code to auto load your classes and that was one key thing I learnt today.

Alt Text

Also understanding the difference between the object properties and the parameters __construct function was quite important as one can tend to confuse both, especially when they have the same naming.

Alt Text

All in, it was a good day for me. Dropped a tweet as well on what I achieved for today using the #100DaysOfCode on Twitter. It helps to keep you committed.

Hope you enjoyed this article and if it's worth your time and you can check out my code and leave a feedback. Thank you.

GitHub logo DanteFrank / Calculator-OPPP

Simple Calculator built using OOP in PHP

Calculator-OPPP

Simple Calculator built using OOP in PHP.

This is basically to help understand the concepts of Object Oriented Programming In PHP and how to auto load classes.




Top comments (0)