Archive for the ‘Applications’ Category
Coding standard, coding style
In Orange Bus we have been looking at our coding style lately. We have created our very own coding standard. Since we base most of our applications on the drupal we chose to use the drupal coding standard as our main source of inspiration.
During our process of creating this coding standard we found a few good links I thought we should share.
Mike @ Orange Bus found these two articles about beautiful and practical code, both these are a must read:
http://www.wilshipley.com/blog/2007/05/pimp-my-code-part-14-be-inflexible.html
http://www.perforce.com/perforce/papers/prettycode.html
Another blog post about line density worth reading is:
All frameworks sucks…. ?
I’ve been hearing this a lot lately, that most framework sucks, well do they?
Mr. Paul M. Jones has a really good article about the subject, he says that when a developer has to do a major change in his mindset and development routines to get used to a new framework, the developer often think that the “framework sucks”.
Personally I’ve been the kind of developer who like to write my own frameworks from scratch, and yes that also mean that I’ve written a couple of frameworks for myself, and threw them away. Since I like to write things from the scratch I’ve also been a bit critical to other frameworks,and I do understand term “all frameworks sucks”. When you’ve written your own framework, you know how it works, and it works just the way you want it to, at least that was the goal of writing it in the first place. It also gives you the possibility to change or add functionality in the core of the framework rather easily.
The advantages with a “off the shelf” framework can sometimes be intriguing, with a little bit of effort you can become darn efficent with this kind of framework, that will of course require a bit from the developer to learn the framework. Another bonus about learning a new framework is that you pick up on some of the bright ideas the developers have implemented in their framework.
I do not think that all frameworks sucks but, there are some frameworks out there that do not match my mindset at all, there is no secret that I’m not a huge fan of large enterprise frameworks with a wide extent of xml files and structures (I’m not naming any names, but the Java world have a few of these). Why on earth would you need to define a new page in three different xml files to get it working?
I’ve heard a lot about Code Ignitor and it sounds like a promising framework, I have not had the time to have a look at it yet. I am familiar with the Zend framework and EZ components which probably are more of a set of building bricks than frameworks, both of these are quite good and comfortable to work with.
Recently I’ve started to look at the Drupal. I realize that Drupal is more of a content management system than a framework, but it has its similarities to a framework. So far I still think Drupal “sucks”
but I do however like the simplicity of writing modules. What I do not like at all is the “lack” of OOP, and yes I know Drupal have its own way of implementing OOP, but I still feels thats is a little bit awkward, I am a bit of a OOP junkie ![]()
Anyway I see the potential of Drupal and look forward to getting to know it better. I believe I eventually will like Drupal because it is easy to extend, you get a lot of stuff for free because someone has already written it for you and it is a big community around it with a lot of smart developers. There is probably a reason why Drupal is one of the largest PHP framework out there.
I’m on skype
The title says it all, I’m on skype, my username is: kristianlunde.
That’s about it for now.
EOF.
New layout, again ;)
I’ve not been completely satisfied with my previous wordpress theme, it worked okay but it took a lot of dead space on the top (approx 300px). I have been looking at other themes for a while now and today I found one I liked a lot, it is called journalist and is created by Lucian E. Marin.
Have a look at his wordpress themes at: http://lucianmarin.com/page/themes/.
BTW: I added a twitter widget on the site to day as well (widget name: Twitter tools).
I’m on twitter
I’m on twitter, http://twitter.com/kristianlunde.
I’d never thought I would go and create an account on twitter but there I am with a brand new twitter account.
I will be posting on twitter next week when I visit Newcastle (UK) if I get my phone number registered on twitter during the weekend, twitter seem to have some problems accepting Norwegian phone numbers today.
Templating with Eclipse
Today I came over a a post on dzone.com about Eclipse and templating. It turns out that you can write small templates of code snippets you use a lot and bind them to a keyword. When typing the keyword, press “ctrl” and “space” and a list of possible templates available will appear, select the prefered template, press “enter” and the code snippet is inserted into your working code. I works just the same way code completion. This actually means that you do not have to write the boring “for” loops or “if” tests anymore, just write a template and become a more efficient developer.
The original post explains how to set up templates, so I will not go into that in this post, but since I am primarily a PHP developer and the post describes templating for Java, I’ll just give a description of where to go if you use the PHPEclipse.
To edit and create templates for PHP, HTML or css, even javascript you have to use this path:
window -> preferences -> PHPeclipse Web Development -> PHP -> Templates.
To write and edit the templates, just follow the guidelines from Mr. Graversen, or have a look at the links below.
For further reading have a look these sites.
- http://firstclassthoughts.co.uk/java/eclipse_tip_templates_public_static_final.html
- http://www.phpeclipse.de/tiki-index.php?page=Howto+use+the+templates+system
- http://help.eclipse.org/help21/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/ctemplates.htm
I guess if I had read the PHPEclipse manual when I first started using Eclipse, I would probably been using it from the start
Good luck with your Eclipse templates, I know I will be using them extensively.
Wordpress 2.6 installed
Wordpress 2.6 was released the other day, and today I took the chance on upgrading from 2.5.1. The installation went without trouble, but when I came to log on to the admin panel I got a:
"403 Forbidden"
A quick google search gave me the solution for this problem. Earlier you logged in by typing:
http://someurl.com/wp-admin
In wordpress 2.6 you should use:
http://someurl.com/wp-login.php
.
I have not got around to test all the new functionality in wordpress 2.6, but so far the new features seems cool, at least the automatic update of plugins was particularly neat
whoisi.com
John Resig posted a note on his blog about whoisi.com, a social network aggregator. The system is ingeniously simple, do a search for the name you are looking for, I did a search for myself :P.
All similar names are listed, if the name is not listed, just add it. To each name you can attach a bunch of links, as for instance facebook, twitter, linkedIn, blogs and so on. Everyone has the possibility to add a person and attach a links.
My page on http://whoisi.com/p/1383