Johan Broddfelt
/* Comments on code */
Donate $

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.

Quick response

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.

Programming languages

Even though I'm quite strong in php, this is not my first language and not my last either, i guess. I will encourage you to look at as many languages you can to find one that suits you best. On this page I will mainly write about php and javascript. Then I will also tell you about another platform I use for building business applications, and that is DataFlex. DataFlex has inspired me a lot when I was building my php framework and now that the DataFlex developers at DataAccess has created a really great tool for building web and mobile applications, I will spend more time on that platform as well. So you will probably get some posts about that as well. When creating reports and dashboards to manipulate information I use Dynamic AI and while preparing the data to be processed in those reports it is good to be strong in SQL. So you might also look forward to some of that.

But now it is time to end this post. We have a lot of ground to cover so let's continue.

- Programming, Developer, Thoughts

Offline Web Application >>


Mail (Not public)
Send mail uppdates on new comments


0 post found