Most recent articles
| Thinking about size of various MySQL typesFriday, February 22, 2008, 4:32 PM
|
![]() Mail article to a friend |
An email came in tonight that had some trouble applying the information from the post about building a system that converts latitudes and longitudes into X-Y co-ordinates for use with images generated by GD with PHP.
In the interest of promoting a little more applicability, I'm going to post the code that generates an actual PNG file from the map database.
This loads all the co-ordinates into three arrays. One for the rivers in the county. Another for the roads. A third for the county political boundaries.
Then it goes through the arrays, and draws the lines onto the image. The line colors and thicknesses are based on the type of river or stream listed from the original shapefiles.
This probably doesn't make things any clearer, but it at least gives you a look at proven production code.
And, for the critics... please refer to the post where I admit that I am very lazy about constructing anything into a usable object class. Yeah, I know the functions is significantly more recursive and could be done better with some OOP. I just don't care, because the code works.
Anyhow... I hope this gives some folks who were looking at the lat-long post something with a little more meat to chew on.
![]() Mail article to a friend |
Download getmap.zip |
I've often pondered why the television business is slow to fall in love with BitTorrent and peer-to-peer file sharing. Yes, it is hard to make an advertising model work. But, if file sharing is the future, it's the future. In ten years the BluRay victory over HD-DVD will be moot, because downloads will rule the internet.
I have also thought that HD offers an opportunity for the networks to place a poison pill into the equation. If the TV networks made HD copies of their shows on BitTorrent the defacto standard, and server them off so many of their own machines that no one could bounce them off the top of search results with a lower-quality copy, you could drown the entire internet in HD.
HD is bandwidth intensive. The ATSC standard used for over-the-air requires 19 MB per second. Could you imagine how badly the internet would choke on that?
I'd buy a TV network, Cisco stock and both Seagate and Western Digital stock. Because as people gagged the entire system with gigantic shows, it would all have to go somewhere.
Then, I would use the TV networks to promote a culture of promiscuous, rampant, unchecked HD file sharing.
Sit back and laugh as the cash rolled in from selling routing equipment and hard drives.
![]() Mail article to a friend |
The Adsense ads finally make sense!!! I wonder if Google upgraded its algorithm, because the Adsense ads for this website forever were being served as "website design for $299" and crap like that. Of course, this blog is aimed at people who already make their own websites. Soooo...
Suddenly, the ads are for stuff that might interest designer. Oh, and the click-thru rate has improved. Go figure.
![]() Mail article to a friend |
Every now and then you come across a blog that is really worth passing along. Jeremy Cole's blog falls squarely in this category. Cole is the kind of MySQL guru I can only dream of being.
I came across his blog while searching for a few different approaches to solving the great issue of blacklisting incoming IP addresses from countries that post a lot of spam into websites. The main problem isn't the database of IPs and countries itself. While large it isn't impossible. It is just cumbersome if your goal is to search for ranges.
The problem comes when you're trying to push through all of those IP addresses quickly to get a fast answer. Cole's solution is novel: form the IPs into polygons and use the MySQL polygon function to determine if an IP falls within the given range. It's pretty cool, when you think about. Speedy, too. That's nice, especially for a blacklisting function, since obviously the whitelisted folks still have to be passed through before they're served any content.
Cole has quite a few other hardcore MySQL guru tips on his website, too. it is worth a further look.
![]() Mail article to a friend |
Buscar... it's an interesting word. It's Mexicanese version of "Search". It is also an important word if your website has any significant amount of Spanish language content on it.
I was surprised to see that my web stats package, when processing search queries, no lo comprende que "buscar" es el mismo typo como "search". Of course I obfuscate that in Spanglish because... well, I have issues. My apologies for butchering a language that doesn't belong to me -- I've been listening to Molotov lately, and learning Spanish from them is about the same as learning carpentry from a monkey brandishing a chainsaw.
More on-topic... I don't know why, but it just strikes me that a web server built by GoDaddy, a company based in Scottsdale, Arizona, would have some kind of Spanish-language support in handling web stats. So, if a Spanish language search engine uses "buscar" in its choice of CGI queries, those go untallied by my web stats as searches.
Maybe I'm just being snotty, but I'd like to see what folks are buscando on my websites.
I know for most readers of this blog this will be a minor inconvenience not being able to tally Spanish language queries to their websites, but I still thought it was a bit limiting.
At some point I need to build my own log analyzer anyhow. Obviously, one more thing to toss in there would be Spanish language support. Of course, if I do that, how long will it be before people request I open source it and add support for Micronesian pidgin English?
Just a matter of time.
![]() Mail article to a friend |
Over the three years I've been in business for myself, I've tried to formulate some notion of what the best recipe for all this website stuff is.
Time and again, I've seen two critical drivers for page visits.
![]() Mail article to a friend |
I've been having a discussion about the merits of SEO with someone who was seeking a link on one of my websites. Now, this guy's history with websites has been nothing but carnage going back a long way. No success at all. Yet, we have a conversation that was ever slightly adversarial on the subject.
So, in the spirit of adversity, I offer this gem... Punxsutawney Hometown. Why do I offer it? To prove a a point about the value of doing your SEO right, and to do it white hat.
The goal of this experiment is to beat his existing website in Google PageRank and search results by doing all of the search engine optimization the right friggin way.
His website -- which you can go Google "Punxsutawney Hometown" if that turns you on (sorry, but linking to him sort of defeats the control of the experiment) -- is a study in ways to not do search engine optimization.
Consider it's numerous flaws:
![]() Mail article to a friend |
2008 is the first election where the tech subculture represents a major constituency to both political parties in the United States. With the exception of John McCain, most of the major candidates are young enough to have a personal background with some experience with computers and the internet.
So, I wanted to take a look at where the top four candidates at this stage (McCain, Romney, Clinton and Obama) stand on key issues (H1-B visas, privacy, network neutrality, government transparency, piracy and internet taxes).
Not surprisingly, getting good solid answers about each candidate's position is tough. Generally candidates don't take firm positions unless those positions are known winners, a stance that usually amounts to "I like babies and America, too."
![]() Mail article to a friend |
© 2010 Pro Content and Design. All rights reserved.
Welcome!
Wonder where to start with your web design business?
This blog follows along with my efforts to build and grow a website design business, Pro Content and Design.
The goal of this blog is to fill in blanks that may be empty as you get your business rolling.
This blog, particularly the source code section, is not intended for beginners. If you are not comfortable with databases, Ajax, DOM objects and other advanced methods, I strongly suggest you go take a look over at W3 Schools before even reading -- let alone tinkering with -- any of the code here.
I hope this blog has some value to web designers as they attempt to get their businesses going.
Good luck, and happy reading.
Thank you,
John Crawford
Pro Content and Design

Coding
W3 Schools
IBM's Mastering Ajax Series
Graphic Design
Worth 1000
Stock.XCHNG
Urban Fonts
Website Software
Apache Web Server
SquirrelMail
PHP/Zend
Website Design Issues
Non-Standard Character Guide
Google Trends
Search Engine Optimization Analyzer
Business
Guy Kawasaki's Blog
Seth Godin's Blog
Freakonomics
Computers
NewEgg
My Main Website
Pro Content and Design
Websites I have built
PunxsyPage: local free classifieds website
My Webapps
TV Stations Transmitter Database