Php & Blog Tips...

40 signs you really are a lousy PHP programmer

This is something I prefer to call my "programming list of shame". Although having a formal university education with courses on software engineering, enterprise software architecture & database design I have been guilty of every single one of those things at one time or another. This is completely subjective & Eclipse oriented
You are a lousy PHP programmer if you..
1. don't comment your code properly with something like phpDoc
2. don't see the need and/or benefits of a good programming IDE like Zend Studio or Eclipse PDT
3. have never used some form of version control like Subclipse
4. don't adopt some coding & naming standards and general conventions and stick to to them at least throughout the project
5. don't use a consistent methodology
6. don't escape and/or validate properly input or sql queries
7. don't plan your application thoroughly before starting to code
8. don't use test-driven development
9. don't program & test with error reporting on
10. don't see the benefits of a debugger
11. don't refactor your code
12. don't keep the different layers seperated using something like MVC
13. don't know what these stand for: KISS, DRY, MVC, OOP, REST
14. don't return content but echo or print it from your functions or classes
15. have never seen the advantage of unit tests or testing in general
16. return HTML, not data, strings, or objects.
17. hard code messages and configuration parameters
18. don't optimize your sql queries
19. don't use __autoload
20. don't allow intelligent error handling
21. use $_GET instead of $_POST for any destructive actions
22. don't know how to use regular expressions
23. you've never heard of sql injection or cross-site scripting
24. don't allow simple configuration, can be parameters passed to a class’s constructor, set/get methods called later, or constants defined at a runtime.
25. don't understand the benefits and limitations of Object Oriented Programming
26. misuse OOP / everything you write , no matter how small is OOP
27. you think reusable software equals/requires your code to be OOP
28. don't choose intelligent defaults
29. don't have one single configuration file
30. don't want the file contents to be seen, but give it a .inc extension instead of .php
31. don't use a database abstraction layer
32. don't keep it DRY, Don't repeat yourself. If you have to copy and paste or duplicate something your design may be off.
33. don't make a function/class/method do just one thing and don't make them interact.
34. don't try to take advantage of OOP specific features like abstract/interface classes, inheritage polymorphism & access modifiers.
35. don't optimize your application design with established design patterns
36. don't allow your user to define a base directory if you have multiple files and/or directories
37. pollute the global namespace, one option is to prefix the functions in your library with a common string
38. don't allow a table prefix when using database tables
39. use a separate template engine
40. don't take a look at established php frameworks for inspiration, most of them have advanced web dev concepts and good code


Twenty2 idea for Blogging Success

Last week I wrote about the habit of blogging. There I discussed about habits in general and how they fit into blogging, why gaining the habit of blogging is very important and finally how to eventually grow it. I’d like to think of the respective post as more of a initiation piece, for today’s article, in which I plan to lay down quite a few habits that make a blogger more effective, efficient, intelligent, interesting and well, let’s just say they kinda mark the difference between regular bloggers and, what’s commonly known as, “probloggers.”

I won’t limit the list to only habits, though. In it you’ll also find characteristics and traits, that highly prolific bloggers posses and which we all should strive to adopt.
1. Frequent posting: One of my main advice towards forming the habit of blogging is making and religiously keeping a posting schedule for your blog. Writing often is essential for any blog’s development, as it will keep readers coming back, asking for more, but sadly it also can be a source of stress. Here at LOAB, I post around a post a week. That’s very rare, I have to admit, people have even e-mailed me asking if I could step up my frequency. Thing is I, and you should too, don’t like to post just for the sake of updating daily. If you feel like you have nothing of value to add to your blog or conversation, it’s better to “shut it,” but doesn’t mean you should stretch your sack too long with the posting frequency either. A good blogger has to provide good, original and remarkable content on a regular basis.
2. Proactivity: Things don’t just happen. You have to take matters into your own hand and act. Thinking, planning, brainstorming isn’t enough, you also have to apply. A good blogger is always in control, adapting and managing according to his surrounding environment and is one step ahead of the game.
3. Personal touch: Probably the main reason why blogs have taken off so well, over the yeas, is its high level of connectivity between the author and the readers. You see blogs are meant to be personal, after all they’re considered by many “online journals.” If you strip that away, you’ll find that your blog isn’t a blog anymore. Don’t write in a corporate, over newsy manner, because then you’ll readers won’t feel any sentiment of connectivity. Why should people read your blog and not their local newspaper? True, there’s nothing wrong with objectivity, actually I often encourage it, but subjectivity should never be neglected by a blogger. Give your blog a voice otherwise you’ll loose a lot of edge.
4. Commenting: Now this is a habit that took me a lot of time to form. Anyone that knows a bit how to make his way around a blog, will tell you that commenting is one of the most effective ways to publicize, create awareness and brand your blog, as well as a great way to network and interact with fellow bloggers. Still even when faced with such tremendous rewards, people still refrain from comment; the most often encountered reason being laziness. Here’s how I do it: whenever I read anything interesting on a blog, I leave a helpful comment, in which I share my thoughts on the subject, adding further value to the article and discussion. I try to go tell myself “hey dude, if you took the time to read it, might as well leave a comment too. You know, show your appreciation.”
5. Patience: Blogging is never easy. It requires consistency, determination and a heck load of patience. If you’re a more rushy individual you’ll probably find blogging not to your liking. A blog needs, in general, about 6 months to establish an audience and a loyal following, essential for its development. It’s especially difficult in the beginning when it feels like your writing solely for yourself and no one’s listening. Building a successful and balanced blogs, thus, requires lots and lots of patience.
6. Usefulness: I’ve made it clear more then once in my posts, that writing valuable and remarkable articles is the out most importance for establishing your blog and your blogging persona. What defines a valuable post is debatable, but I like to think that the value of a post lyes not in the words itself, but in the ideas on which it’s centered. If a reader gains the smallest amount of knowledge or skill after reading a post, then that’s a valuable blog post right there. The easiest way to attain this level is by being helpful. Put yourself in your visitor’s shoes and try to understand what they want and then give it to them. Plain and simple.
7. Linking: Now this is something really bugs me. I’m talking about people not linking nearly enough. It’s simple folks mention it, link it. It’s not like your paying money right from under your pocket or you’re making a superhuman effort. It only take a few dozen seconds of your life to link to someone’s blog and it won’t cost you a think. On the contrary there’s only benefits. The respective linked blogger might for say return the favor and link back on the next occasion, also you’ll be able to form stronger bonds with fellow like-minded bloggers. You shouldn’t limit yourself to exclusively outerlinking as well, but rather when the occasion arises link to a previous, relevant article from your own blog.
8. Progression: Times are changing, but few environments are so volatile and unpredictable as the online one. Just think about what opportunities and services have died off or popped up over the course of the last few years. A few years ago the web 2.0 was more or less inexistent, now look how much it’s grown. Or take SEO (search engine optimization) as another example; over the last few years it has changed dramatically, becoming more and more social, splitting into conventional SEO and web 2.0 SEO. By working in the online environment you should make a priority out of keeping up with the latest trends, new services and news on the web. Whenever you get an idea, no matter how stupid it may seem, try it out. There’s never too much originality in the world.
9. Diversity: It’s a well known fact, which I don’t have to detail, that focusing upon a niche is highly important, but if you know how to properly diversify your content, you’ll be able to avoid boredom and entertain your readers. Read newspapers, magazines, watch TV, listen to the radio, go for a walk and pay attention to everything around you. Soon enough you’ll get inspired. All things are connected one way or the other, you just have to know where to fill the dots. Take Brian Clark from Copyblogger, as an example. Brian has a ton of posts in which he masterfully combined blogging, copyright and music together, in one eclectic mix.
10. Advance writing: Skellie says her #1 tp for creating better content, is writing posts in advance and frankly I agree 100%. Writing in advance is a habit that’s been very hard to grow and maintain, but when it finally settled in, it eased my life as a blogger tenfold. When you have posts already written, you’re spared from the pressure of deadlines and can then blog without any kind of restrain. Read Skellie’s post for more reasons why advance posting rocks! Remember: forward thinkers are always a step ahead of the competition.
11. Proofreading: Mistakes are a normal thing, part of our human nature and of the process of learning. If we didn’t make mistakes we’d be machines, but let’s try to thin them as much as possible. I’m talking about proofreading. It’s highly likely that, right after you’ve finished writing an article, it contains grammar, punctuation or linguistic errors. Some are more obvious then the other, but nonetheless the important thing to keep in mind is to always read your post, at least once, before publishing it. It’s really embarrassing when you make nobrainer grammar mistakes, that could turn an other wise interesting article, into a difficult, unattractive read. Being a non-native English speaker, this has been a lesson I had to learn the hard way, along the years.
12. Notes: Writing down ideas, concepts and pointers has been one of the most helpful and rewarding activity for my blogging endeavors. When your in the business of regularly producing original and thought provoking content, trust me, you need all the inspiration you can get. During a particular day your mind could be invaded with hundreads of ideas, the majority of which, however, get blocked by your subconscious. God only knows how many great ideas, not only web based, struck my mind during a heart beat, but just as well vanished, because I simply couldn’t remember them. I’ve learned my lesson though and now whenever I get an interesting idea in mind, I quickly pull out my phone and start taking notes. Some prefer taking notes on paper, others just make a representative sign on their palm, use whatever method your most comfortable with, as long as you write it down!
13. Rest: Earning a living out of the internet, especially blogging, is a though business. Personally, I’ve had days in which I worked for as long as 12-16 hours. I only managed to work so long and hard because I love what I do, but no matter how much I love my job, it can be extremely tiresome. Knowing when to rest is extremely important and crucial for your productivity as a blogger.

14. Humor: Like I said, blogging from a personal, subjective perspective is highly important for establishing a relationship and sense of well being with your readers. If you manage to add a bit of humor and wit into your writing, then you’ll be able to captivate, entertain and leave your readers asking for more. Everybody’s got a sense of humor, it’s only up to you to decide on how exactly to materialize it online.
15. Persuasion. All good bloggers know how to master the art of persuasion. They know how to write and interact with people in such a manner, that they manage to influence the readers in way or the other. Learning how to be persuasive is important if you want your voice to be felt, however persuasion shouldn’t be confused with manipulation. They’re two very different things. If you want a more in-depth documentation on the subject, I’d definitely recommend Robert Cialdini’s extraordinary book Influence: The Psychology of Persuasion.
16. Goals: By setting an attainable series of goals for your blog each month, you’ll be able to greatly increase your motivation. This really helps finding a purpose and will also speed up your blog’s growth, as you’ll get more and more ambitious as you set ever higher stats. Don’t get discouraged if you fail to meet a month’s goals, just try again next month and then the month after that, if you still fail, until you finally break the milestone. Most bloggers like to share their goals, be them a certain amount of money, subscribers or traffic, with the readers with monthly blog summaries, I however prefer to keep my goals and objectives well hidden. For the long run it’s also a great idea to keep track of your progress. Thus you can make graphs and diagrams of your progress, see where and when your blog experienced a growth/decay in stats, so that you may understand what kind of content and information your readers really want.
17. Confidence: Negativity has no place in blogging. The thought of failure shouldn’t even cross your mind. As long as your patient and confident in your blog and writing, success and readers will not hesitate to follow. Be the most optimistic person you know and you’ll soon reap the fruits of your well based faith.
18. Honesty: Be sincere with both yourself and your readers and show this in your writing. Nobody likes a big old fake, just take a look all these make money online blogs that’ve sprung up like mushrooms and feed people loads of bogus crap. Transparency is essential in building a genuine and respectable online persona.
19. Aesthetics: As blogger you have to know how keep your readers attention. This is primarily done through your writing, that’s why you should always strive to be interesting. However, it’s also important to have a keen sense of aesthetics in your blog posts and over all blog design. Lean how to properly format your posts and try as often as you can to exemplify your ideas through relevant images. Any good publicist will tell you no matter how good a book is, if you don’t have a good cover, it won’t sell as good. Check out my post about scannable content for more info.
20. Humility: No matter how much you’ve grown as a blogger, don’t ever forget were you’ve started from. Remember it’s your readers that made you who you are today, as an online authority and they can as easily break you down. Be respectful towards your readers and fellow bloggers. Acknowledge your mistakes in public, when they’re pointed out, respond to comments and e-mails, network with readers etc.
21. Balance: A blogger’s life can be pretty busy and stress packed. After all most bloggers either have a full time job or are pursuing a time consuming academic activity. Add a tight blogging schedule to that and you’ve got all the ingredients for a social disaster. Don’t neglect your family, peers or even yourself. Avoid falling into human decay and escape your daily routines from time to time. Regular exercise is a must for keeping yourself healthy, people have become especially alerted on that matter after the now infamous NY TImes death by blogging article. Find the balance within yourself that can bring with it emotional and professional satisfaction.
22. Help: Whenever you get the opportunity lend a helping hand even though you might not have any particular direct benefits. Share your thoughts with other people, teach and offer counsel to those who ask and you’ll soon form bonds with your readers. Also, in term don’t shy away from asking for help yourself. There’s nothing wrong with it. When you have limited knowledge about a particular topic make efforts in documenting yourself, when you’ve still haven’t found the answers your looking for, don’t hesitate to ask for them.
And this about wraps up my list of 22 habits of highly prolific bloggers. The list could go on for ages though, but I decided I should add only the ones I thought would be the most representative and important. Any thoughts on the matter? Any must have blogging habits you have in mind? Do tell.

""Creative Art!"" Always Create a creative idea!...