Changelog High Performance Programming Scalability Software Web Server WordPress
I became aware of an annoying little glitch on the Urban Mainframe yesterday. It seems that WordPress, on which this site is running, doesn’t handle the URL http://example.com/index.html on an unmodified install (I’ve confirmed this on a handful of other WordPress sites). This is significant because index.html is a special file on many web-servers, often being the “home” page of a directory on the server. Without special handling, a request for index.html on a WordPress installation generates a 404 (file not found) error — which is obviously something we don’t want our visitors to be presented with.
In my case the impact of the glitch was magnified because I employ a quite aggressive caching policy on this website — and yesterday an unlikely combination of factors resulted in my 404 error page replacing my home page for a complete cache cycle. It went something like this:
Quite a serious glitch then!
There are two things that shouldn’t have happened here.
I resolved the first issue by adding the following snippet of code to the very beginning of the 404.php file in my WordPress theme:
<?php
if ($_SERVER['REQUEST_URI'] == '/index.html') { header("Location: http://urbanmainframe.com/"); exit; }
?>
For the second issue I’ve filed a bug report with the authors of W3 Total Cache, which is the caching system I use here on the Urban Mainframe.
Hacking Linux Open Source OS X Programming Software Unix Vintage
After four decades, the future of the operating system is clouded, but its legacy will endure.
Regardless of the ultimate fate of Unix, the operating system born at Bell Labs 40 years ago has established a legacy likely to endure for decades more. It can claim parentage of a long list of popular software, including the Unix offerings of IBM, HP and Sun, Apple’s Mac OS X and Linux. It has also influenced systems with few direct roots in Unix, such as Microsoft’s Windows NT and the IBM and Microsoft versions of DOS.
The [Association for Computing Machinery] may have said it best in its 1983 Turing award citation in honor of Thompson and Ritchie’s Unix work: “The genius of the Unix system is its framework, which enables programmers to stand on the work of others.”
Hacking Open Source PHP Programming Software Web Design WordPress
A large part of my professional work involves the build and deployment of WordPress-based websites. Now as any designers/developers among you will appreciate, it can be extremely annoying frustrating to sign off a build only to come back later to see that your client has (inadvertantly) messed things up because WordPress has placed too much power in their hands.
I was delighted then to read “10 WordPress Dashboard Hacks” because there are some really useful code snippets presented therein:
Some of these are definitely going to be rolled out on to some of my client’s sites in the near future.
Design Photoshop Programming Web Design
In an article on the web-design advent calendar, 24 Ways, Meagan Fisher advocates setting aside Photoshop and building design comps directly in our preferred flavour of HTML.
That’s how I always work anyway. Only once have I ever built a design in Photoshop before writing the code and that was for the front page of this website — it took ages and felt totally un-natural and counter-intuitive to me. I did it because I understood that that’s how all designers work. I wanted to try it out to see if it made the process any easier for me, it didn’t, at all.
Even so, I think Meagan has overlooked a quite important point: not all web-designers are writers of code.
Database High Performance Open Source Programming Scalability Software
Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel, to load-balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events. In other words, it is the nervous system for how distributed processing communicates.
Sounds awesome. I’ve got to make some time to experiment with this.
High Performance Programming Scalability Web 2.0 Web Design
Fortunately, there are ways to get scripts to download without blocking any other resources in the page, even in older browsers. Unfortunately, it’s up to the web developer to do the heavy lifting.
There are six main techniques for downloading scripts without blocking:
Framework Linux Open Source Programming Software Unix Web Design
I’ve just started experimenting with LESS for a new web development project. With my programmer head on, LESS looks like it has the potential to speed up my CSS coding (which I do by hand) as well as enabling me to abstract my CSS with variables (very handy), nested rules, mixins and even mathematical operations (yeah baby)!
However, installing LESS on my OS X “Leopard” machine wasn’t quite as simple as advertised. I should just be able to go:
sudo gem install less
But that resulted in an error:
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 403 fetching http://gems.rubyforge.org/yaml
I ended up scratching my head for a moment — before turning to my good friend and problem-solving guru, Google, for help. I was advised as follows:
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
sudo gem update --system
sudo gem install less
That worked a treat.
Then, in Terminal, I navigated to my source directory, renamed my style.css file to style.less and issued the following command:
lessc style.less --watch
LESS then generated a new style.css from my .less file and went into watching mode — automatically compiling my .less file into its .css counterpart whenever it detected changes in my source (ie: when I hit save in my text editor) which is a rather cool.
It’s early days yet, but so far LESS is looking like a tool that I can really make use of. I don’t need to change my workflow (aside from starting the watch/compiler process) and I get a degree of CSS flexibility and freedom that I didn’t have before. That’s neat.
A great essay from Aaron Swartz:
The traditional programmer hiring process consists of: a) reading a resume, b) asking some hard questions on the phone, and c) giving them a programming problem in person. I think this is a terrible system for hiring people. You learn very little from a resume and people get real nervous when you ask them tough questions in an interview. Programming isn’t typically a job done under pressure, so seeing how people perform when nervous is pretty useless. And the interview questions usually asked seem chosen just to be cruel. I think I’m a pretty good programmer, but I’ve never passed one of these interviews and I doubt I ever could.
Database High Performance Lists MySQL Programming Scalability
Ah now this is pure gold, 21 things to keep in mind when coding for MySQL. Most of these I knew but it was good to be reminded. Some of them are entirely new to me though:
Priceless information. I’ll be referring back to this list over and over again.
Graphics Open Source Programming Software
ditaa is a small command-line utility, written in Java, that can convert diagrams drawn using ASCII art into proper bitmap graphics. ditaa interprets ASCII art as a series of open and closed shapes, but it also uses special markup syntax to increase the possibilities of shapes and symbols that can be rendered.
Works as advertised. I’m not sure if it has any worth outside of its curiosity value. I found it quicker by far to flowchart with a GUI application than to laboriously create ASCII artwork equivalents for ditaa to process. Neat hack though! [via]