Blog posts tagged with best-practices

Heard in the Community (2010.08.15)

Munchkin is a series of tutorials showing how to build a PHP project with the best programming practices in mind. As Author says: "If you consider the average PHP world and average RPG, where the players are coders, then doing agile and TDD would definitely make you a power player who gets all the loot.". Not in all cases I would use the same tools but it's not about copying the author. Tools doesn't matter as much as the proper approach he tries to teach us.

Heard in the Community (2010.08.08)

Jonathan Wage wrote on his blog about Doctrine Annotations Library. It's used in Doctrine2 ORM for mapping information specified in doc-blocks. I'm really excited about it, especially because it is an independent library. It makes it a perfect tool for meta-programming. I can't wait to put my hands on it!

Heard in the Community (2010.07.25)

"Heard in the Community" series aims to wrap up news from the PHP, symfony and other communities I find interesting and follow.

How to use TextMate like snippets in vim?

Snippet is a piece of text which can be pasted into the document. Parts of it can be parametrized or calculated while pasting. Snippets can increase your productivity by letting you to write common parts of code faster and without mistakes. One of the most famous snippet implementations is included in TextMate editor. In vim we have some of TextMate's snippet features bundled in snipMate script.

How to record a macro in vim?

Macro is a sequence of instructions performed as a one step. In programming it helps automating the repeatable tasks which makes them less boring and less error-prone. Instead of performing the same actions over and over again, it's better to record them as a macro. Once macro is saved it can be run as many times as needed. Vim as a one of most powerful editors has macro support built in.

Caching the websites with bash script and apache's .htaccess file

Recently I got a task to make a completely inefficient application usable enough to give the development team time for improvements. I didn't know the application and didn't have sufficient time to learn it. In that completely miserable moment I was left alone.

Put your stylesheets at the top and your scripts at the bottom

Putting the stylesheets at the top of your web page and moving the scripts to the bottom are only two of thirty four rules described in Best Practices for Speeding Up Your Website (by Yahoo). Following these two rules, however, can really decrease visible time of page rendering. I will present a simple solution to achieve this in symfony framework.