HTML Doctypes Make A Difference
If you are like me you may not have given much thought to an HTML doctype other than “yes, it needs to be there” and “there are a few different types, but I don’t really understand the differences between them”. Well if you are like me then you also recently discovered why doctypes matter and how they actually affect your web page.
For those that are not familiar with an HTML doctype, they are the very first line of an HTML document and look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "https://www.w3.org/TR/html4/strict.dtd">
As I mentioned before, there are a few different document types. The reason for this is because each one corresponds to a different rule set of HTML syntax for the web browser to follow, like: HTML 4.0, HTML 4.01, XHTML 1.0, or XHTML 1.1.
“The HTML syntax requires a doctype to be specified to ensure that the browser renders the page in standards mode. The doctype has no other purpose.” [1]
When you specify an official doctype, your web browser should follow the standard behavior for rendering that specific rule set for the given HTML syntax. Thus you should get expected results when it renders your web page. There …
browsers html
phpMemcachedAdmin: Graphical/Web Administration for memcached
Memcached is an awesome tool, though it doesn’t offer the best interactive administration experience out there, with its command manually run via a telnet/nc connection.
Well luckily enough there’s an alternative to all that pain and its name is phpMemcachedAdmin
While the development stopped in the end of 2012 (if we don’t consider minor forks) the features offered are quite interesting.
Quoting directly from the main site:
[…]
This program allows to see in real-time (top-like) or from the start of the server, stats for get, set, delete, increment, decrement, evictions, reclaimed, cas command, as well as server stats (network, items, server version) with googlecharts and server internal configuration
You can go further to see each server slabs, occupation, memory wasted and items (key & value).
Another part can execute commands to any memcached server : get, set, delete, flush_all, as well as execute any commands (like stats) with telnet
[…]
Which is incredible news, even more considering the complete lack of similar features from the native Memcached code.
Since all the code basically revolves around a PHP file, the setup phase is just a matter of creating a new …
apache linux php sysadmin
WebP images experiment on End Point website
WebP is an image format for RGB images on the web that supports both lossless (like PNG) and lossy (like JPEG) compression. It was released by Google in September 2010 with open source reference software available under the BSD license, accompanied by a royalty-free public patent license, making it clear that they want it to be widely adopted by any and all without any encumbrances.
Its main attraction is smaller file size at similar quality level. It also supports an alpha channel (transparency) and animation for both lossless and lossy images. Thus it is the first image format that offers the transparency of PNG in lossy images at much smaller file size, and animation only available in the archaic limited-color GIF format.
Comparing quality & size
While considering WebP for an experiment on our own website, we were very impressed by its file size to quality ratio. In our tests it was even better than generally claimed. Here are a few side-by-side examples from our site. You’ll only see the WebP version if your browser supports it:
![]() 13,420 bytes JPEG |
![]() 2776 bytes WebP |
![]() 14,734 bytes JPEG |
![]() 3386 bytes WebP |
The original PNG images were converted by ImageMagick to JPEG, and by …
browsers graphics nginx compression optimization
Mobile Emulation in Chrome DevTools
I have been doing some mobile development lately and wanted to share the new Mobile Emulation feature in Chrome Canary with y’all. Chrome Canary is a development build of Chrome which gets updated daily and gives you the chance to use the latest and greatest features in Chrome. I’ve been using it as my primary browser for the past year or so and it’s been fairly stable. What’s great is that you can run Chrome Canary side-by-side with the stable release version of Chrome. For the odd time I do have issues with stability etc., I can just use the latest stable Chrome and be on my way. If you need more convincing, Paul Irish’s Chrome Canary for Developers post might be helpful.
I should mention that Chrome Canary is only available for OS X and Windows at this point. I tested Dev channel Chromium on Ubuntu 13.10 this afternoon and the new mobile emulation stuff is not ready there yet. It should not be long though.
Mobile Emulation in Chrome Dev Tools

Once enabled, the Emulation panel shows up in the Dev Tools console drawer. It gives you the option of emulating a variety devices (many are listed in the drop-down) and you also have the ability to fine tuning the settings à la carte. If …
browsers design environment html javascript tips tools
Functional Handler — A Pattern in Ruby
First, a disclaimer. Naming things in the world of programming is always a challenge. Naming this blog post was also difficult. There are all sorts of implications that come up when you claim something is “functional” or that something is a “pattern”. I don’t claim to be an expert on either of these topics, but what I want to describe is a pattern that I’ve seen develop in my code lately and it involves functions, or anonymous functions to be more precise. So please forgive me if I don’t hold to all the constraints of both of these loaded terms.
A pattern
The pattern that I’ve seen lately is that I need to accomplish of myriad of steps, all in sequence, and I need to only proceed to the next step if my current step succeeds. This is common in the world of Rails controllers. For example:
def update
@order = Order.find params[:id]
if @order.update_attributes(params[:order])
@order.calculate_tax!
@order.calculate_shipping!
@order.send_invoice! if @order.complete?
flash[:notice] = "Order saved"
redirect_to :index
else
render :edit
end
end
What I’m really trying to accomplish here is that I want to perform the following steps:
- Find my order …
functional-programming ruby rails
Unbalanced HTML considered harmful for jQuery
This isn’t earth-shattering news, but it’s one of those things that someone new to jQuery might trip over so I thought I’d share.
I had a bad experience recently adding jQuery to an existing page that had less than stellar HTML construction, and I didn’t have time nor budget to clean up the HTML before starting work. Thus, I was working with something much more complex than, but equally broken as what follows:
<table><tr><td>
<form>
</td></tr>
<tr><td>
<input type="text">
</form>
</td></tr></table>
The jQuery I added did something like this:
$('form input').css('background-color: red');
and of course, I was quite puzzled when it didn’t work. The pitfall here is that jQuery may or may not be able to handle misconstructed or unbalanced HTML, at least not as well as your average browser, which will shift things around internally until something makes sense to it. The minimal solution is to move the opening and closing “form” tags outside the table.
javascript jquery
Using Google Maps and jQuery for Location Search
A few months ago, I built out functionality to display physical store locations within a search radius for Paper Source on an interactive map. There are a few map tools out there to help accomplish this goal, but I chose Google Maps because of my familiarity and past success using it. Here I’ll go through some of the steps to implement this functionality.
Google Maps API Key
Before you start this work, you’ll want to get a Google Maps API key. Learn more here.
Geocoder Object
At the core of our functionality is the use of the google.maps.Geocoder object. The Geocoder converts a search point or search string to into geographic coordinates. The most basic use of the geocoder might look like this:
var geocoder = new google.maps.Geocoder();
//search is a string, input by user
geocoder.geocode({ 'address' : search }, function(results, status) {
if(status == "ZERO_RESULTS") {
//Indicate to user no location has been found
} else {
//Do something with resulting location(s)
}
}
Rendering a Map from the Results
After a geocoder results set is acquired, a map and locations might be displayed. A simple and …
maps javascript jquery
End Point’s New Tennessee Office
This position has been filled. See our active job listings here.
End Point has opened a new office for our Liquid Galaxy business in Bluff City, Tennessee. Bluff City is in the Tri-Cities region in the eastern corner of Tennessee. Our new place is 3500+ square feet and has ample office and warehouse space for our growing Liquid Galaxy business.
From our start back in 1995, End Point has always been a “distributed company” with a modest headquarters in Manhattan. (The headquarters was especially modest in our early days.) The majority of End Point’s employees work from their home offices. Our work focusing on development with Open Source software and providing remote systems support requires relatively little space, so our distributed office arrangement has been a cost-effective and wonderful way to work.
However, over the last four years our work with Liquid Galaxy systems has presented us with some old-fashioned physical-world challenges. Our space requirements have steadily increased as we’ve tested more and more components and built several generations of Liquid Galaxies, and as we’ve prepped and packed increasing numbers of systems going out for permanent installations and events. We’ve well outstripped the space of our Manhattan …
jobs-closed visionport company