Install Varnish in Under 5 Minutes With Bitnami

If you have been following my posts for the last month (or talked to me about what I have been up to recently) you will not be surprised I have another post about the ease of use/awesome documentation when using Bitnami.

I still am 100% impressed with the documentation – as each example I have followed has worked flawlessly (not something I can say much…especially after spending an evening trying to fix my PS3 vs. play it a few nights ago).

What is Varnish?

Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 – 1000x, depending on your architecture.

Source: https://www.varnish-cache.org/about

Where is this amazing 5 minute install documentation?
Bitnami Varnish Installation

Seriously…check it out!

The Importance of User Defined Tests

When working on a large project or a seemingly simple task – I have come to realize it is extremely important to always get a test case (or test cases) directly from the client. As programmers and developers, we often have one idea of how something should work, while our clients have something different either because of business logic or lack of really knowing how to describe what is needed.

By having your clients define the tests – both the developer and client win. The client is forced to describe the actual function in a logical way. The developer can read over the test and fully understand what the outcome needs to be. The client and developer also have a defined result which will be easy to test.

As developers – we all test our work one way or another, but believe me, it is much better if your tests actually matched what the client uses as their tests (which is surprisingly different more than you would expect).Moral of the story – while the user does not need to create some extravagant testing plan – by asking them to define a test case – they are more likely able to better explain what they really need. The developer then is able to do their testing and be confident they know what result is needed and everyone is on the same page.

Install Memcache in Under 5 Minutes with Bitnami

The more I work with Bitnami, the more I absolutely love it. After migrating a number of applications over to my server – I realized I could benefit from using Memcache. I decided to do a quick look at the documentation for Bitnami and found exactly what I needed. Within 5 minutes I had Memcache up and running.

Of course after I did that – I also took a closer look to see what other PHP modules were available – and installed a few more. What I love most? The documentation is great and everything I try actually works – no exceptions – on the first attempt.

Still not sold? Not only are there a ton of PHP modules available, there are a ton of “stacks” available to download/use with ease. Example: Monit, PHP Frameworks like CodeIgniter, Apache Solr, Varnish, etc. Make sure you put this on your “to check out” list and then thank me later!

How To Not Get Me to Update One of My Free WordPress Plugins

This morning I arrived in my office to see an email with a request to make a change to one of my free WordPress plugins: SDAC Translate. I take requests and have made changes to pretty much all the plugins I have available as long as they are reasonable and would help/benefit other users as well.

The person who emailed me started off by calling me a “bigot” because I used the US flag for English and the Portuguese flag for Portuguese (instead of also offering the UK and Brazilian flag as options). They then told me I should take all the money I earned from people donating (over 2,500 downloads, no donations) to go fly to the countries so I could see the difference between the US/UK and Brazil/Portugal. They then also told me they were disabling the plugin until I made the change – and were going to tell everyone why they disabled it.

While I thought about it for awhile – I realized this could get ugly fast. I would potentially then have to have a Canadian flag for both french and english, Mexican/Peru, etc for Spanish, etc It is just not something that I thought would be a good thing for the plugin. The flags are there for a general representation of languages. Google Translate does not care if it is US vs UK – you still get the same exact EN translation.

While name calling and threats apparently work- for putting in extra development (free) time for a plugin which is also free – I decided that I would keep the integrity of my plugin as is and not make any changes. I then mentioned how they could easily take what I had under the GPL license and make their own changes to it – without any issues.

Something to remember – when making any requests for free development on a free product – at the very least, be kind or do it yourself.

Moving Everything to Amazon S3

Over the weekend I decided to move all my media to Amazon S3 for the majority of my personal sites. I have been using Amazon S3 now for a few years with my backups and have made the transition from local media > Amazon S3 for multiple clients. Everyone has been happy and the load times/cost has proven itself.

I run WordPress Multisite so things were a little more complicated when migrating the content – but I finally have everything in place. Plugins I used:

  • Amazon S3 – Gives you the ability to upload all new media to Amazon.
  • CDN Sync Tool – Synced all of my media files from my local install to Amazon
  • WP Super Cache – Makes sure all my theme/media files are served using the CDN

If you are looking for some speed improvements as well as a better backup/file strategy – consider doing the same!

Find JS Code Issues and Errors With JSLint

Ever have a page not load properly in IE 7 but it loads fine – without error – with all other browsers? After you validate all your CSS/HTML and the error or funky behavior persists…and you have made sure your doctype is correct – what can you do? Validate your JS using JS Lint.

What is JSLint?

JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool.

I just got done with some cross browser consulting (my favorite) – and one of the pages would not load properly in IE 7 due to a JS error which did not make sense to me. I loaded up the offending JS in JSLint and within a few minutes – I figured out what the issue was and how to solve it.

JSLint is invaluable if you do any work with JS – so keep the link handy! You will thank me – and JSLint.

HOWTO: Target Firefox for Specific CSS

Generally – the best way to handle CSS is to keep it simple, clean, and without any hacks. From now and again there are some times when I need to write CSS specific to IE (using conditional comments). I recently came across a site where I needed to target Firefox because of a width issue. This is the first time in my many years I ran into this – and tried a number of hopeful solutions but nothing worked. I then found that if I used: @-moz-document url-prefix(){} that that would work out and only Firefox would use the styles within that.

Example:

.font_example {font-size:1.1em;}
@-moz-document url-prefix() {
     .font_example {font-size:1.075em;}
}

Safari, Chrome, IE, etc will use the first .font_example code while Firefox will use the code within @-moz-document url-prefix(){}.

While this is not recommended for everyday usage – when and if you hit a wall, this could be something that will save a lot of time and headaches!

Asset Management with ResourceSpace

This is a follow-up post to my post: Asset Management. I spent an exciting Friday night going through the config, learning the workflow, setting up accounts, and getting to know everything that ResourceSpace has to offer. After a few hours of playing around and applying various customizations (with ease) I am sold on using ResourceSpace for asset management.

What I like about ResourceSpace:

  • It has good documentation – both in the code as well as in a wiki
  • It is easy to customize both in look and feel as well as configuring admin options
  • It has been well thought out and has just about everything you could want (users/groups/fine access control/flash uploads for multiple uploads, contact sheet creation on the fly, etc

What I do not like about ResourceSpace:

  • They use frames
  • The layout is liquid vs. fixed (I am a fixed layout kind of person

The dislikes are minor in the grand scheme of things. Overall – I am excited I gave this a try and look forward to adding and archiving projects in here in the future.

Jappler.com: New Theme Using Lucidity 2.0

My company SDAC Inc. is preparing to release the next version of the commercial Lucidity WordPress theme. I decided that since I am selling a theme – it had to be something that I could easily use, and customize without making major changes or changing much code. With this in mind – I added a number of new features, redid a lot of the admin interface, and added in some of the great new functionality that comes along with WordPress 3.0+.

The theme that you see here is actually a child theme of Lucidity. I customized one theme template, added in a home.php template, added 8 image files, and added just around 50 lines of CSS to customize this theme.

I am hoping to have Lucidity completely finished (going through last bit of QA now) and ready for purchase next week. I am also hoping that now that I have a clean new theme – I will be more inspired to start blogging on a regular basis (one of my goals for 2011).

Interested in Lucidity? Check out the theme site for a demo: Lucidity WordPress theme.