Skip to main content

Posts

Showing posts from 2010

KB976902 - "Black Hole" update

Update February 27, 2011 - Windows 7 Service Pack 1 appeared in my update queue with the checkbox unchecked. Hmm. To update or not to update?

Update January 14, 2011 - This appeared again in my Windows Updates. I figure installing it is okay now that Microsoft appears to have their ducks in a row. After the first fiasco, they probably took their time to release it correctly. This is the precursor to installing Windows 7 SP1. From Microsoft's website: "Windows 7 SP1 Release-to-Manufacturing (RTM) will be available in the first half of calendar year 2011. When released, it will be made available as an integrated release." This updates the installer in Windows 7 so it can upgrade to SP1 later. SP1 isn't available yet.

What follows is the original post.

Today, a mysterious Windows Update was released to all Windows 7 users. I'm going to preface this by saying what some Microsoft MVPs are saying: DO NOT INSTALL!

The update says, "Install this update t…

Easy Invoice Numbers

If you are building or using an e-commerce system and want to look all professional, you need invoice numbers. Invoice numbers are required, at the very least, for auditing purposes by most businesses. However, nothing says "not professional" quite like "dressing in a shirt that is flashier than a light pinstripe" or invoice numbers based solely on a MySQL 'auto_increment' field starting at '1' or, worse, a false arbitrary starting value.



Searching Google for an industry-standard practice of creating an invoice number turns up pathetic results. So this blog entry aims to correct this severe oversight of the Internet and bring it down to the level of the average programmer.

Businesses that are large enough have dedicated finance departments. These people like things to be EXTREMELY organized. If you are developing an application that is going to bring in money (e.g. an e-commerce solution), it needs to generate sequential orders that can be verifi…

Forget flock() and System V Semaphores - use WebMutex instead

While developing my latest PHP-based project, WebCron, I ran into an issue that has bothered me for a while - atomicity. An atomic operation is one where only one thread of one process is allowed to execute some piece of code. Actually, even under C/C++, I've been bothered by this issue.

Unlike Linux, Windows really has the most friendly approach to creating an environment where atomic operations may thrive. Named mutexes is one area where Windows really, truly shines above all the OSes out there. Try porting CreateMutex() to another OS and you'll inevitably have some real head-scratching sessions when you try to do a cross-process, named mutex. So-called 'mutexes' under *NIX OSes are usually 'pthread'-based, which are really more in line with Windows "critical sections" than "mutexes". A programmer coming from the Windows world is going to be utterly confused because they've been pampered by Microsoft and no one in the Linux commun…

Fixing slow Apache on localhost under Windows 7

A couple days ago, I documented my recent experience with my wireless network and how I got hacked. I briefly mentioned that I'm installing Windows 7 this time around.

Yesterday, I ran into an issue with 32-bit Apache 2.2.15 running on Windows 7 Ultimate 64-bit. This issue appears to only affect 64-bit Windows 7 and 64-bit Windows Vista web developers attempting to run 32-bit Apache on the system.

NOTE: I didn't test 64-bit Apache because that is experimental and 64-bit PHP is even more experimental. However, I doubt the results would be too different.

The issue is slow response times (anywhere from 1 to 3 seconds per request) when connecting to 'http://localhost/'. Connecting to 'http://127.0.0.1/' and 'http://[NetBIOScomputernamegoeshere]/' have fast response times. I've seen various fixes around that seem to boil down to these three:

- Disable the Windows Firewall.
- Disable IPv6 support.
- Edit the 'hosts' file.

It looks like ther…

My wireless network got hacked. Unremovable rootkit? New botnet tactic?

Edit (July 6, 2013): It has taken me almost three (3) years to come up with a secure WiFi solution since I first wrote and published this article. It is my professional and personal opinion that, outside of running 200 ft. of Ethernet (which I actually did), only a WPA2-Enterprise AES w/ EAP+TLS setup is secure. My hope is that you come to the realization that your own WiFi network is not secure as you read my story below.

I take security VERY seriously and violations of that security even more seriously. Hacking my personal networking infrastructure is near impossible. Or so I thought.

First, some background. I run...well, I used to run a wireless network access point. Yes, it is one of those consumer-grade, wireless network setups because I'm a cheapskate. The brand doesn't matter. Here's the critical bit of information: I ran the wireless access point with WPA-PSK (TKIP) using a completely random key of about 40 characters in length and a different SSID from t…

A call to open source developers: Let's eliminate ICANN.

In the field of Internet development - ICANN and Network Solutions/Verisign are eyesores. There is a very unhealthy relationship between the two organizations and ICANN holds a monopoly on the Internet as a whole by holding the domain name infrastructure hostage.

On July 1, 2010, a price hike for .COM and .NET domain names will take place (VeriSign is the sole registrar for those TLDs). That means it will cost more to purchase and maintain those type of domain names.

The core problem is the Domain Name System (DNS) as a whole. It was designed in the dark ages of the Internet by a bunch of nerds to map a name to an IP address. It was wholly owned by InterNIC, now known as ICANN through various transactions - or at least that is the best I can explain it in a single sentence. The original Internet (ARPANET) was designed to supposedly be robust in the event of nuclear war and people like it for its supposed anonymity. Basically, the Internet was a United States Department of Defense …

What I've been doing for the past year...making a CMS.

Over the past year, I have, ever so slowly, been dropping off the radar of my usual stomping grounds. Basically, I've spent the past year positioning myself in the industry to stay relevant and gear up for the next decade of software development.

Where is the software industry headed? Simply put, we are headed to a very mobile realm. What exactly that will look like is anyone's guess. What fascinates and intrigues me is always-on Internet in the palm of my hand. THAT, to me, is mobile. The problem we currently face in the mobile arena is that no one is making a device I want to program for. I willingly program in two languages: C/C++ and PHP. Since no one makes a multitouch device that I can write plain ol' C/C++ for (yet), I'm left with PHP.

To that end, I've started down a rather interesting path: This past year, I wrote my own Content Management System (CMS). For the past few years I've experimented with all sorts of lame-brained product ideas (some…

IE6 will be dead in 6 years!

IE6 will officially die six years from now (i.e. it will finally be completely dead in 2016). It is mathematically proven by this chart:



(Download Excel Spreadsheet)

The data comes from the W3C Schools browser statistics page. The "Months from 10.2% Overlap" is referring to the two points where browser usage of IE5 and IE6 were both at 10.2% (time-shifted so you can see how similar the data is). The W3C site appears to stop tracking browsers at 0.5% (I'm calling that dead). My goal with this chart is to show that the data is rather similar at this point in time.

Six years is a pretty bleak outlook. I also had Excel fit a line to the chart and came up with "y = -0.0093x + 0.085" with a R^2 of 0.9854 (a slightly better fit with the available data nodes). With the line, IE6 is declared dead by the W3C Schools' standard of 0.5% in 8.5 months. So, the real answer is probably somewhere between 8.5 months and six years. I'm leaning more toward five years.…

Pseudo-transparent 24-bit PNG in Internet Explorer - No hacks

I've been on a kick lately with transparent PNGs. Due to recent discoveries involving PNG8, it is high time to revisit the world of PNGs and see what else there is out there. In my previous article on PNG8, I discussed how to get nice-looking PNG8 images by using Photoshop and pngquant. Most articles on PNG8 only cover either Fireworks or straight-up pngquant/some other command-line tool. The results aren't that great looking.

Today, I stumbled across this website and tried it out in IE6. Surprisingly, the first 24-bit transparent PNG "worked":



Why is this interesting? Because a pink background shows up. We are all so used to that ugly gray background in IE6 that no one has stopped to think that maybe the background color can be altered. Instead, people have gone for various hacky solutions to get full transparency. Well, now there is an intermediate, no-hacks solution between the full transparency hacks and PNG8.

Here is the image I will be working with:



(This …

Transparent PNG8 is THE Solution To IE6 Transparent PNG Woes...For Photoshop Users!

IF you know what you are doing, PNG8 can be THE answer to IE6's broken support for transparent PNGs. Ironically, the web is discovering PNG8 just as we are finally phasing out IE6. If you develop for the web occasionally, you know what a pain IE6 is. I'm currently working on a very hush-hush project (hence no blog posts lately) and it is almost the last time I have to ever support IE6. After these projects, I will never, ever, EVER have to look back (woohoo!).

Background

If you do a lot of web development, you know about all of the hacks in IE6 to introduce PNG transparency. My current favorite full-blown solution to 24-bit alhpa transparent PNGs in IE6 is DD_BelatedPNG. However, even that has problems and is still a hacky workaround for a problem that shouldn't have even existed for more than two minutes. The moment it was discovered, it should have been fixed.

I initially dismissed this Transparent PNG8 approach because I wasn't going to spend $300 on a piece of …