For as much as people talk about living green and working in a paperless office, we still use lots of resources. It is amazing how much stuff we still print. All that printing uses lots of power, paper, and something we don’t always think of, ink or toner.
Well, now there is something you and I can do about that last item.
A design company in the Netherlands called SPRANQ has developed a new font based on the Open Source font Vera Sans, and has a series of small holes in the font body. When viewed at a large font size, it it quite noticeable – they say it looks like a ‘Swiss font’ but I think it appears more like an aircraft structural member that has the centers lightened with cutouts. But when viewed at a print size of 10pt, the human eye optically fills in the cutouts and the font appears solid.
When compared to a traditional solid font, it does appear slightly less dense.
According to the designers, it uses 20% less ink than a solid font of a similar style and size. That adds up to quite a savings of resources. Especially if thousands of people use it to print millions of documents.
Head over to http://www.ecofont.eu to view and download ecofont. It’s free to download and use!
Internet Explorer continually amazes me.
I was working on a project with a couple of simple floated columns each of which had a div header with a background image. Nothing fancy, just some simple CSS:
.col{
float: left;
}
.pct33{
width: 32%;
}
#category1{
background: transparent url(images/cat1.png)no-repeat;
}
#category2{
background: transparent url(images/cat2.png)no-repeat;
}
#category3{
background: transparent url(images/cat3.png)no-repeat;
}
The HTML is pretty straight-forward as well:
<div>
<div id="category1" class="col pct33">
<h2>category 1</h2>
</div>
<div id="category2" class="col pct33">
<h2>category 2</h2>
</div>
<div id="category3" class="col pct33">
<h2>category 3</h2>
</div>
</div>
The problem is that in Internet Explorer the background images refuse to display. If it was version 6, I suppose I could forgive it, but this was version 7!
Expecting it to be related to the well documented float or peek-a-boo bugs, I tried all of the usual hacks to no avail.
Come to find out the thing to fix the problem is the “shorthand” background rule that combines the background-color, background-image, background-repeat into one statement.
Now, this has never been a problem before and usually displays fine. I think it may be the combination of the float with the transparent background… I don’t really know. All I do know is that once I converted the rule to the following, things started to show up:
#category1{
background-color: transparent;
background-image: url(images/cat1.png);
background-repeat: no-repeat;
}
...
So when all else fails, try thinking outside of the box (or tag).
The other day I was tasked with creating a list of links for a reference project. The content for the list was a folder containing files with numeric filenames like 2344567786.html.
The client wanted to be able to search through the list using his browser find feature and the numeric links did not provide much to go on for searching. So, I figured I’d construct new links using the document title as the link text which would give a clue as to the file contents. Great idea, huh?
Did I mention that there were over 1,700 document files in the folder? Seems like a good place to bring in some automation!
Here’s what I did. First create a ruby file to write your code in. I’ll call it linkJob.rb. Then we start adding code:
Dir.chdir('C:\rubyTest')
resultsfile = File.open('C:\rubyTest\results.html', "w")
These first lines of ruby code change my working directory to where my data files are located and create and open a new file to receive my results.
Dir["data/**"].each do | thisfile |
# processing of the files will go here
end
The each block is what will loop through all of the files contained in the data directory. We could specify only certain types of files in the opening line of the block instead of the ** wildcard.
tmp = File.open(thisfile)
myfile = tmp.read
We’ve inserted these two lines into the each block. It reads the entire contents of the file into our variable myfile. We want to extract the main heading from the document to use as the text for our link, so we’ll look for the contents of the h1 tag.
mysub = myfile.split("</h1>")
mysub2 = mysub[0].split("<h1>")
mytitle = mysub2[1]
OK. This is a little weird. What happens is we use the split function to break the document into an array using the closing h1 tag as the delimiter. We’re using it to discard everything after the closing tag. Then we split on the opening h1 tag and discard everything before it. What we’re left with is the tag contents!
mylink = "<li><a href=\"/data/#{thisfile}\">#{mytitle.chomp}</a></li>"
resultsfile.puts mylink
Next, we construct a list item with our link inside and assign it to the mylink variable. The chomp method removes any end-of-line-characters that may be there. The last line adds our newly created html fragment to our new html doc.
To use the process, I open my linkJob.rb file in Scite . You could use the Windows command prompt as well. In Scite, press Tools / Go and the script runs. I then open C:\rubyTest\results.html and there is the list of links!
All that is left now is to wrap the list items with the appropriate markup and we’re done.
Creating automation processes do take some time to setup and fine-tune. But in most cases, the investment of time has a pretty good return.
How many times have you wanted to know what was going on and had to sort through newspaper listings just to find out that the good stuff was too far away?
Now, there’s a site called maps4me that let’s you see all sorts of fun stuff happening around you and maps it all out for you. Select a category and filter by subcategory to narrow your view down just to what you’re most interested in.
The public beta testing will be running for awhile, so you can be one of the first to try it out!
Make sure you let the fine folks that run that site (wink) know if you have any suggestions to make the site more usable for you or if you run into any issues they should know about – hey, that’s why it’s called “Beta”.
My last blog ran WordPress which had a built-in comments module. Cool at first but then the spammers found it. Not fun. I think my SPAM/legitimate comment ratio was running something like 200/1.
Spam is not a problem unique to this humble website, but an epidemic upon the vast Web. Scores of spam countermeasures exist including captchas, math problems, and javascript methods all aimed at foiling the spambots from their relentless posting for performance-enhancing-get-rich-while-you-lose-weight offers.
It would be so nice if the Web could have an open conversation and not have to be constantly picking up litter and trash.
I do hope to someday enable commenting on this blog, and when I do, there just may be a solution to the spam… stay tuned!
Time Warner Cable has been under Denial of Service attacks for the past 7 days or so and pretty much made the Web a series of “server not found” errors. Every night. For a week now. Sheesh.
They say they are going to work on handling the problem, but who knows how long that will take?
So I took a look at openDNS and I liked what I saw. Lots of admin features and speed. And the best part is that now my TIme Warner service works just fine.
Hello, out there on the Internet.
It’s good to be back online! After a period of recovering from a hacker attack (thanks to my previous host having become totally infected with various php shell scripts) I’m re-vamped and re-tooled and WordPress-less.
Imagine my joy when logging onto my own site only to find that Google had labeled it as an attack site and seeing my virus scanner jump to life to warn me about the worm trying to download from a hidden iframe on one of my pages!
Several hours, lots of deleted files, and several unanswered technical support tickets later, I decided to jump that ship and find a new host.
That brings me to my new home .
The service here has been stellar and best of all, their servers are powered and cooled by the wind! Well, almost. They run on power purchased with wind-power renewable energy credits from a wind farm in Texas… the next best thing!
It’s nice to know there are companies out there that make it possible to make a smaller carbon footprint while striding across cyberspace.
So, maybe it was all worth the trouble after all!