Programming

From your first taste of Basic you knew you loved it. Programming, makes the web dynamic and our websites stateful.

Solve the problem you have now (#)

John Zeratsky provides some excellent advice, some things worth thinking about once in a while while working on your projects...

Do you really know the best way to solve the short-term problem while solving long-term ones? Do you really know how your app/song/project/whatever is going to evolve? Do you really know what your customers/listeners/friends/partners are going to want in 3 or 6 months or a year?

OO in One Sentence - Keep It DRY, Shy, and Tell the Other Guy (PDF) (#)

Every piece of knowledge must have a single, unambiguous, and authoritative representation within a system.

If you program, you've probably read that piece of text before. The DRY (Don’t Repeat Yourself) principle is an excellent principle for people who write code. This PDF, Keep It DRY, Shy, and Tell the Other Guy is written by Andy Hunt and Dave Thomas and presents what they call OO in One Sentence.

The article is brief, but gets into their thoughts on some important concepts and practices and how they effect your work as a programmer.

XSS (Cross Site Scripting) Cheatsheet: Esp: for filter evasion (#)

After discovering that Digg is vulnerable to XSS attacks, Nitesh Dhanjani passes off this link which provides a nice suite of XSS tests and examples. I've used some of these before for testing, and it's worth reading and playing with this stuff to get your head around it. As the author states This page is for people who already understand the basics of XSS attacks but want a deep understanding of the nuances regarding filter evasion

Quick reference to HTTP headers (#)

This document lists all the message headers defined in the HTTP/1.1 protocol, with short descriptions. In the list, the name of the header is a link to its definition in the protocol itself.

MVC and web apps: oil and water (#)

Harry Fuecks deconstructs some of the MVC history and provides some thoughtful discussion (see the comments too). For me, in the end it's about some of the points outlined there (especially Back to Beyond), and ultimately I want my code organized and agile.

Do you know your character encodings? (#)

Get up to speed on character encodings with this great article by Kevin Yank over st Sitepoint. Lengthy yet well written, there are more links to follow at the end of the article.

As usual with content from SP blogs, read the comments for some extra links and discussion.

Processing Online Credit Card Transactions (#)

A succinct writeup about setting up a system to processing credit card transactions online, it covers the basics and offers some extra reading links at the bottom (Cautious Advice for Accepting Online Payments is a worthy read). A good start if you've never ventured into this territory before.

Calculating distance with latitude__longitude in MySQL (#)

I had to calculate distance with latitude/longitude for a project a few years ago and did all of the logic in PHP. I'd be interested in seeing if Ben's example is a bit quicker. Here he builds a query that includes all of the calculations needed to "SELECT * FROM companies HAVING distance <= $distance ORDER BY distance ASC LIMIT xx".

The top 10 presentations on scaling websites: twitter, Flickr, Bloglines, Vox and more (#)

A collection of slides and presentations written by folks who have had experience scaling up web based applications like Flickr, Livejournal and others. Put some time aside to check all of these presentations out!

Race Hazard or Race Condition (#)

Wikipedia's definition for race condition, which can become an issue in various situations when programming (example).

UTF-8 Sampler (#)

A useful page for viewing how different browsers handle UTF-8 characters and also as a source for characters to use while testing data input. Don't miss the links at the bottom of the page, which offer other samplers and some handy overviews of fonts that handle unicode.

RailsVsDjango (#)

This comparison sees two developers building an equivalent application in Rails and Django and writes about the differences between the two tasks.

It's a pretty interesting read for anyone looking for a framework, or someone who is simply building in any language and looking to see how these two frameworks handle some of these tasks. Our CMS does a lot of the things that is outlined in this article, but there are a few ideas that I'm sure to pinch from this!

SQL Injection Attacks by Example (#)

A very clear, well documented article covering many different types of sql injection attacks. This is the result of a larger security review, and though we'd not actually used SQL injection to penetrate a network before, we were pretty familiar with the general concepts. We were completely successful in this engagement, and wanted to recount the steps taken as an illustration.

Designing URIs (#)

Drew Mclellan gives a short write-up about designing URI's and offers some rules for doing so. The ensuing commentary also presents some good ideas.

MVC: The Most Vexing Conundrum (#)

A simple little overview about the MVC design pattern, with a Ruby bend to it. This is worth a read if you are just getting your head around MVC or just getting into Ruby.

mod_rewrite Cheat Sheet - Cheat Sheets (#)

A useful cheat sheet for when you have to dive into your .htaccess file and start redirecting requests. Some great tips inclugin "nice looking urls with pagination" and the always popular "block referer spam".

Natural Docs (#)

Natural Docs is a documentation generator that scans your code and builds high-quality HTML documentation based on a natural syntax that reads like plain English. I haven't tested this but it looks promising.

Check out the Resource categories for older content

The latest from my personal website,
Mike Papageorge.com

SiteUptime Web Site Monitoring Service

Sitepoint's web devlopment books have helped me out on many occasions both for finding a quick solution to a problem but also to level out my knowlegde in weaker areas (JavaScript, I'm looking at you!). I am recommending the following titles from my bookshelf:

The Principles Of Successful Freelancing

I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.

The Art & Science Of JavaScript

The author line-up for this book says it all. 7 excellent developers show you how to get your JavaScript coding up to speed with 7 chapters of great theory, code and examples. Metaprogramming with JavaScript (chapter 5 from Dan Webb) really helped me iron out some things I was missing about JavaScript. That said each chapter really helped me to develop my JavaScript skills beyond simple Ajax calls and html insertion with libs like JQuery.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks

Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..