Philosophy of a programmer
Goal of this site
Welcome to my website. It feels a bit like a blog and I guess it looks like a blog, but my goal is actually to build an education platform. The main goal is that it should be easy to find interesting and inspiring articles. Not only should you be able to learn something new but this is my notebook where I'll keep my best work so I can easily find it. I expect that if I do something I like and i feel it is accessible then I guess you will to.
My philosophy on code
I use to say that if I have to write the same code a third time in a project. Then it is time to get it out and write it in one good place so it can be reused. As you might already have noticed, I have taken this to an extreme in my framework in my previous posts. But this has also enabled me to write large application that today run in all from universities, small local businesses but also as strategic applications in global brands. And until last year I was the only developer on the team. So if you let the code do the most of the work you can free up a lot development time and focus on the fun parts and creating real value for your customers.
Another thing that is well worth noting is that if you have fewer lines of code and a lot of code reuse, there are not as many things that can go wrong. And when, because things do go wrong, your code goes south. You'll be happy you do not have to correct the same code in 10 locations in your application and secure that it does not break something else while your at it.
Since I'm using a standardized way to write my code, it is also very easy to remember how to debug. All code have the exact same structure. So it takes me only about a couple of minutes to find any error in the code. Even if I have not been working on the application for a year.
Another nice feature I use in all my applications, is the error log. This uses some standard features of php. But I have modified it, so if there is an error, either in the code, in an sql-query or I have added a watcher somewhere in the code that gets triggered. I will receive a mail containing information about the error, the url, the user, browser, ip, timestamp and most important, a complete trace dump so I can go directly into the right file on the exact line were the error occurred and fix it in an instant. Did you know that most users do not report errors if they do not really need to use that feature, the work around it and or avoid to use that part of the application and hope that someone else will report it. Then it is nice to just send an email to the users and inform them that the bug has been fixed. Before they even got to reporting it. That is quality of service. You will also catch hackers that try to tinker with your system at an early point so that you can follow their attempts and stop them in their tracks.
But now it is time to end this post. We have a lot of ground to cover so let's continue.
- Programming, Developer, Thoughts