There’s a Lot You Can Learn From 404s

So I made some changes to one of my WordPress sites recently that updated some of the URLs for some very old posts on the site. Nothing would have broken on the site itself, but if someone had posted a link directly to a post a long time ago, it could now lead to a 404 error. In fact, any reasonably-aged site could have broken links like this as things change over time.

So I thought about tracking the 404 errors with a simple script. Sure I could have accessed the server’s logs to do this. But I thought it would be easier to add some code to the 404.php page on the site and have a simple log of just the 404 errors, with just the information I needed.

Here’s the PHP code:

< ?
$url = $_SERVER["REQUEST_URI"];

$agent = "  ";
$ua = $_SERVER['HTTP_USER_AGENT'];
if (strpos($ua,"Googlebot") !== FALSE) $agent = "go";
if (strpos($ua,"bingbot") !== FALSE) $agent = "bi";
if (strpos($ua,"DuckDuckBot") !== FALSE) $agent = "du";
if (strpos($ua,"YandexBot") !== FALSE) $agent = "yb";
if (strpos($ua,"Yahoo! Slurp") !== FALSE) $agent = "ya";
if (strpos($ua,"Baiduspider") !== FALSE) $agent = "ba";
if (strpos($ua,"Sogou") !== FALSE) $agent = "so";

if ($f = fopen(ABSPATH."404log.txt","a+")) {
	fwrite($f,date("ymd H:i:s")."\t". $agent."\t". $url."\n");
	fclose($f);
}
?>

So the bulk of the code looks at the user agent and tries to tag the biggest spiders out there. I wanted to know if any of these were still looking for old links. Having a simple “go” for Google and “ya” for Yahoo was a lot easier to read than the whole big user agent string.

So then I looked at this file after a few hours. I could see that some renamed URLs were going to be a problem, so I added rewrites for those in the .htaccess file. But I also uncovered some interesting things.

First, I noticed calls for an “apple-app-site-association” file, which I was missing. Turns out this is used when an app accesses URLs on a server. I have an app that does this, but for some reason I never realized that this special file would make things work more smoothly. Here’s all the info you need about it: Support Universal Links.

Also, there were hits for apple-touch-icon, which you can read about here. Look at the section entitled “Look ma, no HTML!” to see how to make these without adding anything to your web pages. The important thing to note is that anyone can turn any web page into a bookmark that appears on the home screen of an iPhone or iPad. You don’t have to have any app, developer relationship with Apple or anything. And a home screen bookmark will look for and try to use a variety of apple-touch-icon files.

I also noticed lots and lots of hackers/bots trying to do things they shouldn’t. They are trying to directly access things inside of plug-ins that I don’t have. I can imagine that they are trying to gain access via exploits. I’m learning a lot about what they are trying to do by just looking at what they are trying to access.

On a happier note, I saw a few 404 errors for things in a “.well-known” directory. That led me to learn about about Well-Known Uniform Resource Identifiers.

It was definitely worth a look to see which URLs were creating 404 errors. I’m continuing to gather them in a log to see what else I may find.

Posted on June 22, 2017 at 6:39 pm by site admin · Permalink · Leave a comment
In: General

Everything’s Coming Up HTML5

Been working this past week on converting my second site this year from Flash to HTML5. That’s HTML5 as in really just JavaScript. I mean there is CSS and HTML involved, and even some server-side stuff. But it is really about JavaScript.

It is just too hard to run Flash these days. Most browsers block it and have you enable it on a per-side basis. Most online forums are full of hate towards it. I still love Flash — I mean Adobe Animate — and use it for iOS apps. But for web apps, I guess it is all about HTML5 now.

So this second site is Just Jigsaw Puzzles which has some challenges. The site earlier this year, Just Mah Jongg Solitaire had simple rectangular images that didn’t really move and could be loaded directly from image files. With jigsaws I had to take the image and cut it into pieces using the Canvas. Lots of bezier curves and experimentation. But I got it to work and I am amazed at how fast the Canvas is. I hope to have the new version in beta in a few days.

My hope is that the conversion to HTML5 gives these sites new life. I have a feeling that Flash has been driving away users and muting search engine results.

But I also know that people hate change. The first week of the release of my Mah Jongg HTML5 version was just a constant stream of angry email from people who “didn’t like” the new version. This was despite the fact I tried to match the Flash version feature-for-feature and add some new stuff and improvements everywhere I could. People just don’t like change. It is also funny about how people complain about free stuff.

It is interesting that I surveyed the current users of Just Jigsaw Puzzles and found that when I asked “What do you think of Flash,” 64% replied “I don’t know what Flash is.” The audience skews older, with 94% being 60 or older. Most likely a lot of retired people who don’t necessarily care what the technology is behind the game. They just want to play. That’s how it should be. Oh, and 13% responded “I like Flash,” 20% “I don’t care” and only 3% said they avoid Flash sites. Contrast that with the hatred spewed in online forums.

Posted on June 16, 2017 at 11:50 am by site admin · Permalink · Leave a comment
In: General

Introducing AskAny.com


For the last 20 years I have created web-based games, produced video podcasts and tutorials, written computer books, and developed mobile apps. But I hope my next project overshadows all of that and becomes my legacy.
The Internet has allowed us to connect with each other in many ways. There’s the one-to-one of email and messaging and the one-to-many of web publishing and social networking.
Another way to connect is through question-and-answer sites. Some people use their own web sites to answer questions. Discussion forums and social networks provide a make-shift way to ask an individual questions. There are also sites that focus on one question at a time, allowing multiple people to chime in with answers.
My new site is AskAny.com. The idea is simple: you introduce yourself and some aspect of your life. Maybe it is your job (I am a firefighter), maybe it is your hobby (I collect comic books), perhaps something you have experienced (I was at the March on Washington), or some other aspect of yourself (I run marathons with a prosthetic leg).
Others visit the page you created and can ask you questions. You then answer the questions and spread knowledge and understanding. AskAny.com is a way for people to connect and learn about others.
I am making two assumptions in creating AskAny.com. But I think they are pretty safe assumptions.
The first is that people like to talk about themselves and things that interest them.
This could be for promotional purposes, such as plugging their new blog, website or startup. This could also be because a person feels it is important to spread information about a situation or cause, such as surviving cancer or wildlife conservation. Or it could simply be because someone is passionate about something, such as playing music or following a sports team.
The second assumption is that people are curious about others and the world around them. I hope that they see these pages and want to ask questions.
On a page titled “I am a firefighter” I want people to ask things like: “What was your most dangerous rescue?” or “How do I become a firefighter” or “Do you have a dalmation at your fire station?”
So here’s more about the site. First you create an account and then can create one or multiple pages if you wish. For instance, you can have one about your job and also one about your hobby.
If you have something to promote, then promote it! Bloggers are often told to promote their sites by guest blogging or posting to forums. But the first is difficult as popular blogs are innundated with requests for guest posts, and the second feels spammy. I encourage bloggers to use AskAny.com to promote themselves. If you have a parenting blog, then create a page “I am a parenting expert” at AskAny.com and include a link to your blog. I’ve even provided a space for a website link and Twitter handle at the top of every page.
Every page at AskAny.com has a unique URL. So http://askany.com/creator/ is one of my pages. No one else can have the page URL “creator.” So if a name is important to you, then you’ll want to create that page now. And use it, of course, as inactive pages will be recycled.
Another thing about your pages is that you have much more control than you do with discussion forum sites. If someone asks you an innapropriate question, you can simply delete it.
I want pages to live long lives, or even forever. So instead of answering questions for an hour or a day, the idea is you can answer a question here and there for days, weeks or even years.
There is also a voting system. So pages, questions, answers and comments can be “liked.” Pages with a lot of activity will appear on the front page of the site.
Feel free to give AskAny.com a try right now. The site is still in beta, but I’ve left it open to the public to allow my friends to use it during development. Use the contact link at the bottom of the site to let me know what you think.

Posted on November 17, 2015 at 10:54 am by site admin · Permalink · 2 Comments
In: General

Apple Cars? Maybe It Is All About the Batteries.

The weird Apple rumor of the week is that Apple is getting into the car business. First, some articles pointed to some minivans with cameras that were registered to Apple and postulated that Apple was taking pictures to enhance Apple Maps. Others thought that this was perhaps a self-driving car, like what Google has been developing. Then sources started to report odd tensions between Apple and electric car manufacturer Tesla Motors and came up with the idea that Apple was developing an electric car.
Now let’s not forget that there are still far more reasonable rumors out there, like an Apple television, that haven’t even come around yet. Chances are that an Apple car exists only in the imaginations of Apple bloggers looking for something to write about. It is far more likely that the vehicles in question are being used to test CarPlay, the iPhone Maps app or other things that need to be tested in real cars in the real world.
But lets have some fun and assume that Apple is really developing a car. Where does that take us?
The first thing that comes to mind is: why? Why is Apple, a computer company, developing an automobile? That seems completely outside of their wheelhouse. The dashboard touchscreen for a car? Sure. More ways to connect the iPhone to cars? Sure. But a whole car?
Consider that Apple invests a ton of money, people and time into research and development. Deep down in Apple’s labs there are probably thousands of inventions and gadgets that Apple is working on, most that will never see the light of day. But they are all worth it for the bits and pieces (and patents) that do pay off.
Without a doubt, one of the areas of research must have to do with batteries. Apple uses batteries in most of its products. They need them to be smaller, hold more power, charge faster and improve in ways that people aren’t even thinking about. Better batteries means better products for Apple all around. Plus, if they can develop and patent a better battery, all of their products could jump very far ahead of the competition.
I’m not talking about a small improvement. I’m not talking about an evolution. I’m talking about a true revolution in battery technology. Physics tells us that this is possible because of the enormous amount of energy that can theoretically be stored in a single atom.
So lets assume that the battery R&D group at Apple comes up with a revolutionary battery. It is a fraction of the size of today’s best, charges instantly, and costs almost nothing.
They could turn around and put that into the next iPhone and leave Samsung in the dust. But the battery wouldn’t just be used in phones and computers, it would be used anywhere mobile power is needed. And the biggest need for a battery like that would be in cars. I mean, phones are already small and portable. They would just be more so. But electric cars would suddenly be so much more sensible than gasoline-powered vehicles that the industry would change overnight.
Now Apple doesn’t develop technology and license it out. If they have a battery like this, they wouldn’t think: Hey, we can sell this to Tesla and other car makers. That’s not what Apple does. Being the richest company in the world, they can easily start their own car manufacturing branch and come out with their own car. And with the patent on a battery like this, they would be the only ones who could sell anything like it.
After all, it isn’t like the current crop of car manufacturers make vehicles that work flawlessly and last forever, right? And it isn’t like there is any secret to how they make and sell cars. Why license patents for money when Apple can take over yet another industry?

Posted on February 14, 2015 at 4:00 pm by site admin · Permalink · 2 Comments
In: General

Why I’m Trying the Freemium Model With Starship Captain

My biggest app game ever, Starship Captain, launched today. It is a throw-back to the strategy/adventure games I created earlier in my career, Space Pirate and Rebel Dawn. But with the old comes something new: a new revenue model to try out.
“Freemium” is a term used to describe an app that is free to download, but has in-app purchases that you can buy. Some freemium games are little more than trial versions of themselves until you make the purchase. Others can be played in full, but in-app purchases make it easier to advance or speed up parts of the game. I’m going with the later model, which is used in a lot of games from Clash of the Clans to Candy Crush.
In Starship Captain, the planets on the map are grouped into clusters. You can travel to nearby planets with hyperspace warp jumps that take less than a minute to complete. But to jump to a planet in another cluster, it can take anywhere from 45 minutes to 12 hours. Still beats the hundreds of years it would take to do it in real life, though!
If you want to speed up jumps, you can use “relativity crystals” in the game. Each crystal equals one hour of time. You get 20 crystals to start. You can purchase more.


It was important to me that you would be able to play the game without paying anything. I do this all the time with these kinds of games. I just start a long process, like upgrades or buildings, in the evening and then let the process finish overnight. The same can be done with Starship Captain. You can plan your long jumps for the end of the day, and then resume playing in the morning.
Most of my games use advertising as the revenue model. You can get them for free, and there are no in-app purchases. I have a few games that have no ads in them and you pay for more content (jigsaw puzzles, Push Around levels). I have a few where you just pay up-front.
But if you are a developer and follow various blogs and discussions that go on in the industry, you hear that the freemium model is the best one. Just look at the “top grossing” list in the iTunes store. They are mostly freemium games. So it was about time I tried this model.
One of the big downsides to this model is the hate I will get. Some people get absolutely furious when they see a game use this model. In fact, within hours of launching the game I received my first anonymous hate email about it.
Of course people would prefer that games be free, with no in-app purchases and no ads. That would be nice. But that’s not realistic. I have bills to pay and mouths to feed just like everyone else.
My “job” is to create these apps. And just like other people want to get paid as much money as possible to do their job, I want to make as much money as possible doing mine. So I’ve got to look at the ways these apps make money and figure out what will do the best.
The argument most haters use is that they would rather pay upfront for the game than have in-app purchases. I like that idea too. But it isn’t the way reality works. App developers have tried and tested these and find that the freemium model works better, way better. No matter how many people say they would have rather purchased the game, the truth is that they wouldn’t have purchased it. Developers have tracked this. I’ve seen it myself.
Maybe one person saying that is telling the truth. Fine. But that $2.99 is not going to pay the bills. There would need to be thousands of people buying the game for it to make fiscal sense. And unless you have a huge marketing budget or a big brand, that isn’t going to happen.
And there is an upside to the freemium model for users too. People really do get to try the game before they spend any money on it. They may not think of it as a try-before-buy, but it works that way for them if they want to see it like that.
So I am trying the freemium model for on simple reason: I want Starship Captain to succeed. I want lots of people to play it and to have a nice revenue stream. I want the revenue to be good enough so I can justify spending time updating the game. I want to add to it, improve it and expand it. But that will only happen if the bottom line looks good. And the best chance of that, is to make the game freemium.

Posted on February 12, 2015 at 11:08 am by site admin · Permalink · 5 Comments
In: General